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