-
Notifications
You must be signed in to change notification settings - Fork 9
/
truffle.js
60 lines (58 loc) · 2.13 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
var HDWalletProvider = require("truffle-hdwallet-provider");
let account = process.env.MIGRATE_ADDRESS || '0xd77c534aed04d7ce34cd425073a033db4fbe6a9d';
let endpoint = process.env.ETH_PROVIDER || "https://rinkeby.infura.io/v3/55b957b5c6be42c49e6d48cbb102bdd5";
let privateKey = process.env.ETH_PRIVATE_KEY || "0xb5fffc3933d93dc956772c69b42c4bc66123631a24e3465956d80b5b604a2d13";
module.exports = {
compilers: {
solc: {
version: "0.5.3",
settings: {
optimizer: {
enabled: true,
runs: 200,
}
}
},
},
networks: {
development: { // running against ganache + metamask default port
host: "localhost",
port: 8545,
network_id: "*", // Match any network id
from: "0xd77c534aed04d7ce34cd425073a033db4fbe6a9d", // Ganache first account
gas: 6000000
},
localgeth: {
host: "localhost",
port: 9545,
network_id: "*", // Match any network id
from: account,
gas: 6000000
},
rinkeby: {
provider: new HDWalletProvider(privateKey, endpoint),
port: 9545,
network_id: "4", // rinkeby network ID
from: account, // 0x44a0579754d6c94e7bb2c26bfa7394311cc50ccb" default address to use for any transaction Truffle makes during migrations
},
kovan: {
provider: new HDWalletProvider(privateKey, endpoint.replace('rinkeby', 'kovan')),
port: 8545,
network_id: "42", // kovan network ID
from: account,
},
ropsten: {
provider: new HDWalletProvider(privateKey, endpoint.replace('rinkeby', 'ropsten')),
port: 8545,
network_id: "3", // ropsten network ID
from: account,
},
mainnet: {
provider: new HDWalletProvider(privateKey, endpoint.replace('rinkeby', 'mainnet')),
port: 8545,
network_id: "1", // mainnet network ID
from: account,
gas: 8000000
}
}
};