-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtruffle-config.js
98 lines (92 loc) · 2.84 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
const HDWalletProvider = require('truffle-hdwallet-provider');
require('dotenv').config();
const {
ETHERSCAN_API_KEY,
MNEMONIC,
DEPLOY_GAS_LIMIT,
DEPLOY_GAS_PRICE,
INFURA_ID_PROJECT
} = process.env;
const Web3 = require("web3");
const web3 = new Web3();
module.exports = {
plugins: ['truffle-plugin-verify'],
api_keys: {
etherscan: ETHERSCAN_API_KEY
},
networks: {
/* development: {
host: "127.0.0.1",
port: 7545,
network_id: "*",
gas: 30000000
}, */
ropsten: {
provider: () => new HDWalletProvider(MNEMONIC, "https://ropsten.infura.io/v3/" + INFURA_ID_PROJECT),
network_id: 3,
gas: DEPLOY_GAS_LIMIT,
confirmations: 2,
skipDryRun: true
},
mainnet: {
provider: () => new HDWalletProvider(MNEMONIC, "https://mainnet.infura.io/v3/" + INFURA_ID_PROJECT),
network_id: 1,
gasPrice: web3.utils.toWei(DEPLOY_GAS_PRICE, 'gwei'),
gas: DEPLOY_GAS_LIMIT,
skipDryRun: false
},
kovan: {
provider: () => new HDWalletProvider(MNEMONIC, "https://kovan.infura.io/v3/" + INFURA_ID_PROJECT),
network_id: 42,
confirmations: 2,
gas: DEPLOY_GAS_LIMIT,
skipDryRun: true
},
rinkeby: {
provider: () => new HDWalletProvider(MNEMONIC, "https://rinkeby.infura.io/v3/" + INFURA_ID_PROJECT),
network_id: 4,
confirmations: 2,
gas: DEPLOY_GAS_LIMIT,
skipDryRun: true
},
bscTestnet: {
provider: () => new HDWalletProvider(MNEMONIC, "https://data-seed-prebsc-1-s3.binance.org:8545"),
network_id: 97,
confirmations: 2,
timeoutBlocks: 200,
skipDryRun: true
},
bsc: {
provider: () => new HDWalletProvider(MNEMONIC, "https://bsc-dataseed3.binance.org"),
network_id: 56,
confirmations: 10,
timeoutBlocks: 200,
skipDryRun: true
},
maticMainnet: {
provider: () => new HDWalletProvider(MNEMONIC, "https://rpc-mainnet.matic.network"),
network_id: 137,
confirmations: 2,
timeoutBlocks: 200,
skipDryRun: false
},
maticTestnet: {
provider: () => new HDWalletProvider(MNEMONIC, "https://rpc-mumbai.matic.today"),
network_id: 80001,
confirmations: 2,
timeoutBlocks: 200,
skipDryRun: true
}
},
compilers: {
solc: {
version: "0.5.17",
settings: {
optimizer: {
enabled: true,
runs: 999999
}
}
}
}
};