forked from wearekickback/contracts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtruffle-config.js
100 lines (96 loc) · 2.88 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
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
const { mnemonic, infuraKey, etherscanApiKey } = require('./.deployment.js')
const HDWalletProvider = require('@truffle/hdwallet-provider')
module.exports = {
networks: {
development: {
host: "localhost",
port: 8545,
gas: 6712388,
// gasPrice: 2000000000, // 1 gwei
network_id: "*"
},
docker: {
host: "host.docker.internal",
port: 8545,
gas: 6712388,
// gasPrice: 2000000000, // 1 gwei
network_id: "*"
},
test: {
host: "localhost",
port: 8545,
network_id: "*",
gasPrice: 0x01
},
coverage: {
host: "localhost",
network_id: "*",
port: 8555, // <-- If you change this, also set the port option in .solcover.js.
gas: 0xfffffffffff, // <-- Use this high gas value
gasPrice: 0x01 // <-- Use this low gas price
},
rinkeby: {
provider: (num_addresses = 1) => new HDWalletProvider(mnemonic, `https://rinkeby.infura.io/v3/${infuraKey}`, 0, num_addresses),
gasPrice: 50000000000, // 50 gwei,
network_id: 4
},
ropsten: {
provider: (num_addresses = 1) => new HDWalletProvider(mnemonic, `https://ropsten.infura.io/v3/${infuraKey}`, 0, num_addresses),
gasPrice: 50000000000, // 50 gwei,
network_id: 3
},
kovan: {
provider: (num_addresses = 1) => new HDWalletProvider(mnemonic, `https://kovan.infura.io/v3/${infuraKey}`, 0, num_addresses),
gasPrice: 10000000000, // 10 gwei,
network_id: 42
},
xdai: {
provider: (num_addresses = 1) => new HDWalletProvider(mnemonic, `https://dai.poa.network`, 0, num_addresses),
gasPrice: 0x01, // <-- Use this low gas price
network_id: 100
},
polygon: {
provider: (num_addresses = 1) => new HDWalletProvider(mnemonic, `https://rpc-mainnet.maticvigil.com/v1/${infuraKey}`, 0, num_addresses),
gasPrice: 1000000000, // 1 gwei
network_id: 137
},
mumbai:{
provider: (num_addresses = 1) => new HDWalletProvider(mnemonic, `https://rpc-mumbai.maticvigil.com/v1/${infuraKey}`, 0, num_addresses),
gasPrice: 1000000000, // 1 gwei
network_id: 80001
},
mainnet: {
// gas: 5000000,
provider: (num_addresses = 1) => new HDWalletProvider(mnemonic, `https://mainnet.infura.io/v3/${infuraKey}`, 0, num_addresses),
gasPrice: 1000000000, // 1 gwei
port: 8545,
network_id: 1,
confirmations: 20,
}
},
plugins: [
'truffle-plugin-verify'
],
api_keys: {
etherscan: etherscanApiKey
},
mocha: {
reporter: 'eth-gas-reporter',
reporterOptions : {
currency: 'USD',
gasPrice: 1
},
timeout: 300000,
},
compilers: {
solc: {
version: "0.5.11",
settings: {
optimizer: {
enabled: true
},
evmVersion: 'petersburg' // Important, see https://github.com/trufflesuite/truffle/issues/2416
}
}
}
}