-
Notifications
You must be signed in to change notification settings - Fork 1
/
truffle-config.js
45 lines (36 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
const fs = require('fs');
const mnemonic = fs.readFileSync(".secret").toString().trim(); //mnemonic stored in .secret
const HDWalletProvider = require('truffle-hdwallet-provider');
const infuraKey = "118951e57cf64dc5a614119f6a85ae10"; //infura Project Key/API Key
const infuraRinkebyURL = `https://rinkeby.infura.io/v3/${infuraKey}`;
const infuraMainnetURL = `https://mainnet.infura.io/v3/${infuraKey}`;
const provider = new HDWalletProvider(mnemonic,infuraRinkebyURL);
const mainNet = new HDWalletProvider(mnemonic,infuraMainnetURL)
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: () => provider,
network_id: 4, //rinkeby network_id
gas: 5500000
},
mainnet:{
provider: () => mainNet,
network_id: 1, // mainnet network_id
gas: 5500000
}
},
// Set default mocha options here, use special reporters etc.
mocha: {
// timeout: 100000
},
// Configure your compilers
compilers: {
solc: {
}
}
}