-
Notifications
You must be signed in to change notification settings - Fork 0
/
truffle-config.js
41 lines (37 loc) · 1.13 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
const fs = require('fs');
const HDWalletProvider = require('truffle-hdwallet-provider');
const infura_key = fs.readFileSync(__dirname + "/.infura").toString().trim();
const rinkeby_private_key = fs.readFileSync(__dirname + "/.secret.rinkeby.key").toString().trim();
const mainnet_private_key = fs.readFileSync(__dirname + "/.secret.mainnet.key").toString().trim();
module.exports = {
networks: {
development: {
host: "127.0.0.1", // Localhost (default: none)
port: 8545, // Standard Ethereum port (default: none)
network_id: "*", // Any network (default: none)
},
rinkeby: {
provider: () => new HDWalletProvider(
rinkeby_private_key,
'https://rinkeby.infura.io/v3/' + infura_key
),
gas: 6721975,
gasPrice: 130000000000, // 130 gwei
network_id: '4'
},
mainnet: {
provider: () => new HDWalletProvider(
mainnet_private_key,
'https://mainnet.infura.io/v3/' + infura_key
),
gas: 6721975,
gasPrice: 130000000000, // 130 gwei
network_id: '1'
},
},
compilers: {
solc: {
version: "0.6"
}
}
}