tx · CutHDDT3ZWqnnsLpCRLmXhXX1GbbmRJseeNLkgQeUveE 3Mx4GxjrawhKHBgMKH9C5Hmbj8ePZDrs8ed: -0.01800000 Waves 2023.07.03 11:13 [2649471] smart account 3Mx4GxjrawhKHBgMKH9C5Hmbj8ePZDrs8ed > SELF 0.00000000 Waves
{ "type": 13, "id": "CutHDDT3ZWqnnsLpCRLmXhXX1GbbmRJseeNLkgQeUveE", "fee": 1800000, "feeAssetId": null, "timestamp": 1688372046437, "version": 2, "chainId": 84, "sender": "3Mx4GxjrawhKHBgMKH9C5Hmbj8ePZDrs8ed", "senderPublicKey": "9DpEgmia9fGpxtGGDeSMtER4g9qB7WQPPYTKTHzqSFuX", "proofs": [ "5TC29DLugpY9mjtXPFQEnobKmXvx2MPoWVW3JTJHr93631rbkSXYcWcVTFohMZjjzHhetU8djzqzFvkgvGcLt3wy" ], "script": "base64:BgJdCAISBgoECAgICBIJCgcICAgICAgIEgYKBAEICAESBgoEAQgIARIECgIBCBIDCgEIEgQKAgEEEgMKAQgSBQoDAQgBEgsKCQEICAEBAQEBBBIAEgASAwoBCBIDCgEIQAAJU0VQQVJBVE9SAgJfXwAIS0VZX0lOSVQCBElOSVQADEtFWV9NVUxUSVNJRwIITVVMVElTSUcACktFWV9TVEFUVVMCBlNUQVRVUwAKS0VZX1BBVVNFRAIGUEFVU0VEAApLRVlfUEFVU0VSAgZQQVVTRVIADEtFWV9FWEVDVVRPUgIIRVhFQ1VUT1IAEEtFWV9ST09UX0FEQVBURVICDFJPT1RfQURBUFRFUgATS0VZX0NBTExFUl9DT05UUkFDVAIPQ0FMTEVSX0NPTlRSQUNUAAlLRVlfQ0hBSU4CBUNIQUlOAAtLRVlfQklORElORwIHQklORElORwAHS0VZX0ZFRQIDRkVFABFLRVlfRkVFX1JFQ0lQSUVOVAINRkVFX1JFQ0lQSUVOVAAYS0VZX1JFRkVSUkVSX0ZFRV9QRVJDRU5UAhRSRUZFUlJFUl9GRUVfUEVSQ0VOVAATRlV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QUDDokDWowue7hGuXqGuH2riBivzimqcN5 Diff:
Old | New | Differences | |
---|---|---|---|
73 | 73 | ||
74 | 74 | func _validatePaymentsSize (payments_,target_,err_) = if ((size(payments_) != target_)) | |
75 | 75 | then throw(err_) | |
76 | + | else true | |
77 | + | ||
78 | + | ||
79 | + | func _validateReferrer (referrer_,err_) = if ((referrer_ != "")) | |
80 | + | then _validateAddress(referrer_, err_) | |
76 | 81 | else true | |
77 | 82 | ||
78 | 83 | ||
369 | 374 | ||
370 | 375 | ||
371 | 376 | @Callable(i) | |
372 | - | func burnTokens (executionChainId_,recipient_,gaslessReward_) = { | |
377 | + | func burnTokens (executionChainId_,recipient_,referrer_,gaslessReward_) = { | |
373 | 378 | let err = if (if (if (if (if (_whenInitialized()) | |
374 | 379 | then _whenNotPaused() | |
375 | 380 | else false) | |
376 | - | then _validateChain(executionChainId_, " | |
381 | + | then _validateChain(executionChainId_, "burnTokens: invalid execution chain") | |
377 | 382 | else false) | |
378 | - | then _validatePaymentsSize(i.payments, 1, " | |
383 | + | then _validatePaymentsSize(i.payments, 1, "burnTokens: no payment") | |
379 | 384 | else false) | |
380 | - | then _validateInt(gaslessReward_, 0, MAX_INT, " | |
385 | + | then _validateInt(gaslessReward_, 0, MAX_INT, "burnTokens: invalid gaslessReward") | |
381 | 386 | else false) | |
382 | - | then _validateInt(i.payments[0].amount, 0, MAX_INT, " | |
387 | + | then _validateInt(i.payments[0].amount, 0, MAX_INT, "burnTokens: invalid payment amount") | |
383 | 388 | else false | |
384 | 389 | if ((err == err)) | |
385 | 390 | then { | |
388 | 393 | case a: ByteVector => | |
389 | 394 | a | |
390 | 395 | case _ => | |
391 | - | throw(" | |
396 | + | throw("burnTokens: invalid asset") | |
392 | 397 | } | |
393 | 398 | let binding = _loadBinding(executionChainId_, assetId) | |
394 | 399 | let assetContract = binding._1 | |
399 | 404 | let beforePercentFee = binding._6 | |
400 | 405 | let afterPercentFee = binding._7 | |
401 | 406 | let enabled = binding._8 | |
402 | - | let err1 = if (if (_validateAddress(toString(assetContract), " | |
403 | - | then _validateInt(amount, minAmount, MAX_INT, " | |
407 | + | let err1 = if (if (_validateAddress(toString(assetContract), "burnTokens: no such binding")) | |
408 | + | then _validateInt(amount, minAmount, MAX_INT, "burnTokens: less than min") | |
404 | 409 | else false) | |
405 | - | then _validateBool(enabled, true, " | |
410 | + | then _validateBool(enabled, true, "burnTokens: token is disabled") | |
406 | 411 | else false | |
407 | 412 | if ((err1 == err1)) | |
408 | 413 | then { | |
413 | 418 | then afterPercentFee | |
414 | 419 | else beforePercentFee | |
415 | 420 | let fee = (minFee + fraction(amount, percent, PERCENT_FACTOR)) | |
416 | - | let err2 = _validateInt(amount, (fee + 1), MAX_INT, " | |
421 | + | let err2 = _validateInt(amount, (fee + 1), MAX_INT, "burnTokens: fee more than amount") | |
417 | 422 | if ((err2 == err2)) | |
418 | 423 | then { | |
419 | 424 | let amountToSend = (amount - fee) | |
420 | - | let err3 = _validateInt(amountToSend, (gaslessReward_ + 1), MAX_INT, " | |
425 | + | let err3 = _validateInt(amountToSend, (gaslessReward_ + 1), MAX_INT, "burnTokens: reward more than amount") | |
421 | 426 | if ((err3 == err3)) | |
422 | 427 | then { | |
423 | 428 | let updateFee = (_loadFee(assetId) + fee) | |
426 | 431 | let invocation = invoke(_loadRootAdapter(), FUNC_RELEASE_TOKENS, [executionChainId_, executionAsset, normalizedAmount, recipient_, normalizedGasless], nil) | |
427 | 432 | if ((invocation == invocation)) | |
428 | 433 | then $Tuple2((_saveFee(assetId, updateFee) ++ [Burn(assetId, amountToSend)]), unit) | |
434 | + | else throw("Strict value is not equal to itself.") | |
435 | + | } | |
436 | + | else throw("Strict value is not equal to itself.") | |
437 | + | } | |
438 | + | else throw("Strict value is not equal to itself.") | |
439 | + | } | |
440 | + | else throw("Strict value is not equal to itself.") | |
441 | + | } | |
442 | + | else throw("Strict value is not equal to itself.") | |
443 | + | } | |
444 | + | else throw("Strict value is not equal to itself.") | |
445 | + | } | |
446 | + | ||
447 | + | ||
448 | + | ||
449 | + | @Callable(i) | |
450 | + | func burnTokensV2 (executionChainId_,recipient_,referrer_,gaslessReward_) = { | |
451 | + | let err = if (if (if (if (if (if (_whenInitialized()) | |
452 | + | then _whenNotPaused() | |
453 | + | else false) | |
454 | + | then _validateChain(executionChainId_, "burnTokensV2: invalid execution chain") | |
455 | + | else false) | |
456 | + | then _validatePaymentsSize(i.payments, 1, "burnTokensV2: no payment") | |
457 | + | else false) | |
458 | + | then _validateInt(gaslessReward_, 0, MAX_INT, "burnTokensV2: invalid gaslessReward") | |
459 | + | else false) | |
460 | + | then _validateInt(i.payments[0].amount, 0, MAX_INT, "burnTokensV2: invalid payment amount") | |
461 | + | else false) | |
462 | + | then _validateReferrer(referrer_, "burnTokensV2: invalid referrer") | |
463 | + | else false | |
464 | + | if ((err == err)) | |
465 | + | then { | |
466 | + | let amount = i.payments[0].amount | |
467 | + | let assetId = match i.payments[0].assetId { | |
468 | + | case a: ByteVector => | |
469 | + | a | |
470 | + | case _ => | |
471 | + | throw("burnTokensV2: invalid asset") | |
472 | + | } | |
473 | + | let binding = _loadBinding(executionChainId_, assetId) | |
474 | + | let assetContract = binding._1 | |
475 | + | let executionAsset = binding._2 | |
476 | + | let minAmount = binding._3 | |
477 | + | let minFee = binding._4 | |
478 | + | let thresholdFee = binding._5 | |
479 | + | let beforePercentFee = binding._6 | |
480 | + | let afterPercentFee = binding._7 | |
481 | + | let enabled = binding._8 | |
482 | + | let err1 = if (if (_validateAddress(toString(assetContract), "burnTokensV2: no such binding")) | |
483 | + | then _validateInt(amount, minAmount, MAX_INT, "burnTokensV2: less than min") | |
484 | + | else false) | |
485 | + | then _validateBool(enabled, true, "burnTokensV2: token is disabled") | |
486 | + | else false | |
487 | + | if ((err1 == err1)) | |
488 | + | then { | |
489 | + | let assetDecimals = _asInt(invoke(assetContract, "getDecimals", nil, nil)) | |
490 | + | if ((assetDecimals == assetDecimals)) | |
491 | + | then { | |
492 | + | let percent = if ((amount > thresholdFee)) | |
493 | + | then afterPercentFee | |
494 | + | else beforePercentFee | |
495 | + | let fee = (minFee + fraction(amount, percent, PERCENT_FACTOR)) | |
496 | + | let err2 = _validateInt(amount, (fee + 1), MAX_INT, "burnTokensV2: fee more than amount") | |
497 | + | if ((err2 == err2)) | |
498 | + | then { | |
499 | + | let $t01622416629 = if ((referrer_ != "")) | |
500 | + | then { | |
501 | + | let referrer = addressFromStringValue(referrer_) | |
502 | + | let referrerFeeAmount = fraction(_loadReferrerFeePercent(executionChainId_, referrer), fee, PERCENT_FACTOR) | |
503 | + | $Tuple2(referrerFeeAmount, [ScriptTransfer(referrer, referrerFeeAmount, assetId)]) | |
504 | + | } | |
505 | + | else $Tuple2(0, nil) | |
506 | + | let referrerFee = $t01622416629._1 | |
507 | + | let referrerActions = $t01622416629._2 | |
508 | + | let amountToSend = (amount - fee) | |
509 | + | let err3 = _validateInt(amountToSend, (gaslessReward_ + 1), MAX_INT, "burnTokensV2: reward more than amount") | |
510 | + | if ((err3 == err3)) | |
511 | + | then { | |
512 | + | let updateFee = ((_loadFee(assetId) + fee) - referrerFee) | |
513 | + | let normalizedAmount = _normalizeDecimals(amountToSend, assetDecimals, DECIMALS) | |
514 | + | let normalizedGasless = _normalizeDecimals(gaslessReward_, assetDecimals, DECIMALS) | |
515 | + | let invocation = invoke(_loadRootAdapter(), FUNC_RELEASE_TOKENS, [executionChainId_, executionAsset, normalizedAmount, recipient_, normalizedGasless], nil) | |
516 | + | if ((invocation == invocation)) | |
517 | + | then $Tuple2(((_saveFee(assetId, updateFee) ++ referrerActions) ++ [Burn(assetId, amountToSend)]), unit) | |
429 | 518 | else throw("Strict value is not equal to itself.") | |
430 | 519 | } | |
431 | 520 | else throw("Strict value is not equal to itself.") | |
591 | 680 | let err = if (if (_onlyThisContract(i.caller)) | |
592 | 681 | then _whenInitialized() | |
593 | 682 | else false) | |
594 | - | then _validateAddress(pauser_, " | |
683 | + | then _validateAddress(pauser_, "updatePauser: invalid pauser") | |
595 | 684 | else false | |
596 | 685 | if ((err == err)) | |
597 | 686 | then $Tuple2(_savePauser(addressFromStringValue(pauser_)), unit) |
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_PAUSED = "PAUSED" | |
13 | 13 | ||
14 | 14 | let KEY_PAUSER = "PAUSER" | |
15 | 15 | ||
16 | 16 | let KEY_EXECUTOR = "EXECUTOR" | |
17 | 17 | ||
18 | 18 | let KEY_ROOT_ADAPTER = "ROOT_ADAPTER" | |
19 | 19 | ||
20 | 20 | let KEY_CALLER_CONTRACT = "CALLER_CONTRACT" | |
21 | 21 | ||
22 | 22 | let KEY_CHAIN = "CHAIN" | |
23 | 23 | ||
24 | 24 | let KEY_BINDING = "BINDING" | |
25 | 25 | ||
26 | 26 | let KEY_FEE = "FEE" | |
27 | 27 | ||
28 | 28 | let KEY_FEE_RECIPIENT = "FEE_RECIPIENT" | |
29 | 29 | ||
30 | 30 | let KEY_REFERRER_FEE_PERCENT = "REFERRER_FEE_PERCENT" | |
31 | 31 | ||
32 | 32 | let FUNC_RELEASE_TOKENS = "releaseTokens" | |
33 | 33 | ||
34 | 34 | let WAVES = "WAVES" | |
35 | 35 | ||
36 | 36 | let WAVES_DECIMALS = 8 | |
37 | 37 | ||
38 | 38 | let DECIMALS = 6 | |
39 | 39 | ||
40 | 40 | let PERCENT_FACTOR = 1000000 | |
41 | 41 | ||
42 | 42 | let MAX_REFERRER_FEE = 200000 | |
43 | 43 | ||
44 | 44 | let MAX_INT = 9223372036854775807 | |
45 | 45 | ||
46 | 46 | func _validateAddress (address_,err_) = match addressFromString(address_) { | |
47 | 47 | case a: Address => | |
48 | 48 | true | |
49 | 49 | case _ => | |
50 | 50 | throw(err_) | |
51 | 51 | } | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | func _validateAsset (assetId_,err_) = match assetInfo(fromBase58String(assetId_)) { | |
55 | 55 | case a: Asset => | |
56 | 56 | true | |
57 | 57 | case _ => | |
58 | 58 | throw(err_) | |
59 | 59 | } | |
60 | 60 | ||
61 | 61 | ||
62 | 62 | func _validateInt (val_,lowerBoundary_,upperBoundary_,err_) = if (if ((lowerBoundary_ > val_)) | |
63 | 63 | then true | |
64 | 64 | else (val_ > upperBoundary_)) | |
65 | 65 | then throw(err_) | |
66 | 66 | else true | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | func _validateBool (val_,target_,err_) = if ((val_ != target_)) | |
70 | 70 | then throw(err_) | |
71 | 71 | else true | |
72 | 72 | ||
73 | 73 | ||
74 | 74 | func _validatePaymentsSize (payments_,target_,err_) = if ((size(payments_) != target_)) | |
75 | 75 | then throw(err_) | |
76 | + | else true | |
77 | + | ||
78 | + | ||
79 | + | func _validateReferrer (referrer_,err_) = if ((referrer_ != "")) | |
80 | + | then _validateAddress(referrer_, err_) | |
76 | 81 | else true | |
77 | 82 | ||
78 | 83 | ||
79 | 84 | func _normalizeDecimals (amount_,sourceDecimals_,targetDecimals_) = if ((sourceDecimals_ >= targetDecimals_)) | |
80 | 85 | then (amount_ / pow(10, 0, (sourceDecimals_ - targetDecimals_), 0, 0, DOWN)) | |
81 | 86 | else (amount_ * pow(10, 0, (targetDecimals_ - sourceDecimals_), 0, 0, DOWN)) | |
82 | 87 | ||
83 | 88 | ||
84 | 89 | func _loadInit () = match getBoolean(KEY_INIT) { | |
85 | 90 | case a: Boolean => | |
86 | 91 | a | |
87 | 92 | case _ => | |
88 | 93 | false | |
89 | 94 | } | |
90 | 95 | ||
91 | 96 | ||
92 | 97 | func _saveInit (isInit_) = [BooleanEntry(KEY_INIT, isInit_)] | |
93 | 98 | ||
94 | 99 | ||
95 | 100 | func _loadPause () = match getBoolean(KEY_PAUSED) { | |
96 | 101 | case a: Boolean => | |
97 | 102 | a | |
98 | 103 | case _ => | |
99 | 104 | false | |
100 | 105 | } | |
101 | 106 | ||
102 | 107 | ||
103 | 108 | func _savePause (isPaused_) = [BooleanEntry(KEY_PAUSED, isPaused_)] | |
104 | 109 | ||
105 | 110 | ||
106 | 111 | func _loadPauser () = match getString(KEY_PAUSER) { | |
107 | 112 | case a: String => | |
108 | 113 | addressFromStringValue(a) | |
109 | 114 | case _ => | |
110 | 115 | Address(base58'') | |
111 | 116 | } | |
112 | 117 | ||
113 | 118 | ||
114 | 119 | func _savePauser (pauser_) = [StringEntry(KEY_PAUSER, toString(pauser_))] | |
115 | 120 | ||
116 | 121 | ||
117 | 122 | func _loadMultisig () = match getString(KEY_MULTISIG) { | |
118 | 123 | case a: String => | |
119 | 124 | addressFromStringValue(a) | |
120 | 125 | case _ => | |
121 | 126 | Address(base58'') | |
122 | 127 | } | |
123 | 128 | ||
124 | 129 | ||
125 | 130 | func _saveMultisig (multisig_) = [StringEntry(KEY_MULTISIG, toString(multisig_))] | |
126 | 131 | ||
127 | 132 | ||
128 | 133 | func _loadExecutor () = match getString(KEY_EXECUTOR) { | |
129 | 134 | case a: String => | |
130 | 135 | addressFromStringValue(a) | |
131 | 136 | case _ => | |
132 | 137 | Address(base58'') | |
133 | 138 | } | |
134 | 139 | ||
135 | 140 | ||
136 | 141 | func _saveExecutor (executor_) = [StringEntry(KEY_EXECUTOR, toString(executor_))] | |
137 | 142 | ||
138 | 143 | ||
139 | 144 | func _loadCallerContract () = match getString(KEY_CALLER_CONTRACT) { | |
140 | 145 | case a: String => | |
141 | 146 | a | |
142 | 147 | case _ => | |
143 | 148 | "" | |
144 | 149 | } | |
145 | 150 | ||
146 | 151 | ||
147 | 152 | func _saveCallerContract (caller_) = [StringEntry(KEY_CALLER_CONTRACT, caller_)] | |
148 | 153 | ||
149 | 154 | ||
150 | 155 | func _loadChain (chainId_) = match getBoolean(makeString([KEY_CHAIN, toString(chainId_)], SEPARATOR)) { | |
151 | 156 | case a: Boolean => | |
152 | 157 | a | |
153 | 158 | case _ => | |
154 | 159 | false | |
155 | 160 | } | |
156 | 161 | ||
157 | 162 | ||
158 | 163 | func _saveChain (chainId_,val_) = [BooleanEntry(makeString([KEY_CHAIN, toString(chainId_)], SEPARATOR), val_)] | |
159 | 164 | ||
160 | 165 | ||
161 | 166 | func _loadBinding (executionChainId_,assetId_) = match getString(makeString([KEY_BINDING, toString(executionChainId_), toBase58String(assetId_)], SEPARATOR)) { | |
162 | 167 | case a: String => | |
163 | 168 | let struct = split(a, SEPARATOR) | |
164 | 169 | $Tuple8(addressFromStringValue(struct[0]), struct[1], parseIntValue(struct[2]), parseIntValue(struct[3]), parseIntValue(struct[4]), parseIntValue(struct[5]), parseIntValue(struct[6]), if ((struct[7] == "1")) | |
165 | 170 | then true | |
166 | 171 | else false) | |
167 | 172 | case _ => | |
168 | 173 | $Tuple8(Address(base58''), "", 0, 0, 0, 0, 0, false) | |
169 | 174 | } | |
170 | 175 | ||
171 | 176 | ||
172 | 177 | func _saveBinding (executionChainId_,assetId_,binding_) = [StringEntry(makeString([KEY_BINDING, toString(executionChainId_), toBase58String(assetId_)], SEPARATOR), makeString([toString(binding_._1), binding_._2, toString(binding_._3), toString(binding_._4), toString(binding_._5), toString(binding_._6), toString(binding_._7), if (binding_._8) | |
173 | 178 | then "1" | |
174 | 179 | else "0"], SEPARATOR))] | |
175 | 180 | ||
176 | 181 | ||
177 | 182 | func _loadFee (assetId_) = match getInteger(makeString([KEY_FEE, toBase58String(assetId_)], SEPARATOR)) { | |
178 | 183 | case a: Int => | |
179 | 184 | a | |
180 | 185 | case _ => | |
181 | 186 | 0 | |
182 | 187 | } | |
183 | 188 | ||
184 | 189 | ||
185 | 190 | func _saveFee (assetId_,val_) = [IntegerEntry(makeString([KEY_FEE, toBase58String(assetId_)], SEPARATOR), val_)] | |
186 | 191 | ||
187 | 192 | ||
188 | 193 | func _loadRootAdapter () = match getString(KEY_ROOT_ADAPTER) { | |
189 | 194 | case a: String => | |
190 | 195 | addressFromStringValue(a) | |
191 | 196 | case _ => | |
192 | 197 | Address(base58'') | |
193 | 198 | } | |
194 | 199 | ||
195 | 200 | ||
196 | 201 | func _saveRootAdapter (adapter_) = [StringEntry(KEY_ROOT_ADAPTER, toString(adapter_))] | |
197 | 202 | ||
198 | 203 | ||
199 | 204 | func _loadFeeRecipient () = match getString(KEY_FEE_RECIPIENT) { | |
200 | 205 | case a: String => | |
201 | 206 | addressFromStringValue(a) | |
202 | 207 | case _ => | |
203 | 208 | Address(base58'') | |
204 | 209 | } | |
205 | 210 | ||
206 | 211 | ||
207 | 212 | func _saveFeeRecipient (val_) = [StringEntry(KEY_FEE_RECIPIENT, toString(val_))] | |
208 | 213 | ||
209 | 214 | ||
210 | 215 | func _loadReferrerFeePercent (executionChainId_,referrer_) = match getInteger(makeString([KEY_REFERRER_FEE_PERCENT, toString(executionChainId_), toString(referrer_)], SEPARATOR)) { | |
211 | 216 | case a: Int => | |
212 | 217 | a | |
213 | 218 | case _ => | |
214 | 219 | 0 | |
215 | 220 | } | |
216 | 221 | ||
217 | 222 | ||
218 | 223 | func _saveReferrerFeePercent (executionChainId_,referrer_,val_) = [IntegerEntry(makeString([KEY_REFERRER_FEE_PERCENT, toString(executionChainId_), toString(referrer_)], SEPARATOR), val_)] | |
219 | 224 | ||
220 | 225 | ||
221 | 226 | func _onlyThisContract (caller_) = if ((caller_ != this)) | |
222 | 227 | then throw("_onlyThisContract: revert") | |
223 | 228 | else true | |
224 | 229 | ||
225 | 230 | ||
226 | 231 | func _whenMultisigSet () = if ((_loadMultisig() == Address(base58''))) | |
227 | 232 | then throw("_whenMultisigSet: revert") | |
228 | 233 | else true | |
229 | 234 | ||
230 | 235 | ||
231 | 236 | func _whenNotInitialized () = if (_loadInit()) | |
232 | 237 | then throw("_whenNotInitialized: revert") | |
233 | 238 | else true | |
234 | 239 | ||
235 | 240 | ||
236 | 241 | func _whenInitialized () = if (!(_loadInit())) | |
237 | 242 | then throw("_whenInitialized: revert") | |
238 | 243 | else true | |
239 | 244 | ||
240 | 245 | ||
241 | 246 | func _whenNotPaused () = if (_loadPause()) | |
242 | 247 | then throw("_whenNotPaused: revert") | |
243 | 248 | else true | |
244 | 249 | ||
245 | 250 | ||
246 | 251 | func _whenPaused () = if (!(_loadPause())) | |
247 | 252 | then throw("_whenPaused: revert") | |
248 | 253 | else true | |
249 | 254 | ||
250 | 255 | ||
251 | 256 | func _onlyPauser (caller_) = if ((caller_ != _loadPauser())) | |
252 | 257 | then throw("_onlyPauser: revert") | |
253 | 258 | else true | |
254 | 259 | ||
255 | 260 | ||
256 | 261 | func _asInt (val_) = match val_ { | |
257 | 262 | case a: Int => | |
258 | 263 | a | |
259 | 264 | case _ => | |
260 | 265 | throw("_asInt: revert") | |
261 | 266 | } | |
262 | 267 | ||
263 | 268 | ||
264 | 269 | func _asBytes (val_) = match val_ { | |
265 | 270 | case a: ByteVector => | |
266 | 271 | a | |
267 | 272 | case _ => | |
268 | 273 | throw("_asBytes: revert") | |
269 | 274 | } | |
270 | 275 | ||
271 | 276 | ||
272 | 277 | func _validateExecutor (val_,err_) = if ((val_ != _loadExecutor())) | |
273 | 278 | then throw(err_) | |
274 | 279 | else true | |
275 | 280 | ||
276 | 281 | ||
277 | 282 | func _validateCaller (val_,err_) = if ((val_ != _loadCallerContract())) | |
278 | 283 | then throw(err_) | |
279 | 284 | else true | |
280 | 285 | ||
281 | 286 | ||
282 | 287 | func _validateChain (executionChainId_,err_) = if (!(_loadChain(executionChainId_))) | |
283 | 288 | then throw(err_) | |
284 | 289 | else true | |
285 | 290 | ||
286 | 291 | ||
287 | 292 | @Callable(i) | |
288 | 293 | func init (executor_,adapter_,pauser_,feeRecipient_) = { | |
289 | 294 | let err = if (if (if (if (if (if (_onlyThisContract(i.caller)) | |
290 | 295 | then _whenNotInitialized() | |
291 | 296 | else false) | |
292 | 297 | then _whenMultisigSet() | |
293 | 298 | else false) | |
294 | 299 | then _validateAddress(executor_, "init: invalid executor") | |
295 | 300 | else false) | |
296 | 301 | then _validateAddress(adapter_, "init: invalid adapter") | |
297 | 302 | else false) | |
298 | 303 | then _validateAddress(pauser_, "init: invalid pauser") | |
299 | 304 | else false) | |
300 | 305 | then _validateAddress(feeRecipient_, "init: invalid feeRecipient") | |
301 | 306 | else false | |
302 | 307 | if ((err == err)) | |
303 | 308 | then $Tuple2(((((_saveInit(true) ++ _saveExecutor(addressFromStringValue(executor_))) ++ _saveRootAdapter(addressFromStringValue(adapter_))) ++ _savePauser(addressFromStringValue(pauser_))) ++ _saveFeeRecipient(addressFromStringValue(feeRecipient_))), unit) | |
304 | 309 | else throw("Strict value is not equal to itself.") | |
305 | 310 | } | |
306 | 311 | ||
307 | 312 | ||
308 | 313 | ||
309 | 314 | @Callable(i) | |
310 | 315 | func mintTokens (callerContract_,assetContract_,amount_,recipient_,gaslessReward_,referrer_,referrerFee_) = { | |
311 | 316 | let amount = valueOrErrorMessage(parseInt(amount_), "mint: amount is not Int") | |
312 | 317 | let gaslessReward = valueOrErrorMessage(parseInt(gaslessReward_), "mint: gaslessReward is not Int") | |
313 | 318 | let referrerFee = valueOrErrorMessage(parseInt(referrerFee_), "mint: referrerFee is not Int") | |
314 | 319 | let err = if (if (if (if (if (if (if (if (_whenInitialized()) | |
315 | 320 | then _whenNotPaused() | |
316 | 321 | else false) | |
317 | 322 | then _validateAddress(assetContract_, "mint: invalid asset contract") | |
318 | 323 | else false) | |
319 | 324 | then _validateExecutor(i.caller, "mint: invalid executor") | |
320 | 325 | else false) | |
321 | 326 | then _validateCaller(callerContract_, "mint: invalid caller") | |
322 | 327 | else false) | |
323 | 328 | then _validateAddress(recipient_, "mint: invalid recipient address") | |
324 | 329 | else false) | |
325 | 330 | then _validateInt(amount, 0, MAX_INT, "mint: invalid amount") | |
326 | 331 | else false) | |
327 | 332 | then _validateInt(gaslessReward, 0, MAX_INT, "mint: invalid gaslessReward") | |
328 | 333 | else false) | |
329 | 334 | then _validateInt(referrerFee, 0, MAX_INT, "mint: invalid referrer fee") | |
330 | 335 | else false | |
331 | 336 | if ((err == err)) | |
332 | 337 | then { | |
333 | 338 | let assetId = _asBytes(invoke(addressFromStringValue(assetContract_), "getAssetId", nil, nil)) | |
334 | 339 | if ((assetId == assetId)) | |
335 | 340 | then { | |
336 | 341 | let assetDecimals = _asInt(invoke(addressFromStringValue(assetContract_), "getDecimals", nil, nil)) | |
337 | 342 | if ((assetDecimals == assetDecimals)) | |
338 | 343 | then { | |
339 | 344 | let normalizedAmount = _normalizeDecimals(amount, DECIMALS, assetDecimals) | |
340 | 345 | let normalizedGasless = _normalizeDecimals(gaslessReward, DECIMALS, assetDecimals) | |
341 | 346 | let referrer = match addressFromString(referrer_) { | |
342 | 347 | case refererAddress: Address => | |
343 | 348 | let normalizedReferrerFee = _normalizeDecimals(referrerFee, DECIMALS, assetDecimals) | |
344 | 349 | $Tuple2(normalizedReferrerFee, [ScriptTransfer(refererAddress, normalizedReferrerFee, assetId)]) | |
345 | 350 | case _ => | |
346 | 351 | $Tuple2(0, nil) | |
347 | 352 | } | |
348 | 353 | let normalizedReferrerFee = referrer._1 | |
349 | 354 | let referrerActions = referrer._2 | |
350 | 355 | let invocation = invoke(addressFromStringValue(assetContract_), "mint", [(normalizedAmount + normalizedReferrerFee), toString(this)], nil) | |
351 | 356 | if ((invocation == invocation)) | |
352 | 357 | then { | |
353 | 358 | let actions = if (if ((normalizedGasless > 0)) | |
354 | 359 | then (addressFromStringValue(recipient_) != i.originCaller) | |
355 | 360 | else false) | |
356 | 361 | then [ScriptTransfer(addressFromStringValue(recipient_), (normalizedAmount - normalizedGasless), assetId), ScriptTransfer(i.originCaller, normalizedGasless, assetId)] | |
357 | 362 | else [ScriptTransfer(addressFromStringValue(recipient_), normalizedAmount, assetId)] | |
358 | 363 | $Tuple2((actions ++ referrerActions), unit) | |
359 | 364 | } | |
360 | 365 | else throw("Strict value is not equal to itself.") | |
361 | 366 | } | |
362 | 367 | else throw("Strict value is not equal to itself.") | |
363 | 368 | } | |
364 | 369 | else throw("Strict value is not equal to itself.") | |
365 | 370 | } | |
366 | 371 | else throw("Strict value is not equal to itself.") | |
367 | 372 | } | |
368 | 373 | ||
369 | 374 | ||
370 | 375 | ||
371 | 376 | @Callable(i) | |
372 | - | func burnTokens (executionChainId_,recipient_,gaslessReward_) = { | |
377 | + | func burnTokens (executionChainId_,recipient_,referrer_,gaslessReward_) = { | |
373 | 378 | let err = if (if (if (if (if (_whenInitialized()) | |
374 | 379 | then _whenNotPaused() | |
375 | 380 | else false) | |
376 | - | then _validateChain(executionChainId_, " | |
381 | + | then _validateChain(executionChainId_, "burnTokens: invalid execution chain") | |
377 | 382 | else false) | |
378 | - | then _validatePaymentsSize(i.payments, 1, " | |
383 | + | then _validatePaymentsSize(i.payments, 1, "burnTokens: no payment") | |
379 | 384 | else false) | |
380 | - | then _validateInt(gaslessReward_, 0, MAX_INT, " | |
385 | + | then _validateInt(gaslessReward_, 0, MAX_INT, "burnTokens: invalid gaslessReward") | |
381 | 386 | else false) | |
382 | - | then _validateInt(i.payments[0].amount, 0, MAX_INT, " | |
387 | + | then _validateInt(i.payments[0].amount, 0, MAX_INT, "burnTokens: invalid payment amount") | |
383 | 388 | else false | |
384 | 389 | if ((err == err)) | |
385 | 390 | then { | |
386 | 391 | let amount = i.payments[0].amount | |
387 | 392 | let assetId = match i.payments[0].assetId { | |
388 | 393 | case a: ByteVector => | |
389 | 394 | a | |
390 | 395 | case _ => | |
391 | - | throw(" | |
396 | + | throw("burnTokens: invalid asset") | |
392 | 397 | } | |
393 | 398 | let binding = _loadBinding(executionChainId_, assetId) | |
394 | 399 | let assetContract = binding._1 | |
395 | 400 | let executionAsset = binding._2 | |
396 | 401 | let minAmount = binding._3 | |
397 | 402 | let minFee = binding._4 | |
398 | 403 | let thresholdFee = binding._5 | |
399 | 404 | let beforePercentFee = binding._6 | |
400 | 405 | let afterPercentFee = binding._7 | |
401 | 406 | let enabled = binding._8 | |
402 | - | let err1 = if (if (_validateAddress(toString(assetContract), " | |
403 | - | then _validateInt(amount, minAmount, MAX_INT, " | |
407 | + | let err1 = if (if (_validateAddress(toString(assetContract), "burnTokens: no such binding")) | |
408 | + | then _validateInt(amount, minAmount, MAX_INT, "burnTokens: less than min") | |
404 | 409 | else false) | |
405 | - | then _validateBool(enabled, true, " | |
410 | + | then _validateBool(enabled, true, "burnTokens: token is disabled") | |
406 | 411 | else false | |
407 | 412 | if ((err1 == err1)) | |
408 | 413 | then { | |
409 | 414 | let assetDecimals = _asInt(invoke(assetContract, "getDecimals", nil, nil)) | |
410 | 415 | if ((assetDecimals == assetDecimals)) | |
411 | 416 | then { | |
412 | 417 | let percent = if ((amount > thresholdFee)) | |
413 | 418 | then afterPercentFee | |
414 | 419 | else beforePercentFee | |
415 | 420 | let fee = (minFee + fraction(amount, percent, PERCENT_FACTOR)) | |
416 | - | let err2 = _validateInt(amount, (fee + 1), MAX_INT, " | |
421 | + | let err2 = _validateInt(amount, (fee + 1), MAX_INT, "burnTokens: fee more than amount") | |
417 | 422 | if ((err2 == err2)) | |
418 | 423 | then { | |
419 | 424 | let amountToSend = (amount - fee) | |
420 | - | let err3 = _validateInt(amountToSend, (gaslessReward_ + 1), MAX_INT, " | |
425 | + | let err3 = _validateInt(amountToSend, (gaslessReward_ + 1), MAX_INT, "burnTokens: reward more than amount") | |
421 | 426 | if ((err3 == err3)) | |
422 | 427 | then { | |
423 | 428 | let updateFee = (_loadFee(assetId) + fee) | |
424 | 429 | let normalizedAmount = _normalizeDecimals(amountToSend, assetDecimals, DECIMALS) | |
425 | 430 | let normalizedGasless = _normalizeDecimals(gaslessReward_, assetDecimals, DECIMALS) | |
426 | 431 | let invocation = invoke(_loadRootAdapter(), FUNC_RELEASE_TOKENS, [executionChainId_, executionAsset, normalizedAmount, recipient_, normalizedGasless], nil) | |
427 | 432 | if ((invocation == invocation)) | |
428 | 433 | then $Tuple2((_saveFee(assetId, updateFee) ++ [Burn(assetId, amountToSend)]), unit) | |
434 | + | else throw("Strict value is not equal to itself.") | |
435 | + | } | |
436 | + | else throw("Strict value is not equal to itself.") | |
437 | + | } | |
438 | + | else throw("Strict value is not equal to itself.") | |
439 | + | } | |
440 | + | else throw("Strict value is not equal to itself.") | |
441 | + | } | |
442 | + | else throw("Strict value is not equal to itself.") | |
443 | + | } | |
444 | + | else throw("Strict value is not equal to itself.") | |
445 | + | } | |
446 | + | ||
447 | + | ||
448 | + | ||
449 | + | @Callable(i) | |
450 | + | func burnTokensV2 (executionChainId_,recipient_,referrer_,gaslessReward_) = { | |
451 | + | let err = if (if (if (if (if (if (_whenInitialized()) | |
452 | + | then _whenNotPaused() | |
453 | + | else false) | |
454 | + | then _validateChain(executionChainId_, "burnTokensV2: invalid execution chain") | |
455 | + | else false) | |
456 | + | then _validatePaymentsSize(i.payments, 1, "burnTokensV2: no payment") | |
457 | + | else false) | |
458 | + | then _validateInt(gaslessReward_, 0, MAX_INT, "burnTokensV2: invalid gaslessReward") | |
459 | + | else false) | |
460 | + | then _validateInt(i.payments[0].amount, 0, MAX_INT, "burnTokensV2: invalid payment amount") | |
461 | + | else false) | |
462 | + | then _validateReferrer(referrer_, "burnTokensV2: invalid referrer") | |
463 | + | else false | |
464 | + | if ((err == err)) | |
465 | + | then { | |
466 | + | let amount = i.payments[0].amount | |
467 | + | let assetId = match i.payments[0].assetId { | |
468 | + | case a: ByteVector => | |
469 | + | a | |
470 | + | case _ => | |
471 | + | throw("burnTokensV2: invalid asset") | |
472 | + | } | |
473 | + | let binding = _loadBinding(executionChainId_, assetId) | |
474 | + | let assetContract = binding._1 | |
475 | + | let executionAsset = binding._2 | |
476 | + | let minAmount = binding._3 | |
477 | + | let minFee = binding._4 | |
478 | + | let thresholdFee = binding._5 | |
479 | + | let beforePercentFee = binding._6 | |
480 | + | let afterPercentFee = binding._7 | |
481 | + | let enabled = binding._8 | |
482 | + | let err1 = if (if (_validateAddress(toString(assetContract), "burnTokensV2: no such binding")) | |
483 | + | then _validateInt(amount, minAmount, MAX_INT, "burnTokensV2: less than min") | |
484 | + | else false) | |
485 | + | then _validateBool(enabled, true, "burnTokensV2: token is disabled") | |
486 | + | else false | |
487 | + | if ((err1 == err1)) | |
488 | + | then { | |
489 | + | let assetDecimals = _asInt(invoke(assetContract, "getDecimals", nil, nil)) | |
490 | + | if ((assetDecimals == assetDecimals)) | |
491 | + | then { | |
492 | + | let percent = if ((amount > thresholdFee)) | |
493 | + | then afterPercentFee | |
494 | + | else beforePercentFee | |
495 | + | let fee = (minFee + fraction(amount, percent, PERCENT_FACTOR)) | |
496 | + | let err2 = _validateInt(amount, (fee + 1), MAX_INT, "burnTokensV2: fee more than amount") | |
497 | + | if ((err2 == err2)) | |
498 | + | then { | |
499 | + | let $t01622416629 = if ((referrer_ != "")) | |
500 | + | then { | |
501 | + | let referrer = addressFromStringValue(referrer_) | |
502 | + | let referrerFeeAmount = fraction(_loadReferrerFeePercent(executionChainId_, referrer), fee, PERCENT_FACTOR) | |
503 | + | $Tuple2(referrerFeeAmount, [ScriptTransfer(referrer, referrerFeeAmount, assetId)]) | |
504 | + | } | |
505 | + | else $Tuple2(0, nil) | |
506 | + | let referrerFee = $t01622416629._1 | |
507 | + | let referrerActions = $t01622416629._2 | |
508 | + | let amountToSend = (amount - fee) | |
509 | + | let err3 = _validateInt(amountToSend, (gaslessReward_ + 1), MAX_INT, "burnTokensV2: reward more than amount") | |
510 | + | if ((err3 == err3)) | |
511 | + | then { | |
512 | + | let updateFee = ((_loadFee(assetId) + fee) - referrerFee) | |
513 | + | let normalizedAmount = _normalizeDecimals(amountToSend, assetDecimals, DECIMALS) | |
514 | + | let normalizedGasless = _normalizeDecimals(gaslessReward_, assetDecimals, DECIMALS) | |
515 | + | let invocation = invoke(_loadRootAdapter(), FUNC_RELEASE_TOKENS, [executionChainId_, executionAsset, normalizedAmount, recipient_, normalizedGasless], nil) | |
516 | + | if ((invocation == invocation)) | |
517 | + | then $Tuple2(((_saveFee(assetId, updateFee) ++ referrerActions) ++ [Burn(assetId, amountToSend)]), unit) | |
429 | 518 | else throw("Strict value is not equal to itself.") | |
430 | 519 | } | |
431 | 520 | else throw("Strict value is not equal to itself.") | |
432 | 521 | } | |
433 | 522 | else throw("Strict value is not equal to itself.") | |
434 | 523 | } | |
435 | 524 | else throw("Strict value is not equal to itself.") | |
436 | 525 | } | |
437 | 526 | else throw("Strict value is not equal to itself.") | |
438 | 527 | } | |
439 | 528 | else throw("Strict value is not equal to itself.") | |
440 | 529 | } | |
441 | 530 | ||
442 | 531 | ||
443 | 532 | ||
444 | 533 | @Callable(i) | |
445 | 534 | func transferFee (executionChainId_,assetId_) = { | |
446 | 535 | let err = if (if (_whenInitialized()) | |
447 | 536 | then _whenNotPaused() | |
448 | 537 | else false) | |
449 | 538 | then _validateAsset(assetId_, "transferFee: invalid asset") | |
450 | 539 | else false | |
451 | 540 | if ((err == err)) | |
452 | 541 | then { | |
453 | 542 | let assetId = fromBase58String(assetId_) | |
454 | 543 | let binding = _loadBinding(executionChainId_, assetId) | |
455 | 544 | let assetContract = binding._1 | |
456 | 545 | let enabled = binding._8 | |
457 | 546 | let err1 = if (_validateAddress(toString(assetContract), "transferFee: no such binding")) | |
458 | 547 | then _validateBool(enabled, true, "transferFee: token is disabled") | |
459 | 548 | else false | |
460 | 549 | if ((err1 == err1)) | |
461 | 550 | then $Tuple2((_saveFee(assetId, 0) ++ [ScriptTransfer(_loadFeeRecipient(), _loadFee(assetId), assetId)]), unit) | |
462 | 551 | else throw("Strict value is not equal to itself.") | |
463 | 552 | } | |
464 | 553 | else throw("Strict value is not equal to itself.") | |
465 | 554 | } | |
466 | 555 | ||
467 | 556 | ||
468 | 557 | ||
469 | 558 | @Callable(i) | |
470 | 559 | func updateCallerContract (callerContract_) = { | |
471 | 560 | let err = if (_onlyThisContract(i.caller)) | |
472 | 561 | then _whenInitialized() | |
473 | 562 | else false | |
474 | 563 | if ((err == err)) | |
475 | 564 | then $Tuple2(_saveCallerContract(callerContract_), unit) | |
476 | 565 | else throw("Strict value is not equal to itself.") | |
477 | 566 | } | |
478 | 567 | ||
479 | 568 | ||
480 | 569 | ||
481 | 570 | @Callable(i) | |
482 | 571 | func updateExecutionChain (executionChainId_,enabled_) = { | |
483 | 572 | let err = if (if (_onlyThisContract(i.caller)) | |
484 | 573 | then _whenInitialized() | |
485 | 574 | else false) | |
486 | 575 | then _validateInt(executionChainId_, 0, MAX_INT, "updateExecutionChain: invalid executionChainId") | |
487 | 576 | else false | |
488 | 577 | if ((err == err)) | |
489 | 578 | then $Tuple2(_saveChain(executionChainId_, enabled_), unit) | |
490 | 579 | else throw("Strict value is not equal to itself.") | |
491 | 580 | } | |
492 | 581 | ||
493 | 582 | ||
494 | 583 | ||
495 | 584 | @Callable(i) | |
496 | 585 | func updateFeeRecipient (feeRecipient_) = { | |
497 | 586 | let err = if (if (_onlyThisContract(i.caller)) | |
498 | 587 | then _whenInitialized() | |
499 | 588 | else false) | |
500 | 589 | then _validateAddress(feeRecipient_, "updateFeeRecipient: invalid feeRecipient") | |
501 | 590 | else false | |
502 | 591 | if ((err == err)) | |
503 | 592 | then $Tuple2(_saveFeeRecipient(addressFromStringValue(feeRecipient_)), unit) | |
504 | 593 | else throw("Strict value is not equal to itself.") | |
505 | 594 | } | |
506 | 595 | ||
507 | 596 | ||
508 | 597 | ||
509 | 598 | @Callable(i) | |
510 | 599 | func updateReferrer (executionChainId_,referrer_,fee_) = { | |
511 | 600 | let err = if (if (if (if (_onlyThisContract(i.caller)) | |
512 | 601 | then _whenInitialized() | |
513 | 602 | else false) | |
514 | 603 | then _validateChain(executionChainId_, "updateReferrer: invalid execution chain") | |
515 | 604 | else false) | |
516 | 605 | then _validateAddress(referrer_, "updateReferrer: invalid referrer") | |
517 | 606 | else false) | |
518 | 607 | then _validateInt(fee_, 0, MAX_REFERRER_FEE, "updateReferrer: invalid fee") | |
519 | 608 | else false | |
520 | 609 | if ((err == err)) | |
521 | 610 | then $Tuple2(_saveReferrerFeePercent(executionChainId_, addressFromStringValue(referrer_), fee_), unit) | |
522 | 611 | else throw("Strict value is not equal to itself.") | |
523 | 612 | } | |
524 | 613 | ||
525 | 614 | ||
526 | 615 | ||
527 | 616 | @Callable(i) | |
528 | 617 | func updateBindingInfo (executionChainId_,assetContract_,executionAsset_,minAmount_,minFee_,thresholdFee_,beforePercentFee_,afterPercentFee_,enabled_) = { | |
529 | 618 | let err = if (if (if (if (if (if (if (if (_onlyThisContract(i.caller)) | |
530 | 619 | then _whenInitialized() | |
531 | 620 | else false) | |
532 | 621 | then _validateAddress(assetContract_, "updateBindingInfo: invalid asset contract") | |
533 | 622 | else false) | |
534 | 623 | then _validateInt(executionChainId_, 0, MAX_INT, "updateBindingInfo: invalid executionChainId") | |
535 | 624 | else false) | |
536 | 625 | then _validateInt(minAmount_, 0, MAX_INT, "updateBindingInfo: invalid minAmount") | |
537 | 626 | else false) | |
538 | 627 | then _validateInt(minFee_, 0, MAX_INT, "updateBindingInfo: invalid minFee") | |
539 | 628 | else false) | |
540 | 629 | then _validateInt(thresholdFee_, 0, MAX_INT, "updateBindingInfo: invalid thresholdFee") | |
541 | 630 | else false) | |
542 | 631 | then _validateInt(beforePercentFee_, 0, MAX_INT, "updateBindingInfo: invalid beforePercentFee") | |
543 | 632 | else false) | |
544 | 633 | then _validateInt(afterPercentFee_, 0, MAX_INT, "updateBindingInfo: invalid afterPercentFee") | |
545 | 634 | else false | |
546 | 635 | if ((err == err)) | |
547 | 636 | then { | |
548 | 637 | let assetId = _asBytes(invoke(addressFromStringValue(assetContract_), "getAssetId", nil, nil)) | |
549 | 638 | if ((assetId == assetId)) | |
550 | 639 | then { | |
551 | 640 | let binding = $Tuple8(addressFromStringValue(assetContract_), executionAsset_, minAmount_, minFee_, thresholdFee_, beforePercentFee_, afterPercentFee_, enabled_) | |
552 | 641 | $Tuple2(_saveBinding(executionChainId_, assetId, binding), unit) | |
553 | 642 | } | |
554 | 643 | else throw("Strict value is not equal to itself.") | |
555 | 644 | } | |
556 | 645 | else throw("Strict value is not equal to itself.") | |
557 | 646 | } | |
558 | 647 | ||
559 | 648 | ||
560 | 649 | ||
561 | 650 | @Callable(i) | |
562 | 651 | func pause () = { | |
563 | 652 | let err = if (if (_onlyPauser(i.caller)) | |
564 | 653 | then _whenInitialized() | |
565 | 654 | else false) | |
566 | 655 | then _whenNotPaused() | |
567 | 656 | else false | |
568 | 657 | if ((err == err)) | |
569 | 658 | then $Tuple2(_savePause(true), unit) | |
570 | 659 | else throw("Strict value is not equal to itself.") | |
571 | 660 | } | |
572 | 661 | ||
573 | 662 | ||
574 | 663 | ||
575 | 664 | @Callable(i) | |
576 | 665 | func unpause () = { | |
577 | 666 | let err = if (if (_onlyPauser(i.caller)) | |
578 | 667 | then _whenInitialized() | |
579 | 668 | else false) | |
580 | 669 | then _whenPaused() | |
581 | 670 | else false | |
582 | 671 | if ((err == err)) | |
583 | 672 | then $Tuple2(_savePause(false), unit) | |
584 | 673 | else throw("Strict value is not equal to itself.") | |
585 | 674 | } | |
586 | 675 | ||
587 | 676 | ||
588 | 677 | ||
589 | 678 | @Callable(i) | |
590 | 679 | func updatePauser (pauser_) = { | |
591 | 680 | let err = if (if (_onlyThisContract(i.caller)) | |
592 | 681 | then _whenInitialized() | |
593 | 682 | else false) | |
594 | - | then _validateAddress(pauser_, " | |
683 | + | then _validateAddress(pauser_, "updatePauser: invalid pauser") | |
595 | 684 | else false | |
596 | 685 | if ((err == err)) | |
597 | 686 | then $Tuple2(_savePauser(addressFromStringValue(pauser_)), unit) | |
598 | 687 | else throw("Strict value is not equal to itself.") | |
599 | 688 | } | |
600 | 689 | ||
601 | 690 | ||
602 | 691 | ||
603 | 692 | @Callable(i) | |
604 | 693 | func setMultisig (multisig_) = { | |
605 | 694 | let err = if (_onlyThisContract(i.caller)) | |
606 | 695 | then _validateAddress(multisig_, "setMultisig: invalid multisig") | |
607 | 696 | else false | |
608 | 697 | if ((err == err)) | |
609 | 698 | then $Tuple2(_saveMultisig(addressFromStringValue(multisig_)), unit) | |
610 | 699 | else throw("Strict value is not equal to itself.") | |
611 | 700 | } | |
612 | 701 | ||
613 | 702 | ||
614 | 703 | @Verifier(tx) | |
615 | 704 | func verify () = match getString(KEY_MULTISIG) { | |
616 | 705 | case multisig: String => | |
617 | 706 | valueOrElse(getBoolean(addressFromStringValue(multisig), makeString([KEY_STATUS, toString(this), toBase58String(tx.id)], SEPARATOR)), false) | |
618 | 707 | case _ => | |
619 | 708 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
620 | 709 | } | |
621 | 710 |
github/deemru/w8io/026f985 67.38 ms ◑