tx · 8du9vmAHcwen9APgXNZT6oypbMX588jEFVUm5cyL9Lx4
3N99w48M6Xg9uY1R1HoDHmBpQff3Ni5vGpm: -0.05000000 Waves
2021.03.26 06:14 [1454149] smart account 3N99w48M6Xg9uY1R1HoDHmBpQff3Ni5vGpm > SELF 0.00000000 Waves
{
"type": 13,
"id": "8du9vmAHcwen9APgXNZT6oypbMX588jEFVUm5cyL9Lx4",
"fee": 5000000,
"feeAssetId": null,
"timestamp": 1616728506819,
"version": 2,
"chainId": 84,
"sender": "3N99w48M6Xg9uY1R1HoDHmBpQff3Ni5vGpm",
"senderPublicKey": "HGQSJy3ik1sdoefTWS4qQBxDJZThuqyPuQmf1z87CU7q",
"proofs": [
"5TA7XAzB5NcQKq1iLS7WcxHJ7wHZ3y2acmbnp2sSsqwCYpLzf8ioXdqzbczGZ44FebGbm2gYSZcSg5J3FRsCDcUr"
],
"script": "base64:AAIEAAAAAAAAAAkIAhIAEgMKAQgAAAADAAAAAAlsaWN6YmFORlQJAQAAABFAZXh0ck5hdGl2ZSgxMDUwKQAAAAIFAAAABHRoaXMCAAAACU5GVHRva2VucwAAAAAMa29sZWpueXRva2VuCQAAZAAAAAIFAAAACWxpY3piYU5GVAAAAAAAAAAAAQAAAAAPa29sZWpueXRva2VudHh0CQABpAAAAAEFAAAADGtvbGVqbnl0b2tlbgAAAAIAAAABaQEAAAAJY3JlYXRlTkZUAAAAAAMJAQAAAAEhAAAAAQkAAGYAAAACBQAAAAlsaWN6YmFORlQAAAAAAAAAAGQEAAAABWFzc2V0CQAEQwAAAAcJAAEsAAAAAgUAAAAPa29sZWpueXRva2VudHh0AgAAAA8gTkZUIDEwMDAgV0FWRVMCAAAAOUR6acSZa2kgdGVtdSB0b2tlbm93aSBtb3puYSB1enlza2HEhyBkb3TEmXAgZG8gMTAwMCBXQVZFUwAAAAAAAAAAAQAAAAAAAAAAAAcFAAAABHVuaXQAAAAAAAAAAAAEAAAAB2Fzc2V0SWQJAAQ4AAAAAQUAAAAFY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AIJAAQlAAAAAQgFAAAAAWoAAAAGY2FsbGVyAgAAAAFfBQAAAANORlQGCQAAAgAAAAECAAAAG0p1xbwgcG9kcGlzeXdhxYJlxZsgdHltIE5GVAQAAAAObGljemJhcG9kcGlzb3cEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwkABCUAAAABCAUAAAABagAAAAZjYWxsZXIDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABdAUAAAAHJG1hdGNoMAUAAAABdAAAAAAAAAAAAAkABEwAAAACCQEAAAAMQm9vbGVhbkVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIJAAQlAAAAAQgFAAAAAWoAAAAGY2FsbGVyAgAAAAFfBQAAAANORlQGCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQAEJQAAAAEIBQAAAAFqAAAABmNhbGxlcgkAAGQAAAACBQAAAA5saWN6YmFwb2RwaXNvdwAAAAAAAAAAAQUAAAADbmlsAAAAAJGbOEU=",
"height": 1454149,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: AayBwdiVcCyze4kTrBqiNeJFuHhipMiRBniE119skcgs
Next: DXknVBvSgNaePcBtPfnp3rVrncUNvFXxPLxJK8FCCaDp
Diff:
Old | New | | Differences |
---|
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 | + | let a = transferTransactionById(base58'3N99w48M6Xg9uY1R1HoDHmBpQff3Ni5vGpm') |
---|
16 | 17 | | [asset, IntegerEntry("NFTtokens", (liczbaNFT + 1)), StringEntry((kolejnytokentxt + " token"), nazwatokena), ScriptTransfer(i.caller, 1, assetId)] |
---|
17 | 18 | | } |
---|
18 | 19 | | else throw("Nie mozna już generować tokenów") |
---|
| 20 | + | |
---|
| 21 | + | |
---|
| 22 | + | |
---|
| 23 | + | @Callable(j) |
---|
| 24 | + | func singnNFT (NFT) = { |
---|
| 25 | + | let NFTissuer = match assetInfo(valueOrErrorMessage(toBytes(NFT), "Błędny Asset")) { |
---|
| 26 | + | case t: Asset => |
---|
| 27 | + | t.issuer |
---|
| 28 | + | case _ => |
---|
| 29 | + | throw("Błędny Asset") |
---|
| 30 | + | } |
---|
| 31 | + | if ((this != NFTissuer)) |
---|
| 32 | + | then throw("Błędny NFT") |
---|
| 33 | + | else if ((assetBalance(j.caller, toBytes(NFT)) != 1)) |
---|
| 34 | + | then throw("Nie posiadasz tego NFT") |
---|
| 35 | + | else if ((getBoolean(this, ((toString(j.caller) + "_") + NFT)) == true)) |
---|
| 36 | + | then throw("Już podpisywałeś tym NFT") |
---|
| 37 | + | else { |
---|
| 38 | + | let liczbapodpisow = match getInteger(this, toString(j.caller)) { |
---|
| 39 | + | case t: Int => |
---|
| 40 | + | t |
---|
| 41 | + | case _ => |
---|
| 42 | + | 0 |
---|
| 43 | + | } |
---|
| 44 | + | [BooleanEntry(((toString(j.caller) + "_") + NFT), true), IntegerEntry(toString(j.caller), (liczbapodpisow + 1))] |
---|
| 45 | + | } |
---|
| 46 | + | } |
---|
19 | 47 | | |
---|
20 | 48 | | |
---|
Full:
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 | + | let a = transferTransactionById(base58'3N99w48M6Xg9uY1R1HoDHmBpQff3Ni5vGpm') |
---|
16 | 17 | | [asset, IntegerEntry("NFTtokens", (liczbaNFT + 1)), StringEntry((kolejnytokentxt + " token"), nazwatokena), ScriptTransfer(i.caller, 1, assetId)] |
---|
17 | 18 | | } |
---|
18 | 19 | | else throw("Nie mozna już generować tokenów") |
---|
| 20 | + | |
---|
| 21 | + | |
---|
| 22 | + | |
---|
| 23 | + | @Callable(j) |
---|
| 24 | + | func singnNFT (NFT) = { |
---|
| 25 | + | let NFTissuer = match assetInfo(valueOrErrorMessage(toBytes(NFT), "Błędny Asset")) { |
---|
| 26 | + | case t: Asset => |
---|
| 27 | + | t.issuer |
---|
| 28 | + | case _ => |
---|
| 29 | + | throw("Błędny Asset") |
---|
| 30 | + | } |
---|
| 31 | + | if ((this != NFTissuer)) |
---|
| 32 | + | then throw("Błędny NFT") |
---|
| 33 | + | else if ((assetBalance(j.caller, toBytes(NFT)) != 1)) |
---|
| 34 | + | then throw("Nie posiadasz tego NFT") |
---|
| 35 | + | else if ((getBoolean(this, ((toString(j.caller) + "_") + NFT)) == true)) |
---|
| 36 | + | then throw("Już podpisywałeś tym NFT") |
---|
| 37 | + | else { |
---|
| 38 | + | let liczbapodpisow = match getInteger(this, toString(j.caller)) { |
---|
| 39 | + | case t: Int => |
---|
| 40 | + | t |
---|
| 41 | + | case _ => |
---|
| 42 | + | 0 |
---|
| 43 | + | } |
---|
| 44 | + | [BooleanEntry(((toString(j.caller) + "_") + NFT), true), IntegerEntry(toString(j.caller), (liczbapodpisow + 1))] |
---|
| 45 | + | } |
---|
| 46 | + | } |
---|
19 | 47 | | |
---|
20 | 48 | | |
---|