tx · BdV5Z7Rnpzjch5sCVB6EiNtKqpt4RSM7t2tCCoDQ9atM 3N8y11BBhwvWJ8H7ZJhRdj4RSaCS4F1kmnq: -0.01900000 Waves 2023.02.22 21:36 [2461230] smart account 3N8y11BBhwvWJ8H7ZJhRdj4RSaCS4F1kmnq > SELF 0.00000000 Waves
{ "type": 13, "id": "BdV5Z7Rnpzjch5sCVB6EiNtKqpt4RSM7t2tCCoDQ9atM", "fee": 1900000, "feeAssetId": null, "timestamp": 1677090567816, "version": 2, "chainId": 84, "sender": "3N8y11BBhwvWJ8H7ZJhRdj4RSaCS4F1kmnq", "senderPublicKey": "9h5JzYfTWnVh4h7BT6Dk43FESut9R47V6knaMeebAvMj", "proofs": [ "3N6xE8U45FXE9thUND2p5DrKyBMshFYFdDMLYp6tRkRc79cvQQv8kdAGQn3qBFMzwZcp3djHS5xQefr9n5xHupuV" ], "script": "base64:BgI4CAISBwoFAQEBCAESBQoDARgBEgUKAwEBCBIHCgUBAQgICBIFCgMBAQgSAwoBCBIDCgEBEgMKAQhmAAlTRVBBUkFUT1ICAl9fAAhLRVlfSU5JVAIESU5JVAAMS0VZX01VTFRJU0lHAghNVUxUSVNJRwAKS0VZX1NUQVRVUwIGU1RBVFVTABBLRVlfTUlOX1NFQ19ERVBPAgxNSU5fU0VDX0RFUE8ADktFWV9QVU5JU0hNRU5UAgpQVU5JU0hNRU5UABVLRVlfUkVTRVRfQkxPQ0tfREVMVEECEVJFU0VUX0JMT0NLX0RFTFRBAAxLRVlfU0VDX0RFUE8CCFNFQ19ERVBPABhLRVlfUkVXQVJEX1RPS0VOX0FERFJFU1MCFFJFV0FSRF9UT0tFTl9BRERSRVNTABFLRVlfUkVXQVJEX0FNT1VOVAINUkVXQVJEX0FNT1VOVAARS0VZX0NVUlJFTlRfRVBPQ0gCDUNVUlJFTlRfRVBPQ0gAFUtFWV9TSUdORVJTX1BFUl9FUE9DSAIRU0lHTkVSU19QRVJfRVBPQ0gAEEtFWV9FVkVOVF9TVE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old | New | Differences | |
---|---|---|---|
437 | 437 | ||
438 | 438 | ||
439 | 439 | func _incrementLocks (signers_) = { | |
440 | - | func foldFunc (acc,elem) = (acc | |
440 | + | func foldFunc (acc,elem) = (acc ++ _saveLock(elem, (_loadLock(elem) + 1))) | |
441 | 441 | ||
442 | 442 | let $l = signers_ | |
443 | 443 | let $s = size($l) |
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 | 238 | func _loadEventStatus (eventId_) = match getInteger(makeString([KEY_EVENT_STATUS, 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 | 246 | func _saveEventStatus (eventId_,status_) = [IntegerEntry(makeString([KEY_EVENT_STATUS, 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 | 271 | func _loadRsByEvent (eventId_) = match getString(makeString([KEY_R, 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 | 279 | func _saveRsByEvent (eventId_,rs_) = [StringEntry(makeString([KEY_R, toString(eventId_)], SEPARATOR), makeString(rs_, SEPARATOR))] | |
280 | 280 | ||
281 | 281 | ||
282 | 282 | func _loadSsByEvent (eventId_) = match getString(makeString([KEY_S, 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 | 290 | func _saveSsByEvent (eventId_,ss_) = [StringEntry(makeString([KEY_S, toString(eventId_)], SEPARATOR), makeString(ss_, SEPARATOR))] | |
291 | 291 | ||
292 | 292 | ||
293 | 293 | func _loadRSigmaByEvent (eventId_) = match getString(makeString([KEY_R_SIGMA, toString(eventId_)], SEPARATOR)) { | |
294 | 294 | case a: String => | |
295 | 295 | a | |
296 | 296 | case _ => | |
297 | 297 | "" | |
298 | 298 | } | |
299 | 299 | ||
300 | 300 | ||
301 | 301 | func _saveRSigmaByEvent (eventId_,rSigma_) = [StringEntry(makeString([KEY_R_SIGMA, toString(eventId_)], SEPARATOR), rSigma_)] | |
302 | 302 | ||
303 | 303 | ||
304 | 304 | func _loadSSigmaByEvent (eventId_) = match getString(makeString([KEY_S_SIGMA, toString(eventId_)], SEPARATOR)) { | |
305 | 305 | case a: String => | |
306 | 306 | a | |
307 | 307 | case _ => | |
308 | 308 | "" | |
309 | 309 | } | |
310 | 310 | ||
311 | 311 | ||
312 | 312 | func _saveSSigmaByEvent (eventId_,sSigma_) = [StringEntry(makeString([KEY_S_SIGMA, toString(eventId_)], SEPARATOR), sSigma_)] | |
313 | 313 | ||
314 | 314 | ||
315 | 315 | func _loadRByEventAndSigner (eventId_,signer_) = match getString(makeString([KEY_R, toString(eventId_), signer_], SEPARATOR)) { | |
316 | 316 | case a: String => | |
317 | 317 | a | |
318 | 318 | case _ => | |
319 | 319 | "" | |
320 | 320 | } | |
321 | 321 | ||
322 | 322 | ||
323 | 323 | func _saveRByEventAndSigner (eventId_,signer_,r_) = [StringEntry(makeString([KEY_R, toString(eventId_), signer_], SEPARATOR), r_)] | |
324 | 324 | ||
325 | 325 | ||
326 | 326 | func _loadSByEventAndSigner (eventId_,signer_) = match getString(makeString([KEY_S, toString(eventId_), signer_], SEPARATOR)) { | |
327 | 327 | case a: String => | |
328 | 328 | a | |
329 | 329 | case _ => | |
330 | 330 | "" | |
331 | 331 | } | |
332 | 332 | ||
333 | 333 | ||
334 | 334 | func _saveSByEventAndSigner (eventId_,signer_,s_) = [StringEntry(makeString([KEY_S, toString(eventId_), signer_], SEPARATOR), s_)] | |
335 | 335 | ||
336 | 336 | ||
337 | 337 | func _loadSignersWithRByEvent (eventId_) = match getString(makeString([KEY_R_SIGNERS, 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 | 345 | func _saveSignersWithRByEvent (eventId_,rs_) = [StringEntry(makeString([KEY_R_SIGNERS, toString(eventId_)], SEPARATOR), makeString(rs_, SEPARATOR))] | |
346 | 346 | ||
347 | 347 | ||
348 | 348 | func _loadSignersWithSByEvent (eventId_) = match getString(makeString([KEY_S_SIGNERS, 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 | 356 | func _saveSignersWithSByEvent (eventId_,ss_) = [StringEntry(makeString([KEY_S_SIGNERS, toString(eventId_)], SEPARATOR), makeString(ss_, SEPARATOR))] | |
357 | 357 | ||
358 | 358 | ||
359 | 359 | func _loadEventStartBlock (eventId_) = match getInteger(makeString([KEY_EVENT_START_BLOCK, toString(eventId_)], SEPARATOR)) { | |
360 | 360 | case a: Int => | |
361 | 361 | a | |
362 | 362 | case _ => | |
363 | 363 | 0 | |
364 | 364 | } | |
365 | 365 | ||
366 | 366 | ||
367 | 367 | func _saveEventStartBlock (eventId_,val_) = [IntegerEntry(makeString([KEY_EVENT_START_BLOCK, 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 | 422 | func _checkEventStatusForSubmitR (eventId_,err_) = if ((_loadEventStatus(eventId_) != EVENT_STATUS_INIT)) | |
423 | 423 | then throw(err_) | |
424 | 424 | else true | |
425 | 425 | ||
426 | 426 | ||
427 | 427 | func _checkEventStatusForSubmitS (eventId_,err_) = if ((_loadEventStatus(eventId_) != EVENT_STATUS_SIGN)) | |
428 | 428 | then throw(err_) | |
429 | 429 | else true | |
430 | 430 | ||
431 | 431 | ||
432 | 432 | func _checkEventStatusForReset (eventId_,err_) = if (if ((_loadEventStatus(eventId_) != EVENT_STATUS_SIGN)) | |
433 | 433 | then true | |
434 | 434 | else (height >= (_loadEventStartBlock(eventId_) + _loadResetBlockDelta()))) | |
435 | 435 | then throw(err_) | |
436 | 436 | else true | |
437 | 437 | ||
438 | 438 | ||
439 | 439 | func _incrementLocks (signers_) = { | |
440 | - | func foldFunc (acc,elem) = (acc | |
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 | 462 | func _notSubmittedR (eventId_,signer_,err_) = if ((_loadRByEventAndSigner(eventId_, signer_) != "")) | |
463 | 463 | then throw(err_) | |
464 | 464 | else true | |
465 | 465 | ||
466 | 466 | ||
467 | 467 | func _notSubmittedS (eventId_,signer_,err_) = if ((_loadSByEventAndSigner(eventId_, signer_) != "")) | |
468 | 468 | then throw(err_) | |
469 | 469 | else true | |
470 | 470 | ||
471 | 471 | ||
472 | 472 | func _submittedR (eventId_,signer_,err_) = { | |
473 | 473 | let r = _loadRByEventAndSigner(eventId_, signer_) | |
474 | 474 | if ((r == "")) | |
475 | 475 | then throw(err_) | |
476 | 476 | else if (!(containsElement(_loadRsByEvent(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_ :+ 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 | 602 | then _checkEventStatusForSubmitR(eventId_, "submitR: invalid event status") | |
603 | 603 | else false) | |
604 | 604 | then _notSubmittedR(eventId_, callerPublicKey, "submitR: already submitted") | |
605 | 605 | else false | |
606 | 606 | if ((err == err)) | |
607 | 607 | then { | |
608 | 608 | let rArray = _loadRsByEvent(eventId_) | |
609 | 609 | let signersArray = _loadSignersWithRByEvent(eventId_) | |
610 | 610 | let eventStatusActions = if (((size(rArray) + 1) == t)) | |
611 | 611 | then (_saveEventStatus(eventId_, EVENT_STATUS_SIGN) ++ _saveEventStartBlock(eventId_, height)) | |
612 | 612 | else nil | |
613 | 613 | $Tuple2((((_saveRsByEvent(eventId_, (rArray :+ r_)) ++ _saveRByEventAndSigner(eventId_, callerPublicKey, r_)) ++ _saveSignersWithRByEvent(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 | 638 | then _checkEventStatusForSubmitS(eventId_, "submitS: invalid event status") | |
639 | 639 | else false) | |
640 | 640 | then _notSubmittedS(eventId_, callerPublicKey, "submitS: already submitted") | |
641 | 641 | else false) | |
642 | 642 | then _submittedR(eventId_, callerPublicKey, "submitS: R is not submitted") | |
643 | 643 | else false | |
644 | 644 | if ((err == err)) | |
645 | 645 | then { | |
646 | 646 | let sArray = _loadSsByEvent(eventId_) | |
647 | 647 | let signersArray = _loadSignersWithSByEvent(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 witnessesRewards = invoke(_loadRewardTokenAddress(), FUNC_MINT_MANY, [_loadRewardAmount(), rewardAddresses], nil) | |
656 | 656 | if ((witnessesRewards == witnessesRewards)) | |
657 | 657 | then (((_saveEventStatus(eventId_, EVENT_STATUS_DONE) ++ _saveSignedEventExecutorIdx(execChainId_, executorIdxSize, eventId_)) ++ _saveSignedEventExecutorIdxSize(execChainId_, (executorIdxSize + 1))) ++ _saveSSigmaByEvent(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 | 663 | $Tuple2(((((_saveSsByEvent(eventId_, (sArray :+ s_)) ++ _saveSByEventAndSigner(eventId_, callerPublicKey, s_)) ++ _saveSignersWithSByEvent(eventId_, (signersArray :+ callerPublicKey))) ++ _saveRSigmaByEvent(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 | 685 | then _checkEventStatusForReset(eventId_, "reset: invalid event status") | |
686 | 686 | else false | |
687 | 687 | if ((err == err)) | |
688 | 688 | then { | |
689 | 689 | let slashAmount = 0 | |
690 | 690 | let signersWithR = _loadSignersWithRByEvent(eventId_) | |
691 | 691 | let signersWithS = _loadSignersWithSByEvent(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 | 697 | $Tuple2((((((((_saveRsByEvent(eventId_, [r_]) ++ _saveRByEventAndSigner(eventId_, callerPublicKey, r_)) ++ _saveSignersWithRByEvent(eventId_, [callerPublicKey])) ++ _saveRSigmaByEvent(eventId_, "")) ++ _saveSSigmaByEvent(eventId_, "")) ++ _saveEventStatus(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/03bedc9 81.91 ms ◑![]()