-
Notifications
You must be signed in to change notification settings - Fork 3
/
hardhat.config.js
61 lines (57 loc) · 1.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
require("dotenv").config();
require("@nomiclabs/hardhat-etherscan");
require("@nomiclabs/hardhat-waffle");
require("solidity-coverage");
const PRIVATE_KEY = process.env.PRIVATE_KEY;
task("accounts", "Prints the list of accounts", async (taskArgs, hre) => {
const accounts = await hre.ethers.getSigners();
for (const account of accounts) {
console.log(account.address);
}
});
module.exports = {
networks: {
localhost: {
url: "http://localhost:8545", // uses account 0 of the hardhat node to deploy
},
hardhat: {
forking: {
url: `https://polygon-rpc.com`
}
},
matic: {
url: 'https://polygon-rpc.com',
accounts: [`0x${PRIVATE_KEY}`],
gasPrice: 30000000000, //30 gwei
},
mumbai: {
url: `https://matic-mumbai.chainstacklabs.com`,
accounts: [`0x${PRIVATE_KEY}`],
gasPrice: 30000000000, //30 gwei
},
},
solidity: {
compilers: [
{
version: "0.7.6",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
],
},
etherscan: {
// Your API key for Etherscan
// Obtain one at https://etherscan.io/
apiKey: process.env.ETHERSCAN_API_KEY,
},
paths: {
sources: "./contracts",
tests: "./test",
cache: "./cache",
artifacts: "./artifacts",
},
};