-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtruffle-config.js
More file actions
executable file
·138 lines (126 loc) · 3.02 KB
/
truffle-config.js
File metadata and controls
executable file
·138 lines (126 loc) · 3.02 KB
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
require('babel-register');
require('babel-polyfill');
var dotenv = require("dotenv");
dotenv.config();
const HDWalletProvider = require("@truffle/hdwallet-provider");
const MNEMONIC = process.env.MNEMONIC
const INFURA_KEY = process.env.INFURA_KEY
console.log("Infura key:" + process.env.INFURA_KEY);
if (!MNEMONIC || !INFURA_KEY) {
console.error("Please set a mnemonic and infura key...")
return
}
module.exports = {
networks: {
development: {
host: "127.0.0.1",
port: 8545,
gas: 10000000,
gasPrice: 1000000000,
network_id: "*", // Match any network id
accounts: 10,
defaultEtherBalance: 1000,
blockTime: 3,
maxFeePerGas: 885000000,
baseFeePerGas:875000000
},
rinkeby: {
provider: function () {
return new HDWalletProvider(
MNEMONIC,
"https://rinkeby.infura.io/v3/" + INFURA_KEY
);
},
network_id: "*",
gas: 0x989680
},
ropsten: {
provider: function () {
return new HDWalletProvider(
MNEMONIC,
"https://ropsten.infura.io/v3/" + INFURA_KEY
);
},
network_id: 3,
gas: 4500000,
gasPrice: 1000000000
},
kovan: {
provider: function () {
return new HDWalletProvider(
MNEMONIC,
"https://kovan.infura.io/v3/" + INFURA_KEY
);
},
network_id: "*",
gas: 0x989680
},
goerli: {
provider: function () {
return new HDWalletProvider(
MNEMONIC,
"https://goerli.infura.io/v3/" + INFURA_KEY
// "wss://goerli.infura.io/ws/v3/2645f5383f544588975db84a58cd9af6"
);
},
network_id: "*",
gas: 0x989680,
confirmations: 2,
timeoutBlocks: 200,
skipDryRun: true,
websocket: true,
timeoutBlocks: 50000,
networkCheckTimeout: 1000000,
skipDryRun: true
},
matic: {
provider: () => new HDWalletProvider(MNEMONIC, 'https://matic-mumbai.chainstacklabs.com'),
// provider: () => new HDWalletProvider(MNEMONIC, 'https://polygon-mumbai.g.alchemy.com/v2/H2g1siLIwqCBQMIY052r_vJAejQ_A_V3'),
network_id: 80001,
confirmations: 1,
timeoutBlocks: 1800,
skipDryRun: true,
chainId: 80001,
timeoutBlocks: 50000,
networkCheckTimeout: 1000000,
skipDryRun: true,
blockTime: 3,
},
coverage: {
host: 'localhost',
network_id: '*',
port: 8555,
gas: 0xfffffffffff,
gasPrice: 0x01,
},
live: {
network_id: 1,
provider: function () {
return new HDWalletProvider(
MNEMONIC,
"https://mainnet.infura.io/v3/" + INFURA_KEY
);
},
gas: 4000000,
gasPrice: 50000000000
},
mocha: {
reporter: 'eth-gas-reporter',
reporterOptions: {
currency: 'USD',
gasPrice: 2
}
},
},
compilers: {
solc: {
version: '0.8.0',
},
},
settings: {
optimizer: {
enabled: false,
runs: 200
},
},
};