-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.js
421 lines (406 loc) · 13.9 KB
/
config.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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
const TESTURL = 'http://localhost:8889' // Localhost
//const TESTURL = 'http://54.200.124.65:8889' // QAnet
//const TESTURL = 'http://18.237.87.177:8889' // DEV1
//const TESTURL = 'http://44.238.153.162:8889' // Devnet
//const TESTURL = 'http://fiotestnet.greymass.com' // Testnet
//const TESTURL = 'https://fio.greymass.com' // Mainnet
//const TESTURL = 'http://52.40.41.71:8889' // Eric DEV
//const TESTURL = 'http://52.35.164.8:8889' // Mike DEV
const HISTORYURL = 'http://35.85.153.248:8080' // History
const DEVTOOLSDIR = '../fio.devtools'
const config = {
DEFAULT_DOMAIN: 'smoketest',
URL: TESTURL,
HISTORYURL: HISTORYURL,
BASE_URL: TESTURL + '/v1/',
CLIO: DEVTOOLSDIR + '/bin/clio -u ' + TESTURL,
WALLETKEYFILE: DEVTOOLSDIR + '/walletkey.ini',
//use this prod key file after you get a copy of the file from Ed, then you can run the
//fee-voting-fee-setting.js.
// PRODKEYFILE: DEVTOOLSDIR + '/scripts/launch/producers/keys_producers_devnet.csv',
PRODKEYFILE: DEVTOOLSDIR + '/scripts/launch/producers/keys.csv',
FAUCET_PRIV_KEY: '5KF2B21xT5pE5G3LNA6LKJc6AP2pAd2EnfpAUrJH12SFV8NtvCD',
FAUCET_PUB_KEY: 'FIO6zwqqzHQcqCc2MB4jpp1F73MXpisEQe2SDghQFSGQKoAPjvQ3H',
FAUCET_ACCOUNT: 'qhh25sqpktwh',
FUNDS: 3000000000000,
BILLION: 1000000000,
maxFee: 800000000000,
maxOracleFee: 600000000000,
defaultBundleCount: 100,
// lock duration periods for local testing
UNSTAKELOCKDURATIONSECONDS: 70,
SECONDSPERDAY: 10,
error: {
validationError: 'ValidationError',
validationError2: 'Validation error',
signatureError: 'Request signature is not valid or this user is not allowed to sign this transaction.',
invalidAmount: 'Invalid amount value',
invalidKey: 'Invalid FIO Public Key',
keyNotFound: 'Public key not found',
publicAddressFound: 'Public address not found',
insufficientBalance: 'Insufficient balance',
insufficientFunds: 'Insufficient funds to cover fee',
feeExceedsMax: 'Fee exceeds supplied maximum.',
domainNotPublic: 'FIO Domain is not public. Only owner can create FIO Addresses.',
duplicateTxn: 'Duplicate transaction',
domainRegistered: 'FIO domain already registered',
invalidDomain: 'Invalid FIO domain',
fioDomainRequired: 'fioDomain is required.',
fioAddressNotRegistered: 'FIO Address not registered',
fioDomainInvalidChar: 'fioDomain must match /^[a-z0-9\\-]+$/i.',
fioAddressRequired: 'fioAddress is required.',
fioDomainLengthErr: 'fioDomain must have a length between 1 and 62.',
fioAddressLengthErr: 'fioAddress must have a length between 3 and 64.',
//fioAddressInvalidChar: 'fioAddress must match /^(?:(?=.{3,64}$)[a-zA-Z0-9]{1}(?:(?!-{2,}))[a-zA-Z0-9-]*[a-zA-Z0-9]+@[a-zA-Z0-9]{1}(?:(?!-{2,}))[a-zA-Z0-9-]*[a-zA-Z0-9]+$)/gim.',
fioAddressInvalidChar: 'fioAddress must match /^(?:(?=.{3,64}$)[a-zA-Z0-9]{1}(?:(?:(?!-{2,}))[a-zA-Z0-9-]*[a-zA-Z0-9]+){0,1}@[a-zA-Z0-9]{1}(?:(?:(?!-{2,}))[a-zA-Z0-9-]*[a-zA-Z0-9]+){0,1}$)/gim.',
invalidFioName: 'Invalid FIO Name',
noFioNames: 'No FIO names', // 404 Response
regdomainLockedAccount: 'regdomain not permitted for account with locked tokens, use an account without locked tokens.',
nestedProxy: 'assertion failure with message: account registered as a proxy is not allowed to use a proxy',
invalidDomainOwner: 'The signer does not own the domain',
fioDomainNotRegistered: 'FIO Domain not registered',
fioDomainNeedsRenew: 'FIO Domain expired. Renew first.',
invalidMultiplierFeeError: 'missing setfeemult.multiplier (type=float64)',
invalidRatioFeeError: 'invalid number',
noFioDomains: 'No FIO Domains',
invalidOffset: 'Invalid offset',
invalidLimit: 'Invalid limit',
parseError: 'Parse Error',
noFioAddresses: 'No FIO Addresses',
noFioRequests: 'No FIO Requests',
requestNotFound: 'No such FIO Request',
invalidRequestStatus: 'Only pending requests can be cancelled.',
noPendingRequests: 'No pending FIO Requests',
invalidTpid: 'TPID must be empty or valid FIO address',
invalidRequestSignature: 'Request signature is not valid or this user is not allowed to sign this transaction.',
invalidFeeValue: 'Invalid fee value',
activeProducer: 'FIO Address is active producer. Unregister first.',
activeProxy: 'FIO Address is proxy. Unregister first.',
invalidTpidSdk: 'tpid must match /^(?:(?=.{3,64}$)[a-zA-Z0-9]{1}(?:(?:(?!-{2,}))[a-zA-Z0-9-]*[a-zA-Z0-9]+){0,1}@[a-zA-Z0-9]{1}(?:(?:(?!-{2,}))[a-zA-Z0-9-]*[a-zA-Z0-9]+){0,1}$)/gim.',
invalidTokenCode: 'Invalid token code format',
ivalidRejection: 'Only pending requests can be rejected.',
invalidPayerFioAddress: 'payerFioAddress must match /^(?:(?=.{3,64}$)[a-zA-Z0-9]{1}(?:(?:(?!-{2,}))[a-zA-Z0-9-]*[a-zA-Z0-9]+){0,1}@[a-zA-Z0-9]{1}(?:(?:(?!-{2,}))[a-zA-Z0-9-]*[a-zA-Z0-9]+){0,1}$)/gim.',
invalidPayeeFioAddress: 'payeeFioAddress must match /^(?:(?=.{3,64}$)[a-zA-Z0-9]{1}(?:(?:(?!-{2,}))[a-zA-Z0-9-]*[a-zA-Z0-9]+){0,1}@[a-zA-Z0-9]{1}(?:(?:(?!-{2,}))[a-zA-Z0-9-]*[a-zA-Z0-9]+){0,1}$)/gim.',
locktokenacctexists: 'can_vote:0 locked tokens cannot be transferred to an account that already exists',
locktoken0to1: 'can_vote:0 locked tokens cannot be transferred to an account that contains can_vote:1 locked tokens',
locktoken1to0: 'can_vote:1 locked tokens cannot be transferred to an account that contains can_vote:0 locked tokens'
},
error2: {
noFioNames: {
message: 'No FIO names',
statusCode: 404
},
addressNotFound: {
message: 'FIO Address not found',
statusCode: 404
},
feeExceedsMax: {
message: 'Fee exceeds supplied maximum.',
statusCode: 400
},
invalidFioAddress: {
message: 'Invalid FIO Address',
statusCode: 400
},
invalidPublicAddress: {
message: 'Invalid public address',
statusCode: 400
},
invalidTpid: {
message: 'TPID must be empty or valid FIO address',
statusCode: 400
},
invalidActor: {
message: 'Invalid Actor',
statusCode: 403
},
invalidSignature: {
message: 'Request signature is not valid or this user is not allowed to sign this transaction.',
statusCode: 403
},
invalidAction: {
message: 'Action invalid or not found',
statusCode: 500
},
invalidContract: {
message: 'Contract name invalid or not found',
statusCode: 500
},
invalidActorAuth: {
message: 'Missing required authority',
statusCode: 500
},
accountExists: {
message: 'Account name already exists',
statusCode: 500
},
noActions: {
message: 'No actions',
statusCode: 404
},
invalidBundleSets: {
message: 'Invalid bundle_sets value',
statusCode: 400
},
invalidFeeValue: {
message: 'Invalid fee value',
statusCode: 400
},
insufficientFunds: {
message: 'Insufficient funds to cover fee',
statusCode: 400
},
fioAddressNotRegistered: {
message: 'FIO Address not registered',
statusCode: 400
}
},
api: {
register_fio_domain: {
bundledEligible: false,
fee: 800000000000
},
register_fio_address: {
bundledEligible: false,
fee: 40000000000
},
renew_fio_domain: {
bundledEligible: false,
fee: 800000000000
},
renew_fio_address: {
bundledEligible: false,
fee: 40000000000
},
burn_fio_address: {
bundledEligible: true,
fee: 400000000
},
transfer_fio_domain: {
bundledEligible: false,
fee: 1000000000
},
transfer_fio_address: {
bundledEligible: false,
fee: 1000000000
},
add_pub_address: {
bundledEligible: true,
fee: 600000000
},
remove_pub_address: {
bundledEligible: true,
fee: 600000000
},
remove_all_pub_addresses: {
bundledEligible: true,
fee: 600000000
},
transfer_tokens_pub_key: {
bundledEligible: false,
fee: 2000000000
},
new_funds_request: {
bundledEligible: true,
fee: 1200000000
},
reject_funds_request: {
bundledEligible: true,
fee: 600000000
},
record_obt_data: {
bundledEligible: true,
fee: 1200000000
},
set_fio_domain_public: {
bundledEligible: false,
fee: 600000000
},
register_producer: {
bundledEligible: false,
fee: 200000000000
},
register_proxy: {
bundledEligible: false,
fee: 20000000000
},
unregister_proxy: {
bundledEligible: false,
fee: 400000000
},
unregister_producer: {
bundledEligible: false,
fee: 400000000
},
proxy_vote: {
bundledEligible: true,
fee: 600000000
},
vote_producer: {
bundledEligible: true,
fee: 600000000
},
auth_delete: {
bundledEligible: false,
fee: 400000000
},
auth_link: {
bundledEligible: false,
fee: 400000000
},
auth_update: {
bundledEligible: false,
fee: 1000000000 // 1.0 per 1,000 bytes
},
msig_propose: {
bundledEligible: false,
fee: 1000000000 // 1.0 per 1,000 bytes
},
msig_approve: {
bundledEligible: false,
fee: 400000000
},
msig_unapprove: {
bundledEligible: false,
fee: 400000000
},
msig_cancel: {
bundledEligible: false,
fee: 400000000
},
msig_exec: {
bundledEligible: false,
fee: 400000000
},
msig_invalidate: {
bundledEligible: false,
fee: 400000000
},
cancel_funds_request: {
bundledEligible: true,
fee: 600000000
} ,
add_nft: {
bundledEligible: true,
fee: 600000000
},
remove_nft: {
bundledEligible: true,
fee: 600000000
},
remove_all_nfts: {
bundledEligible: true,
fee: 1200000000
},
stake_fio_tokens: {
bundledEligible: true,
fee: 3000000000
},
unstake_fio_tokens: {
bundledEligible: true,
fee: 3000000000
},
list_domain: {
bundledEligible: false,
fee: 2000000000
},
cancel_list_domain: {
bundledEligible: false,
fee: 1000000000
},
buy_domain: {
bundledEligible: false,
fee: 2000000000
},
set_marketplace_config: {
bundledEligible: false,
fee: 500000000
}
},
paramMax: {
fio_domain: 62,
fio_address: 64,
chain_code: 10,
token_code: 10,
tpid: 64,
nbpa: 128,
new_funds_request_content: 296,
record_obt_data_content: 432,
auth_delete: 400000000,
auth_link: 400000000,
auth_update: 1000000000,
msig_propose: 1000000000,
msig_approve: 400000000,
msig_unapprove: 400000000,
msig_cancel: 400000000,
msig_exec: 400000000,
msig_invalidate: 400000000
},
RAM: {
INITIALACCOUNTRAM: 25600,
REGDOMAINRAM: 2560,
REGADDRESSRAM: 2560,
ADDADDRESSRAM: 512,
SETDOMAINPUBRAM: 256,
BURNEXPIREDRAM: 0,
NEWFUNDSREQUESTRAM: 3120,
RECORDOBTRAM: 4098,
RENEWADDRESSRAM: 1024,
RENEWDOMAINRAM: 1024,
TPIDCLAIMRAM: 0,
BPCLAIMRAM: 0,
TRANSFERRAM: 0,
TRANSFERPUBKEYRAM: 1024,
REJECTFUNDSRAM: 512,
UPDATEFEESRAM: 0,
SETFEEVOTERAM: 0,
BUNDLEVOTERAM: 0,
SETFEEMULTRAM: 0,
LINKAUTHRAM: 1024,
REGPRODUCERRAM: 2560,
UNREGPRODUCERRAM: 0,
REGPROXYRAM: 2560,
UNREGPROXYRAM: 0,
VOTEPROXYRAM: 512,
VOTEPRODUCERRAM: 1024,
UPDATEAUTHRAM: 1024,
XFERDOMAINRAM: 512,
XFERADDRESSRAM: 512,
CANCELFUNDSRAM: 512,
BUNDLEVOTERAM: 0,
FIOESCROWRAM: 1536,
ADDNFTRAMBASE: 512,
ADDNFTRAM: 2048,
STAKEFIOTOKENSRAM: 512,
UNSTAKEFIOTOKENSRAM: 512,
WRAPTOKENRAM: 512,
WRAPDOMAINRAM: 512,
TRANSLOCTOKSRAM: 1200
},
public_addresses: [
{
chain_code: 'BCH',
token_code: 'BCH',
public_address: 'bitcoincash:qzf8zha74ahdh9j0xnwlffdn0zuyaslx3c90q7n9g9',
},
{
chain_code: 'DASH',
token_code: 'DASH',
public_address: 'XyCyPKzTWvW2XdcYjPaPXGQDCGk946ywEv',
}
],
devBPs: [{
"account": "3rmu4bip1dpi",
"feeMultiplier": 1.0
},
{
"account": "hpketsxgdcxe",
"feeMultiplier": 1.0
},
{
"account": "l4wbalfn5jcp",
"feeMultiplier": 1.0
}
]
}
module.exports = config;