tx · 9rpRxdEfGUeqskLEvjNMPTHtbRVtMrmZSoBEwBDdNivm 3N99w48M6Xg9uY1R1HoDHmBpQff3Ni5vGpm: -0.05000000 Waves 2021.03.26 13:34 [1454595] smart account 3N99w48M6Xg9uY1R1HoDHmBpQff3Ni5vGpm > SELF 0.00000000 Waves
{ "type": 13, "id": "9rpRxdEfGUeqskLEvjNMPTHtbRVtMrmZSoBEwBDdNivm", "fee": 5000000, "feeAssetId": null, "timestamp": 1616754960010, "version": 2, "chainId": 84, "sender": "3N99w48M6Xg9uY1R1HoDHmBpQff3Ni5vGpm", "senderPublicKey": "HGQSJy3ik1sdoefTWS4qQBxDJZThuqyPuQmf1z87CU7q", "proofs": [ "PL2PPbCf5j899qQH9BMCqaLfB25GSSHQc6Vemf6eT1Kz9sTuiGzLiDZNfVEueTxVBCYYjPypTbnvxDwMQUacZiM" ], "script": "base64:AAIEAAAAAAAAAAkIAhIAEgMKAQgAAAADAAAAAAlsaWN6YmFORlQJAQAAABFAZXh0ck5hdGl2ZSgxMDUwKQAAAAIFAAAABHRoaXMCAAAACU5GVHRva2VucwAAAAAMa29sZWpueXRva2VuCQAAZAAAAAIFAAAACWxpY3piYU5GVAAAAAAAAAAAAQAAAAAPa29sZWpueXRva2VudHh0CQABpAAAAAEFAAAADGtvbGVqbnl0b2tlbgAAAAIAAAABaQEAAAAJY3JlYXRlTkZUAAAAAAQAAAACYWIICQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAAAAAABmFtb3VudAMJAABmAAAAAgUAAAAMa29sZWpueXRva2VuAAAAAAAAAABkCQAAAgAAAAECAAAAIk5pZSBtb3puYSBqdcW8IGdlbmVyb3dhxIcgdG9rZW7Ds3cDCQAAZgAAAAIAAAAAAAAAAAoFAAAAAmFiCQAAAgAAAAECAAAAKktvc3p0IHd5Z2VuZXJvd2FuaWEgbm93ZWdvIE5GVCB0byAxMCBXQVZFUwQAAAAFYXNzZXQJAARDAAAABwkAASwAAAACBQAAAA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AAAAxCxYLEmWRueSBORlQDCQEAAAACIT0AAAACCQAD8AAAAAIIBQAAAAFqAAAABmNhbGxlcgkAAlkAAAABBQAAAANORlQAAAAAAAAAAAEJAAACAAAAAQIAAAAWTmllIHBvc2lhZGFzeiB0ZWdvIE5GVAMJAAAAAAAAAgkABBsAAAACBQAAAAR0aGlzCQABLAAAAAIJAAEsAAAAAgkABCUAAAABCAUAAAABagAAAAZjYWxsZXICAAAAAV8FAAAAA05GVAYJAAACAAAAAQIAAAAbSnXFvCBwb2RwaXN5d2HFgmXFmyB0eW0gTkZUBAAAAA5saWN6YmFwb2RwaXNvdwQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzCQAEJQAAAAEIBQAAAAFqAAAABmNhbGxlcgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAF0BQAAAAckbWF0Y2gwBQAAAAF0AAAAAAAAAAAACQAETAAAAAIJAQAAAAxCb29sZWFuRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgkABCUAAAABCAUAAAABagAAAAZjYWxsZXICAAAAAV8FAAAAA05GVAYJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAQlAAAAAQgFAAAAAWoAAAAGY2FsbGVyCQAAZAAAAAIFAAAADmxpY3piYXBvZHBpc293AAAAAAAAAAABBQAAAANuaWwAAAAA6RsYOQ==", "height": 1454595, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HBguCLRRzqzGJbHCZjQZEk4fJJKPfVZhDBn2268hAgzY Next: H3MVicF2fuTqvNmta1sQBvrrdB5MnayXVpLtn5afZy7v Diff:
Old | New | Differences | |
---|---|---|---|
8 | 8 | let c = toString(b) | |
9 | 9 | ||
10 | 10 | @Callable(d) | |
11 | - | func createNFT () = if ((b > 100)) | |
12 | - | then throw("Nie mozna już generować tokenów") | |
13 | - | else if ((10 > d.payments[0].amount)) | |
14 | - | then throw("Koszt wygenerowania nowego NFT to 10 WAVES") | |
15 | - | else { | |
16 | - | let e = Issue((c + " 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) | |
17 | - | let f = calculateAssetId(e) | |
18 | - | let g = toBase58String(f) | |
19 | - | let h = transferTransactionById(base58'3N99w48M6Xg9uY1R1HoDHmBpQff3Ni5vGpm') | |
20 | - | [e, IntegerEntry("NFTtokens", (a + 1)), StringEntry((c + " token"), g), ScriptTransfer(d.caller, 1, f)] | |
21 | - | } | |
11 | + | func createNFT () = { | |
12 | + | let e = d.payments[0].amount | |
13 | + | if ((b > 100)) | |
14 | + | then throw("Nie mozna już generować tokenów") | |
15 | + | else if ((10 > e)) | |
16 | + | then throw("Koszt wygenerowania nowego NFT to 10 WAVES") | |
17 | + | else { | |
18 | + | let f = Issue((c + " 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 | + | let g = calculateAssetId(f) | |
20 | + | let h = toBase58String(g) | |
21 | + | let i = transferTransactionById(base58'3N99w48M6Xg9uY1R1HoDHmBpQff3Ni5vGpm') | |
22 | + | [f, IntegerEntry("NFTtokens", (a + 1)), StringEntry((c + " token"), h), ScriptTransfer(d.caller, 1, g)] | |
23 | + | } | |
24 | + | } | |
22 | 25 | ||
23 | 26 | ||
24 | 27 | ||
25 | - | @Callable( | |
26 | - | func singnNFT ( | |
27 | - | let | |
28 | - | let | |
29 | - | if ($isInstanceOf( | |
28 | + | @Callable(j) | |
29 | + | func singnNFT (k) = { | |
30 | + | let l = { | |
31 | + | let m = assetInfo(valueOrErrorMessage(fromBase58String(k), "Błędny Asset")) | |
32 | + | if ($isInstanceOf(m, "Asset")) | |
30 | 33 | then { | |
31 | - | let | |
32 | - | | |
34 | + | let n = m | |
35 | + | n.issuer | |
33 | 36 | } | |
34 | 37 | else throw("Błędny Asset") | |
35 | 38 | } | |
36 | - | if ((this != | |
39 | + | if ((this != l)) | |
37 | 40 | then throw("Błędny NFT") | |
38 | - | else if ((assetBalance( | |
41 | + | else if ((assetBalance(j.caller, fromBase58String(k)) != 1)) | |
39 | 42 | then throw("Nie posiadasz tego NFT") | |
40 | - | else if ((getBoolean(this, ((toString( | |
43 | + | else if ((getBoolean(this, ((toString(j.caller) + "_") + k)) == true)) | |
41 | 44 | then throw("Już podpisywałeś tym NFT") | |
42 | 45 | else { | |
43 | - | let | |
44 | - | let | |
45 | - | if ($isInstanceOf( | |
46 | + | let o = { | |
47 | + | let m = getInteger(this, toString(j.caller)) | |
48 | + | if ($isInstanceOf(m, "Int")) | |
46 | 49 | then { | |
47 | - | let | |
48 | - | | |
50 | + | let n = m | |
51 | + | n | |
49 | 52 | } | |
50 | 53 | else 0 | |
51 | 54 | } | |
52 | - | [BooleanEntry(((toString( | |
55 | + | [BooleanEntry(((toString(j.caller) + "_") + k), true), IntegerEntry(toString(j.caller), (o + 1))] | |
53 | 56 | } | |
54 | 57 | } | |
55 | 58 |
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 | - | func createNFT () = if ((b > 100)) | |
12 | - | then throw("Nie mozna już generować tokenów") | |
13 | - | else if ((10 > d.payments[0].amount)) | |
14 | - | then throw("Koszt wygenerowania nowego NFT to 10 WAVES") | |
15 | - | else { | |
16 | - | let e = Issue((c + " 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) | |
17 | - | let f = calculateAssetId(e) | |
18 | - | let g = toBase58String(f) | |
19 | - | let h = transferTransactionById(base58'3N99w48M6Xg9uY1R1HoDHmBpQff3Ni5vGpm') | |
20 | - | [e, IntegerEntry("NFTtokens", (a + 1)), StringEntry((c + " token"), g), ScriptTransfer(d.caller, 1, f)] | |
21 | - | } | |
11 | + | func createNFT () = { | |
12 | + | let e = d.payments[0].amount | |
13 | + | if ((b > 100)) | |
14 | + | then throw("Nie mozna już generować tokenów") | |
15 | + | else if ((10 > e)) | |
16 | + | then throw("Koszt wygenerowania nowego NFT to 10 WAVES") | |
17 | + | else { | |
18 | + | let f = Issue((c + " 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 | + | let g = calculateAssetId(f) | |
20 | + | let h = toBase58String(g) | |
21 | + | let i = transferTransactionById(base58'3N99w48M6Xg9uY1R1HoDHmBpQff3Ni5vGpm') | |
22 | + | [f, IntegerEntry("NFTtokens", (a + 1)), StringEntry((c + " token"), h), ScriptTransfer(d.caller, 1, g)] | |
23 | + | } | |
24 | + | } | |
22 | 25 | ||
23 | 26 | ||
24 | 27 | ||
25 | - | @Callable( | |
26 | - | func singnNFT ( | |
27 | - | let | |
28 | - | let | |
29 | - | if ($isInstanceOf( | |
28 | + | @Callable(j) | |
29 | + | func singnNFT (k) = { | |
30 | + | let l = { | |
31 | + | let m = assetInfo(valueOrErrorMessage(fromBase58String(k), "Błędny Asset")) | |
32 | + | if ($isInstanceOf(m, "Asset")) | |
30 | 33 | then { | |
31 | - | let | |
32 | - | | |
34 | + | let n = m | |
35 | + | n.issuer | |
33 | 36 | } | |
34 | 37 | else throw("Błędny Asset") | |
35 | 38 | } | |
36 | - | if ((this != | |
39 | + | if ((this != l)) | |
37 | 40 | then throw("Błędny NFT") | |
38 | - | else if ((assetBalance( | |
41 | + | else if ((assetBalance(j.caller, fromBase58String(k)) != 1)) | |
39 | 42 | then throw("Nie posiadasz tego NFT") | |
40 | - | else if ((getBoolean(this, ((toString( | |
43 | + | else if ((getBoolean(this, ((toString(j.caller) + "_") + k)) == true)) | |
41 | 44 | then throw("Już podpisywałeś tym NFT") | |
42 | 45 | else { | |
43 | - | let | |
44 | - | let | |
45 | - | if ($isInstanceOf( | |
46 | + | let o = { | |
47 | + | let m = getInteger(this, toString(j.caller)) | |
48 | + | if ($isInstanceOf(m, "Int")) | |
46 | 49 | then { | |
47 | - | let | |
48 | - | | |
50 | + | let n = m | |
51 | + | n | |
49 | 52 | } | |
50 | 53 | else 0 | |
51 | 54 | } | |
52 | - | [BooleanEntry(((toString( | |
55 | + | [BooleanEntry(((toString(j.caller) + "_") + k), true), IntegerEntry(toString(j.caller), (o + 1))] | |
53 | 56 | } | |
54 | 57 | } | |
55 | 58 | ||
56 | 59 |
github/deemru/w8io/03bedc9 29.25 ms ◑![]()