tx · 3nAKnhSedMQtJqsJZrMeQWAwT8JhPG5Mw8XjQaGw5REq

3MpSqJhv64PR2m7Ywctv1Mp2Kjt3EUk3CSK:  -0.02800000 Waves

2023.03.15 22:55 [2491587] smart account 3MpSqJhv64PR2m7Ywctv1Mp2Kjt3EUk3CSK > SELF 0.00000000 Waves

{ "type": 13, "id": "3nAKnhSedMQtJqsJZrMeQWAwT8JhPG5Mw8XjQaGw5REq", "fee": 2800000, "feeAssetId": null, "timestamp": 1678910040022, "version": 2, "chainId": 84, "sender": "3MpSqJhv64PR2m7Ywctv1Mp2Kjt3EUk3CSK", "senderPublicKey": "ErJhyueNNWWr8GEv71cFyhNnAtRC7sZt2TWFo89gdPo8", "proofs": [ "GRzFxDwEM5QKdSvu8BFAJFvitiA5c1NgLStntdtYPWtb1TCezgkFfPoa5YLLBmGdNpm3k4RC3CGxn1JMG529DpW" ], "script": "base64:BgI5CAISCAoGAQEBCAEIEgUKAwEYARIFCgMBAQgSBwoFAQEICAgSBQoDAQEIEgMKAQgSAwoBARIDCgEIbwAJU0VQQVJBVE9SAgJfXwAIS0VZX0lOSVQCBElOSVQADEtFWV9NVUxUSVNJRwIITVVMVElTSUcACktFWV9TVEFUVVMCBlNUQVRVUwAQS0VZX01JTl9TRUNfREVQTwIMTUlOX1NFQ19ERVBPAA5LRVlfUFVOSVNITUVOVAIKUFVOSVNITUVOVAAVS0VZX1JFU0VUX0JMT0NLX0RFTFRBAhFSRVNFVF9CTE9DS19ERUxUQQAMS0VZX1NFQ19ERVBPAghTRUNfREVQTwAYS0VZX1JFV0FSRF9UT0tFTl9BRERSRVNTAhRSRVdBUkRfVE9LRU5fQUREUkVTUwARS0VZX1JFV0FSRF9BTU9VTlQCDVJFV0FSRF9BTU9VTlQAE0tFWV9XSU5URVNTX0FERFJFU1MCD1dJTlRFU1NfQUREUkVTUwARS0VZX0NVUlJFTlRfRVBPQ0gCDUNVUlJFTlRfRVBPQ0gAFUtFWV9TSUdORVJTX1BFUl9FUE9D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KQEFCG11bHRpc2lnCQC5CQIJAMwIAgUKS0VZX1NUQVRVUwkAzAgCCQClCAEFBHRoaXMJAMwIAgkA2AQBCAUCdHgCaWQFA25pbAUJU0VQQVJBVE9SBwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleYD7u8s=", "height": 2491587, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2CgR6yGrPGnXnGHpfkZ5cF1EdAeUuHNnZ8E8i94fFK1m Next: BTYja6QxptZ1NwMXPkixQaRBk3FHwjxbY5y6bjBn3ojP Diff:
OldNewDifferences
2020 let KEY_REWARD_TOKEN_ADDRESS = "REWARD_TOKEN_ADDRESS"
2121
2222 let KEY_REWARD_AMOUNT = "REWARD_AMOUNT"
23+
24+let KEY_WINTESS_ADDRESS = "WINTESS_ADDRESS"
2325
2426 let KEY_CURRENT_EPOCH = "CURRENT_EPOCH"
2527
4951
5052 let KEY_SIZE = "SIZE"
5153
54+let KEY_SIGNER_GROUP_PUBLIC_KEY = "SIGNER_GROUP_PUBLIC_KEY"
55+
5256 let FUNC_MINT_MANY = "mintMany"
57+
58+let FUNC_IS_CONFIRMED_EVENT = "isConfirmedEvent"
59+
60+let FUNC_GET_RAW_EVENT = "getRawEvent"
61+
62+let EVENT_TYPE_WAVES = "WAVES"
63+
64+let EVENT_TYPE_EVM = "EVM"
5365
5466 let EVENT_STATUS_INIT = 1
5567
213225
214226
215227 func _saveRewardAmount (val_) = [IntegerEntry(KEY_REWARD_AMOUNT, val_)]
228+
229+
230+func _loadWitnessAddress () = match getString(KEY_WINTESS_ADDRESS) {
231+ case a: String =>
232+ addressFromStringValue(a)
233+ case _ =>
234+ Address(base58'')
235+}
236+
237+
238+func _saveWitnessAddress (val_) = [StringEntry(KEY_WINTESS_ADDRESS, toString(val_))]
216239
217240
218241 func _loadCurrentEpoch (execChainId_) = match getInteger(makeString([KEY_CURRENT_EPOCH, toString(execChainId_)], SEPARATOR)) {
421444 else true
422445
423446
447+func _isConfirmedEvent (eventId_,execChainId_,err_) = {
448+ let result = invoke(_loadWitnessAddress(), FUNC_IS_CONFIRMED_EVENT, [eventId_, execChainId_], nil)
449+ if ((result == result))
450+ then match result {
451+ case a: Boolean =>
452+ if (!(a))
453+ then throw(err_)
454+ else true
455+ case _ =>
456+ throw(err_)
457+ }
458+ else throw("Strict value is not equal to itself.")
459+ }
460+
461+
424462 func _isActiveSigner (publicKey_,publicKeys_,err_) = if (!(containsElement(publicKeys_, publicKey_)))
425463 then throw(err_)
426464 else true
563601
564602
565603 @Callable(i)
566-func init (minSecDepo_,punishment_,resetBlockDelta_,rewardTokenAddress_,rewardAmount_) = {
567- let err = if (if (if (if (if (if (if (_onlyThisContract(i.caller))
604+func init (minSecDepo_,punishment_,resetBlockDelta_,rewardTokenAddress_,rewardAmount_,witnessAddress_) = {
605+ let err = if (if (if (if (if (if (if (if (_onlyThisContract(i.caller))
568606 then _whenNotInitialized()
569607 else false)
570608 then _whenMultisigSet()
578616 then _validateAddress(rewardTokenAddress_, "init: invalid rewardTokenAddress")
579617 else false)
580618 then _validateInt(rewardAmount_, 0, MAX_INT, "init: invalid rewardAmount")
619+ else false)
620+ then _validateAddress(witnessAddress_, "init: invalid witnessAddress")
581621 else false
582622 if ((err == err))
583- then $Tuple2((((((_saveInit(true) ++ _saveMinSecDepo(minSecDepo_)) ++ _savePunishment(punishment_)) ++ _saveResetBlockDelta(resetBlockDelta_)) ++ _saveRewardTokenAddress(addressFromStringValue(rewardTokenAddress_))) ++ _saveRewardAmount(rewardAmount_)), unit)
623+ then $Tuple2(((((((_saveInit(true) ++ _saveMinSecDepo(minSecDepo_)) ++ _savePunishment(punishment_)) ++ _saveResetBlockDelta(resetBlockDelta_)) ++ _saveRewardTokenAddress(addressFromStringValue(rewardTokenAddress_))) ++ _saveRewardAmount(rewardAmount_)) ++ _saveWitnessAddress(addressFromStringValue(witnessAddress_))), unit)
584624 else throw("Strict value is not equal to itself.")
585625 }
586626
610650 let callerPublicKey = toBase58String(i.callerPublicKey)
611651 let epoch = _loadCurrentEpoch(execChainId_)
612652 let t = _loadT(execChainId_, epoch)
613- let err = if (if (if (if (if (if (if (_whenInitialized())
653+ let err = if (if (if (if (if (if (if (if (_whenInitialized())
614654 then _validateInt(eventId_, 0, MAX_INT, "submitR: invalid eventId")
615655 else false)
616656 then _validateInt(execChainId_, 0, MAX_INT, "submitR: invalid execChainId")
617657 else false)
618658 then _validateString(r_, "submitR: invalid r")
659+ else false)
660+ then _isConfirmedEvent(eventId_, execChainId_, "submitR: event not confirmed")
619661 else false)
620662 then _isActiveSigner(callerPublicKey, _loadSigners(execChainId_, epoch), "submitR: not active")
621663 else false)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SEPARATOR = "__"
55
66 let KEY_INIT = "INIT"
77
88 let KEY_MULTISIG = "MULTISIG"
99
1010 let KEY_STATUS = "STATUS"
1111
1212 let KEY_MIN_SEC_DEPO = "MIN_SEC_DEPO"
1313
1414 let KEY_PUNISHMENT = "PUNISHMENT"
1515
1616 let KEY_RESET_BLOCK_DELTA = "RESET_BLOCK_DELTA"
1717
1818 let KEY_SEC_DEPO = "SEC_DEPO"
1919
2020 let KEY_REWARD_TOKEN_ADDRESS = "REWARD_TOKEN_ADDRESS"
2121
2222 let KEY_REWARD_AMOUNT = "REWARD_AMOUNT"
23+
24+let KEY_WINTESS_ADDRESS = "WINTESS_ADDRESS"
2325
2426 let KEY_CURRENT_EPOCH = "CURRENT_EPOCH"
2527
2628 let KEY_SIGNERS_PER_EPOCH = "SIGNERS_PER_EPOCH"
2729
2830 let KEY_EVENT_STATUS = "EVENT_STATUS"
2931
3032 let KEY_LOCKS = "LOCKS"
3133
3234 let KEY_T = "T"
3335
3436 let KEY_R = "R"
3537
3638 let KEY_S = "S"
3739
3840 let KEY_R_SIGNERS = "R_SIGNERS"
3941
4042 let KEY_EVENT_START_BLOCK = "EVENT_START_BLOCK"
4143
4244 let KEY_R_SIGMA = "R_SIGMA"
4345
4446 let KEY_S_SIGMA = "S_SIGMA"
4547
4648 let KEY_S_SIGNERS = "S_SIGNERS"
4749
4850 let KEY_SIGNED_EVENT_EXECUTOR = "SIGNED_EVENT_EXECUTOR"
4951
5052 let KEY_SIZE = "SIZE"
5153
54+let KEY_SIGNER_GROUP_PUBLIC_KEY = "SIGNER_GROUP_PUBLIC_KEY"
55+
5256 let FUNC_MINT_MANY = "mintMany"
57+
58+let FUNC_IS_CONFIRMED_EVENT = "isConfirmedEvent"
59+
60+let FUNC_GET_RAW_EVENT = "getRawEvent"
61+
62+let EVENT_TYPE_WAVES = "WAVES"
63+
64+let EVENT_TYPE_EVM = "EVM"
5365
5466 let EVENT_STATUS_INIT = 1
5567
5668 let EVENT_STATUS_SIGN = 2
5769
5870 let EVENT_STATUS_DONE = 3
5971
6072 let MAX_INT = 9223372036854775807
6173
6274 func _validateAddress (address_,err_) = match addressFromString(address_) {
6375 case a: Address =>
6476 true
6577 case _ =>
6678 throw(err_)
6779 }
6880
6981
7082 func _validateAsset (assetId_,err_) = match assetInfo(fromBase58String(assetId_)) {
7183 case a: Asset =>
7284 true
7385 case _ =>
7486 throw(err_)
7587 }
7688
7789
7890 func _validateInt (val_,lowerBoundary_,upperBoundary_,err_) = if (if ((lowerBoundary_ > val_))
7991 then true
8092 else (val_ > upperBoundary_))
8193 then throw(err_)
8294 else true
8395
8496
8597 func _validateString (val_,err_) = if (if ((0 >= size(val_)))
8698 then true
8799 else contains(val_, SEPARATOR))
88100 then throw(err_)
89101 else true
90102
91103
92104 func _validatePaymentsSize (payments_,target_,err_) = if ((size(payments_) != target_))
93105 then throw(err_)
94106 else true
95107
96108
97109 func _validatePaymentAsset (payment_,asset_,err_) = if ((payment_.assetId != asset_))
98110 then throw(err_)
99111 else true
100112
101113
102114 func _validatePublicKey (publicKey_,err_) = if ((size(fromBase58String(publicKey_)) != 32))
103115 then throw(err_)
104116 else true
105117
106118
107119 func _validatePublicKeys (publicKeys_,err_) = {
108120 func foldFunc (acc,elem) = $Tuple2(if (acc._1)
109121 then _validatePublicKey(elem, acc._2)
110122 else false, acc._2)
111123
112124 let result = {
113125 let $l = publicKeys_
114126 let $s = size($l)
115127 let $acc0 = $Tuple2(true, err_)
116128 func $f0_1 ($a,$i) = if (($i >= $s))
117129 then $a
118130 else foldFunc($a, $l[$i])
119131
120132 func $f0_2 ($a,$i) = if (($i >= $s))
121133 then $a
122134 else throw("List size exceeds 10")
123135
124136 $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)
125137 }
126138 result._1
127139 }
128140
129141
130142 func _loadInit () = match getBoolean(KEY_INIT) {
131143 case a: Boolean =>
132144 a
133145 case _ =>
134146 false
135147 }
136148
137149
138150 func _saveInit (isInit_) = [BooleanEntry(KEY_INIT, isInit_)]
139151
140152
141153 func _loadMultisig () = match getString(KEY_MULTISIG) {
142154 case a: String =>
143155 addressFromStringValue(a)
144156 case _ =>
145157 Address(base58'')
146158 }
147159
148160
149161 func _saveMultisig (multisig_) = [StringEntry(KEY_MULTISIG, toString(multisig_))]
150162
151163
152164 func _loadMinSecDepo () = match getInteger(KEY_MIN_SEC_DEPO) {
153165 case a: Int =>
154166 a
155167 case _ =>
156168 0
157169 }
158170
159171
160172 func _saveMinSecDepo (val_) = [IntegerEntry(KEY_MIN_SEC_DEPO, val_)]
161173
162174
163175 func _loadSecDepo (account_) = match getInteger(makeString([KEY_SEC_DEPO, toString(account_)], SEPARATOR)) {
164176 case a: Int =>
165177 a
166178 case _ =>
167179 0
168180 }
169181
170182
171183 func _saveSecDepo (account_,val_) = [IntegerEntry(makeString([KEY_SEC_DEPO, toString(account_)], SEPARATOR), val_)]
172184
173185
174186 func _loadPunishment () = match getInteger(KEY_PUNISHMENT) {
175187 case a: Int =>
176188 a
177189 case _ =>
178190 0
179191 }
180192
181193
182194 func _savePunishment (val_) = [IntegerEntry(KEY_PUNISHMENT, val_)]
183195
184196
185197 func _loadResetBlockDelta () = match getInteger(KEY_RESET_BLOCK_DELTA) {
186198 case a: Int =>
187199 a
188200 case _ =>
189201 0
190202 }
191203
192204
193205 func _saveResetBlockDelta (val_) = [IntegerEntry(KEY_RESET_BLOCK_DELTA, val_)]
194206
195207
196208 func _loadRewardTokenAddress () = match getString(KEY_REWARD_TOKEN_ADDRESS) {
197209 case a: String =>
198210 addressFromStringValue(a)
199211 case _ =>
200212 Address(base58'')
201213 }
202214
203215
204216 func _saveRewardTokenAddress (val_) = [StringEntry(KEY_REWARD_TOKEN_ADDRESS, toString(val_))]
205217
206218
207219 func _loadRewardAmount () = match getInteger(KEY_REWARD_AMOUNT) {
208220 case a: Int =>
209221 a
210222 case _ =>
211223 0
212224 }
213225
214226
215227 func _saveRewardAmount (val_) = [IntegerEntry(KEY_REWARD_AMOUNT, val_)]
228+
229+
230+func _loadWitnessAddress () = match getString(KEY_WINTESS_ADDRESS) {
231+ case a: String =>
232+ addressFromStringValue(a)
233+ case _ =>
234+ Address(base58'')
235+}
236+
237+
238+func _saveWitnessAddress (val_) = [StringEntry(KEY_WINTESS_ADDRESS, toString(val_))]
216239
217240
218241 func _loadCurrentEpoch (execChainId_) = match getInteger(makeString([KEY_CURRENT_EPOCH, toString(execChainId_)], SEPARATOR)) {
219242 case a: Int =>
220243 a
221244 case _ =>
222245 0
223246 }
224247
225248
226249 func _saveCurrentEpoch (execChainId_,val_) = [IntegerEntry(makeString([KEY_CURRENT_EPOCH, toString(execChainId_)], SEPARATOR), val_)]
227250
228251
229252 func _loadSigners (execChainId_,epoch_) = match getString(makeString([KEY_SIGNERS_PER_EPOCH, toString(execChainId_), toString(epoch_)], SEPARATOR)) {
230253 case a: String =>
231254 if ((size(a) > 0))
232255 then split(a, SEPARATOR)
233256 else nil
234257 case _ =>
235258 nil
236259 }
237260
238261
239262 func _saveSigners (execChainId_,epoch_,signers_) = [StringEntry(makeString([KEY_SIGNERS_PER_EPOCH, toString(execChainId_), toString(epoch_)], SEPARATOR), makeString(signers_, SEPARATOR))]
240263
241264
242265 func _loadEventStatus (execChainId_,eventId_) = match getInteger(makeString([KEY_EVENT_STATUS, toString(execChainId_), toString(eventId_)], SEPARATOR)) {
243266 case a: Int =>
244267 a
245268 case _ =>
246269 EVENT_STATUS_INIT
247270 }
248271
249272
250273 func _saveEventStatus (execChainId_,eventId_,status_) = [IntegerEntry(makeString([KEY_EVENT_STATUS, toString(execChainId_), toString(eventId_)], SEPARATOR), status_)]
251274
252275
253276 func _loadLock (publicKey_) = match getInteger(makeString([KEY_LOCKS, publicKey_], SEPARATOR)) {
254277 case a: Int =>
255278 a
256279 case _ =>
257280 0
258281 }
259282
260283
261284 func _saveLock (publicKey_,val_) = [IntegerEntry(makeString([KEY_LOCKS, publicKey_], SEPARATOR), val_)]
262285
263286
264287 func _loadT (execChainId_,epoch_) = match getInteger(makeString([KEY_T, toString(execChainId_), toString(epoch_)], SEPARATOR)) {
265288 case a: Int =>
266289 a
267290 case _ =>
268291 0
269292 }
270293
271294
272295 func _saveT (execChainId_,epoch_,val_) = [IntegerEntry(makeString([KEY_T, toString(execChainId_), toString(epoch_)], SEPARATOR), val_)]
273296
274297
275298 func _loadRsByEvent (execChainId_,eventId_) = match getString(makeString([KEY_R, toString(execChainId_), toString(eventId_)], SEPARATOR)) {
276299 case a: String =>
277300 if ((size(a) > 0))
278301 then split(a, SEPARATOR)
279302 else nil
280303 case _ =>
281304 nil
282305 }
283306
284307
285308 func _saveRsByEvent (execChainId_,eventId_,rs_) = [StringEntry(makeString([KEY_R, toString(execChainId_), toString(eventId_)], SEPARATOR), makeString(rs_, SEPARATOR))]
286309
287310
288311 func _loadSsByEvent (execChainId_,eventId_) = match getString(makeString([KEY_S, toString(execChainId_), toString(eventId_)], SEPARATOR)) {
289312 case a: String =>
290313 if ((size(a) > 0))
291314 then split(a, SEPARATOR)
292315 else nil
293316 case _ =>
294317 nil
295318 }
296319
297320
298321 func _saveSsByEvent (execChainId_,eventId_,ss_) = [StringEntry(makeString([KEY_S, toString(execChainId_), toString(eventId_)], SEPARATOR), makeString(ss_, SEPARATOR))]
299322
300323
301324 func _loadRSigmaByEvent (execChainId_,eventId_) = match getString(makeString([KEY_R_SIGMA, toString(execChainId_), toString(eventId_)], SEPARATOR)) {
302325 case a: String =>
303326 a
304327 case _ =>
305328 ""
306329 }
307330
308331
309332 func _saveRSigmaByEvent (execChainId_,eventId_,rSigma_) = [StringEntry(makeString([KEY_R_SIGMA, toString(execChainId_), toString(eventId_)], SEPARATOR), rSigma_)]
310333
311334
312335 func _loadSSigmaByEvent (execChainId_,eventId_) = match getString(makeString([KEY_S_SIGMA, toString(execChainId_), toString(eventId_)], SEPARATOR)) {
313336 case a: String =>
314337 a
315338 case _ =>
316339 ""
317340 }
318341
319342
320343 func _saveSSigmaByEvent (execChainId_,eventId_,sSigma_) = [StringEntry(makeString([KEY_S_SIGMA, toString(execChainId_), toString(eventId_)], SEPARATOR), sSigma_)]
321344
322345
323346 func _loadRByEventAndSigner (execChainId_,eventId_,signer_) = match getString(makeString([KEY_R, toString(execChainId_), toString(eventId_), signer_], SEPARATOR)) {
324347 case a: String =>
325348 a
326349 case _ =>
327350 ""
328351 }
329352
330353
331354 func _saveRByEventAndSigner (execChainId_,eventId_,signer_,r_) = [StringEntry(makeString([KEY_R, toString(execChainId_), toString(eventId_), signer_], SEPARATOR), r_)]
332355
333356
334357 func _loadSByEventAndSigner (execChainId_,eventId_,signer_) = match getString(makeString([KEY_S, toString(execChainId_), toString(eventId_), signer_], SEPARATOR)) {
335358 case a: String =>
336359 a
337360 case _ =>
338361 ""
339362 }
340363
341364
342365 func _saveSByEventAndSigner (execChainId_,eventId_,signer_,s_) = [StringEntry(makeString([KEY_S, toString(execChainId_), toString(eventId_), signer_], SEPARATOR), s_)]
343366
344367
345368 func _loadSignersWithRByEvent (execChainId_,eventId_) = match getString(makeString([KEY_R_SIGNERS, toString(execChainId_), toString(eventId_)], SEPARATOR)) {
346369 case a: String =>
347370 if ((size(a) > 0))
348371 then split(a, SEPARATOR)
349372 else nil
350373 case _ =>
351374 nil
352375 }
353376
354377
355378 func _saveSignersWithRByEvent (execChainId_,eventId_,rs_) = [StringEntry(makeString([KEY_R_SIGNERS, toString(execChainId_), toString(eventId_)], SEPARATOR), makeString(rs_, SEPARATOR))]
356379
357380
358381 func _loadSignersWithSByEvent (execChainId_,eventId_) = match getString(makeString([KEY_S_SIGNERS, toString(execChainId_), toString(eventId_)], SEPARATOR)) {
359382 case a: String =>
360383 if ((size(a) > 0))
361384 then split(a, SEPARATOR)
362385 else nil
363386 case _ =>
364387 nil
365388 }
366389
367390
368391 func _saveSignersWithSByEvent (execChainId_,eventId_,ss_) = [StringEntry(makeString([KEY_S_SIGNERS, toString(execChainId_), toString(eventId_)], SEPARATOR), makeString(ss_, SEPARATOR))]
369392
370393
371394 func _loadEventStartBlock (execChainId_,eventId_) = match getInteger(makeString([KEY_EVENT_START_BLOCK, toString(execChainId_), toString(eventId_)], SEPARATOR)) {
372395 case a: Int =>
373396 a
374397 case _ =>
375398 0
376399 }
377400
378401
379402 func _saveEventStartBlock (execChainId_,eventId_,val_) = [IntegerEntry(makeString([KEY_EVENT_START_BLOCK, toString(execChainId_), toString(eventId_)], SEPARATOR), val_)]
380403
381404
382405 func _loadSignedEventExecutorIdxSize (executionChainId_) = match getInteger(makeString([KEY_SIGNED_EVENT_EXECUTOR, toString(executionChainId_), KEY_SIZE], SEPARATOR)) {
383406 case a: Int =>
384407 a
385408 case _ =>
386409 0
387410 }
388411
389412
390413 func _saveSignedEventExecutorIdxSize (executionChainId_,val_) = [IntegerEntry(makeString([KEY_SIGNED_EVENT_EXECUTOR, toString(executionChainId_), KEY_SIZE], SEPARATOR), val_)]
391414
392415
393416 func _loadSignedEventExecutorIdx (executionChainId_,idx_) = match getInteger(makeString([KEY_SIGNED_EVENT_EXECUTOR, toString(executionChainId_), toString(idx_)], SEPARATOR)) {
394417 case a: Int =>
395418 a
396419 case _ =>
397420 0
398421 }
399422
400423
401424 func _saveSignedEventExecutorIdx (executionChainId_,idx_,val_) = [IntegerEntry(makeString([KEY_SIGNED_EVENT_EXECUTOR, toString(executionChainId_), toString(idx_)], SEPARATOR), val_)]
402425
403426
404427 func _onlyThisContract (caller_) = if ((caller_ != this))
405428 then throw("_onlyThisContract: revert")
406429 else true
407430
408431
409432 func _whenMultisigSet () = if ((_loadMultisig() == Address(base58'')))
410433 then throw("_whenMultisigSet: revert")
411434 else true
412435
413436
414437 func _whenNotInitialized () = if (_loadInit())
415438 then throw("_whenNotInitialized: revert")
416439 else true
417440
418441
419442 func _whenInitialized () = if (!(_loadInit()))
420443 then throw("_whenInitialized: revert")
421444 else true
422445
423446
447+func _isConfirmedEvent (eventId_,execChainId_,err_) = {
448+ let result = invoke(_loadWitnessAddress(), FUNC_IS_CONFIRMED_EVENT, [eventId_, execChainId_], nil)
449+ if ((result == result))
450+ then match result {
451+ case a: Boolean =>
452+ if (!(a))
453+ then throw(err_)
454+ else true
455+ case _ =>
456+ throw(err_)
457+ }
458+ else throw("Strict value is not equal to itself.")
459+ }
460+
461+
424462 func _isActiveSigner (publicKey_,publicKeys_,err_) = if (!(containsElement(publicKeys_, publicKey_)))
425463 then throw(err_)
426464 else true
427465
428466
429467 func _checkSecDepo (signer_,err_) = if ((_loadMinSecDepo() > _loadSecDepo(addressFromPublicKey(fromBase58String(signer_)))))
430468 then throw(err_)
431469 else true
432470
433471
434472 func _checkEventStatusForSubmitR (execChainId_,eventId_,err_) = if ((_loadEventStatus(execChainId_, eventId_) != EVENT_STATUS_INIT))
435473 then throw(err_)
436474 else true
437475
438476
439477 func _checkEventStatusForSubmitS (execChainId_,eventId_,err_) = if ((_loadEventStatus(execChainId_, eventId_) != EVENT_STATUS_SIGN))
440478 then throw(err_)
441479 else true
442480
443481
444482 func _checkEventStatusForReset (execChainId_,eventId_,err_) = if (if ((_loadEventStatus(execChainId_, eventId_) != EVENT_STATUS_SIGN))
445483 then true
446484 else ((_loadEventStartBlock(execChainId_, eventId_) + _loadResetBlockDelta()) > height))
447485 then throw(err_)
448486 else true
449487
450488
451489 func _incrementLocks (signers_) = {
452490 func foldFunc (acc,elem) = (acc ++ _saveLock(elem, (_loadLock(elem) + 1)))
453491
454492 let $l = signers_
455493 let $s = size($l)
456494 let $acc0 = nil
457495 func $f0_1 ($a,$i) = if (($i >= $s))
458496 then $a
459497 else foldFunc($a, $l[$i])
460498
461499 func $f0_2 ($a,$i) = if (($i >= $s))
462500 then $a
463501 else throw("List size exceeds 10")
464502
465503 $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)
466504 }
467505
468506
469507 func _isZeroLock (publicKey_,err_) = if ((_loadLock(publicKey_) > 0))
470508 then throw(err_)
471509 else true
472510
473511
474512 func _notSubmittedR (execChainId_,eventId_,signer_,err_) = {
475513 let r = _loadRByEventAndSigner(execChainId_, eventId_, signer_)
476514 if (if ((r != ""))
477515 then containsElement(_loadRsByEvent(execChainId_, eventId_), r)
478516 else false)
479517 then throw(err_)
480518 else true
481519 }
482520
483521
484522 func _notSubmittedS (execChainId_,eventId_,signer_,err_) = {
485523 let s = _loadSByEventAndSigner(execChainId_, eventId_, signer_)
486524 if (if ((s != ""))
487525 then containsElement(_loadSsByEvent(execChainId_, eventId_), s)
488526 else false)
489527 then throw(err_)
490528 else true
491529 }
492530
493531
494532 func _submittedR (execChainId_,eventId_,signer_,err_) = {
495533 let r = _loadRByEventAndSigner(execChainId_, eventId_, signer_)
496534 if (if ((r == ""))
497535 then true
498536 else !(containsElement(_loadRsByEvent(execChainId_, eventId_), r)))
499537 then throw(err_)
500538 else true
501539 }
502540
503541
504542 func _slashIncorrect (signersWithR_,signersWithS_) = {
505543 let punishment = _loadPunishment()
506544 func foldFunc (acc,elem) = if (containsElement(signersWithS_, elem))
507545 then $Tuple3(acc._1, (acc._2 :+ elem), acc._3)
508546 else {
509547 let signerAddress = addressFromPublicKey(fromBase58String(elem))
510548 $Tuple3((acc._1 ++ _saveSecDepo(signerAddress, (_loadSecDepo(signerAddress) - punishment))), acc._2, (acc._3 + punishment))
511549 }
512550
513551 let $l = signersWithR_
514552 let $s = size($l)
515553 let $acc0 = $Tuple3(nil, nil, 0)
516554 func $f0_1 ($a,$i) = if (($i >= $s))
517555 then $a
518556 else foldFunc($a, $l[$i])
519557
520558 func $f0_2 ($a,$i) = if (($i >= $s))
521559 then $a
522560 else throw("List size exceeds 10")
523561
524562 $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)
525563 }
526564
527565
528566 func _compensateCorrect (signers_,compensation_) = {
529567 let perSigner = (compensation_ / size(signers_))
530568 func foldFunc (acc,elem) = (acc :+ ScriptTransfer(addressFromPublicKey(fromBase58String(elem)), perSigner, unit))
531569
532570 let $l = signers_
533571 let $s = size($l)
534572 let $acc0 = nil
535573 func $f0_1 ($a,$i) = if (($i >= $s))
536574 then $a
537575 else foldFunc($a, $l[$i])
538576
539577 func $f0_2 ($a,$i) = if (($i >= $s))
540578 then $a
541579 else throw("List size exceeds 10")
542580
543581 $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)
544582 }
545583
546584
547585 func _publicKeysToAddrsStr (publicKeys_) = {
548586 func foldfunc (acc_,elem_) = (acc_ :+ toString(addressFromPublicKey(fromBase58String(elem_))))
549587
550588 let $l = publicKeys_
551589 let $s = size($l)
552590 let $acc0 = nil
553591 func $f0_1 ($a,$i) = if (($i >= $s))
554592 then $a
555593 else foldfunc($a, $l[$i])
556594
557595 func $f0_2 ($a,$i) = if (($i >= $s))
558596 then $a
559597 else throw("List size exceeds 51")
560598
561599 $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)
562600 }
563601
564602
565603 @Callable(i)
566-func init (minSecDepo_,punishment_,resetBlockDelta_,rewardTokenAddress_,rewardAmount_) = {
567- let err = if (if (if (if (if (if (if (_onlyThisContract(i.caller))
604+func init (minSecDepo_,punishment_,resetBlockDelta_,rewardTokenAddress_,rewardAmount_,witnessAddress_) = {
605+ let err = if (if (if (if (if (if (if (if (_onlyThisContract(i.caller))
568606 then _whenNotInitialized()
569607 else false)
570608 then _whenMultisigSet()
571609 else false)
572610 then _validateInt(minSecDepo_, punishment_, MAX_INT, "init: invalid minSecDepo")
573611 else false)
574612 then _validateInt(punishment_, 0, MAX_INT, "init: invalid punishment")
575613 else false)
576614 then _validateInt(resetBlockDelta_, 0, MAX_INT, "init: invalid resetBlockDelta")
577615 else false)
578616 then _validateAddress(rewardTokenAddress_, "init: invalid rewardTokenAddress")
579617 else false)
580618 then _validateInt(rewardAmount_, 0, MAX_INT, "init: invalid rewardAmount")
619+ else false)
620+ then _validateAddress(witnessAddress_, "init: invalid witnessAddress")
581621 else false
582622 if ((err == err))
583- then $Tuple2((((((_saveInit(true) ++ _saveMinSecDepo(minSecDepo_)) ++ _savePunishment(punishment_)) ++ _saveResetBlockDelta(resetBlockDelta_)) ++ _saveRewardTokenAddress(addressFromStringValue(rewardTokenAddress_))) ++ _saveRewardAmount(rewardAmount_)), unit)
623+ then $Tuple2(((((((_saveInit(true) ++ _saveMinSecDepo(minSecDepo_)) ++ _savePunishment(punishment_)) ++ _saveResetBlockDelta(resetBlockDelta_)) ++ _saveRewardTokenAddress(addressFromStringValue(rewardTokenAddress_))) ++ _saveRewardAmount(rewardAmount_)) ++ _saveWitnessAddress(addressFromStringValue(witnessAddress_))), unit)
584624 else throw("Strict value is not equal to itself.")
585625 }
586626
587627
588628
589629 @Callable(i)
590630 func setActiveSigners (execChainId_,signers_,t_) = {
591631 let err = if (if (if (_onlyThisContract(i.caller))
592632 then _whenInitialized()
593633 else false)
594634 then _validatePublicKeys(signers_, "setActiveSigners: invalid signers")
595635 else false)
596636 then _validateInt(t_, 2, size(signers_), "setActiveSigners: invalid T")
597637 else false
598638 if ((err == err))
599639 then {
600640 let epoch = _loadCurrentEpoch(execChainId_)
601641 $Tuple2((((_saveCurrentEpoch(execChainId_, (epoch + 1)) ++ _saveT(execChainId_, (epoch + 1), t_)) ++ _saveSigners(execChainId_, (epoch + 1), signers_)) ++ _incrementLocks(signers_)), unit)
602642 }
603643 else throw("Strict value is not equal to itself.")
604644 }
605645
606646
607647
608648 @Callable(i)
609649 func submitR (eventId_,execChainId_,r_) = {
610650 let callerPublicKey = toBase58String(i.callerPublicKey)
611651 let epoch = _loadCurrentEpoch(execChainId_)
612652 let t = _loadT(execChainId_, epoch)
613- let err = if (if (if (if (if (if (if (_whenInitialized())
653+ let err = if (if (if (if (if (if (if (if (_whenInitialized())
614654 then _validateInt(eventId_, 0, MAX_INT, "submitR: invalid eventId")
615655 else false)
616656 then _validateInt(execChainId_, 0, MAX_INT, "submitR: invalid execChainId")
617657 else false)
618658 then _validateString(r_, "submitR: invalid r")
659+ else false)
660+ then _isConfirmedEvent(eventId_, execChainId_, "submitR: event not confirmed")
619661 else false)
620662 then _isActiveSigner(callerPublicKey, _loadSigners(execChainId_, epoch), "submitR: not active")
621663 else false)
622664 then _checkSecDepo(callerPublicKey, "submitR: not enough security deposit")
623665 else false)
624666 then _checkEventStatusForSubmitR(execChainId_, eventId_, "submitR: invalid event status")
625667 else false)
626668 then _notSubmittedR(execChainId_, eventId_, callerPublicKey, "submitR: already submitted")
627669 else false
628670 if ((err == err))
629671 then {
630672 let rArray = _loadRsByEvent(execChainId_, eventId_)
631673 let signersArray = _loadSignersWithRByEvent(execChainId_, eventId_)
632674 let eventStatusActions = if (((size(rArray) + 1) == t))
633675 then (_saveEventStatus(execChainId_, eventId_, EVENT_STATUS_SIGN) ++ _saveEventStartBlock(execChainId_, eventId_, height))
634676 else nil
635677 $Tuple2((((_saveRsByEvent(execChainId_, eventId_, (rArray :+ r_)) ++ _saveRByEventAndSigner(execChainId_, eventId_, callerPublicKey, r_)) ++ _saveSignersWithRByEvent(execChainId_, eventId_, (signersArray :+ callerPublicKey))) ++ eventStatusActions), unit)
636678 }
637679 else throw("Strict value is not equal to itself.")
638680 }
639681
640682
641683
642684 @Callable(i)
643685 func submitS (eventId_,execChainId_,rSigma_,s_,sSigma_) = {
644686 let callerPublicKey = toBase58String(i.callerPublicKey)
645687 let epoch = _loadCurrentEpoch(execChainId_)
646688 let t = _loadT(execChainId_, epoch)
647689 let err = if (if (if (if (if (if (if (if (if (_whenInitialized())
648690 then _validateInt(eventId_, 0, MAX_INT, "submitS: invalid eventId")
649691 else false)
650692 then _validateInt(execChainId_, 0, MAX_INT, "submitS: invalid execChainId")
651693 else false)
652694 then _validateString(rSigma_, "submitS: invalid r sigma")
653695 else false)
654696 then _validateString(s_, "submitS: invalid s")
655697 else false)
656698 then _isActiveSigner(callerPublicKey, _loadSigners(execChainId_, epoch), "submitS: not active")
657699 else false)
658700 then _checkSecDepo(callerPublicKey, "submitS: not enough security deposit")
659701 else false)
660702 then _checkEventStatusForSubmitS(execChainId_, eventId_, "submitS: invalid event status")
661703 else false)
662704 then _notSubmittedS(execChainId_, eventId_, callerPublicKey, "submitS: already submitted")
663705 else false)
664706 then _submittedR(execChainId_, eventId_, callerPublicKey, "submitS: R is not submitted")
665707 else false
666708 if ((err == err))
667709 then {
668710 let sArray = _loadSsByEvent(execChainId_, eventId_)
669711 let signersArray = _loadSignersWithSByEvent(execChainId_, eventId_)
670712 let eventStatusActions = if (((size(sArray) + 1) == t))
671713 then {
672714 let err1 = _validateString(sSigma_, "submitS: invalid s sigma")
673715 if ((err1 == err1))
674716 then {
675717 let executorIdxSize = _loadSignedEventExecutorIdxSize(execChainId_)
676718 let rewardAddresses = _publicKeysToAddrsStr((signersArray :+ callerPublicKey))
677719 let signersRewards = invoke(_loadRewardTokenAddress(), FUNC_MINT_MANY, [_loadRewardAmount(), rewardAddresses], nil)
678720 if ((signersRewards == signersRewards))
679721 then (((_saveEventStatus(execChainId_, eventId_, EVENT_STATUS_DONE) ++ _saveSignedEventExecutorIdx(execChainId_, executorIdxSize, eventId_)) ++ _saveSignedEventExecutorIdxSize(execChainId_, (executorIdxSize + 1))) ++ _saveSSigmaByEvent(execChainId_, eventId_, sSigma_))
680722 else throw("Strict value is not equal to itself.")
681723 }
682724 else throw("Strict value is not equal to itself.")
683725 }
684726 else nil
685727 $Tuple2(((((_saveSsByEvent(execChainId_, eventId_, (sArray :+ s_)) ++ _saveSByEventAndSigner(execChainId_, eventId_, callerPublicKey, s_)) ++ _saveSignersWithSByEvent(execChainId_, eventId_, (signersArray :+ callerPublicKey))) ++ _saveRSigmaByEvent(execChainId_, eventId_, rSigma_)) ++ eventStatusActions), unit)
686728 }
687729 else throw("Strict value is not equal to itself.")
688730 }
689731
690732
691733
692734 @Callable(i)
693735 func reset (eventId_,execChainId_,r_) = {
694736 let callerPublicKey = toBase58String(i.callerPublicKey)
695737 let epoch = _loadCurrentEpoch(execChainId_)
696738 let err = if (if (if (if (if (if (_whenInitialized())
697739 then _validateInt(eventId_, 0, MAX_INT, "reset: invalid eventId")
698740 else false)
699741 then _validateInt(execChainId_, 0, MAX_INT, "reset: invalid execChainId")
700742 else false)
701743 then _validateString(r_, "reset: invalid r")
702744 else false)
703745 then _isActiveSigner(callerPublicKey, _loadSigners(execChainId_, epoch), "reset: not active")
704746 else false)
705747 then _checkSecDepo(callerPublicKey, "reset: not enough security deposit")
706748 else false)
707749 then _checkEventStatusForReset(execChainId_, eventId_, "reset: invalid event status")
708750 else false
709751 if ((err == err))
710752 then {
711753 let slashAmount = 0
712754 let signersWithR = _loadSignersWithRByEvent(execChainId_, eventId_)
713755 let signersWithS = _loadSignersWithSByEvent(execChainId_, eventId_)
714756 let result = _slashIncorrect(signersWithR, signersWithS)
715757 let slashingActions = result._1
716758 let compensatedSigners = result._2
717759 let compensation = result._3
718760 let compensationActions = _compensateCorrect(compensatedSigners, compensation)
719761 $Tuple2((((((((((_saveEventStatus(execChainId_, eventId_, EVENT_STATUS_INIT) ++ _saveRsByEvent(execChainId_, eventId_, [r_])) ++ _saveRByEventAndSigner(execChainId_, eventId_, callerPublicKey, r_)) ++ _saveSignersWithRByEvent(execChainId_, eventId_, [callerPublicKey])) ++ _saveRSigmaByEvent(execChainId_, eventId_, "")) ++ _saveSsByEvent(execChainId_, eventId_, nil)) ++ _saveSignersWithSByEvent(execChainId_, eventId_, nil)) ++ _saveSSigmaByEvent(execChainId_, eventId_, "")) ++ slashingActions) ++ compensationActions), unit)
720762 }
721763 else throw("Strict value is not equal to itself.")
722764 }
723765
724766
725767
726768 @Callable(i)
727769 func addSecurityDeposit (recipient_) = {
728770 let recipient = if ((recipient_ == ""))
729771 then toString(i.caller)
730772 else recipient_
731773 let err = if (if (_validateAddress(recipient, "addSecurityDeposit: invalid recipient"))
732774 then _validatePaymentsSize(i.payments, 1, "addSecurityDeposit: no payment")
733775 else false)
734776 then _validatePaymentAsset(i.payments[0], unit, "addSecurityDeposit: invalid asset")
735777 else false
736778 if ((err == err))
737779 then {
738780 let recipientAddr = addressFromStringValue(recipient)
739781 let balance = _loadSecDepo(recipientAddr)
740782 let updatedBalance = (balance + i.payments[0].amount)
741783 $Tuple2(_saveSecDepo(recipientAddr, updatedBalance), unit)
742784 }
743785 else throw("Strict value is not equal to itself.")
744786 }
745787
746788
747789
748790 @Callable(i)
749791 func subSecurityDeposit (amount_) = {
750792 let balance = _loadSecDepo(i.caller)
751793 let err = if (_isZeroLock(toBase58String(i.callerPublicKey), "subSecurityDeposit: locked"))
752794 then if ((amount_ > balance))
753795 then throw("subSecurityDeposit: insufficient balance")
754796 else true
755797 else false
756798 if ((err == err))
757799 then $Tuple2((_saveSecDepo(i.caller, (balance - amount_)) ++ [ScriptTransfer(i.caller, amount_, unit)]), unit)
758800 else throw("Strict value is not equal to itself.")
759801 }
760802
761803
762804
763805 @Callable(i)
764806 func setMultisig (multisig_) = {
765807 let err = if (_onlyThisContract(i.caller))
766808 then _validateAddress(multisig_, "setMultisig: invalid multisig address")
767809 else false
768810 if ((err == err))
769811 then $Tuple2(_saveMultisig(addressFromStringValue(multisig_)), unit)
770812 else throw("Strict value is not equal to itself.")
771813 }
772814
773815
774816 @Verifier(tx)
775817 func verify () = match getString(KEY_MULTISIG) {
776818 case multisig: String =>
777819 valueOrElse(getBoolean(addressFromStringValue(multisig), makeString([KEY_STATUS, toString(this), toBase58String(tx.id)], SEPARATOR)), false)
778820 case _ =>
779821 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
780822 }
781823

github/deemru/w8io/169f3d6 
89.73 ms