-
Notifications
You must be signed in to change notification settings - Fork 9
/
truffle.js
74 lines (63 loc) · 2.17 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
require('ts-node/register');
require('espower-typescript/guess');
const path = require('path');
const HDWalletProvider = require('@truffle/hdwallet-provider');
require('dotenv').config();
module.exports = {
// See <http://truffleframework.com/docs/advanced/configuration>
// to customize your Truffle configuration!
contracts_build_directory: path.join(__dirname, 'build/contracts'),
plugins: [
// "truffle-security",
// "solidity-coverage",
'truffle-plugin-verify',
],
networks: {
kovan: {
provider: () => new HDWalletProvider(
process.env.KOVAN_MNEMONIC,
process.env.KOVAN_PROVIDER_URL,
0, // address_index
10, // num_addresses
true, // shareNonce
),
network_id: 42, // Kovan's id
// gas: 7017622, //
// confirmations: 2, // # of confs to wait between deployments. (default: 0)
timeoutBlocks: 50, // # of blocks before a deployment times out (minimum/default: 50)
skipDryRun: false, // Skip dry run before migrations? (default: false for public nets )
},
mainnet: {
provider: () => new HDWalletProvider(
process.env.MAINNET_MNEMONIC,
process.env.MAINNET_PROVIDER_URL,
0, // address_index
10, // num_addresses
true, // shareNonce
),
network_id: 1, // mainnet's id
// gas: 7017622
gasPrice: +process.env.MAINNET_GAS_PRICE || 1000 * 1000 * 1000, // default 1 gwei
// confirmations: 2, // # of confs to wait between deployments. (default: 0)
timeoutBlocks: 50, // # of blocks before a deployment times out (minimum/default: 50)
skipDryRun: false, // Skip dry run before migrations? (default: false for public nets )
},
},
compilers: {
solc: {
version: '0.5.16', // A version or constraint - Ex. "^0.5.0"
// Can also be set to "native" to use a native solc
// docker: false, // Use a version obtained through docker
parser: 'solcjs', // Leverages solc-js purely for speedy parsing
settings: {
optimizer: {
enabled: true,
runs: 1500,
},
},
},
},
api_keys: {
etherscan: process.env.ETHERSCAN_API_KEY,
},
};