-
Notifications
You must be signed in to change notification settings - Fork 0
/
hardhat.config.js
57 lines (55 loc) · 1.12 KB
/
hardhat.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/** @type import('hardhat/config').HardhatUserConfig */
require('dotenv').config();
require("@nomicfoundation/hardhat-toolbox");
require("@nomicfoundation/hardhat-chai-matchers");
require("@nomiclabs/hardhat-truffle4");
const {
POLYGON_API_URL,
AMOY_API_URL,
METAMASK_PRIVATE_KEY,
POLYGONSCAN_API_KEY
} = process.env;
module.exports = {
solidity: {
version: "0.8.24",
settings: {
optimizer: {
enabled: true,
runs: 200
},
viaIR: true,
}
},
defaultNetwork: "hardhat",
networks: {
hardhat: {
chainId: 1337
},
polygon: {
url: POLYGON_API_URL,
chainId: 137,
accounts: [`0x${METAMASK_PRIVATE_KEY}`]
},
amoy: {
url: AMOY_API_URL,
chainId: 80002,
accounts: [`0x${METAMASK_PRIVATE_KEY}`]
}
},
sourcify: {
enabled: false
},
etherscan: {
apiKey: POLYGONSCAN_API_KEY,
customChains: [
{
network: "Polygon Amoy",
chainId: 80002,
urls: {
apiURL: "https://api-amoy.polygonscan.com/api",
browserURL: 'https://amoy.polygonscan.com'
}
}
]
},
};