tx · BB9FAuMxbHieyCbjeBV4czfUfesDaPVcUkXPsijEXNaP

3Muey1cqNaBjjcxXfKHF8qqTZeyGPAsvCpP:  -0.00800000 Waves

2022.08.10 12:03 [2178141] smart account 3Muey1cqNaBjjcxXfKHF8qqTZeyGPAsvCpP > SELF 0.00000000 Waves

{ "type": 13, "id": "BB9FAuMxbHieyCbjeBV4czfUfesDaPVcUkXPsijEXNaP", "fee": 800000, "feeAssetId": null, "timestamp": 1660122212990, "version": 2, "chainId": 84, "sender": "3Muey1cqNaBjjcxXfKHF8qqTZeyGPAsvCpP", "senderPublicKey": "3bPATHM3GnqSGjJb8saHmYMvsaioqu2etEGkZDiuRCcn", "proofs": [ "4T8wU11XVXzv6gfsjuGhnMCV3xPX5nmMCga7xbpL413xiqhgHUWkFeaJ8RjejkLaJL3GHa2k8h4Jhn13c1gZY47D" ], "script": "base64:AAIFAAAAAAAAAAkIAhIDCgEIEgAAAAAJAAAAAAltYXhTdXBwbHkAAAAAAAAAE4gBAAAADXRyeUdldEludGVnZXIAAAABAAAAA2tleQQAAAADdmFsBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFiBQAAAAckbWF0Y2gwBQAAAAFiAAAAAAAAAAAABQAAAAN2YWwBAAAADHRyeUdldFN0cmluZwAAAAEAAAADa2V5BAAAAAN2YWwEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAWIFAAAAByRtYXRjaDAFAAAAAWICAAAAAAUAAAADdmFsAQAAAA10cnlHZXRBZGRyZXNzAAAAAQAAAARhZGRyBAAAAAN2YWwEAAAAByRtYXRjaDAJAAQmAAAAAQUAAAAEYWRkcgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAHQWRkcmVzcwQAAAABYQUAAAAHJG1hdGNoMAU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dGFsTWVtYWxpZW5TdXBwbHkFAAAACW1heFN1cHBseQkAAAIAAAABAgAAABdBbGwgbWVtYWxpZW4gYXJlIG1pbnRlZAMJAQAAAAIhPQAAAAIJAQAAAAx0cnlHZXRTdHJpbmcAAAABCQAEJQAAAAEIBQAAAAFpAAAABmNhbGxlcgIAAAAACQAAAgAAAAECAAAAFllvdSBhbHJlYWR5IG1pbnRlZCBORlQEAAAAAmlkCQABpAAAAAEFAAAAE3RvdGFsTWVtYWxpZW5TdXBwbHkEAAAABWFzc2V0CQAEQwAAAAcJAQAAAAdnZXROYW1lAAAAAQUAAAACaWQJAQAAAAdnZXRNZXRhAAAAAQUAAAACaWQAAAAAAAAAAAEAAAAAAAAAAAAHBQAAAAR1bml0BQAAAAZoZWlnaHQEAAAAB2Fzc2V0SWQJAAQ4AAAAAQUAAAAFYXNzZXQJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAICAAAAD21lbWFsaWVuX3N1cHBseQkAAGQAAAACBQAAABN0b3RhbE1lbWFsaWVuU3VwcGx5AAAAAAAAAAABCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIJAAQlAAAAAQgFAAAAAWkAAAAGY2FsbGVyCQACWAAAAAEFAAAAB2Fzc2V0SWQJAARMAAAAAgUAAAAFYXNzZXQJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyAAAAAAAAAAABBQAAAAdhc3NldElkBQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleROY41o=", "height": 2178141, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5w43zDNAmUKyq3WjkX9rvioAuQvaE3iwLm19KHCBhL8C Next: GJ3KkUa7mnHxknMmfZbUwb1hTM1miLsBFdfKVtvySjXb Diff:
OldNewDifferences
7070 then {
7171 let asset = Issue(getName(id), getMetaVideo(id), 1, 0, false, unit, height)
7272 let assetId = calculateAssetId(asset)
73-[IntegerEntry("memalien_supply", (totalMemalienSupply + 1)), StringEntry(("drop: " + address), toBase58String(assetId)), asset, ScriptTransfer(tryGetAddress(address), 1, assetId)]
73+[IntegerEntry("memalien_supply", (totalMemalienSupply + 1)), StringEntry(((("drop_" + id) + "_") + address), toBase58String(assetId)), asset, ScriptTransfer(tryGetAddress(address), 1, assetId)]
7474 }
7575 else {
7676 let asset = Issue(getName(id), getMeta(id), 1, 0, false, unit, height)
7777 let assetId = calculateAssetId(asset)
78-[IntegerEntry("memalien_supply", (totalMemalienSupply + 1)), StringEntry(address, toBase58String(assetId)), asset, ScriptTransfer(tryGetAddress(address), 1, assetId)]
78+[IntegerEntry("memalien_supply", (totalMemalienSupply + 1)), StringEntry(((("drop_" + id) + "_") + address), toBase58String(assetId)), asset, ScriptTransfer(tryGetAddress(address), 1, assetId)]
7979 }
8080 }
8181 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let maxSupply = 5000
55
66 func tryGetInteger (key) = {
77 let val = match getInteger(this, key) {
88 case b: Int =>
99 b
1010 case _ =>
1111 0
1212 }
1313 val
1414 }
1515
1616
1717 func tryGetString (key) = {
1818 let val = match getString(this, key) {
1919 case b: String =>
2020 b
2121 case _ =>
2222 ""
2323 }
2424 val
2525 }
2626
2727
2828 func tryGetAddress (addr) = {
2929 let val = match addressFromString(addr) {
3030 case a: Address =>
3131 a
3232 case a: Unit =>
3333 Address(base58'3PQG1wqM5vECAGVzMDvBzyq5nSkriqnVFxs')
3434 case _ =>
3535 throw("Match error")
3636 }
3737 val
3838 }
3939
4040
4141 func getName (id) = ("Memalien #" + id)
4242
4343
4444 func getURL (id) = (("https://images.wavespunks.com/memalien/" + id) + ".png")
4545
4646
4747 func getVideoURL (id) = (("https://images.wavespunks.com/memalien/" + id) + ".mp4")
4848
4949
5050 func getMeta (id) = (((("{\"id\": " + id) + "\", \"url\": \"") + getURL(id)) + "\"}")
5151
5252
5353 func getMetaVideo (id) = (((((("{\"id\": " + id) + "\", \"url\": \"") + getURL(id)) + "\", \"animation_url\": \"") + getVideoURL(id)) + "\"}")
5454
5555
5656 @Callable(i)
5757 func dropNFT (address) = {
5858 let totalMemalienSupply = tryGetInteger("memalien_supply")
5959 let endDrop = tryGetInteger("end_drop")
6060 let owner = tryGetString("owner")
6161 if ((totalMemalienSupply > (endDrop - 1)))
6262 then throw("Drop was ended")
6363 else if ((totalMemalienSupply == maxSupply))
6464 then throw("All memalien are minted")
6565 else if ((toString(i.caller) != owner))
6666 then throw("The function is available only to the admin")
6767 else {
6868 let id = toString(totalMemalienSupply)
6969 if (containsElement(split(tryGetString("video_nft"), ","), id))
7070 then {
7171 let asset = Issue(getName(id), getMetaVideo(id), 1, 0, false, unit, height)
7272 let assetId = calculateAssetId(asset)
73-[IntegerEntry("memalien_supply", (totalMemalienSupply + 1)), StringEntry(("drop: " + address), toBase58String(assetId)), asset, ScriptTransfer(tryGetAddress(address), 1, assetId)]
73+[IntegerEntry("memalien_supply", (totalMemalienSupply + 1)), StringEntry(((("drop_" + id) + "_") + address), toBase58String(assetId)), asset, ScriptTransfer(tryGetAddress(address), 1, assetId)]
7474 }
7575 else {
7676 let asset = Issue(getName(id), getMeta(id), 1, 0, false, unit, height)
7777 let assetId = calculateAssetId(asset)
78-[IntegerEntry("memalien_supply", (totalMemalienSupply + 1)), StringEntry(address, toBase58String(assetId)), asset, ScriptTransfer(tryGetAddress(address), 1, assetId)]
78+[IntegerEntry("memalien_supply", (totalMemalienSupply + 1)), StringEntry(((("drop_" + id) + "_") + address), toBase58String(assetId)), asset, ScriptTransfer(tryGetAddress(address), 1, assetId)]
7979 }
8080 }
8181 }
8282
8383
8484
8585 @Callable(i)
8686 func mint () = {
8787 let totalMemalienSupply = tryGetInteger("memalien_supply")
8888 let endDrop = tryGetInteger("end_drop")
8989 if (((endDrop - 1) > totalMemalienSupply))
9090 then throw("Drop wasn`t ended yet")
9191 else if ((totalMemalienSupply == maxSupply))
9292 then throw("All memalien are minted")
9393 else if ((tryGetString(toString(i.caller)) != ""))
9494 then throw("You already minted NFT")
9595 else {
9696 let id = toString(totalMemalienSupply)
9797 let asset = Issue(getName(id), getMeta(id), 1, 0, false, unit, height)
9898 let assetId = calculateAssetId(asset)
9999 [IntegerEntry("memalien_supply", (totalMemalienSupply + 1)), StringEntry(toString(i.caller), toBase58String(assetId)), asset, ScriptTransfer(i.caller, 1, assetId)]
100100 }
101101 }
102102
103103
104104 @Verifier(tx)
105105 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
106106

github/deemru/w8io/169f3d6 
39.63 ms