-
Notifications
You must be signed in to change notification settings - Fork 2
/
hardhat.config.js
69 lines (65 loc) · 1.56 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
require("@nomiclabs/hardhat-waffle");
require("hardhat-contract-sizer");
require("hardhat-gas-reporter");
require("@nomiclabs/hardhat-etherscan");
require("dotenv").config();
task("accounts", "Prints the list of accounts", async () => {
const accounts = await ethers.getSigners();
for (const account of accounts) {
console.log(account.address);
}
});
module.exports = {
solidity: {
compilers: [
{
version: "0.8.11",
settings: {
optimizer: {
enabled: true,
runs: 1000,
},
},
},
],
},
loggingEnabled: true,
contractSizer: {
alphaSort: true,
runOnCompile: true,
disambiguatePaths: false,
},
gasReporter: {
enabled: true,
},
defaultNetwork: "localhost",
networks: {
localhost: {
url: "http://localhost:8545",
},
hardhat: {
forking: {
url:
"https://polygon-mainnet.g.alchemy.com/v2/" + process.env.ALCHEMY_API,
blockNumber: 19872200,
},
accounts: {
accountsBalance: "1000000000000000000000000", //1 million ETH to signers
},
gasPrice: 0,
},
mumbai: {
url: "https://polygon-mumbai.g.alchemy.com/v2/" + process.env.ALCHEMY_API,
accounts: [`${process.env.MUMBAI_DEPLOYER_PRIV_KEY}`],
chainId: 80001,
},
polygon: {
url: "https://matic-mainnet.chainstacklabs.com" + process.env.ALCHEMY_API,
accounts: [`${process.env.POLYGON_DEPLOYER_PRIV_KEY}`],
chainId: 137,
},
},
etherscan: {
apiKey: process.env.ETHERSCAN_API_KEY,
},
};