tx · 6de97xuFRzVFJQNVKShGt2R3obdVtxZRtVFWz9zqAdSK 3N99w48M6Xg9uY1R1HoDHmBpQff3Ni5vGpm: -0.05000000 Waves 2021.04.05 22:07 [1469547] smart account 3N99w48M6Xg9uY1R1HoDHmBpQff3Ni5vGpm > SELF 0.00000000 Waves
{ "type": 13, "id": "6de97xuFRzVFJQNVKShGt2R3obdVtxZRtVFWz9zqAdSK", "fee": 5000000, "feeAssetId": null, "timestamp": 1617649694989, "version": 2, "chainId": 84, "sender": "3N99w48M6Xg9uY1R1HoDHmBpQff3Ni5vGpm", "senderPublicKey": "HGQSJy3ik1sdoefTWS4qQBxDJZThuqyPuQmf1z87CU7q", "proofs": [ "g1cjAL1tvtyJWojDKBMDMWTfHh3K8tBNwb5ye5kcmsrPazHzu9rEHfXxxJwE1mm2sAkaKSukLf2Gov1csh4X3ps" ], "script": "base64:AAIEAAAAAAAAAAkIAhIAEgMKAQgAAAADAAAAAAlsaWN6YmFORlQJAQAAABFAZXh0ck5hdGl2ZSgxMDUwKQAAAAIFAAAABHRoaXMCAAAACU5GVHRva2VucwAAAAAMa29sZWpueXRva2VuCQAAZAAAAAIFAAAACWxpY3piYU5GVAAAAAAAAAAAAQAAAAAPa29sZWpueXRva2VudHh0CQABpAAAAAEFAAAADGtvbGVqbnl0b2tlbgAAAAIAAAABaQEAAAAJY3JlYXRlTkZUAAAAAAMJAABmAAAAAgUAAAAMa29sZWpueXRva2VuAAAAAAAAAABkCQAAAgAAAAECAAAAR05pZSBtb3puYSBqdcW8IGdlbmVyb3dhxIcgdG9rZW7Ds3cgLyBUb2tlbnMgY2FuIG5vIGxvbmdlciBiZSBnZW5lcmF0ZWQgAwkBAAAAAiE9AAAAAgkAAZAAAAABCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAQkAAAIAAAABAgAAAHBNdXNpc3ogd3lrb25hxIcgcMWCYXRub8WbxIcgemEgd3lnZW5lcm93YW5pZSBORlQgMTAgV0FWRVMgLyBZb3UgbmV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GVCAxIFdBVkVTAwMJAABmAAAAAgAAAAAABfXhAAgJAAGRAAAAAggFAAAAAWoAAAAIcGF5bWVudHMAAAAAAAAAAAAAAAAGYW1vdW50BgkBAAAAAiE9AAAAAggJAAGRAAAAAggFAAAAAWoAAAAIcGF5bWVudHMAAAAAAAAAAAAAAAAHYXNzZXRJZAUAAAAEdW5pdAkAAAIAAAABAgAAAFRLb3N6dCBwb2RwaXNhbmlhIHByemV6IE5GVCB0byAxIFdBVkVTIC8gWW91IG5lZWQgdG8gbWFrZSBORlQgMSBXQVZFUyBzaWduaW5nIHBheW1lbnQEAAAADmxpY3piYXBvZHBpc293BAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMJAAQlAAAAAQgFAAAAAWoAAAAGY2FsbGVyAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAXQFAAAAByRtYXRjaDAFAAAAAXQAAAAAAAAAAAAJAARMAAAAAgkBAAAADEJvb2xlYW5FbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACCQAEJQAAAAEIBQAAAAFqAAAABmNhbGxlcgIAAAABXwUAAAAHVHhJZE5GVAYJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAQlAAAAAQgFAAAAAWoAAAAGY2FsbGVyCQAAZAAAAAIFAAAADmxpY3piYXBvZHBpc293AAAAAAAAAAABBQAAAANuaWwAAAAAN5VNXw==", "height": 1469547, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EQJbX28c9j1tPMMRN5JLpRhvWEgM4cN7sW8unUBkpBrQ Next: DC6sYHZtrR9KvuVjj1A5MPy6w9B85U5TnzWvdR6dshAX Diff:
Old | New | Differences | |
---|---|---|---|
26 | 26 | ||
27 | 27 | ||
28 | 28 | @Callable(j) | |
29 | - | func signNFT ( | |
30 | - | let NFTissuer = match assetInfo(valueOrErrorMessage(fromBase58String( | |
29 | + | func signNFT (TxIdNFT) = { | |
30 | + | let NFTissuer = match assetInfo(valueOrErrorMessage(fromBase58String(TxIdNFT), "Błędny Asset / Wrong Asset")) { | |
31 | 31 | case t: Asset => | |
32 | 32 | t.issuer | |
33 | 33 | case _ => | |
35 | 35 | } | |
36 | 36 | if ((this != NFTissuer)) | |
37 | 37 | then throw("Błędny NFT / Wrong NFT") | |
38 | - | else if ((assetBalance(j.caller, fromBase58String( | |
38 | + | else if ((assetBalance(j.caller, fromBase58String(TxIdNFT)) != 1)) | |
39 | 39 | then throw("Nie posiadasz tego NFT / You don't own this NFT") | |
40 | - | else if ((getBoolean(this, ((toString(j.caller) + "_") + | |
40 | + | else if ((getBoolean(this, ((toString(j.caller) + "_") + TxIdNFT)) == true)) | |
41 | 41 | then throw("Już podpisywałeś tym NFT / You already signed the NFT with this") | |
42 | 42 | else if ((size(j.payments) != 1)) | |
43 | 43 | then throw("Musisz wykonać płatność za podpisanie NFT 1 WAVES") | |
52 | 52 | case _ => | |
53 | 53 | 0 | |
54 | 54 | } | |
55 | - | [BooleanEntry(((toString(j.caller) + "_") + | |
55 | + | [BooleanEntry(((toString(j.caller) + "_") + TxIdNFT), true), IntegerEntry(toString(j.caller), (liczbapodpisow + 1))] | |
56 | 56 | } | |
57 | 57 | } | |
58 | 58 |
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 / Tokens can no longer be generated ") | |
13 | 13 | else if ((size(i.payments) != 1)) | |
14 | 14 | then throw("Musisz wykonać płatność za wygenerowanie NFT 10 WAVES / You need to make a payment to generate NFT 10 WAVES ") | |
15 | 15 | else if (if ((1000000000 > i.payments[0].amount)) | |
16 | 16 | then true | |
17 | 17 | else (i.payments[0].assetId != unit)) | |
18 | 18 | then throw("Koszt wygenerowania nowego NFT to 10 WAVES / The cost of generating a new NFT is 10 WAVES ") | |
19 | 19 | else { | |
20 | 20 | let asset = Issue((kolejnytokentxt + "NFT"), "Dzięki temu tokenowi mozna uzyskać dotęp do 1000 WAVES pod adresem ... więcej informacji na stronie www / With this token, you can access 1000 WAVES at ... more information at www ", 1, 0, false, unit, 0) | |
21 | 21 | let assetId = calculateAssetId(asset) | |
22 | 22 | let nazwatokena = toBase58String(assetId) | |
23 | 23 | [asset, IntegerEntry("NFTtokens", (liczbaNFT + 1)), StringEntry((kolejnytokentxt + " token"), nazwatokena), ScriptTransfer(i.caller, 1, assetId)] | |
24 | 24 | } | |
25 | 25 | ||
26 | 26 | ||
27 | 27 | ||
28 | 28 | @Callable(j) | |
29 | - | func signNFT ( | |
30 | - | let NFTissuer = match assetInfo(valueOrErrorMessage(fromBase58String( | |
29 | + | func signNFT (TxIdNFT) = { | |
30 | + | let NFTissuer = match assetInfo(valueOrErrorMessage(fromBase58String(TxIdNFT), "Błędny Asset / Wrong Asset")) { | |
31 | 31 | case t: Asset => | |
32 | 32 | t.issuer | |
33 | 33 | case _ => | |
34 | 34 | throw("Błędny Asset / Wrong Asset") | |
35 | 35 | } | |
36 | 36 | if ((this != NFTissuer)) | |
37 | 37 | then throw("Błędny NFT / Wrong NFT") | |
38 | - | else if ((assetBalance(j.caller, fromBase58String( | |
38 | + | else if ((assetBalance(j.caller, fromBase58String(TxIdNFT)) != 1)) | |
39 | 39 | then throw("Nie posiadasz tego NFT / You don't own this NFT") | |
40 | - | else if ((getBoolean(this, ((toString(j.caller) + "_") + | |
40 | + | else if ((getBoolean(this, ((toString(j.caller) + "_") + TxIdNFT)) == true)) | |
41 | 41 | then throw("Już podpisywałeś tym NFT / You already signed the NFT with this") | |
42 | 42 | else if ((size(j.payments) != 1)) | |
43 | 43 | then throw("Musisz wykonać płatność za podpisanie NFT 1 WAVES") | |
44 | 44 | else if (if ((100000000 > j.payments[0].amount)) | |
45 | 45 | then true | |
46 | 46 | else (j.payments[0].assetId != unit)) | |
47 | 47 | then throw("Koszt podpisania przez NFT to 1 WAVES / You need to make NFT 1 WAVES signing payment") | |
48 | 48 | else { | |
49 | 49 | let liczbapodpisow = match getInteger(this, toString(j.caller)) { | |
50 | 50 | case t: Int => | |
51 | 51 | t | |
52 | 52 | case _ => | |
53 | 53 | 0 | |
54 | 54 | } | |
55 | - | [BooleanEntry(((toString(j.caller) + "_") + | |
55 | + | [BooleanEntry(((toString(j.caller) + "_") + TxIdNFT), true), IntegerEntry(toString(j.caller), (liczbapodpisow + 1))] | |
56 | 56 | } | |
57 | 57 | } | |
58 | 58 | ||
59 | 59 |
github/deemru/w8io/169f3d6 32.06 ms ◑