-
Notifications
You must be signed in to change notification settings - Fork 3
/
hardhat.config.ts
147 lines (143 loc) · 3.45 KB
/
hardhat.config.ts
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
import { task } from "hardhat/config";
import "hardhat-gas-reporter";
import 'hardhat-contract-sizer';
import "@nomiclabs/hardhat-ethers";
import "@nomiclabs/hardhat-waffle";
import "hardhat-typechain";
import "@typechain/ethers-v5";
import '@openzeppelin/hardhat-upgrades';
import 'hardhat-spdx-license-identifier';
import '@nomiclabs/hardhat-etherscan';
import 'dotenv/config';
// This is a sample Hardhat task. To learn how to create your own go to
// https://hardhat.org/guides/create-task.html
task("accounts", "Prints the list of accounts", async (args, hre) => {
const accounts = await hre.ethers.getSigners();
for (const account of accounts) {
console.log(account.address);
}
});
// You need to export an object to set up your config
// Go to https://hardhat.org/config/ to learn more
/**
* @type import('hardhat/config').HardhatUserConfig
*/
export default {
networks: {
mainnet: {
chainId: 1,
url: `https://mainnet.infura.io/v3/${process.env.INFURAKEY}`,
gasPrice: 65000000000,
accounts: {
mnemonic:process.env.MNEMONIC
}
},
ropsten: {
chainId: 3,
url: `https://ropsten.infura.io/v3/${process.env.INFURAKEY}`,
gasPrice: 65000000000,
accounts: {
mnemonic:process.env.MNEMONIC
}
},
rinkeby: {
chainId: 4,
url: `https://rinkeby.infura.io/v3/${process.env.INFURAKEY}`,
gasPrice: 65000000000,
accounts: {
mnemonic:process.env.MNEMONIC,
count:parseInt(`${process.env.ACCOUNTS}`)
}
},
bsc_mainnet: {
chainId: 56,
url: process.env.URL_BSC,
gasPrice: 5000000000,
accounts: {
mnemonic:process.env.MNEMONIC
}
},
bsc_testnet: {
chainId: 97,
url: process.env.URL_TESTNET_BSC,
gasPrice: 50000000000,
accounts: {
mnemonic:process.env.MNEMONIC,
count:parseInt(`${process.env.ACCOUNTS}`)
}
},
moonbase: {
// Need to go to Dicord channel and get DEV (coin in Moonbase Alphanet)
// And Verify Procedure in https://docs.moonbeam.network/networks/testnet/
// Faucet https://docs.moonbeam.network/getting-started/testnet/faucet/
// And Explorer https://moonbase-blockscout.testnet.moonbeam.network/ (Recommend this, https://moonbase.subscan.io/ is too early)
chainId: 1287,
url: process.env.URL_MOONBEAM_TESTNET,
gasPrice: 50000000000,
accounts: {
mnemonic:process.env.MNEMONIC
}
},
localhost: {
url: "http://127.0.0.1:8545",
gasPrice: 35000000000,
blockGasLimit: 149000000
},
hardhat: {
gasPrice: 35000000000,
blockGasLimit: 149000000,
chainId: 31337,
accounts: {
mnemonic:process.env.MNEMONIC,
count:parseInt(`${process.env.ACCOUNTS}`)
}
}
},
solidity: {
version: "0.8.4",
settings: {
optimizer: {
enabled: true,
runs: 500
}
}
},
paths: {
sources: "./contracts",
tests: "./test",
cache: "./cache",
artifacts: "./artifacts"
},
mocha: {
timeout: 20000
},
gasReporter: {
currency: 'USD',
gasPrice: 35,
coinmarketcap: process.env.COINMARKETCAP_API_KEY,
maxMethodDiff: 10,
excludeContracts: ['ERC20Token.sol', 'OmniTokenV1.sol', 'OmniTokenV2.sol']
},
contractSizer: {
alphaSort: true,
runOnCompile: true,
disambiguatePaths: false,
},
etherscan: {
// Your API key for Etherscan
// Obtain one at https://etherscan.io/
// apiKey: process.env.ETHERSCAN_API_KEY
apiKey: process.env.BSCSCAN_API_KEY
},
spdxLicenseIdentifier: {
overwrite: true,
runOnCompile: true,
},
abiExporter: {
path: './data/abi',
clear: true,
flat: true,
only: [],
spacing: 2
}
};