tx · 252e7tRgVSqdpojzm9XUgaBHoacmvq4oEjoaptsMFMam

3MytuyxG75kHY91sNzmHux9xCzUN8FHM4DG:  -0.01100000 Waves

2024.09.21 12:02 [3293189] smart account 3MytuyxG75kHY91sNzmHux9xCzUN8FHM4DG > SELF 0.00000000 Waves

{ "type": 13, "id": "252e7tRgVSqdpojzm9XUgaBHoacmvq4oEjoaptsMFMam", "fee": 1100000, "feeAssetId": null, "timestamp": 1726909352291, "version": 2, "chainId": 84, "sender": "3MytuyxG75kHY91sNzmHux9xCzUN8FHM4DG", "senderPublicKey": "4JNWrRNexiT3ApCKPgynPrc9Z7JiEfeMgZHQHsAAdo3F", "proofs": [ "5HQUVk1n6khW8dXUCRzfEXRj9t97EsbXKE3GRcVraUfJz39oLhtZrNHgwSpCgtoQTDsUpFdTw4DaXNDenrcvXwrt" ], "script": "base64:AAIFAAAAAAAAACcIAhIECgIICBIECgIECBIECgIICBIECgIICBIGCgQBCAgIEgMKAQgAAAAQAQAAAAlnZXRTdHJCeUsAAAABAAAAA2tleQkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkBAAAACWdldEludEJ5SwAAAAEAAAADa2V5CQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQAAAAALYmFpX2Fzc2V0aWQBAAAAIJPhcjhxBJtq6JpjHwQkt2RTlyw+vGYLg3SvaLskjeJCAAAAAAphZG1pbl9hZGRyCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFUTLfve1EjrcSTZbnarq+rhHq1VvziySxAAAAAAA9ub25fY2lyY3VsYXRpbmcJAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVTsajDaiz3SDMXD/foB97kPVKepkwKDR7sAAAAADmRhcHBSdW5uaW5nS2V5AgAAABRjb25mX2RhcHBfaXNfcnVubmluZwAAAAARbWFpbnRlbmFuY2VNU0dLZXkCAAAAFGNvbmZfbWFpbnRlbmFuY2VfbXNnAAAAAAtkYXBwUnVubmluZwkBAAAAC3ZhbHVlT3JFbHNlAAAA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1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAAIAAAABAgAAACJZb3UgYXJlIG5vdCBhbGxvd2VkIHRvIGNoYW5nZSB0aGlzAAAAAWkBAAAAC2RlbGV0ZUVudHJ5AAAAAQAAAAVlbnRyeQQAAAALJHQwNTU2MTU2MDAJAQAAAAxpZENhbGxlckRhdGUAAAABBQAAAAFpBAAAAAJpZAgFAAAACyR0MDU1NjE1NjAwAAAAAl8xBAAAAAZjYWxsZXIIBQAAAAskdDA1NTYxNTYwMAAAAAJfMgQAAAAEZGF0ZQgFAAAACyR0MDU1NjE1NjAwAAAAAl8zAwkAAAAAAAACBQAAAAZjYWxsZXIJAAQlAAAAAQUAAAAKYWRtaW5fYWRkcgkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABBQAAAAVlbnRyeQUAAAADbmlsCQAAAgAAAAECAAAAAm5vAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXk0Mhu5", "height": 3293189, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 65XF2fDd7W8iyVyXqg9fqGFTKcLDrybpq89SQAngz6Xj Next: 38ggDLJZL435p2AHATRqtF7V6Qb299oanFE47GWp8LPM Diff:
OldNewDifferences
131131 then {
132132 let bai_balance_before = valueOrElse(assetBalance(this, bai_assetid), 0)
133133 if ((bai_balance_before == bai_balance_before))
134- then if (true)
135- then throw(toString(bai_balance_before))
136- else {
137- let swap = invoke(non_circulating, "withdraw", [amount], nil)
138- if ((swap == swap))
139- then {
140- let bai_balance_after = valueOrElse(assetBalance(this, bai_assetid), 0)
141- if ((bai_balance_after == bai_balance_after))
142- then if (((bai_balance_after - bai_balance_before) == amount))
134+ then {
135+ let swap = invoke(non_circulating, "withdraw", [amount], nil)
136+ if ((swap == swap))
137+ then {
138+ let bai_balance_after = valueOrElse(assetBalance(this, bai_assetid), 0)
139+ if ((bai_balance_after == bai_balance_after))
140+ then if (true)
141+ then throw(((toString(bai_balance_before) + " / ") + toString(bai_balance_after)))
142+ else if (((bai_balance_after - bai_balance_before) == amount))
143143 then [ScriptTransfer(Address(fromBase58String(recipient_address)), amount, bai_assetid), IntegerEntry(((((("WITHDRAW_" + sourceChainDepositTxId) + "_") + recipient_address) + "_") + sourceChain), amount)]
144144 else throw("Something went wrong during non circulating amount withdraw.")
145- else throw("Strict value is not equal to itself.")
146- }
147- else throw("Strict value is not equal to itself.")
148- }
145+ else throw("Strict value is not equal to itself.")
146+ }
147+ else throw("Strict value is not equal to itself.")
148+ }
149149 else throw("Strict value is not equal to itself.")
150150 }
151151 else throw("You are not allowed to change this")
155155
156156 @Callable(i)
157157 func deleteEntry (entry) = {
158- let $t055235562 = idCallerDate(i)
159- let id = $t055235562._1
160- let caller = $t055235562._2
161- let date = $t055235562._3
158+ let $t055615600 = idCallerDate(i)
159+ let id = $t055615600._1
160+ let caller = $t055615600._2
161+ let date = $t055615600._3
162162 if ((caller == toString(admin_addr)))
163163 then [DeleteEntry(entry)]
164164 else throw("no")
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func getStrByK (key) = getString(this, key)
55
66
77 func getIntByK (key) = getInteger(this, key)
88
99
1010 let bai_assetid = base58'AxGKQRxKo4F2EbhrRq6N2tdLsxtMnpzQsS4QemV6V1W1'
1111
1212 let admin_addr = Address(base58'3MvujUZTtoANRzrKYKzx99Vtb9TUh6VPCDm')
1313
1414 let non_circulating = Address(base58'3NBU8TThHH5YUSk26iGEGU1jHM7vSR3ZTPx')
1515
1616 let dappRunningKey = "conf_dapp_is_running"
1717
1818 let maintenanceMSGKey = "conf_maintenance_msg"
1919
2020 let dappRunning = valueOrElse(getBoolean(this, dappRunningKey), true)
2121
2222 let maintenanceMSG = valueOrElse(getString(this, maintenanceMSGKey), "")
2323
2424 let STATUS_PENDING = "PENDING"
2525
2626 let STATUS_PROCESSED = "PROCESSED"
2727
2828 let supported_recipients_network = split(valueOrElse(getStrByK("supported_recipients_network"), "bnb_base"), "_")
2929
3030 let confirmations_required = valueOrElse(getIntByK("confirmations_required"), 5)
3131
3232 let service_fee = valueOrElse(getIntByK("service_fee"), 25000000)
3333
3434 func getPaymentData (i) = if ((size(i.payments) == 0))
3535 then throw("No payment attached")
3636 else {
3737 let payment = value(i.payments[0])
3838 let amount = value(payment.amount)
3939 let asset = value(payment.assetId)
4040 $Tuple2(amount, asset)
4141 }
4242
4343
4444 func idCallerDate (i) = if (!(dappRunning))
4545 then throw(maintenanceMSG)
4646 else $Tuple3(toBase58String(i.transactionId), toBase58String(i.caller.bytes), lastBlock.timestamp)
4747
4848
4949 @Callable(invoke)
5050 func setConf (key,val) = {
5151 let caller = toString(invoke.caller)
5252 if (containsElement([toString(admin_addr), toString(this)], caller))
5353 then [StringEntry(key, val)]
5454 else throw("You are not allowed to change this")
5555 }
5656
5757
5858
5959 @Callable(i)
6060 func appRunning (isLive,message) = {
6161 let $t021182157 = idCallerDate(i)
6262 let id = $t021182157._1
6363 let caller = $t021182157._2
6464 let date = $t021182157._3
6565 if (containsElement([toString(admin_addr), toString(this)], caller))
6666 then [BooleanEntry(dappRunningKey, isLive), StringEntry(maintenanceMSGKey, message)]
6767 else throw("You are not allowed to change this")
6868 }
6969
7070
7171
7272 @Callable(i)
7373 func deposit (recipient_address,recipient_network) = {
7474 let $t024862525 = getPaymentData(i)
7575 let amount = $t024862525._1
7676 let asset = $t024862525._2
7777 if ((asset != bai_assetid))
7878 then throw("Only BAI token accepted")
7979 else {
8080 let $t026082647 = idCallerDate(i)
8181 let id = $t026082647._1
8282 let caller = $t026082647._2
8383 let date = $t026082647._3
8484 if ((0 >= (amount - service_fee)))
8585 then throw("Cannot bridge non positive amount!")
8686 else if (!(containsElement(supported_recipients_network, recipient_network)))
8787 then throw("Recipient network not supported")
8888 else [StringEntry(((((((((("DEPOSIT_" + id) + "_") + caller) + "_") + recipient_address) + "_") + recipient_network) + "_") + STATUS_PENDING), ((((((((caller + "_") + toString((amount - service_fee))) + "_") + recipient_address) + "_") + recipient_network) + "_") + toString(height)))]
8989 }
9090 }
9191
9292
9393
9494 @Callable(i)
9595 func finalize (data_key_without_status,recipient_tx_txhash) = {
9696 let $t031813220 = idCallerDate(i)
9797 let id = $t031813220._1
9898 let caller = $t031813220._2
9999 let date = $t031813220._3
100100 if (containsElement([toString(admin_addr), toString(this)], caller))
101101 then {
102102 let data = valueOrElse(getStrByK(((data_key_without_status + "_") + STATUS_PENDING)), "")
103103 if ((data == ""))
104104 then throw("Request not found")
105105 else {
106106 let amount = valueOrElse(parseInt(split(data, "_")[1]), 0)
107107 if ((0 > amount))
108108 then throw("Cannot transfer non positive amount")
109109 else {
110110 let deposit_height = valueOrElse(parseInt(split(data, "_")[4]), 0)
111111 if ((confirmations_required > (height - deposit_height)))
112112 then throw("Required confirmation not reached.")
113113 else [DeleteEntry(((data_key_without_status + "_") + STATUS_PENDING)), StringEntry(((data_key_without_status + "_") + STATUS_PROCESSED), ((data + "_") + recipient_tx_txhash)), ScriptTransfer(non_circulating, amount, bai_assetid)]
114114 }
115115 }
116116 }
117117 else throw("You are not allowed to change this")
118118 }
119119
120120
121121
122122 @Callable(i)
123123 func withdraw (amount,recipient_address,sourceChain,sourceChainDepositTxId) = if ((valueOrElse(getIntByK(((((("WITHDRAW_" + sourceChainDepositTxId) + "_") + recipient_address) + "_") + sourceChain)), 0) != 0))
124124 then throw("Withdraw already processed.")
125125 else {
126126 let $t045024683 = idCallerDate(i)
127127 let id = $t045024683._1
128128 let caller = $t045024683._2
129129 let date = $t045024683._3
130130 if (containsElement([toString(admin_addr), toString(this)], caller))
131131 then {
132132 let bai_balance_before = valueOrElse(assetBalance(this, bai_assetid), 0)
133133 if ((bai_balance_before == bai_balance_before))
134- then if (true)
135- then throw(toString(bai_balance_before))
136- else {
137- let swap = invoke(non_circulating, "withdraw", [amount], nil)
138- if ((swap == swap))
139- then {
140- let bai_balance_after = valueOrElse(assetBalance(this, bai_assetid), 0)
141- if ((bai_balance_after == bai_balance_after))
142- then if (((bai_balance_after - bai_balance_before) == amount))
134+ then {
135+ let swap = invoke(non_circulating, "withdraw", [amount], nil)
136+ if ((swap == swap))
137+ then {
138+ let bai_balance_after = valueOrElse(assetBalance(this, bai_assetid), 0)
139+ if ((bai_balance_after == bai_balance_after))
140+ then if (true)
141+ then throw(((toString(bai_balance_before) + " / ") + toString(bai_balance_after)))
142+ else if (((bai_balance_after - bai_balance_before) == amount))
143143 then [ScriptTransfer(Address(fromBase58String(recipient_address)), amount, bai_assetid), IntegerEntry(((((("WITHDRAW_" + sourceChainDepositTxId) + "_") + recipient_address) + "_") + sourceChain), amount)]
144144 else throw("Something went wrong during non circulating amount withdraw.")
145- else throw("Strict value is not equal to itself.")
146- }
147- else throw("Strict value is not equal to itself.")
148- }
145+ else throw("Strict value is not equal to itself.")
146+ }
147+ else throw("Strict value is not equal to itself.")
148+ }
149149 else throw("Strict value is not equal to itself.")
150150 }
151151 else throw("You are not allowed to change this")
152152 }
153153
154154
155155
156156 @Callable(i)
157157 func deleteEntry (entry) = {
158- let $t055235562 = idCallerDate(i)
159- let id = $t055235562._1
160- let caller = $t055235562._2
161- let date = $t055235562._3
158+ let $t055615600 = idCallerDate(i)
159+ let id = $t055615600._1
160+ let caller = $t055615600._2
161+ let date = $t055615600._3
162162 if ((caller == toString(admin_addr)))
163163 then [DeleteEntry(entry)]
164164 else throw("no")
165165 }
166166
167167
168168 @Verifier(tx)
169169 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
170170

github/deemru/w8io/026f985 
54.04 ms