-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtruffle.js
94 lines (93 loc) · 2.83 KB
/
truffle.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
const HDWalletProvider = require('@truffle/hdwallet-provider');
const {
MAINNET_PRIVATE_KEYS,
TESTNET_PRIVATE_KEYS,
ETHERSCAN_API_KEY,
INFURA_API_KEY
} = require('./.secrets.json');
module.exports = {
// See <http://truffleframework.com/docs/advanced/configuration>
// for more about customizing your Truffle configuration!
networks: {
development: {
host: "127.0.0.1",
port: 8545,
network_id: "*" // Match any network id
},
bsctestnet: {
provider: () => new HDWalletProvider(TESTNET_PRIVATE_KEYS, `https://data-seed-prebsc-1-s1.binance.org:8545`),
network_id: 97,
confirmations: 10,
timeoutBlocks: 200,
skipDryRun: true
},
bscmainnet: {
provider: () => new HDWalletProvider(MAINNET_PRIVATE_KEYS, `wss://bsc-ws-node.nariox.org:443`),
network_id: 56,
confirmations: 10,
timeoutBlocks: 200,
skipDryRun: true
},
polygontestnet: {
provider: () => new HDWalletProvider(TESTNET_PRIVATE_KEYS, `https://polygon-mumbai.infura.io/v3/${INFURA_API_KEY}`),
network_id: 80001,
confirmations: 2,
timeoutBlocks: 200,
skipDryRun: true,
gas: 6000000,
gasPrice: 10000000000,
},
polygonmainnet: {
provider: () => new HDWalletProvider(MAINNET_PRIVATE_KEYS, `https://polygon-mainnet.infura.io/v3/${INFURA_API_KEY}`),
network_id: 137,
confirmations: 2,
skipDryRun: true,
networkCheckTimeout: 10000,
gas: 20000000,
gasPrice: 30000000000,
},
avalanchetestnet: {
provider: () => new HDWalletProvider(TESTNET_PRIVATE_KEYS, `https://api.avax-test.network/ext/bc/C/rpc`),
network_id: '*',
confirmations: 2,
timeoutBlocks: 200,
skipDryRun: true
},
avalanchemainnet: {
provider: () => new HDWalletProvider(MAINNET_PRIVATE_KEYS, `https://api.avax.network/ext/bc/C/rpc`),
network_id: '*',
confirmations: 2,
timeoutBlocks: 200,
skipDryRun: true
},
ethtestnet: {
provider: () => new HDWalletProvider(TESTNET_PRIVATE_KEYS, `wss://ropsten.infura.io/ws/v3/${INFURA_API_KEY}`),
network_id: '*',
confirmations: 2,
timeoutBlocks: 200,
skipDryRun: true
},
ethmainnet: {
provider: () => new HDWalletProvider(MAINNET_PRIVATE_KEYS, `wss://mainnet.infura.io/ws/v3/${INFURA_API_KEY}`),
network_id: '*',
gas: 2100000,
gasPrice: 150000000000, // 180 gwei
confirmations: 2,
timeoutBlocks: 200,
skipDryRun: true
}
},
compilers: {
solc: {
version: "^0.8.0", // A version or constraint - Ex. "^0.5.0"
// Can also be set to "native" to use a native solc
parser: "solcjs", // Leverages solc-js purely for speedy parsing
}
},
plugins: [
'truffle-plugin-verify'
],
api_keys: {
etherscan: ETHERSCAN_API_KEY
}
};