-
Notifications
You must be signed in to change notification settings - Fork 0
/
truffle-config.js
81 lines (80 loc) · 2.16 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
require('dotenv-flow').config();
const HDWalletProvider = require("@truffle/hdwallet-provider");
var Web3 = require('web3');
module.exports = {
compilers: {
solc: {
version: '0.6.12', // Fetch exact version from solc-bin (default: truffle's version)
settings: { // See the solidity docs for advice about optimization and evmVersion
optimizer: {
enabled: true,
runs: 200
},
evmVersion: "istanbul"
}
},
},
plugins: [
'truffle-plugin-verify'
],
api_keys: {
etherscan: process.env.ETHERSCAN_API_KEY
},
networks: {
mainnet: {
network_id: '1',
provider: () => new HDWalletProvider(
[process.env.DEPLOYER_PRIVATE_KEY],
"https://mainnet.infura.io/v3/" + process.env.MAINNET_INFURA_API_KEY,
0,
1,
),
gasPrice: Number(process.env.GAS_PRICE),
gas: 8000000,
from: process.env.DEPLOYER_ACCOUNT,
timeoutBlocks: 8000,
},
kovan: {
network_id: '42',
provider: () => new HDWalletProvider(
[process.env.DEPLOYER_PRIVATE_KEY],
"wss://kovan.infura.io/ws/v3/" + process.env.KOVAN_INFURA_API_KEY,
0,
1,
),
gasPrice: 1000000000, // 1 gwei
gas: 8000000,
from: process.env.DEPLOYER_ACCOUNT,
timeoutBlocks: 500,
networkCheckTimeout: 1000000,
},
ropsten: {
network_id: '3',
provider: () => new HDWalletProvider(
[process.env.DEPLOYER_PRIVATE_KEY],
"wss://ropsten.infura.io/ws/v3/" + process.env.ROPSTEN_INFURA_API_KEY,
0,
1,
),
gasPrice: 10000000000, // 10 gwei
gas: 8000000,
from: process.env.DEPLOYER_ACCOUNT,
timeoutBlocks: 500,
networkCheckTimeout: 1000000,
},
rinkeby: {
network_id: '4',
provider: () => new HDWalletProvider(
[process.env.DEPLOYER_PRIVATE_KEY],
"wss://rinkeby.infura.io/ws/v3/" + process.env.RINKEBY_INFURA_API_KEY,
0,
1,
),
gasPrice: 1000000000, // 1 gwei
gas: 8000000,
from: process.env.DEPLOYER_ACCOUNT,
timeoutBlocks: 500,
networkCheckTimeout: 1000000,
}
},
};