tx · J2piwzJswGHTzQoQyABZofLgNyshQazAwifYJ1H6mRhv 3N99w48M6Xg9uY1R1HoDHmBpQff3Ni5vGpm: -0.05000000 Waves 2021.03.26 12:53 [1454556] smart account 3N99w48M6Xg9uY1R1HoDHmBpQff3Ni5vGpm > SELF 0.00000000 Waves
{ "type": 13, "id": "J2piwzJswGHTzQoQyABZofLgNyshQazAwifYJ1H6mRhv", "fee": 5000000, "feeAssetId": null, "timestamp": 1616752416441, "version": 2, "chainId": 84, "sender": "3N99w48M6Xg9uY1R1HoDHmBpQff3Ni5vGpm", "senderPublicKey": "HGQSJy3ik1sdoefTWS4qQBxDJZThuqyPuQmf1z87CU7q", "proofs": [ "33nHwuQco9osNNbNUvrMgzUP9PWT6fyPnduCfFxCGmjHPS9Z666UQG9xzGtamcLaGS2zw9RKaAXy3w3EKhxiZeJE" ], "script": "base64:AAIEAAAAAAAAAAkIAhIAEgMKAQgAAAADAAAAAAlsaWN6YmFORlQJAQAAABFAZXh0ck5hdGl2ZSgxMDUwKQAAAAIFAAAABHRoaXMCAAAACU5GVHRva2VucwAAAAAMa29sZWpueXRva2VuCQAAZAAAAAIFAAAACWxpY3piYU5GVAAAAAAAAAAAAQAAAAAPa29sZWpueXRva2VudHh0CQABpAAAAAEFAAAADGtvbGVqbnl0b2tlbgAAAAIAAAABaQEAAAAJY3JlYXRlTkZUAAAAAAMJAABmAAAAAgUAAAAMa29sZWpueXRva2VuAAAAAAAAAABkCQAAAgAAAAECAAAAIk5pZSBtb3puYSBqdcW8IGdlbmVyb3dhxIcgdG9rZW7Ds3cDCQEAAAABIQAAAAEDCQAAZwAAAAIICQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAAAAAABmFtb3VudAAAAAAAAAAACgYJAAAAAAAAAggJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAAAAAHYXNzZXRJZAUAAAAEdW5pdAkAAAIAAAABAgAAACpLb3N6dCB3eWdlbmVyb3d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AAAAQIAAAAOQsWCxJlkbnkgQXNzZXQDCQEAAAACIT0AAAACBQAAAAR0aGlzBQAAAAlORlRpc3N1ZXIJAAACAAAAAQIAAAAMQsWCxJlkbnkgTkZUAwkBAAAAAiE9AAAAAgkAA/AAAAACCAUAAAABagAAAAZjYWxsZXIJAAJZAAAAAQUAAAADTkZUAAAAAAAAAAABCQAAAgAAAAECAAAAFk5pZSBwb3NpYWRhc3ogdGVnbyBORlQDCQAAAAAAAAIJAAQbAAAAAgUAAAAEdGhpcwkAASwAAAACCQABLAAAAAIJAAQlAAAAAQgFAAAAAWoAAAAGY2FsbGVyAgAAAAFfBQAAAANORlQGCQAAAgAAAAECAAAAG0p1xbwgcG9kcGlzeXdhxYJlxZsgdHltIE5GVAQAAAAObGljemJhcG9kcGlzb3cEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwkABCUAAAABCAUAAAABagAAAAZjYWxsZXIDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABdAUAAAAHJG1hdGNoMAUAAAABdAAAAAAAAAAAAAkABEwAAAACCQEAAAAMQm9vbGVhbkVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIJAAQlAAAAAQgFAAAAAWoAAAAGY2FsbGVyAgAAAAFfBQAAAANORlQGCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQAEJQAAAAEIBQAAAAFqAAAABmNhbGxlcgkAAGQAAAACBQAAAA5saWN6YmFwb2RwaXNvdwAAAAAAAAAAAQUAAAADbmlsAAAAAAhW2lA=", "height": 1454556, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7nWBfb99gVreTvEf1GcGdFzLN2dPHNePdnssGqSrZkJL Next: Bcab8Ckhp5h5TJFYVTJZ2i3STm1owW4u9HTgcy7ffEVr Diff:
Old | New | Differences | |
---|---|---|---|
11 | 11 | func createNFT () = if ((b > 100)) | |
12 | 12 | then throw("Nie mozna już generować tokenów") | |
13 | 13 | else if (!(if ((d.payments[0].amount >= 10)) | |
14 | - | then | |
15 | - | else | |
14 | + | then true | |
15 | + | else (d.payments[0].assetId == unit))) | |
16 | 16 | then throw("Koszt wygenerowania nowego NFT to 10 WAVES") | |
17 | 17 | else { | |
18 | 18 | let e = Issue((c + " NFT 1000 WAVES"), "Dzięki temu tokenowi mozna uzyskać dotęp do 1000 WAVES pod adresem ... więcej informacji na stronie www", 1, 0, false, unit, 0) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = getIntegerValue(this, "NFTtokens") | |
5 | 5 | ||
6 | 6 | let b = (a + 1) | |
7 | 7 | ||
8 | 8 | let c = toString(b) | |
9 | 9 | ||
10 | 10 | @Callable(d) | |
11 | 11 | func createNFT () = if ((b > 100)) | |
12 | 12 | then throw("Nie mozna już generować tokenów") | |
13 | 13 | else if (!(if ((d.payments[0].amount >= 10)) | |
14 | - | then | |
15 | - | else | |
14 | + | then true | |
15 | + | else (d.payments[0].assetId == unit))) | |
16 | 16 | then throw("Koszt wygenerowania nowego NFT to 10 WAVES") | |
17 | 17 | else { | |
18 | 18 | let e = Issue((c + " NFT 1000 WAVES"), "Dzięki temu tokenowi mozna uzyskać dotęp do 1000 WAVES pod adresem ... więcej informacji na stronie www", 1, 0, false, unit, 0) | |
19 | 19 | let f = calculateAssetId(e) | |
20 | 20 | let g = toBase58String(f) | |
21 | 21 | let h = transferTransactionById(base58'3N99w48M6Xg9uY1R1HoDHmBpQff3Ni5vGpm') | |
22 | 22 | [e, IntegerEntry("NFTtokens", (a + 1)), StringEntry((c + " token"), g), ScriptTransfer(d.caller, 1, f)] | |
23 | 23 | } | |
24 | 24 | ||
25 | 25 | ||
26 | 26 | ||
27 | 27 | @Callable(i) | |
28 | 28 | func singnNFT (j) = { | |
29 | 29 | let k = { | |
30 | 30 | let l = assetInfo(valueOrErrorMessage(fromBase58String(j), "Błędny Asset")) | |
31 | 31 | if ($isInstanceOf(l, "Asset")) | |
32 | 32 | then { | |
33 | 33 | let m = l | |
34 | 34 | m.issuer | |
35 | 35 | } | |
36 | 36 | else throw("Błędny Asset") | |
37 | 37 | } | |
38 | 38 | if ((this != k)) | |
39 | 39 | then throw("Błędny NFT") | |
40 | 40 | else if ((assetBalance(i.caller, fromBase58String(j)) != 1)) | |
41 | 41 | then throw("Nie posiadasz tego NFT") | |
42 | 42 | else if ((getBoolean(this, ((toString(i.caller) + "_") + j)) == true)) | |
43 | 43 | then throw("Już podpisywałeś tym NFT") | |
44 | 44 | else { | |
45 | 45 | let n = { | |
46 | 46 | let l = getInteger(this, toString(i.caller)) | |
47 | 47 | if ($isInstanceOf(l, "Int")) | |
48 | 48 | then { | |
49 | 49 | let m = l | |
50 | 50 | m | |
51 | 51 | } | |
52 | 52 | else 0 | |
53 | 53 | } | |
54 | 54 | [BooleanEntry(((toString(i.caller) + "_") + j), true), IntegerEntry(toString(i.caller), (n + 1))] | |
55 | 55 | } | |
56 | 56 | } | |
57 | 57 | ||
58 | 58 |
github/deemru/w8io/03bedc9 26.77 ms ◑![]()