-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtruffle-config.js
More file actions
76 lines (72 loc) · 1.8 KB
/
truffle-config.js
File metadata and controls
76 lines (72 loc) · 1.8 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
const HDWalletProvider = require('truffle-hdwallet-provider');
require('dotenv').config(); // Stores environment-specific variable from '.env' to process.env
require('babel-register');
require('babel-polyfill');
console.log(process.env.METAMASK_MNEMONIC);
console.log(process.env.INFURA_API_KEY);
module.exports = {
// See <http://truffleframework.com/docs/advanced/configuration>
// to customize your Truffle configuration!
plugins: ['truffle-plugin-verify'],
compilers: {
solc: {
version: '0.5.9', // Change this to whatever you need
},
},
networks: {
development: {
host: 'localhost',
port: 9545,
network_id: '*',
gas: 4600000,
},
mainnet: {
provider: function () {
return new HDWalletProvider(
process.env.METAMASK_MNEMONIC,
'https://mainnet.infura.io/v3/' + process.env.INFURA_API_KEY,
0
);
},
network_id: 1,
gas: 7000000,
gasPrice: 30000000000,
skipDryRun: true,
},
kovan: {
provider: function () {
return new HDWalletProvider(
process.env.METAMASK_MNEMONIC,
'https://kovan.infura.io/v3/' + process.env.INFURA_API_KEY,
2
);
},
network_id: 42,
gas: 7000000,
},
rinkeby: {
networkCheckTimeout: 10000,
provider: function () {
return new HDWalletProvider(
process.env.METAMASK_MNEMONIC,
'https://rinkeby.infura.io/v3/' + process.env.INFURA_API_KEY,
0,
2
);
},
network_id: 4,
gasPrice: 3000000000,
gas: 7000000,
skipDryRun: true,
},
},
mocha: {
reporter: 'eth-gas-reporter',
reporterOptions: {
gasPrice: 21,
},
},
api_keys: {
etherscan: process.env.ETHERSCAN_API_KEY,
},
};