tx · FDGGLedXrXhD2SQ8hjBPjX3d4jSPDG36cniShg2ErdyD

3N65E1rYWAxQMCLg27pRxBFtAt3bPcH3pys:  -0.01400000 Waves

2022.02.11 15:39 [1918959] smart account 3N65E1rYWAxQMCLg27pRxBFtAt3bPcH3pys > SELF 0.00000000 Waves

{ "type": 13, "id": "FDGGLedXrXhD2SQ8hjBPjX3d4jSPDG36cniShg2ErdyD", "fee": 1400000, "feeAssetId": null, "timestamp": 1644583190918, "version": 2, "chainId": 84, "sender": "3N65E1rYWAxQMCLg27pRxBFtAt3bPcH3pys", "senderPublicKey": "HUBVsBcuExqVSbV3mSVhpdKfgihF2nwdtpGmpVLRwxEN", "proofs": [ "52gUe1qwNNqLbmK84eDQb582EjKrMfbjpRpg6JPbm7frNjC6x4wJ9bpxp7GdnZgyNbRZzgiPraNQZQtM7HTEkgpR" ], "script": "base64:AAIFAAAAAAAAAAkIAhIAEgMKAQgAAAABAAAAAAd0b2tlbklkAgAAACw2bjdMazYyQVpVSlRkVFlIeFNnTllUN29wYTJoQVlKQWtudEJDbnlrYzNDRgAAAAIAAAABaQEAAAALYWNjZXB0VG9rZW4AAAAABAAAAAJvaQkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAQAAAADcG10AwkAAAAAAAACCQABkAAAAAEIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAABCQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAACQAAAgAAAAECAAAAFUF0dGFjaCBwYXltZW50IHBsZWFzZQMJAABnAAAAAgAAAAAAAAAAAAgFAAAAA3BtdAAAAAZhbW91bnQJAAACAAAAAQIAAAAdUGF5bWVudCBhbW91bnQgc2hvdWxkIGJlID4gMCAEAAAABWFzc2lkBAAAAAckbWF0Y2gwCAUAAAADcG10AAAAB2Fzc2V0SWQDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAACkJ5dGVWZWN0b3IEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEJAAGbAAAAAQIAAAADZmRzAwkAAAAAAAACCQACWAAAAAEFAAAABWFzc2lkBQAAAAd0b2tlbklkCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIJAAQlAAAAAQgFAAAAAWkAAAAGY2FsbGVyCQACWAAAAAEFAAAABWFzc2lkBQAAAANuaWwJAAACAAAAAQIAAAANSW52YWxpZCBhc3NldAAAAAFpAQAAAAh0cmFuc2ZlcgAAAAEAAAAJcmVjaXBpZW50BAAAAANwbXQDCQAAAAAAAAIJAAGQAAAAAQgFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAEJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAJAAACAAAAAQIAAAAPQXR0YWNoIHBheW1lbnRzBAAAAAdhc3NldElkCAUAAAADcG10AAAAB2Fzc2V0SWQEAAAABmFtb3VudAgFAAAAA3BtdAAAAAZhbW91bnQEAAAAA3JlYwkBAAAAEUBleHRyTmF0aXZlKDEwNjIpAAAAAQUAAAAJcmVjaXBpZW50CQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMFAAAAA3JlYwUAAAAGYW1vdW50BQAAAAdhc3NldElkBQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleR8sUjg=", "height": 1918959, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: J9xqF6HbBMgRmBiBSEaPXGgBQA1RBVd2kpu4RLSDiajK Next: 6QypPrkWmbfXXuKxmhJckxu4NWzeTthXU86nzPKkZ8Ls Diff:
OldNewDifferences
1818 case _ =>
1919 toBytes("fds")
2020 }
21-[StringEntry(toString(i.caller), toBase58String(assid))]
21+ if ((toBase58String(assid) == tokenId))
22+ then [StringEntry(toString(i.caller), toBase58String(assid))]
23+ else throw("Invalid asset")
2224 }
2325 }
2426
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let tokenId = "6n7Lk62AZUJTdTYHxSgNYT7opa2hAYJAkntBCnykc3CF"
55
66 @Callable(i)
77 func acceptToken () = {
88 let oi = i.payments[0]
99 let pmt = if ((size(i.payments) == 1))
1010 then i.payments[0]
1111 else throw("Attach payment please")
1212 if ((0 >= pmt.amount))
1313 then throw("Payment amount should be > 0 ")
1414 else {
1515 let assid = match pmt.assetId {
1616 case a: ByteVector =>
1717 a
1818 case _ =>
1919 toBytes("fds")
2020 }
21-[StringEntry(toString(i.caller), toBase58String(assid))]
21+ if ((toBase58String(assid) == tokenId))
22+ then [StringEntry(toString(i.caller), toBase58String(assid))]
23+ else throw("Invalid asset")
2224 }
2325 }
2426
2527
2628
2729 @Callable(i)
2830 func transfer (recipient) = {
2931 let pmt = if ((size(i.payments) == 1))
3032 then i.payments[0]
3133 else throw("Attach payments")
3234 let assetId = pmt.assetId
3335 let amount = pmt.amount
3436 let rec = addressFromStringValue(recipient)
3537 [ScriptTransfer(rec, amount, assetId)]
3638 }
3739
3840
3941 @Verifier(tx)
4042 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
4143

github/deemru/w8io/026f985 
20.33 ms