-
Notifications
You must be signed in to change notification settings - Fork 1
/
hardhat.config.js
60 lines (54 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
require("@nomiclabs/hardhat-ethers");
require('@openzeppelin/hardhat-upgrades');
require("@nomiclabs/hardhat-ganache");
require("@nomiclabs/hardhat-web3");
require('hardhat-abi-exporter');
require("@nomiclabs/hardhat-etherscan");
const {
POLYGON_TESTNET_PRIVATE_KEY,
POLYGON_MAINNET_PRIVATE_KEY,
POLYGONSCAN_API_KEY
} = require('./.secrets.json');
task("accounts", "Prints accounts", async (_, { web3 }) => {
console.log(await web3.eth.getAccounts());
});
/**
* @type import('hardhat/config').HardhatUserConfig
*/
module.exports = {
solidity: {
version: "0.8.4", // Fetch exact version from solc-bin (default: truffle's version)
settings: { // See the solidity docs for advice about optimization and evmVersion
optimizer: {
enabled: true,
runs: 1337
}
}
},
paths: {
sources: "./contracts",
tests: "./test",
cache: "./cache",
artifacts: "./artifacts"
},
networks: {
hardhat: {
},
polygontestnet: {
url: "https://rpc-mumbai.maticvigil.com/",
accounts: POLYGON_TESTNET_PRIVATE_KEY,
gasPrice: 8000000000
},
polygonmainnet: {
url: "https://rpc-mainnet.maticvigil.com/",
accounts: POLYGON_MAINNET_PRIVATE_KEY,
gasPrice: 8000000000
},
},
etherscan: {
apiKey: POLYGONSCAN_API_KEY
},
mocha: {
timeout: 200000
}
};