tx · CDijiWij7941BZEzASHTh2otV7jfTBSVhjPKHaghJRk2 3N99w48M6Xg9uY1R1HoDHmBpQff3Ni5vGpm: -0.05000000 Waves 2021.03.26 06:38 [1454172] smart account 3N99w48M6Xg9uY1R1HoDHmBpQff3Ni5vGpm > SELF 0.00000000 Waves
{ "type": 13, "id": "CDijiWij7941BZEzASHTh2otV7jfTBSVhjPKHaghJRk2", "fee": 5000000, "feeAssetId": null, "timestamp": 1616729956062, "version": 2, "chainId": 84, "sender": "3N99w48M6Xg9uY1R1HoDHmBpQff3Ni5vGpm", "senderPublicKey": "HGQSJy3ik1sdoefTWS4qQBxDJZThuqyPuQmf1z87CU7q", "proofs": [ "4JXGkPhoukCcdfnvc6wV8o6t6w5aewKfAGNvYM2bpPayWCnyCib8vzwcr1y7xVmsy4NsCYa2uufo69bafLnjzdsu" ], "script": "base64:AAIEAAAAAAAAAAkIAhIAEgMKAQgAAAADAAAAAAlsaWN6YmFORlQJAQAAABFAZXh0ck5hdGl2ZSgxMDUwKQAAAAIFAAAABHRoaXMCAAAACU5GVHRva2VucwAAAAAMa29sZWpueXRva2VuCQAAZAAAAAIFAAAACWxpY3piYU5GVAAAAAAAAAAAAQAAAAAPa29sZWpueXRva2VudHh0CQABpAAAAAEFAAAADGtvbGVqbnl0b2tlbgAAAAIAAAABaQEAAAAJY3JlYXRlTkZUAAAAAAMJAQAAAAEhAAAAAQkAAGYAAAACBQAAAAlsaWN6YmFORlQAAAAAAAAAAGQEAAAABWFzc2V0CQAEQwAAAAcJAAEsAAAAAgUAAAAPa29sZWpueXRva2VudHh0AgAAAA8gTkZUIDEwMDAgV0FWRVMCAAAAOUR6acSZa2kgdGVtdSB0b2tlbm93aSBtb3puYSB1enlza2HEhyBkb3TEmXAgZG8gMTAwMCBXQVZFUwAAAAAAAAAAAQAAAAAAAAAAAAcFAAAABHVuaXQAAAAAAAAAAAAEAAAAB2Fzc2V0SWQJAAQ4AAAAAQUAAAAFYXNzZXQEAAAAC25hendhdG9rZ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oAAAAGY2FsbGVyAgAAAAFfBQAAAANORlQGCQAAAgAAAAECAAAAG0p1xbwgcG9kcGlzeXdhxYJlxZsgdHltIE5GVAQAAAAObGljemJhcG9kcGlzb3cEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwkABCUAAAABCAUAAAABagAAAAZjYWxsZXIDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABdAUAAAAHJG1hdGNoMAUAAAABdAAAAAAAAAAAAAkABEwAAAACCQEAAAAMQm9vbGVhbkVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIJAAQlAAAAAQgFAAAAAWoAAAAGY2FsbGVyAgAAAAFfBQAAAANORlQGCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQAEJQAAAAEIBQAAAAFqAAAABmNhbGxlcgkAAGQAAAACBQAAAA5saWN6YmFwb2RwaXNvdwAAAAAAAAAAAQUAAAADbmlsAAAAAF0OUQM=", "height": 1454172, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Fganigzf21tpP5ZMLFFSo2wGTjd3D9BjdxCoeLR8DJEy Next: 3rkQGBnfXSMau8RpmN6EeuuDEqi9duFeUcqE8mnevXMc Diff:
Old | New | Differences | |
---|---|---|---|
22 | 22 | ||
23 | 23 | @Callable(j) | |
24 | 24 | func singnNFT (NFT) = { | |
25 | - | let NFTissuer = match assetInfo(valueOrErrorMessage(fromBase58String(NFT), "Błędny | |
25 | + | let NFTissuer = match assetInfo(valueOrErrorMessage(fromBase58String(NFT), "Błędny Asset")) { | |
26 | 26 | case t: Asset => | |
27 | 27 | t.issuer | |
28 | 28 | case _ => | |
29 | - | throw("Błędny | |
29 | + | throw("Błędny Asset") | |
30 | 30 | } | |
31 | 31 | if ((this != NFTissuer)) | |
32 | 32 | then throw("Błędny NFT") | |
33 | - | else if ((assetBalance(j.caller, | |
33 | + | else if ((assetBalance(j.caller, fromBase58String(NFT)) != 1)) | |
34 | 34 | then throw("Nie posiadasz tego NFT") | |
35 | 35 | else if ((getBoolean(this, ((toString(j.caller) + "_") + NFT)) == true)) | |
36 | 36 | then throw("Już podpisywałeś tym NFT") |
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 (!((liczbaNFT > 100))) | |
12 | 12 | then { | |
13 | 13 | let asset = Issue((kolejnytokentxt + " NFT 1000 WAVES"), "Dzięki temu tokenowi mozna uzyskać dotęp do 1000 WAVES", 1, 0, false, unit, 0) | |
14 | 14 | let assetId = calculateAssetId(asset) | |
15 | 15 | let nazwatokena = toBase58String(assetId) | |
16 | 16 | let a = transferTransactionById(base58'3N99w48M6Xg9uY1R1HoDHmBpQff3Ni5vGpm') | |
17 | 17 | [asset, IntegerEntry("NFTtokens", (liczbaNFT + 1)), StringEntry((kolejnytokentxt + " token"), nazwatokena), ScriptTransfer(i.caller, 1, assetId)] | |
18 | 18 | } | |
19 | 19 | else throw("Nie mozna już generować tokenów") | |
20 | 20 | ||
21 | 21 | ||
22 | 22 | ||
23 | 23 | @Callable(j) | |
24 | 24 | func singnNFT (NFT) = { | |
25 | - | let NFTissuer = match assetInfo(valueOrErrorMessage(fromBase58String(NFT), "Błędny | |
25 | + | let NFTissuer = match assetInfo(valueOrErrorMessage(fromBase58String(NFT), "Błędny Asset")) { | |
26 | 26 | case t: Asset => | |
27 | 27 | t.issuer | |
28 | 28 | case _ => | |
29 | - | throw("Błędny | |
29 | + | throw("Błędny Asset") | |
30 | 30 | } | |
31 | 31 | if ((this != NFTissuer)) | |
32 | 32 | then throw("Błędny NFT") | |
33 | - | else if ((assetBalance(j.caller, | |
33 | + | else if ((assetBalance(j.caller, fromBase58String(NFT)) != 1)) | |
34 | 34 | then throw("Nie posiadasz tego NFT") | |
35 | 35 | else if ((getBoolean(this, ((toString(j.caller) + "_") + NFT)) == true)) | |
36 | 36 | then throw("Już podpisywałeś tym NFT") | |
37 | 37 | else { | |
38 | 38 | let liczbapodpisow = match getInteger(this, toString(j.caller)) { | |
39 | 39 | case t: Int => | |
40 | 40 | t | |
41 | 41 | case _ => | |
42 | 42 | 0 | |
43 | 43 | } | |
44 | 44 | [BooleanEntry(((toString(j.caller) + "_") + NFT), true), IntegerEntry(toString(j.caller), (liczbapodpisow + 1))] | |
45 | 45 | } | |
46 | 46 | } | |
47 | 47 | ||
48 | 48 |
github/deemru/w8io/03bedc9 24.96 ms ◑![]()