-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathtruffle-config.js
52 lines (47 loc) · 1.17 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
const HDWalletProvider = require("@truffle/hdwallet-provider");
const config = require("dotenv").config();
const fs = require("fs");
const mnemonic = fs.readFileSync(".secret").toString().trim();
module.exports = {
networks: {
development: {
host: "127.0.0.1",
port: 7545,
network_id: "*",
},
mainnet: {
provider: () =>
new HDWalletProvider(mnemonic, config.parsed.MAINNET_NETWORK_URL),
network_id: config.parsed.MAINNET_NETWORK_ID,
gas: 5500000,
confirmations: 2,
timeoutBlocks: 200,
skipDryRun: true,
},
testnet: {
provider: () =>
new HDWalletProvider(mnemonic, config.parsed.TESTNET_NETWORK_URL),
network_id: config.parsed.TESTNET_NETWORK_ID,
gas: 5500000,
confirmations: 1,
timeoutBlocks: 150,
skipDryRun: true,
},
},
compilers: {
solc: {
version: "0.6.6",
settings: {
optimizer: {
enabled: true,
runs: 1000, // lower values reduce cost
},
evmVersion: "istanbul",
},
},
},
plugins: ["truffle-plugin-verify"],
api_keys: {
etherscan: config.parsed.EXPLORER_API_KEY,
},
};