tx · 7gxj8wgP6CYiRKVdFzrJZnp3Lj8rs1ZDRmbrAQsqRGB5

3MytuyxG75kHY91sNzmHux9xCzUN8FHM4DG:  -0.01200000 Waves

2024.09.21 13:02 [3293261] smart account 3MytuyxG75kHY91sNzmHux9xCzUN8FHM4DG > SELF 0.00000000 Waves

{ "type": 13, "id": "7gxj8wgP6CYiRKVdFzrJZnp3Lj8rs1ZDRmbrAQsqRGB5", "fee": 1200000, "feeAssetId": null, "timestamp": 1726913010845, "version": 2, "chainId": 84, "sender": "3MytuyxG75kHY91sNzmHux9xCzUN8FHM4DG", "senderPublicKey": "4JNWrRNexiT3ApCKPgynPrc9Z7JiEfeMgZHQHsAAdo3F", "proofs": [ "5ATC5m5s4wg2ZX7dNhZ268dEWMiiH8PGyrjT4acCUSkxkcJwx8BkA9N4CGrTtkzBZnuSAZUXfXYU4awUHifrTEjQ" ], "script": "base64:AAIFAAAAAAAAACkIAhIECgIICBIECgIECBIECgIICBIGCgQICAQIEgYKBAEICAgSAwoBCAAAABEBAAAACWdldFN0ckJ5SwAAAAEAAAADa2V5CQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQEAAAAJZ2V0SW50QnlLAAAAAQAAAANrZXkJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AAAAAAtiYWlfYXNzZXRpZAEAAAAgk+FyOHEEm2rommMfBCS3ZFOXLD68ZguDdK9ouySN4kIAAAAACmFkbWluX2FkZHIJAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVRMt+97USOtxJNludqur6uEerVW/OLJLEAAAAAAD25vbl9jaXJjdWxhdGluZwkBAAAAB0FkZHJlc3MAAAABAQAAABoBVOxqMNqLPdIMxcP9+gH3uQ9Up6mTAoNHuwAAAAAOZGFwcFJ1bm5pbmdLZXkCAAAAFGNvbmZfZGFwcF9pc19ydW5uaW5nAAAAABFtYWludGVuYW5jZU1TR0tleQIAAAAUY29uZl9tYWludGVuYW5jZV9tc2cAAAAAC2RhcHBSdW5uaW5nCQEA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AAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5xtuoIg==", "height": 3293261, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 38ggDLJZL435p2AHATRqtF7V6Qb299oanFE47GWp8LPM Next: GJoveZp8Dpn5cQGbEYBtzjZX3NWMgXRLew251CY19oCZ Diff:
OldNewDifferences
2424 let STATUS_PENDING = "PENDING"
2525
2626 let STATUS_PROCESSED = "PROCESSED"
27+
28+let STATUS_REJECTED = "REJECTED"
2729
2830 let supported_recipients_network = split(valueOrElse(getStrByK("supported_recipients_network"), "bnb_base"), "_")
2931
5860
5961 @Callable(i)
6062 func appRunning (isLive,message) = {
61- let $t021182157 = idCallerDate(i)
62- let id = $t021182157._1
63- let caller = $t021182157._2
64- let date = $t021182157._3
63+ let $t021512190 = idCallerDate(i)
64+ let id = $t021512190._1
65+ let caller = $t021512190._2
66+ let date = $t021512190._3
6567 if (containsElement([toString(admin_addr), toString(this)], caller))
6668 then [BooleanEntry(dappRunningKey, isLive), StringEntry(maintenanceMSGKey, message)]
6769 else throw("You are not allowed to change this")
7173
7274 @Callable(i)
7375 func deposit (recipient_address,recipient_network) = {
74- let $t024862525 = getPaymentData(i)
75- let amount = $t024862525._1
76- let asset = $t024862525._2
76+ let $t025192558 = getPaymentData(i)
77+ let amount = $t025192558._1
78+ let asset = $t025192558._2
7779 if ((asset != bai_assetid))
7880 then throw("Only BAI token accepted")
7981 else {
80- let $t026082647 = idCallerDate(i)
81- let id = $t026082647._1
82- let caller = $t026082647._2
83- let date = $t026082647._3
82+ let $t026412680 = idCallerDate(i)
83+ let id = $t026412680._1
84+ let caller = $t026412680._2
85+ let date = $t026412680._3
8486 if ((0 >= (amount - service_fee)))
8587 then throw("Cannot bridge non positive amount!")
8688 else if (!(containsElement(supported_recipients_network, recipient_network)))
9294
9395
9496 @Callable(i)
95-func finalize (data_key_without_status,recipient_tx_txhash) = {
96- let $t031813220 = idCallerDate(i)
97- let id = $t031813220._1
98- let caller = $t031813220._2
99- let date = $t031813220._3
97+func finalize (data_key_without_status,recipient_tx_txhash,reject,msg) = {
98+ let $t032443283 = idCallerDate(i)
99+ let id = $t032443283._1
100+ let caller = $t032443283._2
101+ let date = $t032443283._3
100102 if (containsElement([toString(admin_addr), toString(this)], caller))
101103 then {
102104 let data = valueOrElse(getStrByK(((data_key_without_status + "_") + STATUS_PENDING)), "")
110112 let deposit_height = valueOrElse(parseInt(split(data, "_")[4]), 0)
111113 if ((confirmations_required > (height - deposit_height)))
112114 then throw("Required confirmation not reached.")
113- 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)]
115+ else if (reject)
116+ then [DeleteEntry(((data_key_without_status + "_") + STATUS_PENDING)), StringEntry(((data_key_without_status + "_") + STATUS_REJECTED), ((data + "_") + msg)), ScriptTransfer(Address(fromBase58String(split(data, "_")[0])), amount, bai_assetid)]
117+ 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)]
114118 }
115119 }
116120 }
123127 func withdraw (amount,recipient_address,sourceChain,sourceChainDepositTxId) = if ((valueOrElse(getIntByK(((((("WITHDRAW_" + sourceChainDepositTxId) + "_") + recipient_address) + "_") + sourceChain)), 0) != 0))
124128 then throw("Withdraw already processed.")
125129 else {
126- let $t045024541 = idCallerDate(i)
127- let id = $t045024541._1
128- let caller = $t045024541._2
129- let date = $t045024541._3
130+ let $t048714910 = idCallerDate(i)
131+ let id = $t048714910._1
132+ let caller = $t048714910._2
133+ let date = $t048714910._3
130134 if (containsElement([toString(admin_addr), toString(this)], caller))
131135 then {
132136 let bai_balance_before = valueOrElse(assetBalance(this, bai_assetid), 0)
153157
154158 @Callable(i)
155159 func deleteEntry (entry) = {
156- let $t053235362 = idCallerDate(i)
157- let id = $t053235362._1
158- let caller = $t053235362._2
159- let date = $t053235362._3
160+ let $t056925731 = idCallerDate(i)
161+ let id = $t056925731._1
162+ let caller = $t056925731._2
163+ let date = $t056925731._3
160164 if ((caller == toString(admin_addr)))
161165 then [DeleteEntry(entry)]
162166 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"
27+
28+let STATUS_REJECTED = "REJECTED"
2729
2830 let supported_recipients_network = split(valueOrElse(getStrByK("supported_recipients_network"), "bnb_base"), "_")
2931
3032 let confirmations_required = valueOrElse(getIntByK("confirmations_required"), 5)
3133
3234 let service_fee = valueOrElse(getIntByK("service_fee"), 25000000)
3335
3436 func getPaymentData (i) = if ((size(i.payments) == 0))
3537 then throw("No payment attached")
3638 else {
3739 let payment = value(i.payments[0])
3840 let amount = value(payment.amount)
3941 let asset = value(payment.assetId)
4042 $Tuple2(amount, asset)
4143 }
4244
4345
4446 func idCallerDate (i) = if (!(dappRunning))
4547 then throw(maintenanceMSG)
4648 else $Tuple3(toBase58String(i.transactionId), toBase58String(i.caller.bytes), lastBlock.timestamp)
4749
4850
4951 @Callable(invoke)
5052 func setConf (key,val) = {
5153 let caller = toString(invoke.caller)
5254 if (containsElement([toString(admin_addr), toString(this)], caller))
5355 then [StringEntry(key, val)]
5456 else throw("You are not allowed to change this")
5557 }
5658
5759
5860
5961 @Callable(i)
6062 func appRunning (isLive,message) = {
61- let $t021182157 = idCallerDate(i)
62- let id = $t021182157._1
63- let caller = $t021182157._2
64- let date = $t021182157._3
63+ let $t021512190 = idCallerDate(i)
64+ let id = $t021512190._1
65+ let caller = $t021512190._2
66+ let date = $t021512190._3
6567 if (containsElement([toString(admin_addr), toString(this)], caller))
6668 then [BooleanEntry(dappRunningKey, isLive), StringEntry(maintenanceMSGKey, message)]
6769 else throw("You are not allowed to change this")
6870 }
6971
7072
7173
7274 @Callable(i)
7375 func deposit (recipient_address,recipient_network) = {
74- let $t024862525 = getPaymentData(i)
75- let amount = $t024862525._1
76- let asset = $t024862525._2
76+ let $t025192558 = getPaymentData(i)
77+ let amount = $t025192558._1
78+ let asset = $t025192558._2
7779 if ((asset != bai_assetid))
7880 then throw("Only BAI token accepted")
7981 else {
80- let $t026082647 = idCallerDate(i)
81- let id = $t026082647._1
82- let caller = $t026082647._2
83- let date = $t026082647._3
82+ let $t026412680 = idCallerDate(i)
83+ let id = $t026412680._1
84+ let caller = $t026412680._2
85+ let date = $t026412680._3
8486 if ((0 >= (amount - service_fee)))
8587 then throw("Cannot bridge non positive amount!")
8688 else if (!(containsElement(supported_recipients_network, recipient_network)))
8789 then throw("Recipient network not supported")
8890 else [StringEntry(((((((((("DEPOSIT_" + id) + "_") + caller) + "_") + recipient_address) + "_") + recipient_network) + "_") + STATUS_PENDING), ((((((((caller + "_") + toString((amount - service_fee))) + "_") + recipient_address) + "_") + recipient_network) + "_") + toString(height)))]
8991 }
9092 }
9193
9294
9395
9496 @Callable(i)
95-func finalize (data_key_without_status,recipient_tx_txhash) = {
96- let $t031813220 = idCallerDate(i)
97- let id = $t031813220._1
98- let caller = $t031813220._2
99- let date = $t031813220._3
97+func finalize (data_key_without_status,recipient_tx_txhash,reject,msg) = {
98+ let $t032443283 = idCallerDate(i)
99+ let id = $t032443283._1
100+ let caller = $t032443283._2
101+ let date = $t032443283._3
100102 if (containsElement([toString(admin_addr), toString(this)], caller))
101103 then {
102104 let data = valueOrElse(getStrByK(((data_key_without_status + "_") + STATUS_PENDING)), "")
103105 if ((data == ""))
104106 then throw("Request not found")
105107 else {
106108 let amount = valueOrElse(parseInt(split(data, "_")[1]), 0)
107109 if ((0 > amount))
108110 then throw("Cannot transfer non positive amount")
109111 else {
110112 let deposit_height = valueOrElse(parseInt(split(data, "_")[4]), 0)
111113 if ((confirmations_required > (height - deposit_height)))
112114 then throw("Required confirmation not reached.")
113- 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)]
115+ else if (reject)
116+ then [DeleteEntry(((data_key_without_status + "_") + STATUS_PENDING)), StringEntry(((data_key_without_status + "_") + STATUS_REJECTED), ((data + "_") + msg)), ScriptTransfer(Address(fromBase58String(split(data, "_")[0])), amount, bai_assetid)]
117+ 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)]
114118 }
115119 }
116120 }
117121 else throw("You are not allowed to change this")
118122 }
119123
120124
121125
122126 @Callable(i)
123127 func withdraw (amount,recipient_address,sourceChain,sourceChainDepositTxId) = if ((valueOrElse(getIntByK(((((("WITHDRAW_" + sourceChainDepositTxId) + "_") + recipient_address) + "_") + sourceChain)), 0) != 0))
124128 then throw("Withdraw already processed.")
125129 else {
126- let $t045024541 = idCallerDate(i)
127- let id = $t045024541._1
128- let caller = $t045024541._2
129- let date = $t045024541._3
130+ let $t048714910 = idCallerDate(i)
131+ let id = $t048714910._1
132+ let caller = $t048714910._2
133+ let date = $t048714910._3
130134 if (containsElement([toString(admin_addr), toString(this)], caller))
131135 then {
132136 let bai_balance_before = valueOrElse(assetBalance(this, bai_assetid), 0)
133137 if ((bai_balance_before == bai_balance_before))
134138 then {
135139 let swap = invoke(non_circulating, "withdraw", [amount], nil)
136140 if ((swap == swap))
137141 then {
138142 let bai_balance_after = valueOrElse(assetBalance(this, bai_assetid), 0)
139143 if ((bai_balance_after == bai_balance_after))
140144 then if (((bai_balance_after - bai_balance_before) == amount))
141145 then [ScriptTransfer(Address(fromBase58String(recipient_address)), amount, bai_assetid), IntegerEntry(((((("WITHDRAW_" + sourceChainDepositTxId) + "_") + recipient_address) + "_") + sourceChain), amount)]
142146 else throw("Something went wrong during non circulating amount withdraw.")
143147 else throw("Strict value is not equal to itself.")
144148 }
145149 else throw("Strict value is not equal to itself.")
146150 }
147151 else throw("Strict value is not equal to itself.")
148152 }
149153 else throw("You are not allowed to change this")
150154 }
151155
152156
153157
154158 @Callable(i)
155159 func deleteEntry (entry) = {
156- let $t053235362 = idCallerDate(i)
157- let id = $t053235362._1
158- let caller = $t053235362._2
159- let date = $t053235362._3
160+ let $t056925731 = idCallerDate(i)
161+ let id = $t056925731._1
162+ let caller = $t056925731._2
163+ let date = $t056925731._3
160164 if ((caller == toString(admin_addr)))
161165 then [DeleteEntry(entry)]
162166 else throw("no")
163167 }
164168
165169
166170 @Verifier(tx)
167171 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
168172

github/deemru/w8io/169f3d6 
35.09 ms