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