-
Notifications
You must be signed in to change notification settings - Fork 1
/
truffle-config.js
73 lines (70 loc) · 2.55 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
require('dotenv').config();
const HDWalletProvider = require('@truffle/hdwallet-provider'); // @notice - Should use new module.
const INFURA_API_KEY="1ba14d9e1aeb4db7b96800261a237f7f";
process.env.INFURA_KEY = INFURA_API_KEY
//console.log('https://ropsten.infura.io/v3/' + process.env.INFURA_KEY);
// console.log('env', process.env.INFURA_KEY)
// const provider = new HDWalletProvider(mnemonic, 'https://ropsten.infura.io/v3/' + process.env.INFURA_KEY);
// console.log(provider);
module.exports = {
networks: {
ropsten: {
provider: () => new HDWalletProvider(mnemonic, 'https://ropsten.infura.io/v3/' + process.env.INFURA_KEY),
network_id: '3',
gas: 4712388,
//gas: 4465030, // Original
//gasPrice: 5000000000, // 5 gwei (Original)
//gasPrice: 10000000000, // 10 gwei
gasPrice: 100000000000, // 100 gwei
skipDryRun: true, // Skip dry run before migrations? (default: false for public nets)
},
kovan: {
provider: () => new HDWalletProvider(mnemonic, 'https://kovan.infura.io/v3/' + process.env.INFURA_KEY),
network_id: '42',
gas: 6465030,
gasPrice: 5000000000, // 5 gwei
skipDryRun: true, // Skip dry run before migrations? (default: false for public nets)
},
rinkeby: {
provider: () => new HDWalletProvider(mnemonic, "https://rinkeby.infura.io/v3/" + process.env.INFURA_KEY),
network_id: 4,
gas: 6000000, // 2 times than before
gasPrice: 5000000000, // 5 gwei,
skipDryRun: true, // Skip dry run before migrations? (default: false for public nets)
//from: process.env.DEPLOYER_ADDRESS
},
goerli: {
provider: () => new HDWalletProvider(mnemonic, "https://goerli.infura.io/v3/" + process.env.INFURA_KEY),
network_id: 5,
gas: 7500000,
gasPrice: 5000000000, // 5 gwei,
skipDryRun: true, // Skip dry run before migrations? (default: false for public nets)
//from: process.env.DEPLOYER_ADDRESS
},
// main ethereum network(mainnet)
live: {
provider: () => new HDWalletProvider(mnemonic, "https://mainnet.infura.io/v3/" + process.env.INFURA_KEY),
network_id: 1,
gas: 5500000,
gasPrice: 2000000000 // 2 gwei
},
local: {
host: '127.0.0.1',
port: 7545,
network_id: '*',
skipDryRun: true,
gasPrice: 5000000000
}
},
compilers: {
solc: {
version: "0.5.16", /// Final version of solidity-v0.5.x
settings: {
optimizer: {
enabled: true,
runs: 200
}
}
}
}
};