tx · AGjNe4S8wrqH72Kj8jqX7XXEtZrPpGUVakMAaiTrvuxY 3N99w48M6Xg9uY1R1HoDHmBpQff3Ni5vGpm: -0.05000000 Waves 2021.03.26 14:05 [1454625] smart account 3N99w48M6Xg9uY1R1HoDHmBpQff3Ni5vGpm > SELF 0.00000000 Waves
{ "type": 13, "id": "AGjNe4S8wrqH72Kj8jqX7XXEtZrPpGUVakMAaiTrvuxY", "fee": 5000000, "feeAssetId": null, "timestamp": 1616756709492, "version": 2, "chainId": 84, "sender": "3N99w48M6Xg9uY1R1HoDHmBpQff3Ni5vGpm", "senderPublicKey": "HGQSJy3ik1sdoefTWS4qQBxDJZThuqyPuQmf1z87CU7q", "proofs": [ "eu42vuxNH3vWzMKKAGSC7Wxh1yGyw2Cc1oPg6DWvSL1AYHkbZwPyrxvNDED8jt3Y3E7sk3VEiE1pcBFTwf62Rud" ], "script": "base64:AAIEAAAAAAAAAAkIAhIAEgMKAQgAAAADAAAAAAlsaWN6YmFORlQJAQAAABFAZXh0ck5hdGl2ZSgxMDUwKQAAAAIFAAAABHRoaXMCAAAACU5GVHRva2VucwAAAAAMa29sZWpueXRva2VuCQAAZAAAAAIFAAAACWxpY3piYU5GVAAAAAAAAAAAAQAAAAAPa29sZWpueXRva2VudHh0CQABpAAAAAEFAAAADGtvbGVqbnl0b2tlbgAAAAIAAAABaQEAAAAJY3JlYXRlTkZUAAAAAAMJAABmAAAAAgUAAAAMa29sZWpueXRva2VuAAAAAAAAAABkCQAAAgAAAAECAAAAIk5pZSBtb3puYSBqdcW8IGdlbmVyb3dhxIcgdG9rZW7Ds3cDAwkAAGYAAAACAAAAAAA7msoACAkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAAAAAZhbW91bnQGCQEAAAACIT0AAAACCAkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAAAAAdhc3NldElkBQAAAAR1bml0CQAAAgAAAAECAAAAKktvc3p0IHd5Z2VuZXJvd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AAAlORlRpc3N1ZXIJAAACAAAAAQIAAAAMQsWCxJlkbnkgTkZUAwkBAAAAAiE9AAAAAgkAA/AAAAACCAUAAAABagAAAAZjYWxsZXIJAAJZAAAAAQUAAAADTkZUAAAAAAAAAAABCQAAAgAAAAECAAAAFk5pZSBwb3NpYWRhc3ogdGVnbyBORlQDCQAAAAAAAAIJAAQbAAAAAgUAAAAEdGhpcwkAASwAAAACCQABLAAAAAIJAAQlAAAAAQgFAAAAAWoAAAAGY2FsbGVyAgAAAAFfBQAAAANORlQGCQAAAgAAAAECAAAAG0p1xbwgcG9kcGlzeXdhxYJlxZsgdHltIE5GVAMDCQAAZgAAAAIAAAAAAAX14QAICQABkQAAAAIIBQAAAAFqAAAACHBheW1lbnRzAAAAAAAAAAAAAAAABmFtb3VudAYJAQAAAAIhPQAAAAIICQABkQAAAAIIBQAAAAFqAAAACHBheW1lbnRzAAAAAAAAAAAAAAAAB2Fzc2V0SWQFAAAABHVuaXQJAAACAAAAAQIAAAAlS29zenQgcG9kcGlzYW5pYSBwcnpleiBORlQgdG8gMSBXQVZFUwQAAAAObGljemJhcG9kcGlzb3cEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwkABCUAAAABCAUAAAABagAAAAZjYWxsZXIDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABdAUAAAAHJG1hdGNoMAUAAAABdAAAAAAAAAAAAAkABEwAAAACCQEAAAAMQm9vbGVhbkVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIJAAQlAAAAAQgFAAAAAWoAAAAGY2FsbGVyAgAAAAFfBQAAAANORlQGCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQAEJQAAAAEIBQAAAAFqAAAABmNhbGxlcgkAAGQAAAACBQAAAA5saWN6YmFwb2RwaXNvdwAAAAAAAAAAAQUAAAADbmlsAAAAAMGbeGw=", "height": 1454625, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HppTnC9r1qtXxLeCvvKjTPdXwt5PjykDXHoRQkrtn2dt Next: 2c78aHfeckApuDzc5JbELsqEfCn2mteDNmYJYK65434F Diff:
Old | New | Differences | |
---|---|---|---|
37 | 37 | then throw("Nie posiadasz tego NFT") | |
38 | 38 | else if ((getBoolean(this, ((toString(j.caller) + "_") + NFT)) == true)) | |
39 | 39 | then throw("Już podpisywałeś tym NFT") | |
40 | - | else { | |
41 | - | let liczbapodpisow = match getInteger(this, toString(j.caller)) { | |
42 | - | case t: Int => | |
43 | - | t | |
44 | - | case _ => | |
45 | - | 0 | |
46 | - | } | |
40 | + | else if (if ((100000000 > j.payments[0].amount)) | |
41 | + | then true | |
42 | + | else (j.payments[0].assetId != unit)) | |
43 | + | then throw("Koszt podpisania przez NFT to 1 WAVES") | |
44 | + | else { | |
45 | + | let liczbapodpisow = match getInteger(this, toString(j.caller)) { | |
46 | + | case t: Int => | |
47 | + | t | |
48 | + | case _ => | |
49 | + | 0 | |
50 | + | } | |
47 | 51 | [BooleanEntry(((toString(j.caller) + "_") + NFT), true), IntegerEntry(toString(j.caller), (liczbapodpisow + 1))] | |
48 | - | } | |
52 | + | } | |
49 | 53 | } | |
50 | 54 | ||
51 | 55 |
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 (if ((1000000000 > i.payments[0].amount)) | |
14 | 14 | then true | |
15 | 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 1000WAVES"), "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 | [asset, IntegerEntry("NFTtokens", (liczbaNFT + 1)), StringEntry((kolejnytokentxt + " token"), nazwatokena), ScriptTransfer(i.caller, 1, assetId)] | |
22 | 22 | } | |
23 | 23 | ||
24 | 24 | ||
25 | 25 | ||
26 | 26 | @Callable(j) | |
27 | 27 | func singnNFT (NFT) = { | |
28 | 28 | let NFTissuer = match assetInfo(valueOrErrorMessage(fromBase58String(NFT), "Błędny Asset")) { | |
29 | 29 | case t: Asset => | |
30 | 30 | t.issuer | |
31 | 31 | case _ => | |
32 | 32 | throw("Błędny Asset") | |
33 | 33 | } | |
34 | 34 | if ((this != NFTissuer)) | |
35 | 35 | then throw("Błędny NFT") | |
36 | 36 | else if ((assetBalance(j.caller, fromBase58String(NFT)) != 1)) | |
37 | 37 | then throw("Nie posiadasz tego NFT") | |
38 | 38 | else if ((getBoolean(this, ((toString(j.caller) + "_") + NFT)) == true)) | |
39 | 39 | then throw("Już podpisywałeś tym NFT") | |
40 | - | else { | |
41 | - | let liczbapodpisow = match getInteger(this, toString(j.caller)) { | |
42 | - | case t: Int => | |
43 | - | t | |
44 | - | case _ => | |
45 | - | 0 | |
46 | - | } | |
40 | + | else if (if ((100000000 > j.payments[0].amount)) | |
41 | + | then true | |
42 | + | else (j.payments[0].assetId != unit)) | |
43 | + | then throw("Koszt podpisania przez NFT to 1 WAVES") | |
44 | + | else { | |
45 | + | let liczbapodpisow = match getInteger(this, toString(j.caller)) { | |
46 | + | case t: Int => | |
47 | + | t | |
48 | + | case _ => | |
49 | + | 0 | |
50 | + | } | |
47 | 51 | [BooleanEntry(((toString(j.caller) + "_") + NFT), true), IntegerEntry(toString(j.caller), (liczbapodpisow + 1))] | |
48 | - | } | |
52 | + | } | |
49 | 53 | } | |
50 | 54 | ||
51 | 55 |
github/deemru/w8io/03bedc9 28.31 ms ◑![]()