-
Notifications
You must be signed in to change notification settings - Fork 9
/
truffle.js
131 lines (124 loc) · 4.19 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
'use strict';
const BN = require('bn.js');
const HDWalletProvider = require("@truffle/hdwallet-provider");
require('dotenv').config() // Store environment-specific variable from '.env' to process.env
const DISTRICT_REGISTRY_ENV = process.env.DISTRICT_REGISTRY_ENV || "dev";
const smartContractsPaths = {
"dev" : '/src/district_registry/shared/smart_contracts_dev.cljs',
"qa" : '/src/district_registry/shared/smart_contracts_qa.cljs',
"prod" :'/src/district_registry/shared/smart_contracts_prod.cljs'
};
let parameters = {
"dev": {
KitDistrict : {includeApps: ["voting", "vault", "finance"]},
// KitDistrict : {includeApps: ["voting", "vault"]},
// KitDistrict : {includeApps: ["finance"]},
// KitDistrict : {includeApps: ["voting"]},
districtRegistryDb : {
challengePeriodDuration : 0,
commitPeriodDuration : 60, // seconds
revealPeriodDuration : 60, // seconds
deposit : 1e18, // 1e18 = 1 DNT
challengeDispensation : 50, // percent
voteQuorum : 50, // percent
},
paramChangeRegistryDb : {
challengePeriodDuration : 600, // seconds
commitPeriodDuration : 600, // seconds
revealPeriodDuration : 600, // seconds
deposit : 1e18, // 1e18 = 1 DNT
challengeDispensation : 50, // percent
voteQuorum : 50 // percent
}
},
"qa" : {
ENS: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",
districtRegistryDb : {
challengePeriodDuration : 0,
commitPeriodDuration : 200, // seconds
revealPeriodDuration : 200, // s econds
deposit : 1e18, // 1e18 = 1 DNT
challengeDispensation : 50, // percent
voteQuorum : 50, // percent
},
paramChangeRegistryDb : {
challengePeriodDuration : 200, // seconds
commitPeriodDuration : 200, // seconds
revealPeriodDuration : 200, // seconds
deposit : 1e18, // 1e18 = 1 DNT
challengeDispensation : 50, // percent
voteQuorum : 50 // percent
}
},
"prod" : {
DNT: "0x0abdace70d3790235af448c88547603b945604ea",
// MiniMeTokenFactory: "0xa7dd95d9978dde794eae5233889f1ffebcdc9914",
ENS: "0x314159265dd8dbb310642f98f50c066173c1259b",
DAOFactory: "0xb9da44c051c6cc9e04b7e0f95e95d69c6a6d8031",
FIFSResolvingRegistrar: "0x546aa2eae2514494eeadb7bbb35243348983c59d",
KitDistrict : {includeApps: ["voting", "vault", "finance"]},
District0xEmails: "0x5065ef0724b76421aeaafa87ba752d6c5d5499b5",
districtRegistryDb : {
challengePeriodDuration : 0,
commitPeriodDuration : 259200, // seconds
revealPeriodDuration : 259200, // seconds
deposit : "10000000000000000000000", // 1e18 = 1 DNT
challengeDispensation : 50, // percent
},
paramChangeRegistryDb : {
challengePeriodDuration : 259200, // seconds
commitPeriodDuration : 259200, // seconds
revealPeriodDuration : 259200, // seconds
deposit : "1000000000000000000000000000", // 1e18 = 1 DNT
challengeDispensation : 50, // percent
}
}
};
module.exports = {
env: DISTRICT_REGISTRY_ENV,
smartContractsPath: __dirname + smartContractsPaths[DISTRICT_REGISTRY_ENV],
contracts_build_directory: __dirname + '/resources/public/contracts/build/',
parameters : parameters[DISTRICT_REGISTRY_ENV],
networks: {
ganache: {
host: 'localhost',
port: 8545,
gas: 6e6, // gas limit
gasPrice: 4e9,
network_id: '*',
skipDryRun: true
},
parity: {
host: 'localhost',
port: 8545,
gas: 6e6,
gasPrice: 3e9, // 6 gwei
network_id: '*',
skipDryRun: true
},
"infura-ropsten": {
provider: () => new HDWalletProvider(process.env.MNENOMIC || process.env.ROPSTEN_PRIV_KEY, "https://ropsten.infura.io/v3/" + process.env.INFURA_API_KEY),
network_id: 3,
gas: 6e6,
gasPrice: 5e9,
skipDryRun: true
},
"infura-mainnet": {
provider: () => new HDWalletProvider(process.env.MNENOMIC || process.env.MAINNET_PRIV_KEY, "https://mainnet.infura.io/v3/" + process.env.INFURA_API_KEY),
network_id: 1,
gas: 6e6,
gasPrice: 110e9,
skipDryRun: true
}
},
compilers: {
solc: {
version: "0.4.24",
settings: {
optimizer: {
enabled: true
}
}
}
}
}