tx · HBguCLRRzqzGJbHCZjQZEk4fJJKPfVZhDBn2268hAgzY 3N99w48M6Xg9uY1R1HoDHmBpQff3Ni5vGpm: -0.05000000 Waves 2021.03.26 13:31 [1454592] smart account 3N99w48M6Xg9uY1R1HoDHmBpQff3Ni5vGpm > SELF 0.00000000 Waves
{ "type": 13, "id": "HBguCLRRzqzGJbHCZjQZEk4fJJKPfVZhDBn2268hAgzY", "fee": 5000000, "feeAssetId": null, "timestamp": 1616754685648, "version": 2, "chainId": 84, "sender": "3N99w48M6Xg9uY1R1HoDHmBpQff3Ni5vGpm", "senderPublicKey": "HGQSJy3ik1sdoefTWS4qQBxDJZThuqyPuQmf1z87CU7q", "proofs": [ "53BV5mu47WzTRpvvFPWQ3fJPQweYSWZw9LvWw4xHq9nUyRYYWHTwgs9jsDZhRN9x6F9S8dKWAmG6wtv3Ei8P7cak" ], "script": "base64:AAIEAAAAAAAAAAkIAhIAEgMKAQgAAAADAAAAAAlsaWN6YmFORlQJAQAAABFAZXh0ck5hdGl2ZSgxMDUwKQAAAAIFAAAABHRoaXMCAAAACU5GVHRva2VucwAAAAAMa29sZWpueXRva2VuCQAAZAAAAAIFAAAACWxpY3piYU5GVAAAAAAAAAAAAQAAAAAPa29sZWpueXRva2VudHh0CQABpAAAAAEFAAAADGtvbGVqbnl0b2tlbgAAAAIAAAABaQEAAAAJY3JlYXRlTkZUAAAAAAMJAABmAAAAAgUAAAAMa29sZWpueXRva2VuAAAAAAAAAABkCQAAAgAAAAECAAAAIk5pZSBtb3puYSBqdcW8IGdlbmVyb3dhxIcgdG9rZW7Ds3cDCQAAZgAAAAIAAAAAAAAAAAoICQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAAAAAABmFtb3VudAkAAAIAAAABAgAAACpLb3N6dCB3eWdlbmVyb3dhbmlhIG5vd2VnbyBORlQgdG8gMTAgV0FWRVMEAAAABWFzc2V0CQAEQwAAAAcJAAEsAAAAAgUAAAAPa29sZWpueXRva2VudH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AAMQsWCxJlkbnkgTkZUAwkBAAAAAiE9AAAAAgkAA/AAAAACCAUAAAABagAAAAZjYWxsZXIJAAJZAAAAAQUAAAADTkZUAAAAAAAAAAABCQAAAgAAAAECAAAAFk5pZSBwb3NpYWRhc3ogdGVnbyBORlQDCQAAAAAAAAIJAAQbAAAAAgUAAAAEdGhpcwkAASwAAAACCQABLAAAAAIJAAQlAAAAAQgFAAAAAWoAAAAGY2FsbGVyAgAAAAFfBQAAAANORlQGCQAAAgAAAAECAAAAG0p1xbwgcG9kcGlzeXdhxYJlxZsgdHltIE5GVAQAAAAObGljemJhcG9kcGlzb3cEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwkABCUAAAABCAUAAAABagAAAAZjYWxsZXIDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABdAUAAAAHJG1hdGNoMAUAAAABdAAAAAAAAAAAAAkABEwAAAACCQEAAAAMQm9vbGVhbkVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIJAAQlAAAAAQgFAAAAAWoAAAAGY2FsbGVyAgAAAAFfBQAAAANORlQGCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQAEJQAAAAEIBQAAAAFqAAAABmNhbGxlcgkAAGQAAAACBQAAAA5saWN6YmFwb2RwaXNvdwAAAAAAAAAAAQUAAAADbmlsAAAAAPkisdo=", "height": 1454592, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3z4DhU9saLSDEdQRmuKs3MRgezannQUpdJuDeXKhi5xW Next: 9rpRxdEfGUeqskLEvjNMPTHtbRVtMrmZSoBEwBDdNivm Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let liczbaNFT = getIntegerValue(this, "NFTtokens") | |
5 | 5 | ||
6 | 6 | let kolejnytoken = (liczbaNFT + 1) | |
7 | 7 | ||
8 | 8 | let kolejnytokentxt = toString(kolejnytoken) | |
9 | 9 | ||
10 | 10 | @Callable(i) | |
11 | 11 | func createNFT () = if ((kolejnytoken > 100)) | |
12 | 12 | then throw("Nie mozna już generować tokenów") | |
13 | 13 | else if ((10 > i.payments[0].amount)) | |
14 | 14 | then throw("Koszt wygenerowania nowego NFT to 10 WAVES") | |
15 | 15 | else { | |
16 | 16 | let asset = Issue((kolejnytokentxt + " 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) | |
17 | 17 | let assetId = calculateAssetId(asset) | |
18 | 18 | let nazwatokena = toBase58String(assetId) | |
19 | 19 | let a = transferTransactionById(base58'3N99w48M6Xg9uY1R1HoDHmBpQff3Ni5vGpm') | |
20 | 20 | [asset, IntegerEntry("NFTtokens", (liczbaNFT + 1)), StringEntry((kolejnytokentxt + " token"), nazwatokena), ScriptTransfer(i.caller, 1, assetId)] | |
21 | 21 | } | |
22 | 22 | ||
23 | 23 | ||
24 | 24 | ||
25 | 25 | @Callable(j) | |
26 | 26 | func singnNFT (NFT) = { | |
27 | 27 | let NFTissuer = match assetInfo(valueOrErrorMessage(fromBase58String(NFT), "Błędny Asset")) { | |
28 | 28 | case t: Asset => | |
29 | 29 | t.issuer | |
30 | 30 | case _ => | |
31 | 31 | throw("Błędny Asset") | |
32 | 32 | } | |
33 | 33 | if ((this != NFTissuer)) | |
34 | 34 | then throw("Błędny NFT") | |
35 | 35 | else if ((assetBalance(j.caller, fromBase58String(NFT)) != 1)) | |
36 | 36 | then throw("Nie posiadasz tego NFT") | |
37 | 37 | else if ((getBoolean(this, ((toString(j.caller) + "_") + NFT)) == true)) | |
38 | 38 | then throw("Już podpisywałeś tym NFT") | |
39 | 39 | else { | |
40 | 40 | let liczbapodpisow = match getInteger(this, toString(j.caller)) { | |
41 | 41 | case t: Int => | |
42 | 42 | t | |
43 | 43 | case _ => | |
44 | 44 | 0 | |
45 | 45 | } | |
46 | 46 | [BooleanEntry(((toString(j.caller) + "_") + NFT), true), IntegerEntry(toString(j.caller), (liczbapodpisow + 1))] | |
47 | 47 | } | |
48 | 48 | } | |
49 | 49 | ||
50 | 50 |
github/deemru/w8io/169f3d6 24.35 ms ◑