tx · H6mJ7TjZEhbmP9jg2zUQMiQKMUQTMJeEm5viKyvzCmvf

3N9ZoipEVJyQhhijNYxkcomvgGrrEeDhPvN:  -0.01000000 Waves

2023.01.20 21:57 [2413682] smart account 3N9ZoipEVJyQhhijNYxkcomvgGrrEeDhPvN > SELF 0.00000000 Waves

{ "type": 13, "id": "H6mJ7TjZEhbmP9jg2zUQMiQKMUQTMJeEm5viKyvzCmvf", "fee": 1000000, "feeAssetId": null, "timestamp": 1674241081817, "version": 2, "chainId": 84, "sender": "3N9ZoipEVJyQhhijNYxkcomvgGrrEeDhPvN", "senderPublicKey": "2Gtgx295VLiew3CzXqh9eXfFZBTEpDW2nLsrJZ1C4i9J", "proofs": [ "2WBVtUEZ8BRAb1u4WJviqeMoqQbS5pNAgLFuCsKpiPzcDz4q9TTQ9U89akMQvrNrVvBuVXxV9eSoWRwk37c283my" ], "script": "base64:AAIFAAAAAAAAACMIAhIGCgQIBAgEEgMKAQgSBwoFCAgIAQgSAwoBCBIECgIICAAAAAoBAAAAFHRyeUdldFN0cmluZ0V4dGVybmFsAAAAAgAAAAdhZGRyZXNzAAAAA2tleQQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAdhZGRyZXNzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQIAAAAAAQAAABV0cnlHZXRJbnRlZ2VyRXh0ZXJuYWwAAAACAAAAB2FkZHJlc3MAAAADa2V5BAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAAB2FkZHJlc3MFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFiBQAAAAckbWF0Y2gwBQAAAAFiAAAAAAAAAAAAAQAAAAx0cnlHZXRTdHJpbmcAAAABAAAAA2tleQkBAAAAFHRyeUdldFN0cmluZ0V4dGVybmFsAAAAAgUAAAAEdGhpcwUAAAADa2V5AQAAAA10cnlHZXRJbnRlZ2VyAA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AAR0eElkAgAAAAhfb3RoZXJJZAkAAlgAAAABCAUAAAABaQAAAA10cmFuc2FjdGlvbklkBQAAAANuaWwAAAABaQEAAAASZmluYWxpemVPdXRnb2luZ1R4AAAAAgAAAAR0eElkAAAACW90aGVyVHhJZAMJAQAAAAIhPQAAAAIJAQAAAAx0cnlHZXRTdHJpbmcAAAABCQABLAAAAAIJAAEsAAAAAgIAAAADdHhfBQAAAAR0eElkAgAAAAhfb3RoZXJJZAIAAAAACQAAAgAAAAEJAAEsAAAAAgUAAAAEdHhJZAIAAAAcIGlzIGFscmVhZHkgZnVsbHkgcHJvY2Vzc2VkIQMJAQAAAAIhPQAAAAIIBQAAAAFpAAAABmNhbGxlcgUAAAAEdGhpcwkAAAIAAAABAgAAAA1EaXJ0eSBoYWNrZXIhCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACAgAAAAN0eF8FAAAABHR4SWQCAAAAB19zdGF0dXMCAAAACVBST0NFU1NFRAkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgIAAAADdHhfBQAAAAR0eElkAgAAAAhfb3RoZXJJZAUAAAAJb3RoZXJUeElkBQAAAANuaWwAAAAARNozgw==", "height": 2413682, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BmtCAFyoL1LWZ8bfqrZguijQvg5LeDPiUSx4RumV4d5i Next: Gy7Y5SYuuvQe2xccvSYvgv5c4VnwGC4oGwqWieDQ4zFE Diff:
OldNewDifferences
107107 let amount = tryGetInteger((("tx_" + txId) + "_amount"))
108108 let assetId = tryGetString((("tx_" + txId) + "_assetId"))
109109 let specifiqueData = if (tryGetBoolean(reissueable(assetIdToReceive)))
110- then if ((tryGetString(otherChainAssetKey(assetId)) != assetIdToReceive))
111- then throw("Skipping tx, corrupt data!")
110+ then if ((tryGetString(nativeAssetKey(assetId)) != assetIdToReceive))
111+ then throw("RE: Skipping tx, corrupt data!")
112112 else [Reissue(fromBase58String(assetIdToReceive), amount, true)]
113- else if ((tryGetString(nativeAssetKey(assetId)) != assetIdToReceive))
114- then throw("Skipping tx, corrupt data!")
113+ else if ((tryGetString(otherChainAssetKey(assetId)) != assetIdToReceive))
114+ then throw("URE: Skipping tx, corrupt data!")
115115 else nil
116116 (specifiqueData ++ [ScriptTransfer(addressFromStringValue(destination), amount, fromBase58String(assetIdToReceive)), StringEntry((("tx_" + txId) + "_status"), "PROCESSED"), StringEntry((("tx_" + txId) + "_otherId"), toBase58String(i.transactionId))])
117117 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func tryGetStringExternal (address,key) = match getString(address, key) {
55 case a: String =>
66 a
77 case _ =>
88 ""
99 }
1010
1111
1212 func tryGetIntegerExternal (address,key) = match getInteger(address, key) {
1313 case b: Int =>
1414 b
1515 case _ =>
1616 0
1717 }
1818
1919
2020 func tryGetString (key) = tryGetStringExternal(this, key)
2121
2222
2323 func tryGetInteger (key) = tryGetIntegerExternal(this, key)
2424
2525
2626 func tryGetBoolean (key) = match getBoolean(this, key) {
2727 case b: Boolean =>
2828 b
2929 case _ =>
3030 false
3131 }
3232
3333
3434 func assetIdToString (assetId) = toBase58String(value(assetId))
3535
3636
3737 func nativeAssetKey (nativeAsset) = ("nativeAsset_" + nativeAsset)
3838
3939
4040 func otherChainAssetKey (otherChainAsset) = ("otherChainAsset_" + otherChainAsset)
4141
4242
4343 func reissueable (asset) = ("reissueable_" + asset)
4444
4545
4646 func validatePayment (payment) = {
4747 let pmt = value(payment)
4848 if (!(isDefined(pmt.assetId)))
4949 then throw("It needs to be an asset")
5050 else {
5151 let assetDetails = value(assetInfo(value(pmt.assetId)))
5252 if ((1 > pmt.amount))
5353 then throw("You didnt attached a payment!")
5454 else assetIdToString(pmt.assetId)
5555 }
5656 }
5757
5858
5959 @Callable(i)
6060 func initiateAssets (nativeAsset,nativeAssetReissueable,otherChainAsset,otherChainAssetReissueable) = if ((tryGetString(nativeAssetKey(nativeAsset)) != ""))
6161 then throw("Native Asset already listed!")
6262 else if ((tryGetString(otherChainAssetKey(otherChainAsset)) != ""))
6363 then throw("Other Asset already listed!")
6464 else [StringEntry(nativeAssetKey(nativeAsset), otherChainAsset), StringEntry(otherChainAssetKey(otherChainAsset), nativeAsset), BooleanEntry(reissueable(nativeAsset), nativeAssetReissueable), BooleanEntry(reissueable(otherChainAsset), otherChainAssetReissueable)]
6565
6666
6767
6868 @Callable(i)
6969 func initiateOutGoingTx (destination) = {
7070 let payment = i.payments
7171 if ((size(payment) != 1))
7272 then throw("Invalid payment added!")
7373 else if ((1 > payment[0].amount))
7474 then throw("Invalid amount added!")
7575 else {
7676 let assetId = validatePayment(payment[0])
7777 let specifiqueData = if (tryGetBoolean(reissueable(assetId)))
7878 then [Burn(fromBase58String(assetId), payment[0].amount), StringEntry((("tx_" + toBase58String(i.transactionId)) + "_asset_to_receive"), tryGetString(otherChainAssetKey(assetId)))]
7979 else [StringEntry((("tx_" + toBase58String(i.transactionId)) + "_asset_to_receive"), tryGetString(nativeAssetKey(assetId)))]
8080 ([StringEntry((("tx_" + toBase58String(i.transactionId)) + "_dest"), destination), StringEntry((("tx_" + toBase58String(i.transactionId)) + "_status"), "UNPROCESSED")] ++ specifiqueData)
8181 }
8282 }
8383
8484
8585
8686 @Callable(i)
8787 func storeDataIncomingTx (txId,destination,assetId,amount,assetIdToReceive) = if (if ((tryGetString((("tx_" + txId) + "_status")) != ""))
8888 then true
8989 else (tryGetString((("tx_" + txId) + "_dest")) != ""))
9090 then throw((txId + " is already stored!"))
9191 else if ((i.caller != this))
9292 then throw("Dirty hacker")
9393 else [StringEntry((("tx_" + txId) + "_dest"), destination), StringEntry((("tx_" + txId) + "_status"), "UNPROCESSED"), StringEntry((("tx_" + txId) + "_assetId"), assetId), StringEntry((("tx_" + txId) + "_assetId_to_receive"), assetIdToReceive), IntegerEntry((("tx_" + txId) + "_amount"), amount)]
9494
9595
9696
9797 @Callable(i)
9898 func releaseIncomingTx (txId) = {
9999 let status = tryGetString((("tx_" + txId) + "_status"))
100100 if ((status == ""))
101101 then throw("No such txid found!")
102102 else if ((status == "PROCESSED"))
103103 then throw("Already processed!")
104104 else {
105105 let assetIdToReceive = tryGetString((("tx_" + txId) + "_assetId_to_receive"))
106106 let destination = tryGetString((("tx_" + txId) + "_dest"))
107107 let amount = tryGetInteger((("tx_" + txId) + "_amount"))
108108 let assetId = tryGetString((("tx_" + txId) + "_assetId"))
109109 let specifiqueData = if (tryGetBoolean(reissueable(assetIdToReceive)))
110- then if ((tryGetString(otherChainAssetKey(assetId)) != assetIdToReceive))
111- then throw("Skipping tx, corrupt data!")
110+ then if ((tryGetString(nativeAssetKey(assetId)) != assetIdToReceive))
111+ then throw("RE: Skipping tx, corrupt data!")
112112 else [Reissue(fromBase58String(assetIdToReceive), amount, true)]
113- else if ((tryGetString(nativeAssetKey(assetId)) != assetIdToReceive))
114- then throw("Skipping tx, corrupt data!")
113+ else if ((tryGetString(otherChainAssetKey(assetId)) != assetIdToReceive))
114+ then throw("URE: Skipping tx, corrupt data!")
115115 else nil
116116 (specifiqueData ++ [ScriptTransfer(addressFromStringValue(destination), amount, fromBase58String(assetIdToReceive)), StringEntry((("tx_" + txId) + "_status"), "PROCESSED"), StringEntry((("tx_" + txId) + "_otherId"), toBase58String(i.transactionId))])
117117 }
118118 }
119119
120120
121121
122122 @Callable(i)
123123 func finalizeOutgoingTx (txId,otherTxId) = if ((tryGetString((("tx_" + txId) + "_otherId")) != ""))
124124 then throw((txId + " is already fully processed!"))
125125 else if ((i.caller != this))
126126 then throw("Dirty hacker!")
127127 else [StringEntry((("tx_" + txId) + "_status"), "PROCESSED"), StringEntry((("tx_" + txId) + "_otherId"), otherTxId)]
128128
129129

github/deemru/w8io/169f3d6 
32.34 ms