tx · 2c78aHfeckApuDzc5JbELsqEfCn2mteDNmYJYK65434F 3N99w48M6Xg9uY1R1HoDHmBpQff3Ni5vGpm: -0.05000000 Waves 2021.03.26 14:16 [1454635] smart account 3N99w48M6Xg9uY1R1HoDHmBpQff3Ni5vGpm > SELF 0.00000000 Waves
{ "type": 13, "id": "2c78aHfeckApuDzc5JbELsqEfCn2mteDNmYJYK65434F", "fee": 5000000, "feeAssetId": null, "timestamp": 1616757456041, "version": 2, "chainId": 84, "sender": "3N99w48M6Xg9uY1R1HoDHmBpQff3Ni5vGpm", "senderPublicKey": "HGQSJy3ik1sdoefTWS4qQBxDJZThuqyPuQmf1z87CU7q", "proofs": [ "D1y3cdFajYLnhhWDiNNyaU1i2CqRsc5m4tXHPs8CebgYPTx5zPnKrcpKRKk2Ng968ZU7fKedUzRrMi4e9VmsDDC" ], "script": "base64:AAIEAAAAAAAAAAkIAhIAEgMKAQgAAAADAAAAAAlsaWN6YmFORlQJAQAAABFAZXh0ck5hdGl2ZSgxMDUwKQAAAAIFAAAABHRoaXMCAAAACU5GVHRva2VucwAAAAAMa29sZWpueXRva2VuCQAAZAAAAAIFAAAACWxpY3piYU5GVAAAAAAAAAAAAQAAAAAPa29sZWpueXRva2VudHh0CQABpAAAAAEFAAAADGtvbGVqbnl0b2tlbgAAAAIAAAABaQEAAAAJY3JlYXRlTkZUAAAAAAMJAABmAAAAAgUAAAAMa29sZWpueXRva2VuAAAAAAAAAABkCQAAAgAAAAECAAAAIk5pZSBtb3puYSBqdcW8IGdlbmVyb3dhxIcgdG9rZW7Ds3cDAwkAAGYAAAACAAAAAAA7msoACAkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAAAAAZhbW91bnQGCQEAAAACIT0AAAACCAkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAAAAAdhc3NldElkBQAAAAR1bml0CQAAAgAAAAECAAAAKktvc3p0IHd5Z2VuZXJvd2FuaWEgbm93ZWdvI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agAAAAZjYWxsZXIJAABkAAAAAgUAAAAObGljemJhcG9kcGlzb3cAAAAAAAAAAAEFAAAAA25pbAAAAAD7MRmd", "height": 1454635, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AGjNe4S8wrqH72Kj8jqX7XXEtZrPpGUVakMAaiTrvuxY Next: EQJbX28c9j1tPMMRN5JLpRhvWEgM4cN7sW8unUBkpBrQ Diff:
Old | New | Differences | |
---|---|---|---|
40 | 40 | then throw("Nie posiadasz tego NFT") | |
41 | 41 | else if ((getBoolean(this, ((toString(h.caller) + "_") + i)) == true)) | |
42 | 42 | then throw("Już podpisywałeś tym NFT") | |
43 | - | else if (if ((100000000 > h.payments[0].amount)) | |
44 | - | then true | |
45 | - | else (h.payments[0].assetId != unit)) | |
46 | - | then throw("Koszt podpisania przez NFT to 1 WAVES") | |
47 | - | else { | |
48 | - | let m = { | |
49 | - | let k = getInteger(this, toString(h.caller)) | |
50 | - | if ($isInstanceOf(k, "Int")) | |
51 | - | then { | |
52 | - | let l = k | |
53 | - | l | |
54 | - | } | |
55 | - | else 0 | |
43 | + | else if ((size(h.payments) != 1)) | |
44 | + | then throw("Musisz wykonać płatność za podpisanie NFT 1 WAVES") | |
45 | + | else if (if ((100000000 > h.payments[0].amount)) | |
46 | + | then true | |
47 | + | else (h.payments[0].assetId != unit)) | |
48 | + | then throw("Koszt podpisania przez NFT to 1 WAVES") | |
49 | + | else { | |
50 | + | let m = { | |
51 | + | let k = getInteger(this, toString(h.caller)) | |
52 | + | if ($isInstanceOf(k, "Int")) | |
53 | + | then { | |
54 | + | let l = k | |
55 | + | l | |
56 | + | } | |
57 | + | else 0 | |
58 | + | } | |
59 | + | [BooleanEntry(((toString(h.caller) + "_") + i), true), IntegerEntry(toString(h.caller), (m + 1))] | |
56 | 60 | } | |
57 | - | [BooleanEntry(((toString(h.caller) + "_") + i), true), IntegerEntry(toString(h.caller), (m + 1))] | |
58 | - | } | |
59 | 61 | } | |
60 | 62 | ||
61 | 63 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = getIntegerValue(this, "NFTtokens") | |
5 | 5 | ||
6 | 6 | let b = (a + 1) | |
7 | 7 | ||
8 | 8 | let c = toString(b) | |
9 | 9 | ||
10 | 10 | @Callable(d) | |
11 | 11 | func createNFT () = if ((b > 100)) | |
12 | 12 | then throw("Nie mozna już generować tokenów") | |
13 | 13 | else if (if ((1000000000 > d.payments[0].amount)) | |
14 | 14 | then true | |
15 | 15 | else (d.payments[0].assetId != unit)) | |
16 | 16 | then throw("Koszt wygenerowania nowego NFT to 10 WAVES") | |
17 | 17 | else { | |
18 | 18 | let e = Issue((c + "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 f = calculateAssetId(e) | |
20 | 20 | let g = toBase58String(f) | |
21 | 21 | [e, IntegerEntry("NFTtokens", (a + 1)), StringEntry((c + " token"), g), ScriptTransfer(d.caller, 1, f)] | |
22 | 22 | } | |
23 | 23 | ||
24 | 24 | ||
25 | 25 | ||
26 | 26 | @Callable(h) | |
27 | 27 | func singnNFT (i) = { | |
28 | 28 | let j = { | |
29 | 29 | let k = assetInfo(valueOrErrorMessage(fromBase58String(i), "Błędny Asset")) | |
30 | 30 | if ($isInstanceOf(k, "Asset")) | |
31 | 31 | then { | |
32 | 32 | let l = k | |
33 | 33 | l.issuer | |
34 | 34 | } | |
35 | 35 | else throw("Błędny Asset") | |
36 | 36 | } | |
37 | 37 | if ((this != j)) | |
38 | 38 | then throw("Błędny NFT") | |
39 | 39 | else if ((assetBalance(h.caller, fromBase58String(i)) != 1)) | |
40 | 40 | then throw("Nie posiadasz tego NFT") | |
41 | 41 | else if ((getBoolean(this, ((toString(h.caller) + "_") + i)) == true)) | |
42 | 42 | then throw("Już podpisywałeś tym NFT") | |
43 | - | else if (if ((100000000 > h.payments[0].amount)) | |
44 | - | then true | |
45 | - | else (h.payments[0].assetId != unit)) | |
46 | - | then throw("Koszt podpisania przez NFT to 1 WAVES") | |
47 | - | else { | |
48 | - | let m = { | |
49 | - | let k = getInteger(this, toString(h.caller)) | |
50 | - | if ($isInstanceOf(k, "Int")) | |
51 | - | then { | |
52 | - | let l = k | |
53 | - | l | |
54 | - | } | |
55 | - | else 0 | |
43 | + | else if ((size(h.payments) != 1)) | |
44 | + | then throw("Musisz wykonać płatność za podpisanie NFT 1 WAVES") | |
45 | + | else if (if ((100000000 > h.payments[0].amount)) | |
46 | + | then true | |
47 | + | else (h.payments[0].assetId != unit)) | |
48 | + | then throw("Koszt podpisania przez NFT to 1 WAVES") | |
49 | + | else { | |
50 | + | let m = { | |
51 | + | let k = getInteger(this, toString(h.caller)) | |
52 | + | if ($isInstanceOf(k, "Int")) | |
53 | + | then { | |
54 | + | let l = k | |
55 | + | l | |
56 | + | } | |
57 | + | else 0 | |
58 | + | } | |
59 | + | [BooleanEntry(((toString(h.caller) + "_") + i), true), IntegerEntry(toString(h.caller), (m + 1))] | |
56 | 60 | } | |
57 | - | [BooleanEntry(((toString(h.caller) + "_") + i), true), IntegerEntry(toString(h.caller), (m + 1))] | |
58 | - | } | |
59 | 61 | } | |
60 | 62 | ||
61 | 63 |
github/deemru/w8io/03bedc9 26.44 ms ◑![]()