-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtruffle-config.js
84 lines (83 loc) · 2.63 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
require('dotenv').config();
const HDWalletProvider = require('@truffle/hdwallet-provider');
const gasLimit = process.env['GAS_LIMIT'];
const gasPrice = process.env['GAS_PRICE'];
const privateKey = process.env['PRIVATE_KEY'];
const infuraProjectId = process.env['INFURA_PROJECT_ID'];
module.exports = {
compilers: {
solc: {
version: '0.6.12',
optimizer: {
enabled: false,
runs: 200,
},
},
},
networks: {
mainnet: {
network_id: 1,
gasPrice,
networkCheckTimeout: 10000, // fixes truffle bug
provider: () => new HDWalletProvider(privateKey, 'wss://mainnet.infura.io/ws/v3/' + infuraProjectId),
skipDryRun: false,
},
ropsten: {
network_id: 3,
networkCheckTimeout: 10000, // fixes truffle bug
provider: () => new HDWalletProvider(privateKey, 'wss://ropsten.infura.io/ws/v3/' + infuraProjectId),
skipDryRun: true,
},
rinkeby: {
network_id: 4,
networkCheckTimeout: 10000, // fixes truffle bug
provider: () => new HDWalletProvider(privateKey, 'wss://rinkeby.infura.io/ws/v3/' + infuraProjectId),
skipDryRun: true,
},
kovan: {
network_id: 42,
networkCheckTimeout: 10000, // fixes truffle bug
provider: () => new HDWalletProvider(privateKey, 'wss://kovan.infura.io/ws/v3/' + infuraProjectId),
skipDryRun: true,
},
goerli: {
network_id: 5,
networkCheckTimeout: 10000, // fixes truffle bug
provider: () => new HDWalletProvider(privateKey, 'wss://goerli.infura.io/ws/v3/' + infuraProjectId),
skipDryRun: true,
},
bscmain: {
network_id: 56,
gasPrice,
networkCheckTimeout: 10000, // fixes truffle bug
provider: () => new HDWalletProvider(privateKey, 'https://bsc-dataseed.binance.org/'),
skipDryRun: false,
},
bsctest: {
network_id: 97,
networkCheckTimeout: 10000, // fixes truffle bug
provider: () => new HDWalletProvider(privateKey, 'https://data-seed-prebsc-1-s1.binance.org:8545/'),
skipDryRun: true,
},
maticmain: {
network_id: 137,
gasPrice,
networkCheckTimeout: 10000, // fixes truffle bug
provider: () => new HDWalletProvider(privateKey, 'wss://ws-matic-mainnet.chainstacklabs.com/'),
skipDryRun: false,
},
matictest: {
network_id: 80001,
networkCheckTimeout: 10000, // fixes truffle bug
provider: () => new HDWalletProvider(privateKey, 'wss://ws-matic-mumbai.chainstacklabs.com/'),
skipDryRun: true,
},
development: {
network_id: '*',
gas: gasLimit,
host: 'localhost',
port: 8545,
skipDryRun: true,
},
},
};