-
Notifications
You must be signed in to change notification settings - Fork 7
/
hardhat-deploy.config.js
83 lines (81 loc) · 1.81 KB
/
hardhat-deploy.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
73
74
75
76
77
78
79
80
81
82
83
/* hardhat-deploy.config.js */
require('@babel/register');
require('@babel/polyfill');
require('hardhat-gas-reporter');
require('@nomiclabs/hardhat-waffle');
require('@nomiclabs/hardhat-truffle5');
require('@nomiclabs/hardhat-etherscan');
require('@nomiclabs/hardhat-ethers');
require('@nomiclabs/hardhat-web3');
require('dotenv-safe').config();
const {
RINKEBY_API_URL,
GOERLI_API_URL,
MAINNET_API_URL,
MUMBAI_API_URL,
MATIC_API_URL,
RINKEBY_PRIVATE_KEY,
GOERLI_PRIVATE_KEY,
MAINNET_PRIVATE_KEY,
MUMBAI_PRIVATE_KEY,
MATIC_PRIVATE_KEY,
KOVAN_API_URL,
KOVAN_PRIVATE_KEY,
} = process.env;
module.exports = {
defaultNetwork: 'hardhat',
networks: {
hardhat: {
chainId: 1337,
},
localhost: {
url: 'http://127.0.0.1:8545',
// over-ride chain ID to allow MetaMask to connect to localhost:8545
// see https://hardhat.org/metamask-issue.html
chainId: 1337,
},
rinkeby: {
url: RINKEBY_API_URL,
chainId: 4,
gas: 'auto',
gasPrice: 2000000000, // 2 gwei
accounts: [RINKEBY_PRIVATE_KEY],
},
goerli: {
url: GOERLI_API_URL,
chainId: 5,
// gas: "auto",
gasPrice: 1000000000, // 1 gwei
accounts: [GOERLI_PRIVATE_KEY],
},
mainnet: {
url: MAINNET_API_URL,
chainId: 1,
gasPrice: 80000000000, // 120gwei
accounts: [MAINNET_PRIVATE_KEY],
},
mumbai: {
url: MUMBAI_API_URL,
accounts: [MUMBAI_PRIVATE_KEY],
},
kovan: {
url: KOVAN_API_URL,
gas: 'auto',
gasPrice: 1000000000, // 1 gwei
accounts: [KOVAN_PRIVATE_KEY],
},
matic: {
url: MATIC_API_URL,
accounts: [MATIC_PRIVATE_KEY],
},
},
solidity: {
version: '0.8.7',
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
};