-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathtruffle-config.js
51 lines (46 loc) · 1.11 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
require('@babel/register')
require('@babel/polyfill')
require('dotenv').config();
const HDWalletProvider = require('@truffle/hdwallet-provider')
const createWalletProvider = (mnemonic, rpcEndpoint) =>
new HDWalletProvider(mnemonic, rpcEndpoint)
const createInfuraProvider = (network = 'mainnet') =>
createWalletProvider(
process.env.MNEMONIC || '',
`https://${network}.infura.io/v3/${process.env.INFURA_API_KEY}`
)
module.exports = {
plugins: ["solidity-coverage"],
compilers: {
solc: {
version: "0.6.8"
}
},
networks: {
development: {
host: 'localhost',
port: 8545,
gas: 5500000,
gasPrice: 5e9,
network_id: '*'
},
infura_ropsten: {
provider: () => createInfuraProvider('ropsten'),
gas: 6500000,
gasPrice: 500e9,
network_id: 3
},
infura_goerli: {
provider: () => createInfuraProvider('goerli'),
gas: 8000000,
gasPrice: 1e9,
network_id: 5
},
infura_mainnet: {
provider: () => createInfuraProvider('mainnet'),
gas: 5500000,
gasPrice: 40e9,
network_id: 1
}
}
}