tx · CoXfRA2qzqmgrWaupjXWvJx6GXFauzeZkRQjG8FnjP6z

3N1Sy1orAx7cA4DiXHsPc4qtpWoJcAh4zDc:  -0.01000000 Waves

2024.06.01 18:00 [3131779] smart account 3N1Sy1orAx7cA4DiXHsPc4qtpWoJcAh4zDc > SELF 0.00000000 Waves

{ "type": 13, "id": "CoXfRA2qzqmgrWaupjXWvJx6GXFauzeZkRQjG8FnjP6z", "fee": 1000000, "feeAssetId": null, "timestamp": 1717254065067, "version": 2, "chainId": 84, "sender": "3N1Sy1orAx7cA4DiXHsPc4qtpWoJcAh4zDc", "senderPublicKey": "49zi6CveYsNs7mCRBAxfBriVPMfCo9R4hXtDKcttRB6o", "proofs": [ "496vGsYFCe41BMDQ7WMDVJ6Dum5YUYCJijE1CkRzQ7pbq7EiZoh1ssS8LegH4W3oV8Di23x92C288EhtyRj2U29C" ], "script": "base64:AAIFAAAAAAAAABgIAhIECgIECBIDCgEIEgQKAggIEgMKAQgAAAALAAAAAAtiYWlfYXNzZXRpZAEAAAAgk+FyOHEEm2rommMfBCS3ZFOXLD68ZguDdK9ouySN4kIAAAAACmFkbWluX2FkZHIJAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVQksX6wAmH1Xxe8AAMn0i1Eby7rr+JFiN8AAAAADmRhcHBSdW5uaW5nS2V5AgAAABRjb25mX2RhcHBfaXNfcnVubmluZwAAAAARbWFpbnRlbmFuY2VNU0dLZXkCAAAAFGNvbmZfbWFpbnRlbmFuY2VfbXNnAAAAAAtkYXBwUnVubmluZwkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABBsAAAACBQAAAAR0aGlzBQAAAA5kYXBwUnVubmluZ0tleQYAAAAADm1haW50ZW5hbmNlTVNHCQEAAAALdmFsdWVPckVsc2UAAAACCQAEHQAAAAIFAAAABHRoaXMFAAAAEW1haW50ZW5hbmNlTVNHS2V5AgAAAAAAAAAADlNUQVRVU19QRU5ESU5HAgAAAAdQRU5ESU5HAAAAABBTVEFUVVNfUFJ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mRlclB1YmxpY0tlebiFjXA=", "height": 3131779, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AsFSPZmAmm4NcNE7ArHk3wXgq5W9EEzkfYM3XVTAUHWG Next: 5DAYN4pZMVLEWKQoRS6pqffn8ojVUJy1dAjqdqp3k2RL Diff:
OldNewDifferences
6060 let id = $t015821621._1
6161 let caller = $t015821621._2
6262 let date = $t015821621._3
63-[StringEntry(((id + "_") + STATUS_PENDING), ((caller + "_") + toString(amount)))]
63+[StringEntry(((id + "_") + STATUS_PENDING), ((((caller + "_") + toString(amount)) + "_") + bnb_addres))]
6464 }
6565 }
6666
6868
6969 @Callable(i)
7070 func finalize (txid,bnb_txhash) = {
71- let $t017771816 = idCallerDate(i)
72- let id = $t017771816._1
73- let caller = $t017771816._2
74- let date = $t017771816._3
71+ let $t017921831 = idCallerDate(i)
72+ let id = $t017921831._1
73+ let caller = $t017921831._2
74+ let date = $t017921831._3
7575 if (containsElement([admin_addr, toString(this)], caller))
7676 then {
7777 let data = getStrByK(((txid + "_") + STATUS_PENDING))
8383 }
8484
8585
86+
87+@Callable(i)
88+func deleteEntry (entry) = {
89+ let caller = i.caller
90+ if ((caller == admin_addr))
91+ then [DeleteEntry(entry)]
92+ else throw("no")
93+ }
94+
95+
8696 @Verifier(tx)
8797 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
8898
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let bai_assetid = base58'AxGKQRxKo4F2EbhrRq6N2tdLsxtMnpzQsS4QemV6V1W1'
55
66 let admin_addr = Address(base58'3MsG6jPNCrVJUtYB7XJBxS7utWsXAf4n9Vp')
77
88 let dappRunningKey = "conf_dapp_is_running"
99
1010 let maintenanceMSGKey = "conf_maintenance_msg"
1111
1212 let dappRunning = valueOrElse(getBoolean(this, dappRunningKey), true)
1313
1414 let maintenanceMSG = valueOrElse(getString(this, maintenanceMSGKey), "")
1515
1616 let STATUS_PENDING = "PENDING"
1717
1818 let STATUS_PROCESSED = "PROCESSED"
1919
2020 func getStrByK (key) = valueOrElse(getString(this, key), "")
2121
2222
2323 func getPaymentData (i) = if ((size(i.payments) == 0))
2424 then throw("No payment attached")
2525 else {
2626 let payment = value(i.payments[0])
2727 let amount = value(payment.amount)
2828 let asset = value(payment.assetId)
2929 $Tuple2(amount, asset)
3030 }
3131
3232
3333 func idCallerDate (i) = if (!(dappRunning))
3434 then throw(maintenanceMSG)
3535 else $Tuple3(toBase58String(i.transactionId), toBase58String(i.caller.bytes), lastBlock.timestamp)
3636
3737
3838 @Callable(i)
3939 func appRunning (isLive,message) = {
4040 let $t011361175 = idCallerDate(i)
4141 let id = $t011361175._1
4242 let caller = $t011361175._2
4343 let date = $t011361175._3
4444 if (containsElement([admin_addr, toString(this)], caller))
4545 then [BooleanEntry(dappRunningKey, isLive), StringEntry(maintenanceMSGKey, message)]
4646 else throw("You are not allowed to change this")
4747 }
4848
4949
5050
5151 @Callable(i)
5252 func deposit (bnb_addres) = {
5353 let $t014611500 = getPaymentData(i)
5454 let amount = $t014611500._1
5555 let asset = $t014611500._2
5656 if ((asset != bai_assetid))
5757 then throw("Only BAI token accepted")
5858 else {
5959 let $t015821621 = idCallerDate(i)
6060 let id = $t015821621._1
6161 let caller = $t015821621._2
6262 let date = $t015821621._3
63-[StringEntry(((id + "_") + STATUS_PENDING), ((caller + "_") + toString(amount)))]
63+[StringEntry(((id + "_") + STATUS_PENDING), ((((caller + "_") + toString(amount)) + "_") + bnb_addres))]
6464 }
6565 }
6666
6767
6868
6969 @Callable(i)
7070 func finalize (txid,bnb_txhash) = {
71- let $t017771816 = idCallerDate(i)
72- let id = $t017771816._1
73- let caller = $t017771816._2
74- let date = $t017771816._3
71+ let $t017921831 = idCallerDate(i)
72+ let id = $t017921831._1
73+ let caller = $t017921831._2
74+ let date = $t017921831._3
7575 if (containsElement([admin_addr, toString(this)], caller))
7676 then {
7777 let data = getStrByK(((txid + "_") + STATUS_PENDING))
7878 if ((data == ""))
7979 then throw("Request not found")
8080 else [StringEntry(((txid + "_") + STATUS_PROCESSED), ((data + "_") + bnb_txhash))]
8181 }
8282 else throw("You are not allowed to change this")
8383 }
8484
8585
86+
87+@Callable(i)
88+func deleteEntry (entry) = {
89+ let caller = i.caller
90+ if ((caller == admin_addr))
91+ then [DeleteEntry(entry)]
92+ else throw("no")
93+ }
94+
95+
8696 @Verifier(tx)
8797 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
8898

github/deemru/w8io/026f985 
28.95 ms