forked from livepeer/protocol
-
Notifications
You must be signed in to change notification settings - Fork 0
/
truffle.js
89 lines (84 loc) · 2.57 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
require("babel-register")
require("babel-polyfill")
const KeystoreProvider = require("truffle-keystore-provider")
const Web3 = require("web3")
const memoizeProviderCreator = () => {
let keystoreProviders = {}
return (account, dataDir, providerUrl, readOnly) => {
if (readOnly) {
return new Web3.providers.HttpProvider(providerUrl)
} else {
if (providerUrl in keystoreProviders) {
return keystoreProviders[providerUrl]
} else {
const provider = new KeystoreProvider(account, dataDir, providerUrl)
keystoreProviders[providerUrl] = provider
return provider
}
}
}
}
const createProvider = memoizeProviderCreator()
module.exports = {
networks: {
development: {
host: "localhost",
port: 8545,
network_id: "*", // Match any network id
gas: 6700000
},
coverage: {
host: "localhost",
network_id: "*",
port: 8555,
gas: 0xffffffffff,
gasPrice: 0x01
},
parityDev: {
host: "parity-dev",
port: 8545,
network_id: 7777,
gas: 6700000
},
gethDev: {
host: "geth-dev",
port: 8545,
network_id: 7777,
gas: 6700000
},
lpTestNet: {
provider: () => {
return createProvider(process.env.LPTESTNET_ACCOUNT, process.env.DATA_DIR, "http://ethrpc-testnet.livepeer.org:8545", process.env.READ_ONLY)
},
network_id: 858585,
gas: 6600000
},
rinkeby: {
provider: () => {
return createProvider(process.env.RINKEBY_ACCOUNT, process.env.DATA_DIR, "https://rinkeby.infura.io", process.env.READ_ONLY)
},
network_id: 4,
gas: 6600000
},
rinkebyDryRun: {
provider: () => {
return createProvider(process.env.RINKEBY_ACCOUNT, process.env.DATA_DIR, "https://rinkeby.infura.io", process.env.READ_ONLY)
},
network_id: 4,
gas: 6600000
},
mainnet: {
provider: () => {
return createProvider(process.env.MAINNET_ACCOUNT, process.env.DATA_DIR, "https://mainnet.infura.io", process.env.READ_ONLY)
},
network_id: 1,
gas: 6600000
}
},
solc: {
optimizer: {
enabled: true,
runs: 200
}
}
}