-
Notifications
You must be signed in to change notification settings - Fork 1
/
truffle.js
55 lines (52 loc) · 1.45 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
require(`babel-register`)({
ignore: /node_modules\/(?!openzeppelin-solidity)/
})
require(`babel-polyfill`)
const HDWalletProvider = require(`truffle-hdwallet-provider`)
require(`dotenv`).config() // Store environment-specific variable from '.env' to process.env
const NonceTrackerSubprovider = require(`web3-provider-engine/subproviders/nonce-tracker`)
// NOTE: If retreiving mnemonic from Metamask - use 1st wallet in profile list.
const wallet = process.env.WALLET
const mnemonic = process.env.MNENOMIC
const infuraKey = process.env.INFURA_API_KEY
module.exports = {
migrations_directory: `./migrations`,
networks: {
development: {
network_id: `*`, // Match any network id
host: `localhost`,
gas: 6721975,
port: 8545
},
kovan: {
network_id: 42,
from: wallet,
provider: () => new HDWalletProvider(mnemonic, `https://kovan.infura.io/v3/${infuraKey}`),
gas: 6986331,
gasPrice: 5500000000
},
ropsten: {
network_id: 3,
provider: () => new HDWalletProvider(mnemonic, `https://ropsten.infura.io/${infuraKey}`),
gas: 6986331,
gasPrice: 3500000000
},
mainnet: {
network_id: `1`,
provider: () => new HDWalletProvider(mnemonic, `https://mainnet.infura.io/v3/${infuraKey}`),
gas: 6986331,
gasPrice: 20e9
}
},
solc: {
optimizer: {
enabled: true,
runs: 500
}
},
compilers: {
solc: {
version: `0.5.4`
}
}
}