-
Notifications
You must be signed in to change notification settings - Fork 0
/
truffle-config.js
85 lines (82 loc) · 1.71 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
var HDWalletProvider = require('@truffle/hdwallet-provider');
require('dotenv').config();
const MNEMONIC = process.env.MNEMONIC;
const token = process.env.INFURA_TOKEN;
const etherscanKey = process.env.ETHERSCAN_KEY;
module.exports = {
networks: {
develop: {
host: '127.0.0.1',
port: 8545,
network_id: '*',
gas: 6721975,
},
development: {
host: '127.0.0.1',
port: 7545,
network_id: '*',
gas: 6721975,
},
bscTestnet: {
provider: () => {
return new HDWalletProvider(
MNEMONIC,
'https://data-seed-prebsc-1-s1.binance.org:8545'
);
},
network_id: '97',
},
bscMainnet: {
provider: () => {
return new HDWalletProvider(
MNEMONIC,
'https://bsc-dataseed.binance.org'
);
},
network_id: '56',
},
mainnet: {
provider: () => {
return new HDWalletProvider(
MNEMONIC,
'https://mainnet.infura.io/v3/' + token
);
},
network_id: '1',
},
ropsten: {
provider: () => {
return new HDWalletProvider(
MNEMONIC,
'https://ropsten.infura.io/v3/' + token
);
},
network_id: '3',
},
kovan: {
provider: () => {
return new HDWalletProvider(
MNEMONIC,
'https://kovan.infura.io/v3/' + token
);
},
network_id: '42',
skipDryRun: true,
},
},
plugins: ['truffle-plugin-verify'],
api_keys: {
etherscan: etherscanKey,
},
compilers: {
solc: {
version: '0.6.12',
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
},
};