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