-
Notifications
You must be signed in to change notification settings - Fork 2
/
hardhat.config.js
68 lines (67 loc) · 1.45 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
require("@nomicfoundation/hardhat-toolbox");
require('@nomiclabs/hardhat-truffle5');
require("hardhat-abi-exporter");
require("hardhat-deploy");
require("hardhat-deploy-ethers");
real_accounts = undefined;
if(process.env.OWNER_KEY) {
real_accounts = [process.env.OWNER_KEY];
}
module.exports = {
solidity: {
compilers: [
{
version: '0.8.17',
settings: {
optimizer: {
enabled: true,
runs: 10000,
},
},
},
],
},
abiExporter: {
path: './build/contracts',
clear: true,
flat: true,
spacing: 2
},
networks: {
goerli: {
url: `https://goerli.infura.io/v3/${process.env.INFURA_ID}`,
tags: ["test", "use_root"],
chainId: 5,
accounts: real_accounts,
// gasPrice: 30567057697 // 如果线上拥堵可能要调高gas
},
ethwmainnet: {
url: `https://mainnet.ethereumpow.org`,
tags: ["use_root"],
chainId: 10001,
accounts: real_accounts
},
mainnet: {
url: `https://mainnet.infura.io/v3/${process.env.INFURA_ID}`,
tags: ["use_root"],
chainId: 1,
accounts: real_accounts,
},
rinkeby: {
url: `https://rinkeby.infura.io/v3/${process.env.INFURA_ID}`,
chainId: 4,
accounts: real_accounts,
}
},
namedAccounts: {
deployer: {
default: 0,
},
owner: {
default: 0, //先默认同一个
},
visitor: {
default: 2
}
},
};