-
Notifications
You must be signed in to change notification settings - Fork 2
/
truffle-config.js
89 lines (86 loc) · 2.52 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
const HDWalletProvider = require('@truffle/hdwallet-provider');
require('dotenv').config();
require('chai/register-should');
module.exports = {
networks: {
development: {
host: 'localhost',
port: 8545,
network_id: '*',
gas: 8000000
},
live: {
provider: () => new HDWalletProvider({
mnemonic: {
phrase: process.env.PK
},
providerOrUrl: process.env.MAINNET_RPC_URL
}),
port: 8545,
network_id: '1',
gas: 6000000,
gasPrice: 46000000000
},
rinkeby: {
provider: () => new HDWalletProvider({
mnemonic: {
phrase: process.env.PK
},
providerOrUrl: process.env.RINKEBY_RPC_URL
}),
port: 8545,
network_id: '4',
gas: 6000000,
gasPrice: 80000000000,
skipDryRun: true
},
polygon: {
provider: () => new HDWalletProvider({
mnemonic: {
phrase: process.env.PK
},
providerOrUrl: process.env.POLYGON_RPC_URL
}),
network_id: '137',
confirmations: 2,
timeoutBlocks: 200,
skipDryRun: true
},
mumbai: {
provider: () => new HDWalletProvider({
mnemonic: {
phrase: process.env.PK
},
providerOrUrl: process.env.MUMBAI_RPC_URL
}),
network_id: '80001',
confirmations: 2,
gasPrice: 200000000000,
timeoutBlocks: 200,
skipDryRun: true
},
coverage: {
host: 'localhost',
network_id: '*',
port: 8555, // <-- If you change this, also set the port option in .solcover.js.
gas: 0xfffffffffff, // <-- Use this high gas value
gasPrice: 0x01 // <-- Use this low gas price
}
},
plugins: ['solidity-coverage', 'truffle-plugin-verify'],
mocha: {
// timeout: 100000
},
compilers: {
solc: {
version: '0.8.9',
optimizer: { // Turning on compiler optimization that removes some local variables during compilation
enabled: true,
runs: 200
}
}
},
api_keys: {
etherscan: process.env.ETHERSCAN_APIKEY
}
};