-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtruffle-config.js
121 lines (119 loc) · 3.07 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
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
require("dotenv").config({ path: "./.env" });
const HDWalletProvider = require("@truffle/hdwallet-provider");
const wrapProvider = require("arb-ethers-web3-bridge").wrapProvider;
const MNEMONIC = process.env.MNEMONIC;
const INFURA_PROJECT_ID = process.env.INFURA_PROJECT_ID;
const ETHERSCAN_API_KEY = process.env.ETHERSCAN_API_KEY;
const GANACHE_MNEMONIC = process.env.GANACHE_MNEMONIC;
module.exports = {
// Configure your compilers
compilers: {
solc: {
version: "0.8.9",
// docker: true, // Use compiler you've installed locally with docker (default: false)
settings: {
optimizer: {
enabled: true,
runs: 200,
},
// evmVersion: "byzantium"
},
},
},
contracts_directory: "./contracts/",
contracts_build_directory: "./build/contracts/",
plugins: ["truffle-plugin-verify"],
api_keys: {
etherscan: ETHERSCAN_API_KEY,
},
networks: {
development: {
host: "127.0.0.1",
port: 8545,
network_id: "*", // Any network (default: none)
},
ropsten: {
provider: () =>
new HDWalletProvider(
MNEMONIC,
`https://ropsten.infura.io/v3/${INFURA_PROJECT_ID}`
),
network_id: 3,
gas: 5500000,
gasPrice: 10e9,
confirmations: 2,
timeoutBlocks: 200,
skipDryRun: true,
},
rinkeby: {
provider: () =>
new HDWalletProvider(
MNEMONIC,
`https://rinkeby.infura.io/v3/${INFURA_PROJECT_ID}`
),
network_id: 4,
gasPrice: 10e9,
confirmations: 2,
timeoutBlocks: 200,
skipDryRun: true,
},
goerli: {
provider: () =>
new HDWalletProvider(
MNEMONIC,
`https://goerli.infura.io/v3/${INFURA_PROJECT_ID}`
),
network_id: 5,
gasPrice: 10e9,
confirmations: 2,
timeoutBlocks: 200,
skipDryRun: true,
},
kovan: {
provider: () =>
new HDWalletProvider(
MNEMONIC,
`https://kovan.infura.io/v3/${INFURA_PROJECT_ID}`
),
network_id: 42,
gasPrice: 10e9,
confirmations: 2,
timeoutBlocks: 200,
skipDryRun: true,
},
// arbitrum_mainnet: {
// provider: () =>
// new HDWalletProvider(
// MNEMONIC,
// `https://arbitrum-mainnet.infura.io/v3/${INFURA_PROJECT_ID}`
// ),
// network_id: 42161,
// gasPrice: 10e9,
// confirmations: 2,
// timeoutBlocks: 200,
// skipDryRun: true,
// },
arbitrum_rinkeby: {
provider: () =>
new HDWalletProvider(MNEMONIC, "https://rinkeby.arbitrum.io/rpc"),
network_id: 421611,
gasPrice: 10e9,
confirmations: 2,
timeoutBlocks: 200,
skipDryRun: true,
networkCheckTimeout: 1000000000,
},
arbitrum_local: {
provider: () => {
return wrapProvider(
new HDWalletProvider(GANACHE_MNEMONIC, "http://127.0.0.1:8545")
);
},
network_id: "*",
},
},
// Set default mocha options here, use special reporters etc.
mocha: {
// timeout: 100000
},
};