-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtruffle-config.js
More file actions
48 lines (44 loc) · 1.35 KB
/
truffle-config.js
File metadata and controls
48 lines (44 loc) · 1.35 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
require('dotenv').config()
const HDWalletProvider = require("truffle-hdwallet-provider");
const babelRegister = require('babel-register');
const babelPolyfill = require('babel-polyfill');
// Infura API key
const infura_apikey_dev = process.env.DSLA_INFURA_APIKEY_DEV;
const infura_apikey_prod = process.env.DSLA_INFURA_APIKEY_PROD;
// 12 mnemonic words that represents the account that will own the contract
const mnemonic_dev = process.env.DSLA_MNEMONIC_DEV;
const mnemonic_prod = process.env.DSLA_MNEMONIC_PROD;
module.exports = {
networks: {
local: {
host: 'localhost',
port: 9545,
gas: 5000000,
gasPrice: 5e9,
network_id: '*'
},
ropsten: {
provider: function() {
return new HDWalletProvider(mnemonic_dev, "https://ropsten.infura.io/" + infura_apikey_dev);
},
network_id: "3",
gas: 4612388,
gasPrice: 10,
},
rinkeby: {
provider: function() {
return new HDWalletProvider(mnemonic_dev, "https://rinkeby.infura.io/" + infura_apikey_dev);
},
network_id: "2",
gas: 4612388
},
mainnet: {
provider: function() {
return new HDWalletProvider(mnemonic_prod, "https://mainnet.infura.io/" + infura_apikey_prod);
},
network_id: "1",
gas: 4612388,
gasPrice: 7000000000
}
}
};