This repository was archived by the owner on Jan 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtruffle.js
More file actions
60 lines (58 loc) · 1.36 KB
/
truffle.js
File metadata and controls
60 lines (58 loc) · 1.36 KB
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
require("dotenv").config();
const { INFURA_TOKEN, MNEMONIC, ETH_HOST, ETH_PORT } = process.env;
const HDWalletProvider = require("truffle-hdwallet-provider");
module.exports = {
networks: {
development: {
host: ETH_HOST || "127.0.0.1",
port: ETH_PORT || 8545,
network_id: "*"
},
live: {
provider: () =>
new HDWalletProvider(
MNEMONIC,
`https://mainnet.infura.io/${INFURA_TOKEN}`
),
network_id: "1"
},
kovan: {
provider: () =>
new HDWalletProvider(
MNEMONIC,
`https://kovan.infura.io/${INFURA_TOKEN}`
),
network_id: "2"
},
ropsten: {
provider: () =>
new HDWalletProvider(
MNEMONIC,
`https://ropsten.infura.io/${INFURA_TOKEN}`
),
network_id: "3",
gas: 4700000
},
rinkeby: {
provider: () =>
new HDWalletProvider(
MNEMONIC,
`https://rinkeby.infura.io/${INFURA_TOKEN}`
),
network_id: "4"
}
},
compilers: {
solc: {
version: "0.5.9", // Fetch exact version from solc-bin (default: truffle's version)
settings: {
// See the solidity docs for advice about optimization and evmVersion
optimizer: {
enabled: false,
runs: 200
},
evmVersion: "byzantium"
}
}
}
};