tx · 7y9K5hXGQXHfMrHwBMng8jZx6p6EengTiHd1nMFLT3Zb

3N3ed4RrX8NHhw4mX3yu5obUK6uqGFcA6ar:  -0.01000000 Waves

2021.12.23 12:57 [1846750] smart account 3N3ed4RrX8NHhw4mX3yu5obUK6uqGFcA6ar > SELF 0.00000000 Waves

{ "type": 13, "id": "7y9K5hXGQXHfMrHwBMng8jZx6p6EengTiHd1nMFLT3Zb", "fee": 1000000, "feeAssetId": null, "timestamp": 1640253448664, "version": 2, "chainId": 84, "sender": "3N3ed4RrX8NHhw4mX3yu5obUK6uqGFcA6ar", "senderPublicKey": "ArpGQ46FtvbDmJXQ7qnPrTSHBq85zSM6TcYpUkVJWqJo", "proofs": [ "5C21oh1ZEr97tbnr1NH8d1yvWQjNXJDqujxkrUNA8pNCyDsSrpCpdiWpqcDNH5rKQ8sct6fMCe259scf2H5bZpKr" ], "script": "base64:AAIFAAAAAAAAAAwIAhIDCgEIEgMKAQgAAAACAQAAAAx3cml0ZUludGVnZXIAAAACAAAAA2tleQAAAAxpbnRlZ2VyVmFsdWUJAQAAAAxJbnRlZ2VyRW50cnkAAAACBQAAAANrZXkFAAAADGludGVnZXJWYWx1ZQEAAAALd3JpdGVTdHJpbmcAAAACAAAAA2tleQAAAAtzdHJpbmdWYWx1ZQkBAAAAC1N0cmluZ0VudHJ5AAAAAgUAAAADa2V5BQAAAAtzdHJpbmdWYWx1ZQAAAAIAAAABaQEAAAAJYnV5VGlja2V0AAAAAQAAAAdldmVudElkBAAAAA9wdWJsaWNLZXlDYWxsZXIJAAJYAAAAAQgFAAAAAWkAAAAPY2FsbGVyUHVibGljS2V5BAAAAAVhc3NldAkABEIAAAAFAgAAAAtUZXN0IFRpY2tldAIAAAAZTkZULVRpY2tldGluZyB0ZXN0IHRpY2tldAAAAAAAAAAAAQAAAAAAAAAAAAcEAAAAB3Rva2VuSWQJAAJYAAAAAQkABDgAAAABBQAAAAVhc3NldAkABEwAAAACBQAAAAVhc3NldAkABEwAAAACCQEAAAALd3JpdGVTdHJpbmcAAAACCQABLAAAAAIFAAAAB3Rva2VuSWQCAAAACl9QdWJsaWNLZXkFAAAAD3B1YmxpY0tleUNhbGxlcgkABEwAAAACCQEAAAALd3JpdGVTdHJpbmcAAAACCQABLAAAAAIFAAAAB3Rva2VuSWQCAAAACF9FdmVudElkBQAAAAdldmVudElkCQAETAAAAAIJAQAAAAt3cml0ZVN0cmluZwAAAAIJAAEsAAAAAgUAAAAHdG9rZW5JZAIAAAAHX1N0YXR1cwIAAAAIaW5hY3RpdmUJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyAAAAAAAAAAABCQACWQAAAAEFAAAAB3Rva2VuSWQFAAAAA25pbAAAAAFpAQAAAAxjaGFuZ2VTdGF0dXMAAAABAAAABW5mdElkBAAAAAZzdGF0dXMJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAQAAABFAZXh0ck5hdGl2ZSgxMDU4KQAAAAEJAAEsAAAAAgUAAAAFbmZ0SWQCAAAAB19TdGF0dXMCAAAAAAMJAAAAAAAAAgUAAAAGc3RhdHVzAgAAAAhpbmFjdGl2ZQkABEwAAAACCQEAAAALd3JpdGVTdHJpbmcAAAACCQABLAAAAAIFAAAABW5mdElkAgAAAAdfU3RhdHVzAgAAAAhyZWRlZW1lZAUAAAADbmlsCQAAAgAAAAECAAAAEE5vIHZhbGlkIHN0YXR1cyEAAAAAwLPEbQ==", "height": 1846750, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EDiZ1riycn41xoFE6iBqFNBcYgqfDMHPtWZgGWxipxtF Next: none Diff:
OldNewDifferences
1616 }
1717
1818
19+
20+@Callable(i)
21+func changeStatus (nftId) = {
22+ let status = valueOrElse(getStringValue((nftId + "_Status")), "")
23+ if ((status == "inactive"))
24+ then [writeString((nftId + "_Status"), "redeemed")]
25+ else throw("No valid status!")
26+ }
27+
28+
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func writeInteger (key,integerValue) = IntegerEntry(key, integerValue)
55
66
77 func writeString (key,stringValue) = StringEntry(key, stringValue)
88
99
1010 @Callable(i)
1111 func buyTicket (eventId) = {
1212 let publicKeyCaller = toBase58String(i.callerPublicKey)
1313 let asset = Issue("Test Ticket", "NFT-Ticketing test ticket", 1, 0, false)
1414 let tokenId = toBase58String(calculateAssetId(asset))
1515 [asset, writeString((tokenId + "_PublicKey"), publicKeyCaller), writeString((tokenId + "_EventId"), eventId), writeString((tokenId + "_Status"), "inactive"), ScriptTransfer(i.caller, 1, fromBase58String(tokenId))]
1616 }
1717
1818
19+
20+@Callable(i)
21+func changeStatus (nftId) = {
22+ let status = valueOrElse(getStringValue((nftId + "_Status")), "")
23+ if ((status == "inactive"))
24+ then [writeString((nftId + "_Status"), "redeemed")]
25+ else throw("No valid status!")
26+ }
27+
28+

github/deemru/w8io/026f985 
23.00 ms