-
Notifications
You must be signed in to change notification settings - Fork 37
/
truffle.js
68 lines (65 loc) · 1.66 KB
/
truffle.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
const path = require("path");
const dotenv = require('dotenv').config();
const HDWalletProvider = require('truffle-hdwallet-provider');
const mnemonic = process.env.ETHEREUM_ACCOUNT_MNEMONIC;
module.exports = {
api_keys: {
etherscan: process.env.ETHERSCAN_API_KEY
},
plugins: [
'truffle-plugin-verify'
],
networks: {
mainnet: {
provider: function() {
return new HDWalletProvider(mnemonic, process.env.INFURA_ENDPOINT);
},
network_id: '1',
gasPrice: 4100000000, // 4.1 gwei
skipDryRun: true,
},
kovan: {
provider: function() {
return new HDWalletProvider(mnemonic, process.env.KOVAN_INFURA_ENDPOINT, 0, 15);
},
network_id: '42',
gas: 8000000,
gasPrice: 3000000000,
// skipDryRun: true,
},
rinkeby: {
provider: function() {
return new HDWalletProvider(mnemonic, process.env.RINKEBY_INFURA_ENDPOINT, 0, 10);
},
network_id: '4',
},
test: {
provider: function() {
return new HDWalletProvider(mnemonic, 'http://127.0.0.1:8545/');
},
network_id: '*',
},
development: {
host: "127.0.0.1", // Localhost (default: none)
port: 8545, // Standard Ethereum port (default: none)
network_id: "*", // Any network (default: none)
}
},
compilers: {
solc: {
version: "0.5.7",
settings: {
optimizer: {
enabled: true,
runs: 20000
},
}
}
},
api_keys: {
etherscan: process.env.ETHERSCAN_API_KEY
},
plugins: [
'truffle-plugin-verify'
]
}