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:
Old | New | Differences | |
---|---|---|---|
16 | 16 | } | |
17 | 17 | ||
18 | 18 | ||
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 | + |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func writeInteger (key,integerValue) = IntegerEntry(key, integerValue) | |
5 | 5 | ||
6 | 6 | ||
7 | 7 | func writeString (key,stringValue) = StringEntry(key, stringValue) | |
8 | 8 | ||
9 | 9 | ||
10 | 10 | @Callable(i) | |
11 | 11 | func buyTicket (eventId) = { | |
12 | 12 | let publicKeyCaller = toBase58String(i.callerPublicKey) | |
13 | 13 | let asset = Issue("Test Ticket", "NFT-Ticketing test ticket", 1, 0, false) | |
14 | 14 | let tokenId = toBase58String(calculateAssetId(asset)) | |
15 | 15 | [asset, writeString((tokenId + "_PublicKey"), publicKeyCaller), writeString((tokenId + "_EventId"), eventId), writeString((tokenId + "_Status"), "inactive"), ScriptTransfer(i.caller, 1, fromBase58String(tokenId))] | |
16 | 16 | } | |
17 | 17 | ||
18 | 18 | ||
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 ◑