tx · 2rgekmRj7Au8tziYKm5hr74fGp8emVaqpHr8Gmpckpzu

3Mr7Qu4DoK2AG3aFJkavD1QfLeYZ9JQkf2z:  -0.02100000 Waves

2024.01.19 17:35 [2938575] smart account 3Mr7Qu4DoK2AG3aFJkavD1QfLeYZ9JQkf2z > SELF 0.00000000 Waves

{ "type": 13, "id": "2rgekmRj7Au8tziYKm5hr74fGp8emVaqpHr8Gmpckpzu", "fee": 2100000, "feeAssetId": null, "timestamp": 1705674928974, "version": 2, "chainId": 84, "sender": "3Mr7Qu4DoK2AG3aFJkavD1QfLeYZ9JQkf2z", "senderPublicKey": "EAKRfs8swGWZJwXuunVL2epKZGzqzd5kZPfksHXQvESb", "proofs": [ "2QsxqN3bxJbpD1PZsSNggTVA9hray3xSQGjgH7QVde4BNb9PTmveDUEaCvtfQv3aHom7ZoY6guDH1pzEQnjxfFAi" ], "script": "base64:BgJiCAISBgoECAgICBIJCgcICAgICAgIEgUKAwEIARIGCgQBCAgBEgQKAgEIEgMKAQgSBAoCAQQSAwoBCBIFCgMBCAESCwoJAQgIAQEBAQEEEgQKAggIEgASABIDCgEIEgMKAQhKAAlTRVBBUkFUT1ICAl9fAAhLRVlfSU5JVAIESU5JVAAMS0VZX01VTFRJU0lHAghNVUxUSVNJRwAKS0VZX1NUQVRVUwIGU1RBVFVTAApLRVlfUEFVU0VEAgZQQVVTRUQACktFWV9QQVVTRVICBlBBVVNFUgAMS0VZX0VYRUNVVE9SAghFWEVDVVRPUgAQS0VZX1JPT1RfQURBUFRFUgIMUk9PVF9BREFQVEVSABNLRVlfQ0FMTEVSX0NPTlRSQUNUAg9DQUxMRVJfQ09OVFJBQ1QACUtFWV9DSEFJTgIFQ0hBSU4AC0tFWV9CSU5ESU5HAgdCSU5ESU5HAAdLRVlfRkVFAgNGRUUAEUtFWV9GRUVfUkVDSVBJRU5UAg1GRUVfUkVDSVBJRU5UABhLRVlfUkVGRVJSRVJfRkVFX1BFUkNFTlQCFFJFRkVSUkVSX0ZF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GNoMAkBC3ZhbHVlT3JFbHNlAgkAmwgCCQERQGV4dHJOYXRpdmUoMTA2MikBBQhtdWx0aXNpZwkAuQkCCQDMCAIFCktFWV9TVEFUVVMJAMwIAgkApQgBBQR0aGlzCQDMCAIJANgEAQgFAnR4AmlkBQNuaWwFCVNFUEFSQVRPUgcJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXmn7lSx", "height": 2938575, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HabcFfDoT4S38HU5ePE6Z8UT7bXgACUcxfjXtnx2pGUC Next: B6bz263gLG4W4jeEn5n1nYo5fPZFkbaA31KXT78UCimD Diff:
OldNewDifferences
2929
3030 let KEY_REFERRER_FEE_PERCENT = "REFERRER_FEE_PERCENT"
3131
32+let KEY_CROSSCHAIN_POOL_CONTRACTS = "CROSSCHAIN_POOL_CONTRACTS"
33+
34+let KEY_BRIDGE_ASSET_CONTRACT = "BRIDGE_ASSET_CONTRACT"
35+
36+let FUNC_MINT = "mint"
37+
38+let FUNC_DEPOSIT = "deposit"
39+
3240 let FUNC_RELEASE_TOKENS = "releaseTokens"
41+
42+let FUNC_GET_ASSET_ID = "getAssetId"
43+
44+let FUNC_GET_DECIMALS = "getDecimals"
3345
3446 let WAVES = "WAVES"
3547
223235 func _saveReferrerFeePercent (executionChainId_,referrer_,val_) = [IntegerEntry(makeString([KEY_REFERRER_FEE_PERCENT, toString(executionChainId_), toString(referrer_)], SEPARATOR), val_)]
224236
225237
238+func _loadCrosschainPoolContracts () = match getString(KEY_CROSSCHAIN_POOL_CONTRACTS) {
239+ case a: String =>
240+ if ((size(a) > 0))
241+ then split_51C(a, SEPARATOR)
242+ else nil
243+ case _ =>
244+ nil
245+}
246+
247+
248+func _saveCrosschainPoolContracts (contracts_) = [StringEntry(KEY_CROSSCHAIN_POOL_CONTRACTS, makeString_11C(contracts_, SEPARATOR))]
249+
250+
251+func _loadBridgeAssetContract (crosschainPoolContract_) = match getString(makeString([KEY_BRIDGE_ASSET_CONTRACT, toString(crosschainPoolContract_)], SEPARATOR)) {
252+ case a: String =>
253+ addressFromStringValue(a)
254+ case _ =>
255+ Address(base58'')
256+}
257+
258+
259+func _saveBridgeAssetContract (crosschainPoolContract_,bridgeAssetContract_) = [StringEntry(makeString([KEY_BRIDGE_ASSET_CONTRACT, toString(crosschainPoolContract_)], SEPARATOR), toString(bridgeAssetContract_))]
260+
261+
226262 func _onlyThisContract (caller_) = if ((caller_ != this))
227263 then throw("_onlyThisContract: revert")
228264 else true
335371 else false
336372 if ((err == err))
337373 then {
338- let assetId = _asBytes(invoke(addressFromStringValue(assetContract_), "getAssetId", nil, nil))
374+ let $t01179712086 = if (containsElement(_loadCrosschainPoolContracts(), assetContract_))
375+ then $Tuple2(true, _loadBridgeAssetContract(addressFromStringValue(assetContract_)))
376+ else $Tuple2(false, addressFromStringValue(assetContract_))
377+ let isCrosschainPoolAsset = $t01179712086._1
378+ let bridgeAssetContract = $t01179712086._2
379+ let assetId = _asBytes(invoke(bridgeAssetContract, FUNC_GET_ASSET_ID, nil, nil))
339380 if ((assetId == assetId))
340381 then {
341- let assetDecimals = _asInt(invoke(addressFromStringValue(assetContract_), "getDecimals", nil, nil))
342- if ((assetDecimals == assetDecimals))
382+ let decimals = _asInt(invoke(bridgeAssetContract, FUNC_GET_DECIMALS, nil, nil))
383+ if ((decimals == decimals))
343384 then {
344- let normalizedAmount = _normalizeDecimals(amount, DECIMALS, assetDecimals)
345- let normalizedGasless = _normalizeDecimals(gaslessReward, DECIMALS, assetDecimals)
346- let referrer = match addressFromString(referrer_) {
385+ let normalizedAmount = _normalizeDecimals(amount, DECIMALS, decimals)
386+ let normalizedGasless = _normalizeDecimals(gaslessReward, DECIMALS, decimals)
387+ let $t01242312860 = match addressFromString(referrer_) {
347388 case refererAddress: Address =>
348- let normalizedReferrerFee = _normalizeDecimals(referrerFee, DECIMALS, assetDecimals)
389+ let normalizedReferrerFee = _normalizeDecimals(referrerFee, DECIMALS, decimals)
349390 $Tuple2(normalizedReferrerFee, [ScriptTransfer(refererAddress, normalizedReferrerFee, assetId)])
350391 case _ =>
351392 $Tuple2(0, nil)
352393 }
353- let normalizedReferrerFee = referrer._1
354- let referrerActions = referrer._2
355- let invocation = invoke(addressFromStringValue(assetContract_), "mint", [(normalizedAmount + normalizedReferrerFee), toString(this)], nil)
356- if ((invocation == invocation))
394+ let normalizedReferrerFee = $t01242312860._1
395+ let referrerActions = $t01242312860._2
396+ let mintInvocation = invoke(bridgeAssetContract, FUNC_MINT, [(normalizedAmount + normalizedReferrerFee), toString(this)], nil)
397+ if ((mintInvocation == mintInvocation))
357398 then {
358- let actions = if (if ((normalizedGasless > 0))
399+ let $t01299913337 = if (if ((normalizedGasless > 0))
359400 then (addressFromStringValue(recipient_) != i.originCaller)
360401 else false)
361- then [ScriptTransfer(addressFromStringValue(recipient_), (normalizedAmount - normalizedGasless), assetId), ScriptTransfer(i.originCaller, normalizedGasless, assetId)]
362- else [ScriptTransfer(addressFromStringValue(recipient_), normalizedAmount, assetId)]
363- $Tuple2((actions ++ referrerActions), unit)
402+ then $Tuple2([ScriptTransfer(i.originCaller, normalizedGasless, assetId)], normalizedGasless)
403+ else $Tuple2(nil, 0)
404+ let gaslessActions = $t01299913337._1
405+ let normalizedGaslessUsed = $t01299913337._2
406+ let actions = if (isCrosschainPoolAsset)
407+ then {
408+ let poolAssetId = _asBytes(invoke(addressFromStringValue(assetContract_), FUNC_GET_ASSET_ID, nil, nil))
409+ if ((poolAssetId == poolAssetId))
410+ then {
411+ let balanceBefore = assetBalance(this, poolAssetId)
412+ if ((balanceBefore == balanceBefore))
413+ then {
414+ let depositInvocation = invoke(addressFromStringValue(assetContract_), FUNC_DEPOSIT, [0], [AttachedPayment(assetId, (normalizedAmount - normalizedGaslessUsed))])
415+ if ((depositInvocation == depositInvocation))
416+ then {
417+ let balanceAfter = assetBalance(this, poolAssetId)
418+ if ((balanceAfter == balanceAfter))
419+ then [ScriptTransfer(addressFromStringValue(recipient_), (balanceAfter - balanceBefore), poolAssetId)]
420+ else throw("Strict value is not equal to itself.")
421+ }
422+ else throw("Strict value is not equal to itself.")
423+ }
424+ else throw("Strict value is not equal to itself.")
425+ }
426+ else throw("Strict value is not equal to itself.")
427+ }
428+ else [ScriptTransfer(addressFromStringValue(recipient_), (normalizedAmount - normalizedGaslessUsed), assetId)]
429+ $Tuple2(((actions ++ gaslessActions) ++ referrerActions), unit)
364430 }
365431 else throw("Strict value is not equal to itself.")
366432 }
411477 else false
412478 if ((err1 == err1))
413479 then {
414- let assetDecimals = _asInt(invoke(assetContract, "getDecimals", nil, nil))
480+ let assetDecimals = _asInt(invoke(assetContract, FUNC_GET_DECIMALS, nil, nil))
415481 if ((assetDecimals == assetDecimals))
416482 then {
417483 let percent = if ((amount > thresholdFee))
486552 else false
487553 if ((err1 == err1))
488554 then {
489- let assetDecimals = _asInt(invoke(assetContract, "getDecimals", nil, nil))
555+ let assetDecimals = _asInt(invoke(assetContract, FUNC_GET_DECIMALS, nil, nil))
490556 if ((assetDecimals == assetDecimals))
491557 then {
492558 let percent = if ((amount > thresholdFee))
496562 let err2 = _validateInt(amount, (fee + 1), MAX_INT, "burnTokensV2: fee more than amount")
497563 if ((err2 == err2))
498564 then {
499- let $t01620116606 = if ((referrer_ != ""))
565+ let $t01816718572 = if ((referrer_ != ""))
500566 then {
501567 let referrer = addressFromStringValue(referrer_)
502568 let referrerFeeAmount = fraction(_loadReferrerFeePercent(executionChainId_, referrer), fee, PERCENT_FACTOR)
503569 $Tuple2(referrerFeeAmount, [ScriptTransfer(referrer, referrerFeeAmount, assetId)])
504570 }
505571 else $Tuple2(0, nil)
506- let referrerFee = $t01620116606._1
507- let referrerActions = $t01620116606._2
572+ let referrerFee = $t01816718572._1
573+ let referrerActions = $t01816718572._2
508574 let amountToSend = (amount - fee)
509575 let err3 = _validateInt(amountToSend, (gaslessReward_ + 1), MAX_INT, "burnTokensV2: reward more than amount")
510576 if ((err3 == err3))
634700 else false
635701 if ((err == err))
636702 then {
637- let assetId = _asBytes(invoke(addressFromStringValue(assetContract_), "getAssetId", nil, nil))
703+ let assetId = _asBytes(invoke(addressFromStringValue(assetContract_), FUNC_GET_ASSET_ID, nil, nil))
638704 if ((assetId == assetId))
639705 then {
640706 let binding = $Tuple8(addressFromStringValue(assetContract_), executionAsset_, minAmount_, minFee_, thresholdFee_, beforePercentFee_, afterPercentFee_, enabled_)
642708 }
643709 else throw("Strict value is not equal to itself.")
644710 }
711+ else throw("Strict value is not equal to itself.")
712+ }
713+
714+
715+
716+@Callable(i)
717+func addCrosschainPoolContract (crosschainPoolContract_,bridgeAssetContract_) = {
718+ let err = if (if (if (_onlyThisContract(i.caller))
719+ then _whenInitialized()
720+ else false)
721+ then _validateAddress(crosschainPoolContract_, "addCrosschainPoolContract: invalid crosschainPoolContract")
722+ else false)
723+ then _validateAddress(bridgeAssetContract_, "addCrosschainPoolContract: invalid bridgeAssetContract")
724+ else false
725+ if ((err == err))
726+ then $Tuple2((_saveCrosschainPoolContracts((_loadCrosschainPoolContracts() :+ crosschainPoolContract_)) ++ _saveBridgeAssetContract(addressFromStringValue(crosschainPoolContract_), addressFromStringValue(bridgeAssetContract_))), unit)
645727 else throw("Strict value is not equal to itself.")
646728 }
647729
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SEPARATOR = "__"
55
66 let KEY_INIT = "INIT"
77
88 let KEY_MULTISIG = "MULTISIG"
99
1010 let KEY_STATUS = "STATUS"
1111
1212 let KEY_PAUSED = "PAUSED"
1313
1414 let KEY_PAUSER = "PAUSER"
1515
1616 let KEY_EXECUTOR = "EXECUTOR"
1717
1818 let KEY_ROOT_ADAPTER = "ROOT_ADAPTER"
1919
2020 let KEY_CALLER_CONTRACT = "CALLER_CONTRACT"
2121
2222 let KEY_CHAIN = "CHAIN"
2323
2424 let KEY_BINDING = "BINDING"
2525
2626 let KEY_FEE = "FEE"
2727
2828 let KEY_FEE_RECIPIENT = "FEE_RECIPIENT"
2929
3030 let KEY_REFERRER_FEE_PERCENT = "REFERRER_FEE_PERCENT"
3131
32+let KEY_CROSSCHAIN_POOL_CONTRACTS = "CROSSCHAIN_POOL_CONTRACTS"
33+
34+let KEY_BRIDGE_ASSET_CONTRACT = "BRIDGE_ASSET_CONTRACT"
35+
36+let FUNC_MINT = "mint"
37+
38+let FUNC_DEPOSIT = "deposit"
39+
3240 let FUNC_RELEASE_TOKENS = "releaseTokens"
41+
42+let FUNC_GET_ASSET_ID = "getAssetId"
43+
44+let FUNC_GET_DECIMALS = "getDecimals"
3345
3446 let WAVES = "WAVES"
3547
3648 let WAVES_DECIMALS = 8
3749
3850 let DECIMALS = 6
3951
4052 let PERCENT_FACTOR = 1000000
4153
4254 let MAX_REFERRER_FEE = 200000
4355
4456 let MAX_INT = 9223372036854775807
4557
4658 func _validateAddress (address_,err_) = match addressFromString(address_) {
4759 case a: Address =>
4860 true
4961 case _ =>
5062 throw(err_)
5163 }
5264
5365
5466 func _validateAsset (assetId_,err_) = match assetInfo(fromBase58String(assetId_)) {
5567 case a: Asset =>
5668 true
5769 case _ =>
5870 throw(err_)
5971 }
6072
6173
6274 func _validateInt (val_,lowerBoundary_,upperBoundary_,err_) = if (if ((lowerBoundary_ > val_))
6375 then true
6476 else (val_ > upperBoundary_))
6577 then throw(err_)
6678 else true
6779
6880
6981 func _validateBool (val_,target_,err_) = if ((val_ != target_))
7082 then throw(err_)
7183 else true
7284
7385
7486 func _validatePaymentsSize (payments_,target_,err_) = if ((size(payments_) != target_))
7587 then throw(err_)
7688 else true
7789
7890
7991 func _validateReferrer (referrer_,err_) = if ((referrer_ != ""))
8092 then _validateAddress(referrer_, err_)
8193 else true
8294
8395
8496 func _normalizeDecimals (amount_,sourceDecimals_,targetDecimals_) = if ((sourceDecimals_ >= targetDecimals_))
8597 then (amount_ / pow(10, 0, (sourceDecimals_ - targetDecimals_), 0, 0, DOWN))
8698 else (amount_ * pow(10, 0, (targetDecimals_ - sourceDecimals_), 0, 0, DOWN))
8799
88100
89101 func _loadInit () = match getBoolean(KEY_INIT) {
90102 case a: Boolean =>
91103 a
92104 case _ =>
93105 false
94106 }
95107
96108
97109 func _saveInit (isInit_) = [BooleanEntry(KEY_INIT, isInit_)]
98110
99111
100112 func _loadPause () = match getBoolean(KEY_PAUSED) {
101113 case a: Boolean =>
102114 a
103115 case _ =>
104116 false
105117 }
106118
107119
108120 func _savePause (isPaused_) = [BooleanEntry(KEY_PAUSED, isPaused_)]
109121
110122
111123 func _loadPauser () = match getString(KEY_PAUSER) {
112124 case a: String =>
113125 addressFromStringValue(a)
114126 case _ =>
115127 Address(base58'')
116128 }
117129
118130
119131 func _savePauser (pauser_) = [StringEntry(KEY_PAUSER, toString(pauser_))]
120132
121133
122134 func _loadMultisig () = match getString(KEY_MULTISIG) {
123135 case a: String =>
124136 addressFromStringValue(a)
125137 case _ =>
126138 Address(base58'')
127139 }
128140
129141
130142 func _saveMultisig (multisig_) = [StringEntry(KEY_MULTISIG, toString(multisig_))]
131143
132144
133145 func _loadExecutor () = match getString(KEY_EXECUTOR) {
134146 case a: String =>
135147 addressFromStringValue(a)
136148 case _ =>
137149 Address(base58'')
138150 }
139151
140152
141153 func _saveExecutor (executor_) = [StringEntry(KEY_EXECUTOR, toString(executor_))]
142154
143155
144156 func _loadCallerContract () = match getString(KEY_CALLER_CONTRACT) {
145157 case a: String =>
146158 a
147159 case _ =>
148160 ""
149161 }
150162
151163
152164 func _saveCallerContract (caller_) = [StringEntry(KEY_CALLER_CONTRACT, caller_)]
153165
154166
155167 func _loadChain (chainId_) = match getBoolean(makeString([KEY_CHAIN, toString(chainId_)], SEPARATOR)) {
156168 case a: Boolean =>
157169 a
158170 case _ =>
159171 false
160172 }
161173
162174
163175 func _saveChain (chainId_,val_) = [BooleanEntry(makeString([KEY_CHAIN, toString(chainId_)], SEPARATOR), val_)]
164176
165177
166178 func _loadBinding (executionChainId_,assetId_) = match getString(makeString([KEY_BINDING, toString(executionChainId_), toBase58String(assetId_)], SEPARATOR)) {
167179 case a: String =>
168180 let struct = split(a, SEPARATOR)
169181 $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"))
170182 then true
171183 else false)
172184 case _ =>
173185 $Tuple8(Address(base58''), "", 0, 0, 0, 0, 0, false)
174186 }
175187
176188
177189 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)
178190 then "1"
179191 else "0"], SEPARATOR))]
180192
181193
182194 func _loadFee (assetId_) = match getInteger(makeString([KEY_FEE, toBase58String(assetId_)], SEPARATOR)) {
183195 case a: Int =>
184196 a
185197 case _ =>
186198 0
187199 }
188200
189201
190202 func _saveFee (assetId_,val_) = [IntegerEntry(makeString([KEY_FEE, toBase58String(assetId_)], SEPARATOR), val_)]
191203
192204
193205 func _loadRootAdapter () = match getString(KEY_ROOT_ADAPTER) {
194206 case a: String =>
195207 addressFromStringValue(a)
196208 case _ =>
197209 Address(base58'')
198210 }
199211
200212
201213 func _saveRootAdapter (adapter_) = [StringEntry(KEY_ROOT_ADAPTER, toString(adapter_))]
202214
203215
204216 func _loadFeeRecipient () = match getString(KEY_FEE_RECIPIENT) {
205217 case a: String =>
206218 addressFromStringValue(a)
207219 case _ =>
208220 Address(base58'')
209221 }
210222
211223
212224 func _saveFeeRecipient (val_) = [StringEntry(KEY_FEE_RECIPIENT, toString(val_))]
213225
214226
215227 func _loadReferrerFeePercent (executionChainId_,referrer_) = match getInteger(makeString([KEY_REFERRER_FEE_PERCENT, toString(executionChainId_), toString(referrer_)], SEPARATOR)) {
216228 case a: Int =>
217229 a
218230 case _ =>
219231 0
220232 }
221233
222234
223235 func _saveReferrerFeePercent (executionChainId_,referrer_,val_) = [IntegerEntry(makeString([KEY_REFERRER_FEE_PERCENT, toString(executionChainId_), toString(referrer_)], SEPARATOR), val_)]
224236
225237
238+func _loadCrosschainPoolContracts () = match getString(KEY_CROSSCHAIN_POOL_CONTRACTS) {
239+ case a: String =>
240+ if ((size(a) > 0))
241+ then split_51C(a, SEPARATOR)
242+ else nil
243+ case _ =>
244+ nil
245+}
246+
247+
248+func _saveCrosschainPoolContracts (contracts_) = [StringEntry(KEY_CROSSCHAIN_POOL_CONTRACTS, makeString_11C(contracts_, SEPARATOR))]
249+
250+
251+func _loadBridgeAssetContract (crosschainPoolContract_) = match getString(makeString([KEY_BRIDGE_ASSET_CONTRACT, toString(crosschainPoolContract_)], SEPARATOR)) {
252+ case a: String =>
253+ addressFromStringValue(a)
254+ case _ =>
255+ Address(base58'')
256+}
257+
258+
259+func _saveBridgeAssetContract (crosschainPoolContract_,bridgeAssetContract_) = [StringEntry(makeString([KEY_BRIDGE_ASSET_CONTRACT, toString(crosschainPoolContract_)], SEPARATOR), toString(bridgeAssetContract_))]
260+
261+
226262 func _onlyThisContract (caller_) = if ((caller_ != this))
227263 then throw("_onlyThisContract: revert")
228264 else true
229265
230266
231267 func _whenMultisigSet () = if ((_loadMultisig() == Address(base58'')))
232268 then throw("_whenMultisigSet: revert")
233269 else true
234270
235271
236272 func _whenNotInitialized () = if (_loadInit())
237273 then throw("_whenNotInitialized: revert")
238274 else true
239275
240276
241277 func _whenInitialized () = if (!(_loadInit()))
242278 then throw("_whenInitialized: revert")
243279 else true
244280
245281
246282 func _whenNotPaused () = if (_loadPause())
247283 then throw("_whenNotPaused: revert")
248284 else true
249285
250286
251287 func _whenPaused () = if (!(_loadPause()))
252288 then throw("_whenPaused: revert")
253289 else true
254290
255291
256292 func _onlyPauser (caller_) = if ((caller_ != _loadPauser()))
257293 then throw("_onlyPauser: revert")
258294 else true
259295
260296
261297 func _asInt (val_) = match val_ {
262298 case a: Int =>
263299 a
264300 case _ =>
265301 throw("_asInt: revert")
266302 }
267303
268304
269305 func _asBytes (val_) = match val_ {
270306 case a: ByteVector =>
271307 a
272308 case _ =>
273309 throw("_asBytes: revert")
274310 }
275311
276312
277313 func _validateExecutor (val_,err_) = if ((val_ != _loadExecutor()))
278314 then throw(err_)
279315 else true
280316
281317
282318 func _validateCaller (val_,err_) = if ((val_ != _loadCallerContract()))
283319 then throw(err_)
284320 else true
285321
286322
287323 func _validateChain (executionChainId_,err_) = if (!(_loadChain(executionChainId_)))
288324 then throw(err_)
289325 else true
290326
291327
292328 @Callable(i)
293329 func init (executor_,adapter_,pauser_,feeRecipient_) = {
294330 let err = if (if (if (if (if (if (_onlyThisContract(i.caller))
295331 then _whenNotInitialized()
296332 else false)
297333 then _whenMultisigSet()
298334 else false)
299335 then _validateAddress(executor_, "init: invalid executor")
300336 else false)
301337 then _validateAddress(adapter_, "init: invalid adapter")
302338 else false)
303339 then _validateAddress(pauser_, "init: invalid pauser")
304340 else false)
305341 then _validateAddress(feeRecipient_, "init: invalid feeRecipient")
306342 else false
307343 if ((err == err))
308344 then $Tuple2(((((_saveInit(true) ++ _saveExecutor(addressFromStringValue(executor_))) ++ _saveRootAdapter(addressFromStringValue(adapter_))) ++ _savePauser(addressFromStringValue(pauser_))) ++ _saveFeeRecipient(addressFromStringValue(feeRecipient_))), unit)
309345 else throw("Strict value is not equal to itself.")
310346 }
311347
312348
313349
314350 @Callable(i)
315351 func mintTokens (callerContract_,assetContract_,amount_,recipient_,gaslessReward_,referrer_,referrerFee_) = {
316352 let amount = valueOrErrorMessage(parseInt(amount_), "mint: amount is not Int")
317353 let gaslessReward = valueOrErrorMessage(parseInt(gaslessReward_), "mint: gaslessReward is not Int")
318354 let referrerFee = valueOrErrorMessage(parseInt(referrerFee_), "mint: referrerFee is not Int")
319355 let err = if (if (if (if (if (if (if (if (_whenInitialized())
320356 then _whenNotPaused()
321357 else false)
322358 then _validateAddress(assetContract_, "mint: invalid asset contract")
323359 else false)
324360 then _validateExecutor(i.caller, "mint: invalid executor")
325361 else false)
326362 then _validateCaller(callerContract_, "mint: invalid caller")
327363 else false)
328364 then _validateAddress(recipient_, "mint: invalid recipient address")
329365 else false)
330366 then _validateInt(amount, 0, MAX_INT, "mint: invalid amount")
331367 else false)
332368 then _validateInt(gaslessReward, 0, MAX_INT, "mint: invalid gaslessReward")
333369 else false)
334370 then _validateInt(referrerFee, 0, MAX_INT, "mint: invalid referrer fee")
335371 else false
336372 if ((err == err))
337373 then {
338- let assetId = _asBytes(invoke(addressFromStringValue(assetContract_), "getAssetId", nil, nil))
374+ let $t01179712086 = if (containsElement(_loadCrosschainPoolContracts(), assetContract_))
375+ then $Tuple2(true, _loadBridgeAssetContract(addressFromStringValue(assetContract_)))
376+ else $Tuple2(false, addressFromStringValue(assetContract_))
377+ let isCrosschainPoolAsset = $t01179712086._1
378+ let bridgeAssetContract = $t01179712086._2
379+ let assetId = _asBytes(invoke(bridgeAssetContract, FUNC_GET_ASSET_ID, nil, nil))
339380 if ((assetId == assetId))
340381 then {
341- let assetDecimals = _asInt(invoke(addressFromStringValue(assetContract_), "getDecimals", nil, nil))
342- if ((assetDecimals == assetDecimals))
382+ let decimals = _asInt(invoke(bridgeAssetContract, FUNC_GET_DECIMALS, nil, nil))
383+ if ((decimals == decimals))
343384 then {
344- let normalizedAmount = _normalizeDecimals(amount, DECIMALS, assetDecimals)
345- let normalizedGasless = _normalizeDecimals(gaslessReward, DECIMALS, assetDecimals)
346- let referrer = match addressFromString(referrer_) {
385+ let normalizedAmount = _normalizeDecimals(amount, DECIMALS, decimals)
386+ let normalizedGasless = _normalizeDecimals(gaslessReward, DECIMALS, decimals)
387+ let $t01242312860 = match addressFromString(referrer_) {
347388 case refererAddress: Address =>
348- let normalizedReferrerFee = _normalizeDecimals(referrerFee, DECIMALS, assetDecimals)
389+ let normalizedReferrerFee = _normalizeDecimals(referrerFee, DECIMALS, decimals)
349390 $Tuple2(normalizedReferrerFee, [ScriptTransfer(refererAddress, normalizedReferrerFee, assetId)])
350391 case _ =>
351392 $Tuple2(0, nil)
352393 }
353- let normalizedReferrerFee = referrer._1
354- let referrerActions = referrer._2
355- let invocation = invoke(addressFromStringValue(assetContract_), "mint", [(normalizedAmount + normalizedReferrerFee), toString(this)], nil)
356- if ((invocation == invocation))
394+ let normalizedReferrerFee = $t01242312860._1
395+ let referrerActions = $t01242312860._2
396+ let mintInvocation = invoke(bridgeAssetContract, FUNC_MINT, [(normalizedAmount + normalizedReferrerFee), toString(this)], nil)
397+ if ((mintInvocation == mintInvocation))
357398 then {
358- let actions = if (if ((normalizedGasless > 0))
399+ let $t01299913337 = if (if ((normalizedGasless > 0))
359400 then (addressFromStringValue(recipient_) != i.originCaller)
360401 else false)
361- then [ScriptTransfer(addressFromStringValue(recipient_), (normalizedAmount - normalizedGasless), assetId), ScriptTransfer(i.originCaller, normalizedGasless, assetId)]
362- else [ScriptTransfer(addressFromStringValue(recipient_), normalizedAmount, assetId)]
363- $Tuple2((actions ++ referrerActions), unit)
402+ then $Tuple2([ScriptTransfer(i.originCaller, normalizedGasless, assetId)], normalizedGasless)
403+ else $Tuple2(nil, 0)
404+ let gaslessActions = $t01299913337._1
405+ let normalizedGaslessUsed = $t01299913337._2
406+ let actions = if (isCrosschainPoolAsset)
407+ then {
408+ let poolAssetId = _asBytes(invoke(addressFromStringValue(assetContract_), FUNC_GET_ASSET_ID, nil, nil))
409+ if ((poolAssetId == poolAssetId))
410+ then {
411+ let balanceBefore = assetBalance(this, poolAssetId)
412+ if ((balanceBefore == balanceBefore))
413+ then {
414+ let depositInvocation = invoke(addressFromStringValue(assetContract_), FUNC_DEPOSIT, [0], [AttachedPayment(assetId, (normalizedAmount - normalizedGaslessUsed))])
415+ if ((depositInvocation == depositInvocation))
416+ then {
417+ let balanceAfter = assetBalance(this, poolAssetId)
418+ if ((balanceAfter == balanceAfter))
419+ then [ScriptTransfer(addressFromStringValue(recipient_), (balanceAfter - balanceBefore), poolAssetId)]
420+ else throw("Strict value is not equal to itself.")
421+ }
422+ else throw("Strict value is not equal to itself.")
423+ }
424+ else throw("Strict value is not equal to itself.")
425+ }
426+ else throw("Strict value is not equal to itself.")
427+ }
428+ else [ScriptTransfer(addressFromStringValue(recipient_), (normalizedAmount - normalizedGaslessUsed), assetId)]
429+ $Tuple2(((actions ++ gaslessActions) ++ referrerActions), unit)
364430 }
365431 else throw("Strict value is not equal to itself.")
366432 }
367433 else throw("Strict value is not equal to itself.")
368434 }
369435 else throw("Strict value is not equal to itself.")
370436 }
371437 else throw("Strict value is not equal to itself.")
372438 }
373439
374440
375441
376442 @Callable(i)
377443 func burnTokens (executionChainId_,recipient_,gaslessReward_) = {
378444 let err = if (if (if (if (if (_whenInitialized())
379445 then _whenNotPaused()
380446 else false)
381447 then _validateChain(executionChainId_, "burnTokens: invalid execution chain")
382448 else false)
383449 then _validatePaymentsSize(i.payments, 1, "burnTokens: no payment")
384450 else false)
385451 then _validateInt(gaslessReward_, 0, MAX_INT, "burnTokens: invalid gaslessReward")
386452 else false)
387453 then _validateInt(i.payments[0].amount, 0, MAX_INT, "burnTokens: invalid payment amount")
388454 else false
389455 if ((err == err))
390456 then {
391457 let amount = i.payments[0].amount
392458 let assetId = match i.payments[0].assetId {
393459 case a: ByteVector =>
394460 a
395461 case _ =>
396462 throw("burnTokens: invalid asset")
397463 }
398464 let binding = _loadBinding(executionChainId_, assetId)
399465 let assetContract = binding._1
400466 let executionAsset = binding._2
401467 let minAmount = binding._3
402468 let minFee = binding._4
403469 let thresholdFee = binding._5
404470 let beforePercentFee = binding._6
405471 let afterPercentFee = binding._7
406472 let enabled = binding._8
407473 let err1 = if (if (_validateAddress(toString(assetContract), "burnTokens: no such binding"))
408474 then _validateInt(amount, minAmount, MAX_INT, "burnTokens: less than min")
409475 else false)
410476 then _validateBool(enabled, true, "burnTokens: token is disabled")
411477 else false
412478 if ((err1 == err1))
413479 then {
414- let assetDecimals = _asInt(invoke(assetContract, "getDecimals", nil, nil))
480+ let assetDecimals = _asInt(invoke(assetContract, FUNC_GET_DECIMALS, nil, nil))
415481 if ((assetDecimals == assetDecimals))
416482 then {
417483 let percent = if ((amount > thresholdFee))
418484 then afterPercentFee
419485 else beforePercentFee
420486 let fee = (minFee + fraction(amount, percent, PERCENT_FACTOR))
421487 let err2 = _validateInt(amount, (fee + 1), MAX_INT, "burnTokens: fee more than amount")
422488 if ((err2 == err2))
423489 then {
424490 let amountToSend = (amount - fee)
425491 let err3 = _validateInt(amountToSend, (gaslessReward_ + 1), MAX_INT, "burnTokens: reward more than amount")
426492 if ((err3 == err3))
427493 then {
428494 let updateFee = (_loadFee(assetId) + fee)
429495 let normalizedAmount = _normalizeDecimals(amountToSend, assetDecimals, DECIMALS)
430496 let normalizedGasless = _normalizeDecimals(gaslessReward_, assetDecimals, DECIMALS)
431497 let invocation = invoke(_loadRootAdapter(), FUNC_RELEASE_TOKENS, [executionChainId_, executionAsset, normalizedAmount, recipient_, normalizedGasless], nil)
432498 if ((invocation == invocation))
433499 then $Tuple2((_saveFee(assetId, updateFee) ++ [Burn(assetId, amountToSend)]), unit)
434500 else throw("Strict value is not equal to itself.")
435501 }
436502 else throw("Strict value is not equal to itself.")
437503 }
438504 else throw("Strict value is not equal to itself.")
439505 }
440506 else throw("Strict value is not equal to itself.")
441507 }
442508 else throw("Strict value is not equal to itself.")
443509 }
444510 else throw("Strict value is not equal to itself.")
445511 }
446512
447513
448514
449515 @Callable(i)
450516 func burnTokensV2 (executionChainId_,recipient_,referrer_,gaslessReward_) = {
451517 let err = if (if (if (if (if (if (_whenInitialized())
452518 then _whenNotPaused()
453519 else false)
454520 then _validateChain(executionChainId_, "burnTokensV2: invalid execution chain")
455521 else false)
456522 then _validatePaymentsSize(i.payments, 1, "burnTokensV2: no payment")
457523 else false)
458524 then _validateInt(gaslessReward_, 0, MAX_INT, "burnTokensV2: invalid gaslessReward")
459525 else false)
460526 then _validateInt(i.payments[0].amount, 0, MAX_INT, "burnTokensV2: invalid payment amount")
461527 else false)
462528 then _validateReferrer(referrer_, "burnTokensV2: invalid referrer")
463529 else false
464530 if ((err == err))
465531 then {
466532 let amount = i.payments[0].amount
467533 let assetId = match i.payments[0].assetId {
468534 case a: ByteVector =>
469535 a
470536 case _ =>
471537 throw("burnTokensV2: invalid asset")
472538 }
473539 let binding = _loadBinding(executionChainId_, assetId)
474540 let assetContract = binding._1
475541 let executionAsset = binding._2
476542 let minAmount = binding._3
477543 let minFee = binding._4
478544 let thresholdFee = binding._5
479545 let beforePercentFee = binding._6
480546 let afterPercentFee = binding._7
481547 let enabled = binding._8
482548 let err1 = if (if (_validateAddress(toString(assetContract), "burnTokensV2: no such binding"))
483549 then _validateInt(amount, minAmount, MAX_INT, "burnTokensV2: less than min")
484550 else false)
485551 then _validateBool(enabled, true, "burnTokensV2: token is disabled")
486552 else false
487553 if ((err1 == err1))
488554 then {
489- let assetDecimals = _asInt(invoke(assetContract, "getDecimals", nil, nil))
555+ let assetDecimals = _asInt(invoke(assetContract, FUNC_GET_DECIMALS, nil, nil))
490556 if ((assetDecimals == assetDecimals))
491557 then {
492558 let percent = if ((amount > thresholdFee))
493559 then afterPercentFee
494560 else beforePercentFee
495561 let fee = (minFee + fraction(amount, percent, PERCENT_FACTOR))
496562 let err2 = _validateInt(amount, (fee + 1), MAX_INT, "burnTokensV2: fee more than amount")
497563 if ((err2 == err2))
498564 then {
499- let $t01620116606 = if ((referrer_ != ""))
565+ let $t01816718572 = if ((referrer_ != ""))
500566 then {
501567 let referrer = addressFromStringValue(referrer_)
502568 let referrerFeeAmount = fraction(_loadReferrerFeePercent(executionChainId_, referrer), fee, PERCENT_FACTOR)
503569 $Tuple2(referrerFeeAmount, [ScriptTransfer(referrer, referrerFeeAmount, assetId)])
504570 }
505571 else $Tuple2(0, nil)
506- let referrerFee = $t01620116606._1
507- let referrerActions = $t01620116606._2
572+ let referrerFee = $t01816718572._1
573+ let referrerActions = $t01816718572._2
508574 let amountToSend = (amount - fee)
509575 let err3 = _validateInt(amountToSend, (gaslessReward_ + 1), MAX_INT, "burnTokensV2: reward more than amount")
510576 if ((err3 == err3))
511577 then {
512578 let updateFee = ((_loadFee(assetId) + fee) - referrerFee)
513579 let normalizedAmount = _normalizeDecimals(amountToSend, assetDecimals, DECIMALS)
514580 let normalizedGasless = _normalizeDecimals(gaslessReward_, assetDecimals, DECIMALS)
515581 let invocation = invoke(_loadRootAdapter(), FUNC_RELEASE_TOKENS, [executionChainId_, executionAsset, normalizedAmount, recipient_, normalizedGasless], nil)
516582 if ((invocation == invocation))
517583 then $Tuple2(((_saveFee(assetId, updateFee) ++ referrerActions) ++ [Burn(assetId, amountToSend)]), unit)
518584 else throw("Strict value is not equal to itself.")
519585 }
520586 else throw("Strict value is not equal to itself.")
521587 }
522588 else throw("Strict value is not equal to itself.")
523589 }
524590 else throw("Strict value is not equal to itself.")
525591 }
526592 else throw("Strict value is not equal to itself.")
527593 }
528594 else throw("Strict value is not equal to itself.")
529595 }
530596
531597
532598
533599 @Callable(i)
534600 func transferFee (executionChainId_,assetId_) = {
535601 let err = if (if (_whenInitialized())
536602 then _whenNotPaused()
537603 else false)
538604 then _validateAsset(assetId_, "transferFee: invalid asset")
539605 else false
540606 if ((err == err))
541607 then {
542608 let assetId = fromBase58String(assetId_)
543609 let binding = _loadBinding(executionChainId_, assetId)
544610 let assetContract = binding._1
545611 let enabled = binding._8
546612 let err1 = if (_validateAddress(toString(assetContract), "transferFee: no such binding"))
547613 then _validateBool(enabled, true, "transferFee: token is disabled")
548614 else false
549615 if ((err1 == err1))
550616 then $Tuple2((_saveFee(assetId, 0) ++ [ScriptTransfer(_loadFeeRecipient(), _loadFee(assetId), assetId)]), unit)
551617 else throw("Strict value is not equal to itself.")
552618 }
553619 else throw("Strict value is not equal to itself.")
554620 }
555621
556622
557623
558624 @Callable(i)
559625 func updateCallerContract (callerContract_) = {
560626 let err = if (_onlyThisContract(i.caller))
561627 then _whenInitialized()
562628 else false
563629 if ((err == err))
564630 then $Tuple2(_saveCallerContract(callerContract_), unit)
565631 else throw("Strict value is not equal to itself.")
566632 }
567633
568634
569635
570636 @Callable(i)
571637 func updateExecutionChain (executionChainId_,enabled_) = {
572638 let err = if (if (_onlyThisContract(i.caller))
573639 then _whenInitialized()
574640 else false)
575641 then _validateInt(executionChainId_, 0, MAX_INT, "updateExecutionChain: invalid executionChainId")
576642 else false
577643 if ((err == err))
578644 then $Tuple2(_saveChain(executionChainId_, enabled_), unit)
579645 else throw("Strict value is not equal to itself.")
580646 }
581647
582648
583649
584650 @Callable(i)
585651 func updateFeeRecipient (feeRecipient_) = {
586652 let err = if (if (_onlyThisContract(i.caller))
587653 then _whenInitialized()
588654 else false)
589655 then _validateAddress(feeRecipient_, "updateFeeRecipient: invalid feeRecipient")
590656 else false
591657 if ((err == err))
592658 then $Tuple2(_saveFeeRecipient(addressFromStringValue(feeRecipient_)), unit)
593659 else throw("Strict value is not equal to itself.")
594660 }
595661
596662
597663
598664 @Callable(i)
599665 func updateReferrer (executionChainId_,referrer_,fee_) = {
600666 let err = if (if (if (if (_onlyThisContract(i.caller))
601667 then _whenInitialized()
602668 else false)
603669 then _validateChain(executionChainId_, "updateReferrer: invalid execution chain")
604670 else false)
605671 then _validateAddress(referrer_, "updateReferrer: invalid referrer")
606672 else false)
607673 then _validateInt(fee_, 0, MAX_REFERRER_FEE, "updateReferrer: invalid fee")
608674 else false
609675 if ((err == err))
610676 then $Tuple2(_saveReferrerFeePercent(executionChainId_, addressFromStringValue(referrer_), fee_), unit)
611677 else throw("Strict value is not equal to itself.")
612678 }
613679
614680
615681
616682 @Callable(i)
617683 func updateBindingInfo (executionChainId_,assetContract_,executionAsset_,minAmount_,minFee_,thresholdFee_,beforePercentFee_,afterPercentFee_,enabled_) = {
618684 let err = if (if (if (if (if (if (if (if (_onlyThisContract(i.caller))
619685 then _whenInitialized()
620686 else false)
621687 then _validateAddress(assetContract_, "updateBindingInfo: invalid asset contract")
622688 else false)
623689 then _validateInt(executionChainId_, 0, MAX_INT, "updateBindingInfo: invalid executionChainId")
624690 else false)
625691 then _validateInt(minAmount_, 0, MAX_INT, "updateBindingInfo: invalid minAmount")
626692 else false)
627693 then _validateInt(minFee_, 0, MAX_INT, "updateBindingInfo: invalid minFee")
628694 else false)
629695 then _validateInt(thresholdFee_, 0, MAX_INT, "updateBindingInfo: invalid thresholdFee")
630696 else false)
631697 then _validateInt(beforePercentFee_, 0, MAX_INT, "updateBindingInfo: invalid beforePercentFee")
632698 else false)
633699 then _validateInt(afterPercentFee_, 0, MAX_INT, "updateBindingInfo: invalid afterPercentFee")
634700 else false
635701 if ((err == err))
636702 then {
637- let assetId = _asBytes(invoke(addressFromStringValue(assetContract_), "getAssetId", nil, nil))
703+ let assetId = _asBytes(invoke(addressFromStringValue(assetContract_), FUNC_GET_ASSET_ID, nil, nil))
638704 if ((assetId == assetId))
639705 then {
640706 let binding = $Tuple8(addressFromStringValue(assetContract_), executionAsset_, minAmount_, minFee_, thresholdFee_, beforePercentFee_, afterPercentFee_, enabled_)
641707 $Tuple2(_saveBinding(executionChainId_, assetId, binding), unit)
642708 }
643709 else throw("Strict value is not equal to itself.")
644710 }
711+ else throw("Strict value is not equal to itself.")
712+ }
713+
714+
715+
716+@Callable(i)
717+func addCrosschainPoolContract (crosschainPoolContract_,bridgeAssetContract_) = {
718+ let err = if (if (if (_onlyThisContract(i.caller))
719+ then _whenInitialized()
720+ else false)
721+ then _validateAddress(crosschainPoolContract_, "addCrosschainPoolContract: invalid crosschainPoolContract")
722+ else false)
723+ then _validateAddress(bridgeAssetContract_, "addCrosschainPoolContract: invalid bridgeAssetContract")
724+ else false
725+ if ((err == err))
726+ then $Tuple2((_saveCrosschainPoolContracts((_loadCrosschainPoolContracts() :+ crosschainPoolContract_)) ++ _saveBridgeAssetContract(addressFromStringValue(crosschainPoolContract_), addressFromStringValue(bridgeAssetContract_))), unit)
645727 else throw("Strict value is not equal to itself.")
646728 }
647729
648730
649731
650732 @Callable(i)
651733 func pause () = {
652734 let err = if (if (_onlyPauser(i.caller))
653735 then _whenInitialized()
654736 else false)
655737 then _whenNotPaused()
656738 else false
657739 if ((err == err))
658740 then $Tuple2(_savePause(true), unit)
659741 else throw("Strict value is not equal to itself.")
660742 }
661743
662744
663745
664746 @Callable(i)
665747 func unpause () = {
666748 let err = if (if (_onlyPauser(i.caller))
667749 then _whenInitialized()
668750 else false)
669751 then _whenPaused()
670752 else false
671753 if ((err == err))
672754 then $Tuple2(_savePause(false), unit)
673755 else throw("Strict value is not equal to itself.")
674756 }
675757
676758
677759
678760 @Callable(i)
679761 func updatePauser (pauser_) = {
680762 let err = if (if (_onlyThisContract(i.caller))
681763 then _whenInitialized()
682764 else false)
683765 then _validateAddress(pauser_, "updatePauser: invalid pauser")
684766 else false
685767 if ((err == err))
686768 then $Tuple2(_savePauser(addressFromStringValue(pauser_)), unit)
687769 else throw("Strict value is not equal to itself.")
688770 }
689771
690772
691773
692774 @Callable(i)
693775 func setMultisig (multisig_) = {
694776 let err = if (_onlyThisContract(i.caller))
695777 then _validateAddress(multisig_, "setMultisig: invalid multisig")
696778 else false
697779 if ((err == err))
698780 then $Tuple2(_saveMultisig(addressFromStringValue(multisig_)), unit)
699781 else throw("Strict value is not equal to itself.")
700782 }
701783
702784
703785 @Verifier(tx)
704786 func verify () = match getString(KEY_MULTISIG) {
705787 case multisig: String =>
706788 valueOrElse(getBoolean(addressFromStringValue(multisig), makeString([KEY_STATUS, toString(this), toBase58String(tx.id)], SEPARATOR)), false)
707789 case _ =>
708790 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
709791 }
710792

github/deemru/w8io/169f3d6 
90.80 ms