-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtruffle-config.js
51 lines (49 loc) · 1.44 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
46
47
48
49
50
51
const HDWalletProvider = require("truffle-hdwallet-provider");
const Web3 = require("Web3");
const fs = require("fs");
const path = require("path");
const mnemonicPath = path.resolve(__dirname, "mnemonic");
const MNEMONIC = fs.readFileSync(mnemonicPath, "utf8");
module.exports = {
networks: {
development: {
provider: function() {
return new Web3.providers.WebsocketProvider("ws://localhost:7545");
},
network_id: "5777"
},
ropsten: {
provider: function() {
return new HDWalletProvider(
MNEMONIC,
"https://ropsten.infura.io/v3/9ec1ba34a9164ea6a05f44a4168aa065"
);
},
network_id: 3,
gas: 4000000 //make sure this gas allocation isn't over 4M, which is the max
},
rinkeby: {
provider: function() {
return new HDWalletProvider(
MNEMONIC,
"https://rinkeby.infura.io/v3/221cb1c28ce24c269b98142f855c008e"
);
},
network_id: 4,
gas: 1000000
}
},
compilers: {
solc: {
version: "0.5.0" // Fetch exact version from solc-bin (default: truffle's version)
// docker: true, // Use "0.5.1" you've installed locally with docker (default: false)
// settings: { // See the solidity docs for advice about optimization and evmVersion
// optimizer: {
// enabled: false,
// runs: 200
// },
// evmVersion: "byzantium"
// }
}
}
};