-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtruffle.js
34 lines (30 loc) · 1001 Bytes
/
truffle.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
require("dotenv").config();
const path = require("path");
const HDWalletProvider = require("truffle-hdwallet-provider");
// from https://iancoleman.io/bip39/
module.exports = {
// See <http://truffleframework.com/docs/advanced/configuration>
// to customize your Truffle configuration!
contracts_build_directory: path.join(__dirname, "client/src/contracts"),
networks : {
development: {
host: "localhost",
port: 7545,
network_id: "*" // any
},
ropsten: {
provider: function() {
return new HDWalletProvider(process.env.MNEMONIC, "https://ropsten.infura.io/v3/" + process.env.INFURA_PROJECT_ID)
},
network_id: 3
},
mainnet: {
provider: function() {
return new HDWalletProvider(process.env.MNEMONIC, "https://mainnet.infura.io/v3/" + process.env.INFURA_PROJECT_ID)
},
network_id: 1,
gas: 1000000, // remix.ethereum.org
gasPrice: 200000000, // 1.2 GWei https://ethgasstation.info/
}
}
};