-
Notifications
You must be signed in to change notification settings - Fork 0
/
truffle-config.js
65 lines (58 loc) · 1.71 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
const HDWalletProvider = require('@truffle/hdwallet-provider')
const MNEMONIC =
process.env.MNEMONIC ||
'clock radar mass judge dismiss just intact mind resemble fringe diary casino'
const INFURA_API_KEY = process.env.INFURA_API_KEY
const ETHERSCAN_API_KEY = process.env.ETHERSCAN_API_KEY
const walletProvider = provider => new HDWalletProvider(MNEMONIC, provider)
module.exports = {
//$ truffle test --network <network-name>
networks: {
development: {
host: 'localhost',
port: 8545,
network_id: '*', // match any network
gas: 7000000,
skipDryRun: true,
},
goerli: {
provider: () => walletProvider(`https://goerli.infura.io/v3/${INFURA_API_KEY}`),
network_id: 5,
gas: 7000000,
gasPrice: 10000000000, // 10 gwei
skipDryRun: true,
},
maticMumbai: {
provider: () => walletProvider('https://rpc-mumbai.matic.today'),
network_id: 80001,
gas: 7000000,
gasPrice: 10000000000, // 10 gwei
skipDryRun: true,
},
mainnet: {
provider: () => walletProvider(`https://mainnet.infura.io/v3/${INFURA_API_KEY}`),
network_id: 1,
gas: 7000000,
gasPrice: 10000000000, // 10 gwei
skipDryRun: true,
},
},
// Set default mocha options here, use special reporters etc.
mocha: {
reporter: 'eth-gas-reporter',
reporterOptions: {
currency: 'USD',
gasPrice: 21,
showTimeSpent: true,
},
},
// Configure contracts location to dir without contracts
// to avoid Truffle compilation step (we use @chainlink/belt instead)
contracts_directory: './contracts_null',
verify: {
preamble: 'LINK\nVersion: 0.1.0',
},
api_keys: {
etherscan: ETHERSCAN_API_KEY,
},
}