-
Notifications
You must be signed in to change notification settings - Fork 8
/
truffle-config.js
66 lines (63 loc) · 1.3 KB
/
truffle-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
const dotenv = require('dotenv');
const HDWalletProvider = require('@truffle/hdwallet-provider');
dotenv.config();
const infuraProvider = (network) => {
return new HDWalletProvider(
process.env.MNEMONIC,
`https://${network}.infura.io/v3/${process.env.INFURA_PROJECT_ID}`
)
}
module.exports = {
networks: {
development: {
host: "127.0.0.1",
port: 7545,
network_id: "*"
},
test: {
host: "127.0.0.1",
port: 7545,
network_id: "*"
},
goerli: {
provider: infuraProvider('goerli'),
network_id: '5',
gas: 7000000,
gasPrice: 5000000000, // 5 gwei
skipDryRun: true
},
mainnet: {
provider: infuraProvider('mainnet'),
network_id: '1',
gas: 7000000,
gasPrice: 50000000000, // 50 gwei
timeoutBlocks: 9999,
skipDryRun: true
},
},
compilers: {
solc: {
version: "0.7.1",
settings: {
optimizer: {
enabled: true,
runs: 1500
}
}
}
},
mocha: {
reporter: 'eth-gas-reporter',
reporterOptions : {
currency: 'USD',
coinmarketcap: '793664cd-7f8f-470f-867b-9de05f7d411d',
gasPrice: 20
}
},
api_keys: {
etherscan: process.env.ETHERSCAN_API_KEY
},
plugins: [
'truffle-plugin-verify'
]
};