tx · 9iRCKULuSrgreEPfNpnpvnr5LiijwDkJ26QDeQRCGxgx 3N7m9xGD4z7uJNvH1s7U1yyU9FygAyDfgNf: -0.02100000 Waves 2023.03.07 21:50 [2480045] smart account 3N7m9xGD4z7uJNvH1s7U1yyU9FygAyDfgNf > SELF 0.00000000 Waves
{ "type": 13, "id": "9iRCKULuSrgreEPfNpnpvnr5LiijwDkJ26QDeQRCGxgx", "fee": 2100000, "feeAssetId": null, "timestamp": 1678214866431, "version": 2, "chainId": 84, "sender": "3N7m9xGD4z7uJNvH1s7U1yyU9FygAyDfgNf", "senderPublicKey": "5xVy1ofqNp5FKaYbUWbxAYDz718ERzA8Eb4RB54ECJV2", "proofs": [ "3mBx5HiCAKmBKgUnA9RjL6Yf5ZRFDUVyRyAwBBaQtKxC2wNspYXww2ApzXKGspoxcYSRswW1p3juJU3rsFBTsrBt" ], "script": "base64:BgI4CAISBwoFAQEBCAESBQoDARgBEgUKAwEBCBIHCgUBAQgICBIFCgMBAQgSAwoBCBIDCgEBEgMKAQhmAAlTRVBBUkFUT1ICAl9fAAhLRVlfSU5JVAIESU5JVAAMS0VZX01VTFRJU0lHAghNVUxUSVNJRwAKS0VZX1NUQVRVUwIGU1RBVFVTABBLRVlfTUlOX1NFQ19ERVBPAgxNSU5fU0VDX0RFUE8ADktFWV9QVU5JU0hNRU5UAgpQVU5JU0hNRU5UABVLRVlfUkVTRVRfQkxPQ0tfREVMVEECEVJFU0VUX0JMT0NLX0RFTFRBAAxLRVlfU0VDX0RFUE8CCFNFQ19ERVBPABhLRVlfUkVXQVJEX1RPS0VOX0FERFJFU1MCFFJFV0FSRF9UT0tFTl9BRERSRVNTABFLRVlfUkVXQVJEX0FNT1VOVAINUkVXQVJEX0FNT1VOVAARS0VZX0NVUlJFTlRfRVBPQ0gCDUNVUlJFTlRfRVBPQ0gAFUtFWV9TSUdORVJTX1BFUl9FUE9DSAIRU0lHTkVSU19QRVJfRVBPQ0gAEEtFWV9FVkVOVF9TVEFUVVM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mFsaWQgbXVsdGlzaWcgYWRkcmVzcwcDCQAAAgUDZXJyBQNlcnIJAJQKAgkBDV9zYXZlTXVsdGlzaWcBCQERQGV4dHJOYXRpdmUoMTA2MikBBQltdWx0aXNpZ18FBHVuaXQJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4BAnR4AQZ2ZXJpZnkABAckbWF0Y2gwCQCiCAEFDEtFWV9NVUxUSVNJRwMJAAECBQckbWF0Y2gwAgZTdHJpbmcECG11bHRpc2lnBQckbWF0Y2gwCQELdmFsdWVPckVsc2UCCQCbCAIJARFAZXh0ck5hdGl2ZSgxMDYyKQEFCG11bHRpc2lnCQC5CQIJAMwIAgUKS0VZX1NUQVRVUwkAzAgCCQClCAEFBHRoaXMJAMwIAgkA2AQBCAUCdHgCaWQFA25pbAUJU0VQQVJBVE9SBwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleRr/sbE=", "height": 2480045, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4wFbEBnphYe5Fiend6wRjrdqLeMw3ZgvGdYSCGbt94Zf Next: none Diff:
Old | New | Differences | |
---|---|---|---|
235 | 235 | func _saveSigners (execChainId_,epoch_,signers_) = [StringEntry(makeString([KEY_SIGNERS_PER_EPOCH, toString(execChainId_), toString(epoch_)], SEPARATOR), makeString(signers_, SEPARATOR))] | |
236 | 236 | ||
237 | 237 | ||
238 | - | func _loadEventStatus (eventId_) = match getInteger(makeString([KEY_EVENT_STATUS, toString(eventId_)], SEPARATOR)) { | |
238 | + | func _loadEventStatus (execChainId_,eventId_) = match getInteger(makeString([KEY_EVENT_STATUS, toString(execChainId_), toString(eventId_)], SEPARATOR)) { | |
239 | 239 | case a: Int => | |
240 | 240 | a | |
241 | 241 | case _ => | |
243 | 243 | } | |
244 | 244 | ||
245 | 245 | ||
246 | - | func _saveEventStatus (eventId_,status_) = [IntegerEntry(makeString([KEY_EVENT_STATUS, toString(eventId_)], SEPARATOR), status_)] | |
246 | + | func _saveEventStatus (execChainId_,eventId_,status_) = [IntegerEntry(makeString([KEY_EVENT_STATUS, toString(execChainId_), toString(eventId_)], SEPARATOR), status_)] | |
247 | 247 | ||
248 | 248 | ||
249 | 249 | func _loadLock (publicKey_) = match getInteger(makeString([KEY_LOCKS, publicKey_], SEPARATOR)) { | |
268 | 268 | func _saveT (execChainId_,epoch_,val_) = [IntegerEntry(makeString([KEY_T, toString(execChainId_), toString(epoch_)], SEPARATOR), val_)] | |
269 | 269 | ||
270 | 270 | ||
271 | - | func _loadRsByEvent (eventId_) = match getString(makeString([KEY_R, toString(eventId_)], SEPARATOR)) { | |
271 | + | func _loadRsByEvent (execChainId_,eventId_) = match getString(makeString([KEY_R, toString(execChainId_), toString(eventId_)], SEPARATOR)) { | |
272 | 272 | case a: String => | |
273 | 273 | split(a, SEPARATOR) | |
274 | 274 | case _ => | |
276 | 276 | } | |
277 | 277 | ||
278 | 278 | ||
279 | - | func _saveRsByEvent (eventId_,rs_) = [StringEntry(makeString([KEY_R, toString(eventId_)], SEPARATOR), makeString(rs_, SEPARATOR))] | |
279 | + | func _saveRsByEvent (execChainId_,eventId_,rs_) = [StringEntry(makeString([KEY_R, toString(execChainId_), toString(eventId_)], SEPARATOR), makeString(rs_, SEPARATOR))] | |
280 | 280 | ||
281 | 281 | ||
282 | - | func _loadSsByEvent (eventId_) = match getString(makeString([KEY_S, toString(eventId_)], SEPARATOR)) { | |
282 | + | func _loadSsByEvent (execChainId_,eventId_) = match getString(makeString([KEY_S, toString(execChainId_), toString(eventId_)], SEPARATOR)) { | |
283 | 283 | case a: String => | |
284 | 284 | split(a, SEPARATOR) | |
285 | 285 | case _ => | |
287 | 287 | } | |
288 | 288 | ||
289 | 289 | ||
290 | - | func _saveSsByEvent (eventId_,ss_) = [StringEntry(makeString([KEY_S, toString(eventId_)], SEPARATOR), makeString(ss_, SEPARATOR))] | |
290 | + | func _saveSsByEvent (execChainId_,eventId_,ss_) = [StringEntry(makeString([KEY_S, toString(execChainId_), toString(eventId_)], SEPARATOR), makeString(ss_, SEPARATOR))] | |
291 | 291 | ||
292 | 292 | ||
293 | - | func _loadRSigmaByEvent (eventId_) = match getString(makeString([KEY_R_SIGMA, toString(eventId_)], SEPARATOR)) { | |
293 | + | func _loadRSigmaByEvent (execChainId_,eventId_) = match getString(makeString([KEY_R_SIGMA, toString(execChainId_), toString(eventId_)], SEPARATOR)) { | |
294 | 294 | case a: String => | |
295 | 295 | a | |
296 | 296 | case _ => | |
298 | 298 | } | |
299 | 299 | ||
300 | 300 | ||
301 | - | func _saveRSigmaByEvent (eventId_,rSigma_) = [StringEntry(makeString([KEY_R_SIGMA, toString(eventId_)], SEPARATOR), rSigma_)] | |
301 | + | func _saveRSigmaByEvent (execChainId_,eventId_,rSigma_) = [StringEntry(makeString([KEY_R_SIGMA, toString(execChainId_), toString(eventId_)], SEPARATOR), rSigma_)] | |
302 | 302 | ||
303 | 303 | ||
304 | - | func _loadSSigmaByEvent (eventId_) = match getString(makeString([KEY_S_SIGMA, toString(eventId_)], SEPARATOR)) { | |
304 | + | func _loadSSigmaByEvent (execChainId_,eventId_) = match getString(makeString([KEY_S_SIGMA, toString(execChainId_), toString(eventId_)], SEPARATOR)) { | |
305 | 305 | case a: String => | |
306 | 306 | a | |
307 | 307 | case _ => | |
309 | 309 | } | |
310 | 310 | ||
311 | 311 | ||
312 | - | func _saveSSigmaByEvent (eventId_,sSigma_) = [StringEntry(makeString([KEY_S_SIGMA, toString(eventId_)], SEPARATOR), sSigma_)] | |
312 | + | func _saveSSigmaByEvent (execChainId_,eventId_,sSigma_) = [StringEntry(makeString([KEY_S_SIGMA, toString(execChainId_), toString(eventId_)], SEPARATOR), sSigma_)] | |
313 | 313 | ||
314 | 314 | ||
315 | - | func _loadRByEventAndSigner (eventId_,signer_) = match getString(makeString([KEY_R, toString(eventId_), signer_], SEPARATOR)) { | |
315 | + | func _loadRByEventAndSigner (execChainId_,eventId_,signer_) = match getString(makeString([KEY_R, toString(execChainId_), toString(eventId_), signer_], SEPARATOR)) { | |
316 | 316 | case a: String => | |
317 | 317 | a | |
318 | 318 | case _ => | |
320 | 320 | } | |
321 | 321 | ||
322 | 322 | ||
323 | - | func _saveRByEventAndSigner (eventId_,signer_,r_) = [StringEntry(makeString([KEY_R, toString(eventId_), signer_], SEPARATOR), r_)] | |
323 | + | func _saveRByEventAndSigner (execChainId_,eventId_,signer_,r_) = [StringEntry(makeString([KEY_R, toString(execChainId_), toString(eventId_), signer_], SEPARATOR), r_)] | |
324 | 324 | ||
325 | 325 | ||
326 | - | func _loadSByEventAndSigner (eventId_,signer_) = match getString(makeString([KEY_S, toString(eventId_), signer_], SEPARATOR)) { | |
326 | + | func _loadSByEventAndSigner (execChainId_,eventId_,signer_) = match getString(makeString([KEY_S, toString(execChainId_), toString(eventId_), signer_], SEPARATOR)) { | |
327 | 327 | case a: String => | |
328 | 328 | a | |
329 | 329 | case _ => | |
331 | 331 | } | |
332 | 332 | ||
333 | 333 | ||
334 | - | func _saveSByEventAndSigner (eventId_,signer_,s_) = [StringEntry(makeString([KEY_S, toString(eventId_), signer_], SEPARATOR), s_)] | |
334 | + | func _saveSByEventAndSigner (execChainId_,eventId_,signer_,s_) = [StringEntry(makeString([KEY_S, toString(execChainId_), toString(eventId_), signer_], SEPARATOR), s_)] | |
335 | 335 | ||
336 | 336 | ||
337 | - | func _loadSignersWithRByEvent (eventId_) = match getString(makeString([KEY_R_SIGNERS, toString(eventId_)], SEPARATOR)) { | |
337 | + | func _loadSignersWithRByEvent (execChainId_,eventId_) = match getString(makeString([KEY_R_SIGNERS, toString(execChainId_), toString(eventId_)], SEPARATOR)) { | |
338 | 338 | case a: String => | |
339 | 339 | split(a, SEPARATOR) | |
340 | 340 | case _ => | |
342 | 342 | } | |
343 | 343 | ||
344 | 344 | ||
345 | - | func _saveSignersWithRByEvent (eventId_,rs_) = [StringEntry(makeString([KEY_R_SIGNERS, toString(eventId_)], SEPARATOR), makeString(rs_, SEPARATOR))] | |
345 | + | func _saveSignersWithRByEvent (execChainId_,eventId_,rs_) = [StringEntry(makeString([KEY_R_SIGNERS, toString(execChainId_), toString(eventId_)], SEPARATOR), makeString(rs_, SEPARATOR))] | |
346 | 346 | ||
347 | 347 | ||
348 | - | func _loadSignersWithSByEvent (eventId_) = match getString(makeString([KEY_S_SIGNERS, toString(eventId_)], SEPARATOR)) { | |
348 | + | func _loadSignersWithSByEvent (execChainId_,eventId_) = match getString(makeString([KEY_S_SIGNERS, toString(execChainId_), toString(eventId_)], SEPARATOR)) { | |
349 | 349 | case a: String => | |
350 | 350 | split(a, SEPARATOR) | |
351 | 351 | case _ => | |
353 | 353 | } | |
354 | 354 | ||
355 | 355 | ||
356 | - | func _saveSignersWithSByEvent (eventId_,ss_) = [StringEntry(makeString([KEY_S_SIGNERS, toString(eventId_)], SEPARATOR), makeString(ss_, SEPARATOR))] | |
356 | + | func _saveSignersWithSByEvent (execChainId_,eventId_,ss_) = [StringEntry(makeString([KEY_S_SIGNERS, toString(execChainId_), toString(eventId_)], SEPARATOR), makeString(ss_, SEPARATOR))] | |
357 | 357 | ||
358 | 358 | ||
359 | - | func _loadEventStartBlock (eventId_) = match getInteger(makeString([KEY_EVENT_START_BLOCK, toString(eventId_)], SEPARATOR)) { | |
359 | + | func _loadEventStartBlock (execChainId_,eventId_) = match getInteger(makeString([KEY_EVENT_START_BLOCK, toString(execChainId_), toString(eventId_)], SEPARATOR)) { | |
360 | 360 | case a: Int => | |
361 | 361 | a | |
362 | 362 | case _ => | |
364 | 364 | } | |
365 | 365 | ||
366 | 366 | ||
367 | - | func _saveEventStartBlock (eventId_,val_) = [IntegerEntry(makeString([KEY_EVENT_START_BLOCK, toString(eventId_)], SEPARATOR), val_)] | |
367 | + | func _saveEventStartBlock (execChainId_,eventId_,val_) = [IntegerEntry(makeString([KEY_EVENT_START_BLOCK, toString(execChainId_), toString(eventId_)], SEPARATOR), val_)] | |
368 | 368 | ||
369 | 369 | ||
370 | 370 | func _loadSignedEventExecutorIdxSize (executionChainId_) = match getInteger(makeString([KEY_SIGNED_EVENT_EXECUTOR, toString(executionChainId_), KEY_SIZE], SEPARATOR)) { | |
419 | 419 | else true | |
420 | 420 | ||
421 | 421 | ||
422 | - | func _checkEventStatusForSubmitR (eventId_,err_) = if ((_loadEventStatus(eventId_) != EVENT_STATUS_INIT)) | |
422 | + | func _checkEventStatusForSubmitR (execChainId_,eventId_,err_) = if ((_loadEventStatus(execChainId_, eventId_) != EVENT_STATUS_INIT)) | |
423 | 423 | then throw(err_) | |
424 | 424 | else true | |
425 | 425 | ||
426 | 426 | ||
427 | - | func _checkEventStatusForSubmitS (eventId_,err_) = if ((_loadEventStatus(eventId_) != EVENT_STATUS_SIGN)) | |
427 | + | func _checkEventStatusForSubmitS (execChainId_,eventId_,err_) = if ((_loadEventStatus(execChainId_, eventId_) != EVENT_STATUS_SIGN)) | |
428 | 428 | then throw(err_) | |
429 | 429 | else true | |
430 | 430 | ||
431 | 431 | ||
432 | - | func _checkEventStatusForReset (eventId_,err_) = if (if ((_loadEventStatus(eventId_) != EVENT_STATUS_SIGN)) | |
432 | + | func _checkEventStatusForReset (execChainId_,eventId_,err_) = if (if ((_loadEventStatus(execChainId_, eventId_) != EVENT_STATUS_SIGN)) | |
433 | 433 | then true | |
434 | - | else (height >= (_loadEventStartBlock(eventId_) + _loadResetBlockDelta()))) | |
434 | + | else (height >= (_loadEventStartBlock(execChainId_, eventId_) + _loadResetBlockDelta()))) | |
435 | 435 | then throw(err_) | |
436 | 436 | else true | |
437 | 437 | ||
459 | 459 | else true | |
460 | 460 | ||
461 | 461 | ||
462 | - | func _notSubmittedR (eventId_,signer_,err_) = if ((_loadRByEventAndSigner(eventId_, signer_) != "")) | |
462 | + | func _notSubmittedR (execChainId_,eventId_,signer_,err_) = if ((_loadRByEventAndSigner(execChainId_, eventId_, signer_) != "")) | |
463 | 463 | then throw(err_) | |
464 | 464 | else true | |
465 | 465 | ||
466 | 466 | ||
467 | - | func _notSubmittedS (eventId_,signer_,err_) = if ((_loadSByEventAndSigner(eventId_, signer_) != "")) | |
467 | + | func _notSubmittedS (execChainId_,eventId_,signer_,err_) = if ((_loadSByEventAndSigner(execChainId_, eventId_, signer_) != "")) | |
468 | 468 | then throw(err_) | |
469 | 469 | else true | |
470 | 470 | ||
471 | 471 | ||
472 | - | func _submittedR (eventId_,signer_,err_) = { | |
473 | - | let r = _loadRByEventAndSigner(eventId_, signer_) | |
472 | + | func _submittedR (execChainId_,eventId_,signer_,err_) = { | |
473 | + | let r = _loadRByEventAndSigner(execChainId_, eventId_, signer_) | |
474 | 474 | if ((r == "")) | |
475 | 475 | then throw(err_) | |
476 | - | else if (!(containsElement(_loadRsByEvent(eventId_), r))) | |
476 | + | else if (!(containsElement(_loadRsByEvent(execChainId_, eventId_), r))) | |
477 | 477 | then throw(err_) | |
478 | 478 | else true | |
479 | 479 | } | |
599 | 599 | else false) | |
600 | 600 | then _checkSecDepo(callerPublicKey, "submitR: not enough security deposit") | |
601 | 601 | else false) | |
602 | - | then _checkEventStatusForSubmitR(eventId_, "submitR: invalid event status") | |
602 | + | then _checkEventStatusForSubmitR(execChainId_, eventId_, "submitR: invalid event status") | |
603 | 603 | else false) | |
604 | - | then _notSubmittedR(eventId_, callerPublicKey, "submitR: already submitted") | |
604 | + | then _notSubmittedR(execChainId_, eventId_, callerPublicKey, "submitR: already submitted") | |
605 | 605 | else false | |
606 | 606 | if ((err == err)) | |
607 | 607 | then { | |
608 | - | let rArray = _loadRsByEvent(eventId_) | |
609 | - | let signersArray = _loadSignersWithRByEvent(eventId_) | |
608 | + | let rArray = _loadRsByEvent(execChainId_, eventId_) | |
609 | + | let signersArray = _loadSignersWithRByEvent(execChainId_, eventId_) | |
610 | 610 | let eventStatusActions = if (((size(rArray) + 1) == t)) | |
611 | - | then (_saveEventStatus(eventId_, EVENT_STATUS_SIGN) ++ _saveEventStartBlock(eventId_, height)) | |
611 | + | then (_saveEventStatus(execChainId_, eventId_, EVENT_STATUS_SIGN) ++ _saveEventStartBlock(execChainId_, eventId_, height)) | |
612 | 612 | else nil | |
613 | - | $Tuple2((((_saveRsByEvent(eventId_, (rArray :+ r_)) ++ _saveRByEventAndSigner(eventId_, callerPublicKey, r_)) ++ _saveSignersWithRByEvent(eventId_, (signersArray :+ callerPublicKey))) ++ eventStatusActions), unit) | |
613 | + | $Tuple2((((_saveRsByEvent(execChainId_, eventId_, (rArray :+ r_)) ++ _saveRByEventAndSigner(execChainId_, eventId_, callerPublicKey, r_)) ++ _saveSignersWithRByEvent(execChainId_, eventId_, (signersArray :+ callerPublicKey))) ++ eventStatusActions), unit) | |
614 | 614 | } | |
615 | 615 | else throw("Strict value is not equal to itself.") | |
616 | 616 | } | |
635 | 635 | else false) | |
636 | 636 | then _checkSecDepo(callerPublicKey, "submitS: not enough security deposit") | |
637 | 637 | else false) | |
638 | - | then _checkEventStatusForSubmitS(eventId_, "submitS: invalid event status") | |
638 | + | then _checkEventStatusForSubmitS(execChainId_, eventId_, "submitS: invalid event status") | |
639 | 639 | else false) | |
640 | - | then _notSubmittedS(eventId_, callerPublicKey, "submitS: already submitted") | |
640 | + | then _notSubmittedS(execChainId_, eventId_, callerPublicKey, "submitS: already submitted") | |
641 | 641 | else false) | |
642 | - | then _submittedR(eventId_, callerPublicKey, "submitS: R is not submitted") | |
642 | + | then _submittedR(execChainId_, eventId_, callerPublicKey, "submitS: R is not submitted") | |
643 | 643 | else false | |
644 | 644 | if ((err == err)) | |
645 | 645 | then { | |
646 | - | let sArray = _loadSsByEvent(eventId_) | |
647 | - | let signersArray = _loadSignersWithSByEvent(eventId_) | |
646 | + | let sArray = _loadSsByEvent(execChainId_, eventId_) | |
647 | + | let signersArray = _loadSignersWithSByEvent(execChainId_, eventId_) | |
648 | 648 | let eventStatusActions = if (((size(sArray) + 1) == t)) | |
649 | 649 | then { | |
650 | 650 | let err1 = _validateString(sSigma_, "submitS: invalid s sigma") | |
654 | 654 | let rewardAddresses = _publicKeysToAddrsStr((signersArray :+ callerPublicKey)) | |
655 | 655 | let signersRewards = invoke(_loadRewardTokenAddress(), FUNC_MINT_MANY, [_loadRewardAmount(), rewardAddresses], nil) | |
656 | 656 | if ((signersRewards == signersRewards)) | |
657 | - | then (((_saveEventStatus(eventId_, EVENT_STATUS_DONE) ++ _saveSignedEventExecutorIdx(execChainId_, executorIdxSize, eventId_)) ++ _saveSignedEventExecutorIdxSize(execChainId_, (executorIdxSize + 1))) ++ _saveSSigmaByEvent(eventId_, sSigma_)) | |
657 | + | then (((_saveEventStatus(execChainId_, eventId_, EVENT_STATUS_DONE) ++ _saveSignedEventExecutorIdx(execChainId_, executorIdxSize, eventId_)) ++ _saveSignedEventExecutorIdxSize(execChainId_, (executorIdxSize + 1))) ++ _saveSSigmaByEvent(execChainId_, eventId_, sSigma_)) | |
658 | 658 | else throw("Strict value is not equal to itself.") | |
659 | 659 | } | |
660 | 660 | else throw("Strict value is not equal to itself.") | |
661 | 661 | } | |
662 | 662 | else nil | |
663 | - | $Tuple2(((((_saveSsByEvent(eventId_, (sArray :+ s_)) ++ _saveSByEventAndSigner(eventId_, callerPublicKey, s_)) ++ _saveSignersWithSByEvent(eventId_, (signersArray :+ callerPublicKey))) ++ _saveRSigmaByEvent(eventId_, rSigma_)) ++ eventStatusActions), unit) | |
663 | + | $Tuple2(((((_saveSsByEvent(execChainId_, eventId_, (sArray :+ s_)) ++ _saveSByEventAndSigner(execChainId_, eventId_, callerPublicKey, s_)) ++ _saveSignersWithSByEvent(execChainId_, eventId_, (signersArray :+ callerPublicKey))) ++ _saveRSigmaByEvent(execChainId_, eventId_, rSigma_)) ++ eventStatusActions), unit) | |
664 | 664 | } | |
665 | 665 | else throw("Strict value is not equal to itself.") | |
666 | 666 | } | |
682 | 682 | else false) | |
683 | 683 | then _checkSecDepo(callerPublicKey, "reset: not enough security deposit") | |
684 | 684 | else false) | |
685 | - | then _checkEventStatusForReset(eventId_, "reset: invalid event status") | |
685 | + | then _checkEventStatusForReset(execChainId_, eventId_, "reset: invalid event status") | |
686 | 686 | else false | |
687 | 687 | if ((err == err)) | |
688 | 688 | then { | |
689 | 689 | let slashAmount = 0 | |
690 | - | let signersWithR = _loadSignersWithRByEvent(eventId_) | |
691 | - | let signersWithS = _loadSignersWithSByEvent(eventId_) | |
690 | + | let signersWithR = _loadSignersWithRByEvent(execChainId_, eventId_) | |
691 | + | let signersWithS = _loadSignersWithSByEvent(execChainId_, eventId_) | |
692 | 692 | let result = _slashIncorrect(signersWithR, signersWithS) | |
693 | 693 | let slashingActions = result._1 | |
694 | 694 | let compensatedSigners = result._2 | |
695 | 695 | let compensation = result._3 | |
696 | 696 | let compensationActions = _compensateCorrect(compensatedSigners, compensation) | |
697 | - | $Tuple2((((((((_saveRsByEvent(eventId_, [r_]) ++ _saveRByEventAndSigner(eventId_, callerPublicKey, r_)) ++ _saveSignersWithRByEvent(eventId_, [callerPublicKey])) ++ _saveRSigmaByEvent(eventId_, "")) ++ _saveSSigmaByEvent(eventId_, "")) ++ _saveEventStatus(eventId_, EVENT_STATUS_INIT)) ++ slashingActions) ++ compensationActions), unit) | |
697 | + | $Tuple2((((((((_saveRsByEvent(execChainId_, eventId_, [r_]) ++ _saveRByEventAndSigner(execChainId_, eventId_, callerPublicKey, r_)) ++ _saveSignersWithRByEvent(execChainId_, eventId_, [callerPublicKey])) ++ _saveRSigmaByEvent(execChainId_, eventId_, "")) ++ _saveSSigmaByEvent(execChainId_, eventId_, "")) ++ _saveEventStatus(execChainId_, eventId_, EVENT_STATUS_INIT)) ++ slashingActions) ++ compensationActions), unit) | |
698 | 698 | } | |
699 | 699 | else throw("Strict value is not equal to itself.") | |
700 | 700 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let SEPARATOR = "__" | |
5 | 5 | ||
6 | 6 | let KEY_INIT = "INIT" | |
7 | 7 | ||
8 | 8 | let KEY_MULTISIG = "MULTISIG" | |
9 | 9 | ||
10 | 10 | let KEY_STATUS = "STATUS" | |
11 | 11 | ||
12 | 12 | let KEY_MIN_SEC_DEPO = "MIN_SEC_DEPO" | |
13 | 13 | ||
14 | 14 | let KEY_PUNISHMENT = "PUNISHMENT" | |
15 | 15 | ||
16 | 16 | let KEY_RESET_BLOCK_DELTA = "RESET_BLOCK_DELTA" | |
17 | 17 | ||
18 | 18 | let KEY_SEC_DEPO = "SEC_DEPO" | |
19 | 19 | ||
20 | 20 | let KEY_REWARD_TOKEN_ADDRESS = "REWARD_TOKEN_ADDRESS" | |
21 | 21 | ||
22 | 22 | let KEY_REWARD_AMOUNT = "REWARD_AMOUNT" | |
23 | 23 | ||
24 | 24 | let KEY_CURRENT_EPOCH = "CURRENT_EPOCH" | |
25 | 25 | ||
26 | 26 | let KEY_SIGNERS_PER_EPOCH = "SIGNERS_PER_EPOCH" | |
27 | 27 | ||
28 | 28 | let KEY_EVENT_STATUS = "EVENT_STATUS" | |
29 | 29 | ||
30 | 30 | let KEY_LOCKS = "LOCKS" | |
31 | 31 | ||
32 | 32 | let KEY_T = "T" | |
33 | 33 | ||
34 | 34 | let KEY_R = "R" | |
35 | 35 | ||
36 | 36 | let KEY_S = "S" | |
37 | 37 | ||
38 | 38 | let KEY_R_SIGNERS = "R_SIGNERS" | |
39 | 39 | ||
40 | 40 | let KEY_EVENT_START_BLOCK = "EVENT_START_BLOCK" | |
41 | 41 | ||
42 | 42 | let KEY_R_SIGMA = "R_SIGMA" | |
43 | 43 | ||
44 | 44 | let KEY_S_SIGMA = "S_SIGMA" | |
45 | 45 | ||
46 | 46 | let KEY_S_SIGNERS = "S_SIGNERS" | |
47 | 47 | ||
48 | 48 | let KEY_SIGNED_EVENT_EXECUTOR = "SIGNED_EVENT_EXECUTOR" | |
49 | 49 | ||
50 | 50 | let KEY_SIZE = "SIZE" | |
51 | 51 | ||
52 | 52 | let FUNC_MINT_MANY = "mintMany" | |
53 | 53 | ||
54 | 54 | let EVENT_STATUS_INIT = 1 | |
55 | 55 | ||
56 | 56 | let EVENT_STATUS_SIGN = 2 | |
57 | 57 | ||
58 | 58 | let EVENT_STATUS_DONE = 3 | |
59 | 59 | ||
60 | 60 | let MAX_INT = 9223372036854775807 | |
61 | 61 | ||
62 | 62 | func _validateAddress (address_,err_) = match addressFromString(address_) { | |
63 | 63 | case a: Address => | |
64 | 64 | true | |
65 | 65 | case _ => | |
66 | 66 | throw(err_) | |
67 | 67 | } | |
68 | 68 | ||
69 | 69 | ||
70 | 70 | func _validateAsset (assetId_,err_) = match assetInfo(fromBase58String(assetId_)) { | |
71 | 71 | case a: Asset => | |
72 | 72 | true | |
73 | 73 | case _ => | |
74 | 74 | throw(err_) | |
75 | 75 | } | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func _validateInt (val_,lowerBoundary_,upperBoundary_,err_) = if (if ((lowerBoundary_ > val_)) | |
79 | 79 | then true | |
80 | 80 | else (val_ > upperBoundary_)) | |
81 | 81 | then throw(err_) | |
82 | 82 | else true | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | func _validateString (val_,err_) = if ((0 >= size(val_))) | |
86 | 86 | then throw(err_) | |
87 | 87 | else true | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func _validatePaymentsSize (payments_,target_,err_) = if ((size(payments_) != target_)) | |
91 | 91 | then throw(err_) | |
92 | 92 | else true | |
93 | 93 | ||
94 | 94 | ||
95 | 95 | func _validatePaymentAsset (payment_,asset_,err_) = if ((payment_.assetId != asset_)) | |
96 | 96 | then throw(err_) | |
97 | 97 | else true | |
98 | 98 | ||
99 | 99 | ||
100 | 100 | func _validatePublicKey (publicKey_,err_) = if ((size(fromBase58String(publicKey_)) != 32)) | |
101 | 101 | then throw(err_) | |
102 | 102 | else true | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func _validatePublicKeys (publicKeys_,err_) = { | |
106 | 106 | func foldFunc (acc,elem) = $Tuple2(if (acc._1) | |
107 | 107 | then _validatePublicKey(elem, acc._2) | |
108 | 108 | else false, acc._2) | |
109 | 109 | ||
110 | 110 | let result = { | |
111 | 111 | let $l = publicKeys_ | |
112 | 112 | let $s = size($l) | |
113 | 113 | let $acc0 = $Tuple2(true, err_) | |
114 | 114 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
115 | 115 | then $a | |
116 | 116 | else foldFunc($a, $l[$i]) | |
117 | 117 | ||
118 | 118 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
119 | 119 | then $a | |
120 | 120 | else throw("List size exceeds 10") | |
121 | 121 | ||
122 | 122 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
123 | 123 | } | |
124 | 124 | result._1 | |
125 | 125 | } | |
126 | 126 | ||
127 | 127 | ||
128 | 128 | func _loadInit () = match getBoolean(KEY_INIT) { | |
129 | 129 | case a: Boolean => | |
130 | 130 | a | |
131 | 131 | case _ => | |
132 | 132 | false | |
133 | 133 | } | |
134 | 134 | ||
135 | 135 | ||
136 | 136 | func _saveInit (isInit_) = [BooleanEntry(KEY_INIT, isInit_)] | |
137 | 137 | ||
138 | 138 | ||
139 | 139 | func _loadMultisig () = match getString(KEY_MULTISIG) { | |
140 | 140 | case a: String => | |
141 | 141 | addressFromStringValue(a) | |
142 | 142 | case _ => | |
143 | 143 | Address(base58'') | |
144 | 144 | } | |
145 | 145 | ||
146 | 146 | ||
147 | 147 | func _saveMultisig (multisig_) = [StringEntry(KEY_MULTISIG, toString(multisig_))] | |
148 | 148 | ||
149 | 149 | ||
150 | 150 | func _loadMinSecDepo () = match getInteger(KEY_MIN_SEC_DEPO) { | |
151 | 151 | case a: Int => | |
152 | 152 | a | |
153 | 153 | case _ => | |
154 | 154 | 0 | |
155 | 155 | } | |
156 | 156 | ||
157 | 157 | ||
158 | 158 | func _saveMinSecDepo (val_) = [IntegerEntry(KEY_MIN_SEC_DEPO, val_)] | |
159 | 159 | ||
160 | 160 | ||
161 | 161 | func _loadSecDepo (account_) = match getInteger(makeString([KEY_SEC_DEPO, toString(account_)], SEPARATOR)) { | |
162 | 162 | case a: Int => | |
163 | 163 | a | |
164 | 164 | case _ => | |
165 | 165 | 0 | |
166 | 166 | } | |
167 | 167 | ||
168 | 168 | ||
169 | 169 | func _saveSecDepo (account_,val_) = [IntegerEntry(makeString([KEY_SEC_DEPO, toString(account_)], SEPARATOR), val_)] | |
170 | 170 | ||
171 | 171 | ||
172 | 172 | func _loadPunishment () = match getInteger(KEY_PUNISHMENT) { | |
173 | 173 | case a: Int => | |
174 | 174 | a | |
175 | 175 | case _ => | |
176 | 176 | 0 | |
177 | 177 | } | |
178 | 178 | ||
179 | 179 | ||
180 | 180 | func _savePunishment (val_) = [IntegerEntry(KEY_PUNISHMENT, val_)] | |
181 | 181 | ||
182 | 182 | ||
183 | 183 | func _loadResetBlockDelta () = match getInteger(KEY_RESET_BLOCK_DELTA) { | |
184 | 184 | case a: Int => | |
185 | 185 | a | |
186 | 186 | case _ => | |
187 | 187 | 0 | |
188 | 188 | } | |
189 | 189 | ||
190 | 190 | ||
191 | 191 | func _saveResetBlockDelta (val_) = [IntegerEntry(KEY_RESET_BLOCK_DELTA, val_)] | |
192 | 192 | ||
193 | 193 | ||
194 | 194 | func _loadRewardTokenAddress () = match getString(KEY_REWARD_TOKEN_ADDRESS) { | |
195 | 195 | case a: String => | |
196 | 196 | addressFromStringValue(a) | |
197 | 197 | case _ => | |
198 | 198 | Address(base58'') | |
199 | 199 | } | |
200 | 200 | ||
201 | 201 | ||
202 | 202 | func _saveRewardTokenAddress (val_) = [StringEntry(KEY_REWARD_TOKEN_ADDRESS, toString(val_))] | |
203 | 203 | ||
204 | 204 | ||
205 | 205 | func _loadRewardAmount () = match getInteger(KEY_REWARD_AMOUNT) { | |
206 | 206 | case a: Int => | |
207 | 207 | a | |
208 | 208 | case _ => | |
209 | 209 | 0 | |
210 | 210 | } | |
211 | 211 | ||
212 | 212 | ||
213 | 213 | func _saveRewardAmount (val_) = [IntegerEntry(KEY_REWARD_AMOUNT, val_)] | |
214 | 214 | ||
215 | 215 | ||
216 | 216 | func _loadCurrentEpoch (execChainId_) = match getInteger(makeString([KEY_CURRENT_EPOCH, toString(execChainId_)], SEPARATOR)) { | |
217 | 217 | case a: Int => | |
218 | 218 | a | |
219 | 219 | case _ => | |
220 | 220 | 0 | |
221 | 221 | } | |
222 | 222 | ||
223 | 223 | ||
224 | 224 | func _saveCurrentEpoch (execChainId_,val_) = [IntegerEntry(makeString([KEY_CURRENT_EPOCH, toString(execChainId_)], SEPARATOR), val_)] | |
225 | 225 | ||
226 | 226 | ||
227 | 227 | func _loadSigners (execChainId_,epoch_) = match getString(makeString([KEY_SIGNERS_PER_EPOCH, toString(execChainId_), toString(epoch_)], SEPARATOR)) { | |
228 | 228 | case a: String => | |
229 | 229 | split(a, SEPARATOR) | |
230 | 230 | case _ => | |
231 | 231 | nil | |
232 | 232 | } | |
233 | 233 | ||
234 | 234 | ||
235 | 235 | func _saveSigners (execChainId_,epoch_,signers_) = [StringEntry(makeString([KEY_SIGNERS_PER_EPOCH, toString(execChainId_), toString(epoch_)], SEPARATOR), makeString(signers_, SEPARATOR))] | |
236 | 236 | ||
237 | 237 | ||
238 | - | func _loadEventStatus (eventId_) = match getInteger(makeString([KEY_EVENT_STATUS, toString(eventId_)], SEPARATOR)) { | |
238 | + | func _loadEventStatus (execChainId_,eventId_) = match getInteger(makeString([KEY_EVENT_STATUS, toString(execChainId_), toString(eventId_)], SEPARATOR)) { | |
239 | 239 | case a: Int => | |
240 | 240 | a | |
241 | 241 | case _ => | |
242 | 242 | EVENT_STATUS_INIT | |
243 | 243 | } | |
244 | 244 | ||
245 | 245 | ||
246 | - | func _saveEventStatus (eventId_,status_) = [IntegerEntry(makeString([KEY_EVENT_STATUS, toString(eventId_)], SEPARATOR), status_)] | |
246 | + | func _saveEventStatus (execChainId_,eventId_,status_) = [IntegerEntry(makeString([KEY_EVENT_STATUS, toString(execChainId_), toString(eventId_)], SEPARATOR), status_)] | |
247 | 247 | ||
248 | 248 | ||
249 | 249 | func _loadLock (publicKey_) = match getInteger(makeString([KEY_LOCKS, publicKey_], SEPARATOR)) { | |
250 | 250 | case a: Int => | |
251 | 251 | a | |
252 | 252 | case _ => | |
253 | 253 | 0 | |
254 | 254 | } | |
255 | 255 | ||
256 | 256 | ||
257 | 257 | func _saveLock (publicKey_,val_) = [IntegerEntry(makeString([KEY_LOCKS, publicKey_], SEPARATOR), val_)] | |
258 | 258 | ||
259 | 259 | ||
260 | 260 | func _loadT (execChainId_,epoch_) = match getInteger(makeString([KEY_T, toString(execChainId_), toString(epoch_)], SEPARATOR)) { | |
261 | 261 | case a: Int => | |
262 | 262 | a | |
263 | 263 | case _ => | |
264 | 264 | 0 | |
265 | 265 | } | |
266 | 266 | ||
267 | 267 | ||
268 | 268 | func _saveT (execChainId_,epoch_,val_) = [IntegerEntry(makeString([KEY_T, toString(execChainId_), toString(epoch_)], SEPARATOR), val_)] | |
269 | 269 | ||
270 | 270 | ||
271 | - | func _loadRsByEvent (eventId_) = match getString(makeString([KEY_R, toString(eventId_)], SEPARATOR)) { | |
271 | + | func _loadRsByEvent (execChainId_,eventId_) = match getString(makeString([KEY_R, toString(execChainId_), toString(eventId_)], SEPARATOR)) { | |
272 | 272 | case a: String => | |
273 | 273 | split(a, SEPARATOR) | |
274 | 274 | case _ => | |
275 | 275 | nil | |
276 | 276 | } | |
277 | 277 | ||
278 | 278 | ||
279 | - | func _saveRsByEvent (eventId_,rs_) = [StringEntry(makeString([KEY_R, toString(eventId_)], SEPARATOR), makeString(rs_, SEPARATOR))] | |
279 | + | func _saveRsByEvent (execChainId_,eventId_,rs_) = [StringEntry(makeString([KEY_R, toString(execChainId_), toString(eventId_)], SEPARATOR), makeString(rs_, SEPARATOR))] | |
280 | 280 | ||
281 | 281 | ||
282 | - | func _loadSsByEvent (eventId_) = match getString(makeString([KEY_S, toString(eventId_)], SEPARATOR)) { | |
282 | + | func _loadSsByEvent (execChainId_,eventId_) = match getString(makeString([KEY_S, toString(execChainId_), toString(eventId_)], SEPARATOR)) { | |
283 | 283 | case a: String => | |
284 | 284 | split(a, SEPARATOR) | |
285 | 285 | case _ => | |
286 | 286 | nil | |
287 | 287 | } | |
288 | 288 | ||
289 | 289 | ||
290 | - | func _saveSsByEvent (eventId_,ss_) = [StringEntry(makeString([KEY_S, toString(eventId_)], SEPARATOR), makeString(ss_, SEPARATOR))] | |
290 | + | func _saveSsByEvent (execChainId_,eventId_,ss_) = [StringEntry(makeString([KEY_S, toString(execChainId_), toString(eventId_)], SEPARATOR), makeString(ss_, SEPARATOR))] | |
291 | 291 | ||
292 | 292 | ||
293 | - | func _loadRSigmaByEvent (eventId_) = match getString(makeString([KEY_R_SIGMA, toString(eventId_)], SEPARATOR)) { | |
293 | + | func _loadRSigmaByEvent (execChainId_,eventId_) = match getString(makeString([KEY_R_SIGMA, toString(execChainId_), toString(eventId_)], SEPARATOR)) { | |
294 | 294 | case a: String => | |
295 | 295 | a | |
296 | 296 | case _ => | |
297 | 297 | "" | |
298 | 298 | } | |
299 | 299 | ||
300 | 300 | ||
301 | - | func _saveRSigmaByEvent (eventId_,rSigma_) = [StringEntry(makeString([KEY_R_SIGMA, toString(eventId_)], SEPARATOR), rSigma_)] | |
301 | + | func _saveRSigmaByEvent (execChainId_,eventId_,rSigma_) = [StringEntry(makeString([KEY_R_SIGMA, toString(execChainId_), toString(eventId_)], SEPARATOR), rSigma_)] | |
302 | 302 | ||
303 | 303 | ||
304 | - | func _loadSSigmaByEvent (eventId_) = match getString(makeString([KEY_S_SIGMA, toString(eventId_)], SEPARATOR)) { | |
304 | + | func _loadSSigmaByEvent (execChainId_,eventId_) = match getString(makeString([KEY_S_SIGMA, toString(execChainId_), toString(eventId_)], SEPARATOR)) { | |
305 | 305 | case a: String => | |
306 | 306 | a | |
307 | 307 | case _ => | |
308 | 308 | "" | |
309 | 309 | } | |
310 | 310 | ||
311 | 311 | ||
312 | - | func _saveSSigmaByEvent (eventId_,sSigma_) = [StringEntry(makeString([KEY_S_SIGMA, toString(eventId_)], SEPARATOR), sSigma_)] | |
312 | + | func _saveSSigmaByEvent (execChainId_,eventId_,sSigma_) = [StringEntry(makeString([KEY_S_SIGMA, toString(execChainId_), toString(eventId_)], SEPARATOR), sSigma_)] | |
313 | 313 | ||
314 | 314 | ||
315 | - | func _loadRByEventAndSigner (eventId_,signer_) = match getString(makeString([KEY_R, toString(eventId_), signer_], SEPARATOR)) { | |
315 | + | func _loadRByEventAndSigner (execChainId_,eventId_,signer_) = match getString(makeString([KEY_R, toString(execChainId_), toString(eventId_), signer_], SEPARATOR)) { | |
316 | 316 | case a: String => | |
317 | 317 | a | |
318 | 318 | case _ => | |
319 | 319 | "" | |
320 | 320 | } | |
321 | 321 | ||
322 | 322 | ||
323 | - | func _saveRByEventAndSigner (eventId_,signer_,r_) = [StringEntry(makeString([KEY_R, toString(eventId_), signer_], SEPARATOR), r_)] | |
323 | + | func _saveRByEventAndSigner (execChainId_,eventId_,signer_,r_) = [StringEntry(makeString([KEY_R, toString(execChainId_), toString(eventId_), signer_], SEPARATOR), r_)] | |
324 | 324 | ||
325 | 325 | ||
326 | - | func _loadSByEventAndSigner (eventId_,signer_) = match getString(makeString([KEY_S, toString(eventId_), signer_], SEPARATOR)) { | |
326 | + | func _loadSByEventAndSigner (execChainId_,eventId_,signer_) = match getString(makeString([KEY_S, toString(execChainId_), toString(eventId_), signer_], SEPARATOR)) { | |
327 | 327 | case a: String => | |
328 | 328 | a | |
329 | 329 | case _ => | |
330 | 330 | "" | |
331 | 331 | } | |
332 | 332 | ||
333 | 333 | ||
334 | - | func _saveSByEventAndSigner (eventId_,signer_,s_) = [StringEntry(makeString([KEY_S, toString(eventId_), signer_], SEPARATOR), s_)] | |
334 | + | func _saveSByEventAndSigner (execChainId_,eventId_,signer_,s_) = [StringEntry(makeString([KEY_S, toString(execChainId_), toString(eventId_), signer_], SEPARATOR), s_)] | |
335 | 335 | ||
336 | 336 | ||
337 | - | func _loadSignersWithRByEvent (eventId_) = match getString(makeString([KEY_R_SIGNERS, toString(eventId_)], SEPARATOR)) { | |
337 | + | func _loadSignersWithRByEvent (execChainId_,eventId_) = match getString(makeString([KEY_R_SIGNERS, toString(execChainId_), toString(eventId_)], SEPARATOR)) { | |
338 | 338 | case a: String => | |
339 | 339 | split(a, SEPARATOR) | |
340 | 340 | case _ => | |
341 | 341 | nil | |
342 | 342 | } | |
343 | 343 | ||
344 | 344 | ||
345 | - | func _saveSignersWithRByEvent (eventId_,rs_) = [StringEntry(makeString([KEY_R_SIGNERS, toString(eventId_)], SEPARATOR), makeString(rs_, SEPARATOR))] | |
345 | + | func _saveSignersWithRByEvent (execChainId_,eventId_,rs_) = [StringEntry(makeString([KEY_R_SIGNERS, toString(execChainId_), toString(eventId_)], SEPARATOR), makeString(rs_, SEPARATOR))] | |
346 | 346 | ||
347 | 347 | ||
348 | - | func _loadSignersWithSByEvent (eventId_) = match getString(makeString([KEY_S_SIGNERS, toString(eventId_)], SEPARATOR)) { | |
348 | + | func _loadSignersWithSByEvent (execChainId_,eventId_) = match getString(makeString([KEY_S_SIGNERS, toString(execChainId_), toString(eventId_)], SEPARATOR)) { | |
349 | 349 | case a: String => | |
350 | 350 | split(a, SEPARATOR) | |
351 | 351 | case _ => | |
352 | 352 | nil | |
353 | 353 | } | |
354 | 354 | ||
355 | 355 | ||
356 | - | func _saveSignersWithSByEvent (eventId_,ss_) = [StringEntry(makeString([KEY_S_SIGNERS, toString(eventId_)], SEPARATOR), makeString(ss_, SEPARATOR))] | |
356 | + | func _saveSignersWithSByEvent (execChainId_,eventId_,ss_) = [StringEntry(makeString([KEY_S_SIGNERS, toString(execChainId_), toString(eventId_)], SEPARATOR), makeString(ss_, SEPARATOR))] | |
357 | 357 | ||
358 | 358 | ||
359 | - | func _loadEventStartBlock (eventId_) = match getInteger(makeString([KEY_EVENT_START_BLOCK, toString(eventId_)], SEPARATOR)) { | |
359 | + | func _loadEventStartBlock (execChainId_,eventId_) = match getInteger(makeString([KEY_EVENT_START_BLOCK, toString(execChainId_), toString(eventId_)], SEPARATOR)) { | |
360 | 360 | case a: Int => | |
361 | 361 | a | |
362 | 362 | case _ => | |
363 | 363 | 0 | |
364 | 364 | } | |
365 | 365 | ||
366 | 366 | ||
367 | - | func _saveEventStartBlock (eventId_,val_) = [IntegerEntry(makeString([KEY_EVENT_START_BLOCK, toString(eventId_)], SEPARATOR), val_)] | |
367 | + | func _saveEventStartBlock (execChainId_,eventId_,val_) = [IntegerEntry(makeString([KEY_EVENT_START_BLOCK, toString(execChainId_), toString(eventId_)], SEPARATOR), val_)] | |
368 | 368 | ||
369 | 369 | ||
370 | 370 | func _loadSignedEventExecutorIdxSize (executionChainId_) = match getInteger(makeString([KEY_SIGNED_EVENT_EXECUTOR, toString(executionChainId_), KEY_SIZE], SEPARATOR)) { | |
371 | 371 | case a: Int => | |
372 | 372 | a | |
373 | 373 | case _ => | |
374 | 374 | 0 | |
375 | 375 | } | |
376 | 376 | ||
377 | 377 | ||
378 | 378 | func _saveSignedEventExecutorIdxSize (executionChainId_,val_) = [IntegerEntry(makeString([KEY_SIGNED_EVENT_EXECUTOR, toString(executionChainId_), KEY_SIZE], SEPARATOR), val_)] | |
379 | 379 | ||
380 | 380 | ||
381 | 381 | func _loadSignedEventExecutorIdx (executionChainId_,idx_) = match getInteger(makeString([KEY_SIGNED_EVENT_EXECUTOR, toString(executionChainId_), toString(idx_)], SEPARATOR)) { | |
382 | 382 | case a: Int => | |
383 | 383 | a | |
384 | 384 | case _ => | |
385 | 385 | 0 | |
386 | 386 | } | |
387 | 387 | ||
388 | 388 | ||
389 | 389 | func _saveSignedEventExecutorIdx (executionChainId_,idx_,val_) = [IntegerEntry(makeString([KEY_SIGNED_EVENT_EXECUTOR, toString(executionChainId_), toString(idx_)], SEPARATOR), val_)] | |
390 | 390 | ||
391 | 391 | ||
392 | 392 | func _onlyThisContract (caller_) = if ((caller_ != this)) | |
393 | 393 | then throw("_onlyThisContract: revert") | |
394 | 394 | else true | |
395 | 395 | ||
396 | 396 | ||
397 | 397 | func _whenMultisigSet () = if ((_loadMultisig() == Address(base58''))) | |
398 | 398 | then throw("_whenMultisigSet: revert") | |
399 | 399 | else true | |
400 | 400 | ||
401 | 401 | ||
402 | 402 | func _whenNotInitialized () = if (_loadInit()) | |
403 | 403 | then throw("_whenNotInitialized: revert") | |
404 | 404 | else true | |
405 | 405 | ||
406 | 406 | ||
407 | 407 | func _whenInitialized () = if (!(_loadInit())) | |
408 | 408 | then throw("_whenInitialized: revert") | |
409 | 409 | else true | |
410 | 410 | ||
411 | 411 | ||
412 | 412 | func _isActiveSigner (publicKey_,publicKeys_,err_) = if (!(containsElement(publicKeys_, publicKey_))) | |
413 | 413 | then throw(err_) | |
414 | 414 | else true | |
415 | 415 | ||
416 | 416 | ||
417 | 417 | func _checkSecDepo (signer_,err_) = if ((_loadMinSecDepo() > _loadSecDepo(addressFromPublicKey(fromBase58String(signer_))))) | |
418 | 418 | then throw(err_) | |
419 | 419 | else true | |
420 | 420 | ||
421 | 421 | ||
422 | - | func _checkEventStatusForSubmitR (eventId_,err_) = if ((_loadEventStatus(eventId_) != EVENT_STATUS_INIT)) | |
422 | + | func _checkEventStatusForSubmitR (execChainId_,eventId_,err_) = if ((_loadEventStatus(execChainId_, eventId_) != EVENT_STATUS_INIT)) | |
423 | 423 | then throw(err_) | |
424 | 424 | else true | |
425 | 425 | ||
426 | 426 | ||
427 | - | func _checkEventStatusForSubmitS (eventId_,err_) = if ((_loadEventStatus(eventId_) != EVENT_STATUS_SIGN)) | |
427 | + | func _checkEventStatusForSubmitS (execChainId_,eventId_,err_) = if ((_loadEventStatus(execChainId_, eventId_) != EVENT_STATUS_SIGN)) | |
428 | 428 | then throw(err_) | |
429 | 429 | else true | |
430 | 430 | ||
431 | 431 | ||
432 | - | func _checkEventStatusForReset (eventId_,err_) = if (if ((_loadEventStatus(eventId_) != EVENT_STATUS_SIGN)) | |
432 | + | func _checkEventStatusForReset (execChainId_,eventId_,err_) = if (if ((_loadEventStatus(execChainId_, eventId_) != EVENT_STATUS_SIGN)) | |
433 | 433 | then true | |
434 | - | else (height >= (_loadEventStartBlock(eventId_) + _loadResetBlockDelta()))) | |
434 | + | else (height >= (_loadEventStartBlock(execChainId_, eventId_) + _loadResetBlockDelta()))) | |
435 | 435 | then throw(err_) | |
436 | 436 | else true | |
437 | 437 | ||
438 | 438 | ||
439 | 439 | func _incrementLocks (signers_) = { | |
440 | 440 | func foldFunc (acc,elem) = (acc ++ _saveLock(elem, (_loadLock(elem) + 1))) | |
441 | 441 | ||
442 | 442 | let $l = signers_ | |
443 | 443 | let $s = size($l) | |
444 | 444 | let $acc0 = nil | |
445 | 445 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
446 | 446 | then $a | |
447 | 447 | else foldFunc($a, $l[$i]) | |
448 | 448 | ||
449 | 449 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
450 | 450 | then $a | |
451 | 451 | else throw("List size exceeds 10") | |
452 | 452 | ||
453 | 453 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
454 | 454 | } | |
455 | 455 | ||
456 | 456 | ||
457 | 457 | func _isZeroLock (publicKey_,err_) = if ((_loadLock(publicKey_) > 0)) | |
458 | 458 | then throw(err_) | |
459 | 459 | else true | |
460 | 460 | ||
461 | 461 | ||
462 | - | func _notSubmittedR (eventId_,signer_,err_) = if ((_loadRByEventAndSigner(eventId_, signer_) != "")) | |
462 | + | func _notSubmittedR (execChainId_,eventId_,signer_,err_) = if ((_loadRByEventAndSigner(execChainId_, eventId_, signer_) != "")) | |
463 | 463 | then throw(err_) | |
464 | 464 | else true | |
465 | 465 | ||
466 | 466 | ||
467 | - | func _notSubmittedS (eventId_,signer_,err_) = if ((_loadSByEventAndSigner(eventId_, signer_) != "")) | |
467 | + | func _notSubmittedS (execChainId_,eventId_,signer_,err_) = if ((_loadSByEventAndSigner(execChainId_, eventId_, signer_) != "")) | |
468 | 468 | then throw(err_) | |
469 | 469 | else true | |
470 | 470 | ||
471 | 471 | ||
472 | - | func _submittedR (eventId_,signer_,err_) = { | |
473 | - | let r = _loadRByEventAndSigner(eventId_, signer_) | |
472 | + | func _submittedR (execChainId_,eventId_,signer_,err_) = { | |
473 | + | let r = _loadRByEventAndSigner(execChainId_, eventId_, signer_) | |
474 | 474 | if ((r == "")) | |
475 | 475 | then throw(err_) | |
476 | - | else if (!(containsElement(_loadRsByEvent(eventId_), r))) | |
476 | + | else if (!(containsElement(_loadRsByEvent(execChainId_, eventId_), r))) | |
477 | 477 | then throw(err_) | |
478 | 478 | else true | |
479 | 479 | } | |
480 | 480 | ||
481 | 481 | ||
482 | 482 | func _slashIncorrect (signersWithR_,signersWithS_) = { | |
483 | 483 | let punishment = _loadPunishment() | |
484 | 484 | func foldFunc (acc,elem) = if (containsElement(signersWithS_, elem)) | |
485 | 485 | then $Tuple3(acc._1, (acc._2 :+ elem), acc._3) | |
486 | 486 | else { | |
487 | 487 | let signerAddress = addressFromPublicKey(fromBase58String(elem)) | |
488 | 488 | $Tuple3((acc._1 ++ _saveSecDepo(signerAddress, (_loadSecDepo(signerAddress) - punishment))), acc._2, (acc._3 + punishment)) | |
489 | 489 | } | |
490 | 490 | ||
491 | 491 | let $l = signersWithR_ | |
492 | 492 | let $s = size($l) | |
493 | 493 | let $acc0 = $Tuple3(nil, nil, 0) | |
494 | 494 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
495 | 495 | then $a | |
496 | 496 | else foldFunc($a, $l[$i]) | |
497 | 497 | ||
498 | 498 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
499 | 499 | then $a | |
500 | 500 | else throw("List size exceeds 10") | |
501 | 501 | ||
502 | 502 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
503 | 503 | } | |
504 | 504 | ||
505 | 505 | ||
506 | 506 | func _compensateCorrect (signers_,compensation_) = { | |
507 | 507 | let perSigner = (compensation_ / size(signers_)) | |
508 | 508 | func foldFunc (acc,elem) = (acc :+ ScriptTransfer(addressFromPublicKey(fromBase58String(elem)), perSigner, unit)) | |
509 | 509 | ||
510 | 510 | let $l = signers_ | |
511 | 511 | let $s = size($l) | |
512 | 512 | let $acc0 = nil | |
513 | 513 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
514 | 514 | then $a | |
515 | 515 | else foldFunc($a, $l[$i]) | |
516 | 516 | ||
517 | 517 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
518 | 518 | then $a | |
519 | 519 | else throw("List size exceeds 10") | |
520 | 520 | ||
521 | 521 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
522 | 522 | } | |
523 | 523 | ||
524 | 524 | ||
525 | 525 | func _publicKeysToAddrsStr (publicKeys_) = { | |
526 | 526 | func foldfunc (acc_,elem_) = (acc_ :+ toString(addressFromPublicKey(fromBase58String(elem_)))) | |
527 | 527 | ||
528 | 528 | let $l = publicKeys_ | |
529 | 529 | let $s = size($l) | |
530 | 530 | let $acc0 = nil | |
531 | 531 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
532 | 532 | then $a | |
533 | 533 | else foldfunc($a, $l[$i]) | |
534 | 534 | ||
535 | 535 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
536 | 536 | then $a | |
537 | 537 | else throw("List size exceeds 51") | |
538 | 538 | ||
539 | 539 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 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) | |
540 | 540 | } | |
541 | 541 | ||
542 | 542 | ||
543 | 543 | @Callable(i) | |
544 | 544 | func init (minSecDepo_,punishment_,resetBlockDelta_,rewardTokenAddress_,rewardAmount_) = { | |
545 | 545 | let err = if (if (if (if (if (if (if (_onlyThisContract(i.caller)) | |
546 | 546 | then _whenNotInitialized() | |
547 | 547 | else false) | |
548 | 548 | then _whenMultisigSet() | |
549 | 549 | else false) | |
550 | 550 | then _validateInt(minSecDepo_, punishment_, MAX_INT, "init: invalid minSecDepo") | |
551 | 551 | else false) | |
552 | 552 | then _validateInt(punishment_, 0, MAX_INT, "init: invalid punishment") | |
553 | 553 | else false) | |
554 | 554 | then _validateInt(resetBlockDelta_, 0, MAX_INT, "init: invalid resetBlockDelta") | |
555 | 555 | else false) | |
556 | 556 | then _validateAddress(rewardTokenAddress_, "init: invalid rewardTokenAddress") | |
557 | 557 | else false) | |
558 | 558 | then _validateInt(rewardAmount_, 0, MAX_INT, "init: invalid rewardAmount") | |
559 | 559 | else false | |
560 | 560 | if ((err == err)) | |
561 | 561 | then $Tuple2((((((_saveInit(true) ++ _saveMinSecDepo(minSecDepo_)) ++ _savePunishment(punishment_)) ++ _saveResetBlockDelta(resetBlockDelta_)) ++ _saveRewardTokenAddress(addressFromStringValue(rewardTokenAddress_))) ++ _saveRewardAmount(rewardAmount_)), unit) | |
562 | 562 | else throw("Strict value is not equal to itself.") | |
563 | 563 | } | |
564 | 564 | ||
565 | 565 | ||
566 | 566 | ||
567 | 567 | @Callable(i) | |
568 | 568 | func setActiveSigners (execChainId_,signers_,t_) = { | |
569 | 569 | let err = if (if (if (_onlyThisContract(i.caller)) | |
570 | 570 | then _whenInitialized() | |
571 | 571 | else false) | |
572 | 572 | then _validatePublicKeys(signers_, "setActiveSigners: invalid signers") | |
573 | 573 | else false) | |
574 | 574 | then _validateInt(t_, 2, size(signers_), "setActiveSigners: invalid T") | |
575 | 575 | else false | |
576 | 576 | if ((err == err)) | |
577 | 577 | then { | |
578 | 578 | let epoch = _loadCurrentEpoch(execChainId_) | |
579 | 579 | $Tuple2((((_saveCurrentEpoch(execChainId_, (epoch + 1)) ++ _saveT(execChainId_, (epoch + 1), t_)) ++ _saveSigners(execChainId_, (epoch + 1), signers_)) ++ _incrementLocks(signers_)), unit) | |
580 | 580 | } | |
581 | 581 | else throw("Strict value is not equal to itself.") | |
582 | 582 | } | |
583 | 583 | ||
584 | 584 | ||
585 | 585 | ||
586 | 586 | @Callable(i) | |
587 | 587 | func submitR (eventId_,execChainId_,r_) = { | |
588 | 588 | let callerPublicKey = toBase58String(i.callerPublicKey) | |
589 | 589 | let epoch = _loadCurrentEpoch(execChainId_) | |
590 | 590 | let t = _loadT(execChainId_, epoch) | |
591 | 591 | let err = if (if (if (if (if (if (if (_whenInitialized()) | |
592 | 592 | then _validateInt(eventId_, 0, MAX_INT, "submitR: invalid eventId") | |
593 | 593 | else false) | |
594 | 594 | then _validateInt(execChainId_, 0, MAX_INT, "submitR: invalid execChainId") | |
595 | 595 | else false) | |
596 | 596 | then _validateString(r_, "submitR: invalid r") | |
597 | 597 | else false) | |
598 | 598 | then _isActiveSigner(callerPublicKey, _loadSigners(execChainId_, epoch), "submitR: not active") | |
599 | 599 | else false) | |
600 | 600 | then _checkSecDepo(callerPublicKey, "submitR: not enough security deposit") | |
601 | 601 | else false) | |
602 | - | then _checkEventStatusForSubmitR(eventId_, "submitR: invalid event status") | |
602 | + | then _checkEventStatusForSubmitR(execChainId_, eventId_, "submitR: invalid event status") | |
603 | 603 | else false) | |
604 | - | then _notSubmittedR(eventId_, callerPublicKey, "submitR: already submitted") | |
604 | + | then _notSubmittedR(execChainId_, eventId_, callerPublicKey, "submitR: already submitted") | |
605 | 605 | else false | |
606 | 606 | if ((err == err)) | |
607 | 607 | then { | |
608 | - | let rArray = _loadRsByEvent(eventId_) | |
609 | - | let signersArray = _loadSignersWithRByEvent(eventId_) | |
608 | + | let rArray = _loadRsByEvent(execChainId_, eventId_) | |
609 | + | let signersArray = _loadSignersWithRByEvent(execChainId_, eventId_) | |
610 | 610 | let eventStatusActions = if (((size(rArray) + 1) == t)) | |
611 | - | then (_saveEventStatus(eventId_, EVENT_STATUS_SIGN) ++ _saveEventStartBlock(eventId_, height)) | |
611 | + | then (_saveEventStatus(execChainId_, eventId_, EVENT_STATUS_SIGN) ++ _saveEventStartBlock(execChainId_, eventId_, height)) | |
612 | 612 | else nil | |
613 | - | $Tuple2((((_saveRsByEvent(eventId_, (rArray :+ r_)) ++ _saveRByEventAndSigner(eventId_, callerPublicKey, r_)) ++ _saveSignersWithRByEvent(eventId_, (signersArray :+ callerPublicKey))) ++ eventStatusActions), unit) | |
613 | + | $Tuple2((((_saveRsByEvent(execChainId_, eventId_, (rArray :+ r_)) ++ _saveRByEventAndSigner(execChainId_, eventId_, callerPublicKey, r_)) ++ _saveSignersWithRByEvent(execChainId_, eventId_, (signersArray :+ callerPublicKey))) ++ eventStatusActions), unit) | |
614 | 614 | } | |
615 | 615 | else throw("Strict value is not equal to itself.") | |
616 | 616 | } | |
617 | 617 | ||
618 | 618 | ||
619 | 619 | ||
620 | 620 | @Callable(i) | |
621 | 621 | func submitS (eventId_,execChainId_,rSigma_,s_,sSigma_) = { | |
622 | 622 | let callerPublicKey = toBase58String(i.callerPublicKey) | |
623 | 623 | let epoch = _loadCurrentEpoch(execChainId_) | |
624 | 624 | let t = _loadT(execChainId_, epoch) | |
625 | 625 | let err = if (if (if (if (if (if (if (if (if (_whenInitialized()) | |
626 | 626 | then _validateInt(eventId_, 0, MAX_INT, "submitS: invalid eventId") | |
627 | 627 | else false) | |
628 | 628 | then _validateInt(execChainId_, 0, MAX_INT, "submitS: invalid execChainId") | |
629 | 629 | else false) | |
630 | 630 | then _validateString(rSigma_, "submitS: invalid r sigma") | |
631 | 631 | else false) | |
632 | 632 | then _validateString(s_, "submitS: invalid s") | |
633 | 633 | else false) | |
634 | 634 | then _isActiveSigner(callerPublicKey, _loadSigners(execChainId_, epoch), "submitS: not active") | |
635 | 635 | else false) | |
636 | 636 | then _checkSecDepo(callerPublicKey, "submitS: not enough security deposit") | |
637 | 637 | else false) | |
638 | - | then _checkEventStatusForSubmitS(eventId_, "submitS: invalid event status") | |
638 | + | then _checkEventStatusForSubmitS(execChainId_, eventId_, "submitS: invalid event status") | |
639 | 639 | else false) | |
640 | - | then _notSubmittedS(eventId_, callerPublicKey, "submitS: already submitted") | |
640 | + | then _notSubmittedS(execChainId_, eventId_, callerPublicKey, "submitS: already submitted") | |
641 | 641 | else false) | |
642 | - | then _submittedR(eventId_, callerPublicKey, "submitS: R is not submitted") | |
642 | + | then _submittedR(execChainId_, eventId_, callerPublicKey, "submitS: R is not submitted") | |
643 | 643 | else false | |
644 | 644 | if ((err == err)) | |
645 | 645 | then { | |
646 | - | let sArray = _loadSsByEvent(eventId_) | |
647 | - | let signersArray = _loadSignersWithSByEvent(eventId_) | |
646 | + | let sArray = _loadSsByEvent(execChainId_, eventId_) | |
647 | + | let signersArray = _loadSignersWithSByEvent(execChainId_, eventId_) | |
648 | 648 | let eventStatusActions = if (((size(sArray) + 1) == t)) | |
649 | 649 | then { | |
650 | 650 | let err1 = _validateString(sSigma_, "submitS: invalid s sigma") | |
651 | 651 | if ((err1 == err1)) | |
652 | 652 | then { | |
653 | 653 | let executorIdxSize = _loadSignedEventExecutorIdxSize(execChainId_) | |
654 | 654 | let rewardAddresses = _publicKeysToAddrsStr((signersArray :+ callerPublicKey)) | |
655 | 655 | let signersRewards = invoke(_loadRewardTokenAddress(), FUNC_MINT_MANY, [_loadRewardAmount(), rewardAddresses], nil) | |
656 | 656 | if ((signersRewards == signersRewards)) | |
657 | - | then (((_saveEventStatus(eventId_, EVENT_STATUS_DONE) ++ _saveSignedEventExecutorIdx(execChainId_, executorIdxSize, eventId_)) ++ _saveSignedEventExecutorIdxSize(execChainId_, (executorIdxSize + 1))) ++ _saveSSigmaByEvent(eventId_, sSigma_)) | |
657 | + | then (((_saveEventStatus(execChainId_, eventId_, EVENT_STATUS_DONE) ++ _saveSignedEventExecutorIdx(execChainId_, executorIdxSize, eventId_)) ++ _saveSignedEventExecutorIdxSize(execChainId_, (executorIdxSize + 1))) ++ _saveSSigmaByEvent(execChainId_, eventId_, sSigma_)) | |
658 | 658 | else throw("Strict value is not equal to itself.") | |
659 | 659 | } | |
660 | 660 | else throw("Strict value is not equal to itself.") | |
661 | 661 | } | |
662 | 662 | else nil | |
663 | - | $Tuple2(((((_saveSsByEvent(eventId_, (sArray :+ s_)) ++ _saveSByEventAndSigner(eventId_, callerPublicKey, s_)) ++ _saveSignersWithSByEvent(eventId_, (signersArray :+ callerPublicKey))) ++ _saveRSigmaByEvent(eventId_, rSigma_)) ++ eventStatusActions), unit) | |
663 | + | $Tuple2(((((_saveSsByEvent(execChainId_, eventId_, (sArray :+ s_)) ++ _saveSByEventAndSigner(execChainId_, eventId_, callerPublicKey, s_)) ++ _saveSignersWithSByEvent(execChainId_, eventId_, (signersArray :+ callerPublicKey))) ++ _saveRSigmaByEvent(execChainId_, eventId_, rSigma_)) ++ eventStatusActions), unit) | |
664 | 664 | } | |
665 | 665 | else throw("Strict value is not equal to itself.") | |
666 | 666 | } | |
667 | 667 | ||
668 | 668 | ||
669 | 669 | ||
670 | 670 | @Callable(i) | |
671 | 671 | func reset (eventId_,execChainId_,r_) = { | |
672 | 672 | let callerPublicKey = toBase58String(i.callerPublicKey) | |
673 | 673 | let epoch = _loadCurrentEpoch(execChainId_) | |
674 | 674 | let err = if (if (if (if (if (if (_whenInitialized()) | |
675 | 675 | then _validateInt(eventId_, 0, MAX_INT, "reset: invalid eventId") | |
676 | 676 | else false) | |
677 | 677 | then _validateInt(execChainId_, 0, MAX_INT, "reset: invalid execChainId") | |
678 | 678 | else false) | |
679 | 679 | then _validateString(r_, "reset: invalid r") | |
680 | 680 | else false) | |
681 | 681 | then _isActiveSigner(callerPublicKey, _loadSigners(execChainId_, epoch), "reset: not active") | |
682 | 682 | else false) | |
683 | 683 | then _checkSecDepo(callerPublicKey, "reset: not enough security deposit") | |
684 | 684 | else false) | |
685 | - | then _checkEventStatusForReset(eventId_, "reset: invalid event status") | |
685 | + | then _checkEventStatusForReset(execChainId_, eventId_, "reset: invalid event status") | |
686 | 686 | else false | |
687 | 687 | if ((err == err)) | |
688 | 688 | then { | |
689 | 689 | let slashAmount = 0 | |
690 | - | let signersWithR = _loadSignersWithRByEvent(eventId_) | |
691 | - | let signersWithS = _loadSignersWithSByEvent(eventId_) | |
690 | + | let signersWithR = _loadSignersWithRByEvent(execChainId_, eventId_) | |
691 | + | let signersWithS = _loadSignersWithSByEvent(execChainId_, eventId_) | |
692 | 692 | let result = _slashIncorrect(signersWithR, signersWithS) | |
693 | 693 | let slashingActions = result._1 | |
694 | 694 | let compensatedSigners = result._2 | |
695 | 695 | let compensation = result._3 | |
696 | 696 | let compensationActions = _compensateCorrect(compensatedSigners, compensation) | |
697 | - | $Tuple2((((((((_saveRsByEvent(eventId_, [r_]) ++ _saveRByEventAndSigner(eventId_, callerPublicKey, r_)) ++ _saveSignersWithRByEvent(eventId_, [callerPublicKey])) ++ _saveRSigmaByEvent(eventId_, "")) ++ _saveSSigmaByEvent(eventId_, "")) ++ _saveEventStatus(eventId_, EVENT_STATUS_INIT)) ++ slashingActions) ++ compensationActions), unit) | |
697 | + | $Tuple2((((((((_saveRsByEvent(execChainId_, eventId_, [r_]) ++ _saveRByEventAndSigner(execChainId_, eventId_, callerPublicKey, r_)) ++ _saveSignersWithRByEvent(execChainId_, eventId_, [callerPublicKey])) ++ _saveRSigmaByEvent(execChainId_, eventId_, "")) ++ _saveSSigmaByEvent(execChainId_, eventId_, "")) ++ _saveEventStatus(execChainId_, eventId_, EVENT_STATUS_INIT)) ++ slashingActions) ++ compensationActions), unit) | |
698 | 698 | } | |
699 | 699 | else throw("Strict value is not equal to itself.") | |
700 | 700 | } | |
701 | 701 | ||
702 | 702 | ||
703 | 703 | ||
704 | 704 | @Callable(i) | |
705 | 705 | func addSecurityDeposit (recipient_) = { | |
706 | 706 | let recipient = if ((recipient_ == "")) | |
707 | 707 | then toString(i.caller) | |
708 | 708 | else recipient_ | |
709 | 709 | let err = if (if (_validateAddress(recipient, "addSecurityDeposit: invalid recipient")) | |
710 | 710 | then _validatePaymentsSize(i.payments, 1, "addSecurityDeposit: no payment") | |
711 | 711 | else false) | |
712 | 712 | then _validatePaymentAsset(i.payments[0], unit, "addSecurityDeposit: invalid asset") | |
713 | 713 | else false | |
714 | 714 | if ((err == err)) | |
715 | 715 | then { | |
716 | 716 | let recipientAddr = addressFromStringValue(recipient) | |
717 | 717 | let balance = _loadSecDepo(recipientAddr) | |
718 | 718 | let updatedBalance = (balance + i.payments[0].amount) | |
719 | 719 | $Tuple2(_saveSecDepo(recipientAddr, updatedBalance), unit) | |
720 | 720 | } | |
721 | 721 | else throw("Strict value is not equal to itself.") | |
722 | 722 | } | |
723 | 723 | ||
724 | 724 | ||
725 | 725 | ||
726 | 726 | @Callable(i) | |
727 | 727 | func subSecurityDeposit (amount_) = { | |
728 | 728 | let balance = _loadSecDepo(i.caller) | |
729 | 729 | let err = if (_isZeroLock(toBase58String(i.callerPublicKey), "subSecurityDeposit: locked")) | |
730 | 730 | then if ((amount_ > balance)) | |
731 | 731 | then throw("subSecurityDeposit: insufficient balance") | |
732 | 732 | else true | |
733 | 733 | else false | |
734 | 734 | if ((err == err)) | |
735 | 735 | then $Tuple2((_saveSecDepo(i.caller, (balance - amount_)) ++ [ScriptTransfer(i.caller, amount_, unit)]), unit) | |
736 | 736 | else throw("Strict value is not equal to itself.") | |
737 | 737 | } | |
738 | 738 | ||
739 | 739 | ||
740 | 740 | ||
741 | 741 | @Callable(i) | |
742 | 742 | func setMultisig (multisig_) = { | |
743 | 743 | let err = if (_onlyThisContract(i.caller)) | |
744 | 744 | then _validateAddress(multisig_, "setMultisig: invalid multisig address") | |
745 | 745 | else false | |
746 | 746 | if ((err == err)) | |
747 | 747 | then $Tuple2(_saveMultisig(addressFromStringValue(multisig_)), unit) | |
748 | 748 | else throw("Strict value is not equal to itself.") | |
749 | 749 | } | |
750 | 750 | ||
751 | 751 | ||
752 | 752 | @Verifier(tx) | |
753 | 753 | func verify () = match getString(KEY_MULTISIG) { | |
754 | 754 | case multisig: String => | |
755 | 755 | valueOrElse(getBoolean(addressFromStringValue(multisig), makeString([KEY_STATUS, toString(this), toBase58String(tx.id)], SEPARATOR)), false) | |
756 | 756 | case _ => | |
757 | 757 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
758 | 758 | } | |
759 | 759 |
github/deemru/w8io/026f985 114.71 ms ◑