forked from agelessZeal/BEP20-BEP1155-NFT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
truffle-config.js
94 lines (92 loc) · 2.12 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
const HDWalletProvider = require("@truffle/hdwallet-provider");
require("dotenv").config();
const providerFactory = (network) =>
new HDWalletProvider(
process.env.PRIVATE_KEY,
`https://${network}.infura.io/v3/${process.env.INFURA_KEY}`
);
module.exports = {
networks: {
development: {
host: "127.0.0.1",
port: 8545,
network_id: 666,
gasPrice: 35e9,
},
upgrade: {
host: "127.0.0.1",
port: 8545,
network_id: 666,
gasPrice: 35e9,
},
test: {
host: "127.0.0.1",
port: 8545,
network_id: 666,
gasPrice: 35e9,
},
rinkeby: {
provider: () => providerFactory("rinkeby"),
network_id: 4,
gas: 6e6,
gasPrice: 10e9, // 10 Gwei
skipDryRun: true,
},
matic: {
provider: () =>
new HDWalletProvider(
process.env.MATIC_PRIVATE_KEY,
`https://rpc-mumbai.matic.today`
),
network_id: 80001,
confirmations: 2,
timeoutBlocks: 200,
skipDryRun: true,
},
mainnet_matic: {
provider: () =>
new HDWalletProvider(
process.env.MATIC_PRIVATE_KEY,
`https://rpc-mainnet.matic.network`
),
network_id: 137,
gasPrice: 1e9,
},
mainnet: {
provider: () => providerFactory("mainnet"),
network_id: 1,
gasPrice: 20e9, // 20 Gwei, Change this value according to price average of the deployment time
gas: 2e6,
},
testnet: {
provider: () => new HDWalletProvider( process.env.PRIVATE_KEY, `https://data-seed-prebsc-1-s1.binance.org:8545`),
network_id: 97,
confirmations: 10,
timeoutBlocks: 200,
skipDryRun: true
},
bsc: {
provider: () =>
new HDWalletProvider(
process.env.PRIVATE_KEY,
`https://bsc-dataseed1.binance.org`
),
network_id: 56,
gasPrice: 5e9,
confirmations: 10,
timeoutBlocks: 200,
skipDryRun: true
},
},
compilers: {
solc: {
version: "0.7.6",
settings: {
optimizer: {
enabled: true,
runs: 200,
},
},
},
},
};