-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathhardhat.config.js
72 lines (71 loc) · 2.34 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/**
* @type import('hardhat/config').HardhatUserConfig
*/
require('dotenv').config();
require("@nomiclabs/hardhat-ethers");
require("@nomiclabs/hardhat-etherscan");
require("@nomiclabs/hardhat-web3");
require("@nomiclabs/hardhat-waffle");
const { API_URL, API_URL_KOVAN, API_URL_RINKEBY, API_URL_POLYGON, POLYSCAN_API_KEY, PRIVATE_KEY, PRIVATE_KEY_TV, BIDDER1_PRIV, BIDDER2_PRIV, BIDDER3_PRIV, BIDDER4_PRIV, DEPLOYER_PRIV } = process.env;
module.exports = {
solidity: {
version: "0.8.0",
settings: {
optimizer: {
enabled: true,
runs: 1000
}
}
},
defaultNetwork: "polygon",
networks: {
hardhat: {
chainId: 1337,
accounts: [
{ privateKey: `0x${DEPLOYER_PRIV}`, balance: "10000000000000000000000"},
{ privateKey: `0x${PRIVATE_KEY}`, balance: "10000000000000000000000"},
{ privateKey: `0x${BIDDER1_PRIV}`, balance: "10000000000000000000000"},
{ privateKey: `0x${BIDDER2_PRIV}`, balance: "10000000000000000000000"},
{ privateKey: `0x${BIDDER3_PRIV}`, balance: "10000000000000000000000"},
{ privateKey: `0x${BIDDER4_PRIV}`, balance: "10000000000000000000000"},
{ privateKey: `0x${PRIVATE_KEY_TV}`, balance: "10000000000000000000000"}
],
forking: {
url: API_URL_POLYGON,
blockNumber: 52922328 // assumes polygon fork
},
timeout: 400000000,
loggingEnabled: true,
gasMultiplier: 5,
gasPrice: 1000000000 * 7
},
kovan: {
url: API_URL_KOVAN,
accounts: [`0x${PRIVATE_KEY}`],
gasMultiplier: 3,
gasPrice: 1000000000 * 2
},
rinkeby: {
url: API_URL_RINKEBY,
accounts: [`0x${PRIVATE_KEY}`],
gasMultiplier: 4,
gasPrice: 1000000000 * 6
},
mumbai: {
url: API_URL,
accounts: [`0x${DEPLOYER_PRIV}`],
gasMultiplier: 3,
gasPrice: 1000000000 * 2
},
polygon: {
url: API_URL_POLYGON,
accounts: [`0x${DEPLOYER_PRIV}`]
}
},
etherscan: {
apiKey: POLYSCAN_API_KEY
}
}
// npx hardhat verify --network mumbai 0x63595e55f9050385C77D61AFF198f7ac6103b8da
// npx hardhat node --fork https://polygon-mainnet.g.alchemy.com/v2/Ptsa6JdQQUtTbRGM1Elvw_ed3cTszLoj --max-memory 9000 --fork-block-number 27336220
//