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