tx · 5UfWwd8UygKEG7SE9xGzvhHU4jGWCSLWMm1Jr21p16Zp 3N2Fq3xoRamZ62SFkonL1kcSs9womjpF7KQ: -0.00400000 Waves 2022.07.04 20:02 [2125202] smart account 3N2Fq3xoRamZ62SFkonL1kcSs9womjpF7KQ > SELF 0.00000000 Waves
{ "type": 13, "id": "5UfWwd8UygKEG7SE9xGzvhHU4jGWCSLWMm1Jr21p16Zp", "fee": 400000, "feeAssetId": null, "timestamp": 1656954129743, "version": 2, "chainId": 84, "sender": "3N2Fq3xoRamZ62SFkonL1kcSs9womjpF7KQ", "senderPublicKey": "9s1gudEMHm746dNqnAUyThSzsf5cNdcNTuBE1ABNtZ5C", "proofs": [ "23dKaVA92wRaGaqqDrRsr8njh6EoeAHmTV5QEX6ELfobRjFJvNDcyiShJpEAF4VtPhLV4tweqSwuDHZ9e3rDsd4Z" ], "script": "base64:AAIFAAAAAAAAAAwIAhIGCgQICAgIEgAAAAADAQAAAA10cnlHZXRJbnRlZ2VyAAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWIFAAAAByRtYXRjaDAFAAAAAWIAAAAAAAAAAAABAAAADHRyeUdldFN0cmluZwAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFiBQAAAAckbWF0Y2gwBQAAAAFiAgAAAAABAAAACGNoZWNrTkZUAAAAAQAAAAVhc3NldAMDAwkAAAAAAAACCAgFAAAABWFzc2V0AAAABmlzc3VlcgAAAAVieXRlcwgFAAAABHRoaXMAAAAFYnl0ZXMJAAAAAAAAAggFAAAABWFzc2V0AAAACGRlY2ltYWxzAAAAAAAAAAAABwkAAAAAAAACCAUAAAAFYXNzZXQAAAAKcmVpc3N1YWJsZQcHCQAAA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AAgkAASwAAAACCQABLAAAAAICAAAAC2NvbGxlY3Rpb25fBQAAABBjb2xsZWN0aW9uRG9tYWluAgAAAAVfc2l6ZQkAAGUAAAACBQAAAAZuZnROdW0AAAAAAAAAAAEJAARMAAAAAgUAAAAQdXBkYXRlQ29sbGVjdGlvbgkABEwAAAACCQEAAAAEQnVybgAAAAIFAAAAB2Fzc2V0SWQAAAAAAAAAAAEJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQkAASwAAAACCQABLAAAAAICAAAABG5mdF8FAAAACmFzc2V0SWRTdHICAAAABV9kYXRhCQAETAAAAAIJAQAAAAtEZWxldGVFbnRyeQAAAAEJAAEsAAAAAgkAASwAAAACAgAAAARuZnRfBQAAAAphc3NldElkU3RyAgAAAAZfaW1hZ2UJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQkAASwAAAACCQABLAAAAAICAAAABG5mdF8FAAAACmFzc2V0SWRTdHICAAAAB19pc3N1ZXIJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQkAASwAAAACCQABLAAAAAIJAAEsAAAAAgIAAAALY29sbGVjdGlvbl8FAAAAEGNvbGxlY3Rpb25Eb21haW4CAAAACV9hc3NldElkXwUAAAAKYXNzZXRJZFN0cgUAAAADbmlsCQAAAgAAAAECAAAAFkl2YWxpZCBjb2xsZWN0aW9uIG5hbWUJAAACAAAAAQIAAAATSXZhbGlkIE5GVCBhdHRhY2hlZAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V50euPyA==", "height": 2125202, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: 6Qv4iWKXgWXR9Y51btDWgvHPLKJfDf5U8Dvja2m5rAmv Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 5 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | func a (b) = { | |
5 | + | let c = getInteger(this, b) | |
6 | + | if ($isInstanceOf(c, "Int")) | |
7 | + | then { | |
8 | + | let d = c | |
9 | + | d | |
10 | + | } | |
11 | + | else 0 | |
12 | + | } | |
13 | + | ||
14 | + | ||
15 | + | func e (b) = { | |
16 | + | let c = getString(this, b) | |
17 | + | if ($isInstanceOf(c, "String")) | |
18 | + | then { | |
19 | + | let d = c | |
20 | + | d | |
21 | + | } | |
22 | + | else "" | |
23 | + | } | |
24 | + | ||
25 | + | ||
26 | + | func f (g) = if (if (if ((g.issuer.bytes == this.bytes)) | |
27 | + | then (g.decimals == 0) | |
28 | + | else false) | |
29 | + | then (g.reissuable == false) | |
30 | + | else false) | |
31 | + | then (g.quantity == 1) | |
32 | + | else false | |
33 | + | ||
34 | + | ||
35 | + | @Callable(h) | |
36 | + | func createNFT (i,j,k,l) = if ((toString(h.caller) == "3MuocfPorcMAUnSc35WpLgUKFQJKm6RC55Z")) | |
37 | + | then throw("issuance of new NFTs is limited") | |
38 | + | else if ((indexOf(k, "https://") != 0)) | |
39 | + | then throw("https link to image required") | |
40 | + | else { | |
41 | + | let g = Issue(i, j, 1, 0, false, unit, 0) | |
42 | + | let m = calculateAssetId(g) | |
43 | + | let n = toBase58String(m) | |
44 | + | let o = ((toString(h.caller) + "_") + (if ((size(l) > 0)) | |
45 | + | then l | |
46 | + | else "basic")) | |
47 | + | let p = (a((("collection_" + o) + "_size")) + 1) | |
48 | + | $Tuple2([StringEntry((("nft_" + n) + "_data"), (((("{'collection': '" + o) + "', 'num': ") + toString(p)) + "}")), StringEntry((("nft_" + n) + "_image"), k), StringEntry((("nft_" + n) + "_issuer"), toString(h.caller)), IntegerEntry((("collection_" + o) + "_size"), p), StringEntry(((("collection_" + o) + "_assetId_") + n), n), g, ScriptTransfer(h.caller, 1, m)], n) | |
49 | + | } | |
50 | + | ||
51 | + | ||
52 | + | ||
53 | + | @Callable(h) | |
54 | + | func burnNFT () = { | |
55 | + | let m = value(value(h.payments[0]).assetId) | |
56 | + | let g = value(assetInfo(m)) | |
57 | + | if (if ((value(h.payments[0]).amount == 1)) | |
58 | + | then f(g) | |
59 | + | else false) | |
60 | + | then { | |
61 | + | let n = toBase58String(m) | |
62 | + | let q = e((("nft_" + n) + "_issuer")) | |
63 | + | let r = e((("nft_" + n) + "_data")) | |
64 | + | let s = split(r, ", ") | |
65 | + | let t = split(s[0], ": ") | |
66 | + | let o = dropRight(drop(t[1], 1), 1) | |
67 | + | let p = a((("collection_" + o) + "_size")) | |
68 | + | if ((p > 0)) | |
69 | + | then { | |
70 | + | let u = if ((p == 1)) | |
71 | + | then DeleteEntry((("collection_" + o) + "_size")) | |
72 | + | else IntegerEntry((("collection_" + o) + "_size"), (p - 1)) | |
73 | + | [u, Burn(m, 1), DeleteEntry((("nft_" + n) + "_data")), DeleteEntry((("nft_" + n) + "_image")), DeleteEntry((("nft_" + n) + "_issuer")), DeleteEntry(((("collection_" + o) + "_assetId_") + n))] | |
74 | + | } | |
75 | + | else throw("Ivalid collection name") | |
76 | + | } | |
77 | + | else throw("Ivalid NFT attached") | |
78 | + | } | |
79 | + | ||
80 | + | ||
81 | + | @Verifier(v) | |
82 | + | func w () = sigVerify(v.bodyBytes, v.proofs[0], v.senderPublicKey) | |
83 | + |
github/deemru/w8io/026f985 51.38 ms ◑