forked from mosendo/gasless
-
Notifications
You must be signed in to change notification settings - Fork 0
/
truffle-config.js
46 lines (41 loc) · 1.26 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
const path = require('path')
var PrivateKeyProvider = require("truffle-privatekey-provider");
const privateKey = process.env.PRIVATEKEY;
const config = {
// See <http://truffleframework.com/docs/advanced/configuration>
// to customize your Truffle configuration!
contracts_build_directory: path.join(__dirname, "./app/contracts"),
compilers: {
solc: {
version: "0.5.11", // A version or constraint - Ex. "^0.5.0"
// Can also be set to "native" to use a native solc
settings: {
optimizer: {
enabled: true,
runs: 200 // Optimize for how many times you intend to run the code
},
//evmVersion: <string> // Default: "petersburg"
}
}
},
networks: {
development: {
host: "localhost",
port: 9545,
network_id: "*" // Match any network id
}
}
};
if(privateKey) {
config.networks.kovan = {
provider: new PrivateKeyProvider(privateKey, "https://kovan.infura.io/27e484dcd9e3efcfd25a83a78777cdf1/"),
network_id: 42,
skipDryRun: true
}
config.networks.live = {
provider: new PrivateKeyProvider(privateKey, "https://mainnet.infura.io/27e484dcd9e3efcfd25a83a78777cdf1/"),
network_id: 1,
skipDryRun: true
}
}
module.exports = config;