-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathtruffle.js
144 lines (142 loc) · 4.97 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
// Must set three networks for each deployed network
// See examples below for rinkeby0,1,2
// 0 - Deployer/Owner of Logic contract, Deployer/Owner of vesting contracts, Deployer/Owner(temp) of TPL contract
// 1 - Deployer/Owner(temp) of Proxy contract
// 2 - Owner(temp) of all props, Handling allocations
// 3 - Valid Validator
const Web3 = require('web3');
const PrivateKeyProvider = require('truffle-privatekey-provider');
const utils = require('./scripts_utils/utils');
// eslint-disable-next-line no-unused-vars
const web3 = new Web3();
module.exports = {
networks: {
test: {
host: 'localhost',
port: 8545,
network_id: '5777',
},
rinkeby0: {
provider() {
if (!process.env.DEVOPS_PK0 || !process.env.DEVOPS_WALLET0) {
console.log('Must provide environment variable DEVOPS_PK0 and DEVOPS_WALLET0 when running in this network');
process.exit(1);
} else {
const pk = process.env.DEVOPS_PK0;
return new PrivateKeyProvider(pk, 'https://rinkeby.infura.io/v3/dac11f4ffdaa4089b7a945654082298a');
}
return false;
},
network_id: '4',
wallet_address: process.env.DEVOPS_WALLET0,
},
rinkeby1: {
provider() {
if (!process.env.DEVOPS_PK1 || !process.env.DEVOPS_WALLET1) {
console.log('Must provide environment variable DEVOPS_PK1 and DEVOPS_WALLET1 when running in this network');
process.exit(1);
} else {
const pk = process.env.DEVOPS_PK1;
return new PrivateKeyProvider(pk, 'https://rinkeby.infura.io/v3/dac11f4ffdaa4089b7a945654082298a');
}
return false;
},
network_id: '4',
wallet_address: process.env.DEVOPS_WALLET1,
},
rinkeby2: {
provider() {
if (!process.env.DEVOPS_PK2 || !process.env.DEVOPS_WALLET2) {
console.log('Must provide environment variable DEVOPS_PK2 and DEVOPS_WALLET2 when running in this network');
process.exit(1);
} else {
const pk = process.env.DEVOPS_PK2;
return new PrivateKeyProvider(pk, 'https://rinkeby.infura.io/v3/dac11f4ffdaa4089b7a945654082298a');
}
return false;
},
network_id: '4',
wallet_address: process.env.DEVOPS_WALLET2,
},
mainnet0: {
provider() {
if (!process.env.DEVOPS_PK0 || !process.env.DEVOPS_WALLET0) {
console.log('Must provide environment variable DEVOPS_PK0 and DEVOPS_WALLET0 when running in this network');
process.exit(1);
} else {
const pk = process.env.DEVOPS_PK0;
return new PrivateKeyProvider(pk, `https://mainnet.infura.io/v3/${process.env.INFURA_KEY}`);
}
return false;
},
network_id: '1',
wallet_address: process.env.DEVOPS_WALLET0,
gas: utils.gasLimit('deployJurisdiction'),
gasPrice: utils.gasPrice(),
},
mainnet: {
provider() {
if (!process.env.DEVOPS_PK1 || !process.env.DEVOPS_WALLET1) {
console.log('Must provide environment variable DEVOPS_PK1 and DEVOPS_WALLET1 when running in this network');
process.exit(1);
} else {
const pk = process.env.DEVOPS_PK1;
return new PrivateKeyProvider(pk, `https://mainnet.infura.io/v3/${process.env.INFURA_KEY}`);
}
return false;
},
network_id: '1',
wallet_address: process.env.DEVOPS_WALLET1,
gas: utils.gasLimit('vestingContract'),
gasPrice: utils.gasPrice(),
},
mainnet1: {
provider() {
if (!process.env.DEVOPS_PK1 || !process.env.DEVOPS_WALLET1) {
console.log('Must provide environment variable DEVOPS_PK1 and DEVOPS_WALLET1 when running in this network');
process.exit(1);
} else {
const pk = process.env.DEVOPS_PK1;
return new PrivateKeyProvider(pk, `https://mainnet.infura.io/v3/${process.env.INFURA_KEY}`);
}
return false;
},
network_id: '1',
wallet_address: process.env.DEVOPS_WALLET1,
gas: utils.gasLimit('vestingContract'),
gasPrice: utils.gasPrice(),
},
mainnet2: {
provider() {
if (!process.env.DEVOPS_PK2 || !process.env.DEVOPS_WALLET2) {
console.log('Must provide environment variable DEVOPS_PK2 and DEVOPS_WALLET2 when running in this network');
process.exit(1);
} else {
const pk = process.env.DEVOPS_PK2;
return new PrivateKeyProvider(pk, `https://mainnet.infura.io/v3/${process.env.INFURA_KEY}`);
}
return false;
},
network_id: '1',
wallet_address: process.env.DEVOPS_WALLET2,
gas: utils.gasLimit('deployJurisdiction'),
gasPrice: utils.gasPrice(),
},
coverage: {
host: 'localhost',
network_id: '*',
port: 8555,
gas: 0xfffffffffff,
gasPrice: 0x01,
},
},
compilers: {
solc: {
version: '0.4.25',
optimizer: {
enabled: false,
runs: 500,
},
},
},
};