-
Notifications
You must be signed in to change notification settings - Fork 0
/
truffle-config.js
52 lines (50 loc) · 1.18 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
const HDWalletProvider = require("truffle-hdwallet-provider");
require("dotenv").config();
const providerFactory = network =>
new HDWalletProvider(
process.env.MNEMONICS || "", // Mnemonics of the deployer
`https://${network}.infura.io/v3/${process.env.INFURA_KEY}` // Provider URL => web3.HttpProvider
);
module.exports = {
compilers: {
solc: {
version: "0.5.17",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
},
plugins: ["truffle-contract-size"],
networks: {
mainnet: {
provider: providerFactory("mainnet"),
network_id: 1,
gas: 9000000,
gasPrice: 25000000000 // 100 Gwei, Change this value according to price average of the deployment time
},
rinkeby: {
provider: providerFactory("rinkeby"),
network_id: 4,
gas: 9000000,
gasPrice: 50000000000 // 50 Gwei
},
development: {
host: "127.0.0.1",
port: 8544,
network_id: "*",
gas: 9000000
}
},
mocha: {
enableTimeouts: false,
useColors: true,
reporter: "eth-gas-reporter",
reporterOptions: {
currency: "USD",
gasPrice: 21
}
}
};