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