tx · CaWCvkNGCQ3royZtbKRRmeSUvHSvMRtkNQDihVznLSt1

3MugHf1wRTdGuTrjXGB4qunDNZ6jNEVEAdu:  -0.00800000 Waves

2022.08.24 12:40 [2198392] smart account 3MugHf1wRTdGuTrjXGB4qunDNZ6jNEVEAdu > SELF 0.00000000 Waves

{ "type": 13, "id": "CaWCvkNGCQ3royZtbKRRmeSUvHSvMRtkNQDihVznLSt1", "fee": 800000, "feeAssetId": null, "timestamp": 1661334040982, "version": 2, "chainId": 84, "sender": "3MugHf1wRTdGuTrjXGB4qunDNZ6jNEVEAdu", "senderPublicKey": "FbyxDzJQJeCSLtjFFYUf8YN6yLMPB1sXnpiQ13oFNHWd", "proofs": [ "4fgfQxAs2Rrr5QTHnLwRHtcGkqpbei5EbXQPfdmCPTBuAFM7MyJfHXMmk8gc1cYo4s3bs6B4GCwMsYsas71GdcCD" ], "script": "base64:AAIFAAAAAAAAAAQIAhIAAAAACwAAAAAJbWF4U3VwcGx5AAAAAAAAAAPoAAAAAAV3YXZlcwAAAAAABfXhAAEAAAAMZ2V0UHVua0lES2V5AAAAAQAAAAJpZAkAASwAAAACAgAAAAVwdW5rXwUAAAACaWQBAAAADXRyeUdldEludGVnZXIAAAABAAAAA2tleQQAAAADdmFsBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFiBQAAAAckbWF0Y2gwBQAAAAFiAAAAAAAAAAAABQAAAAN2YWwBAAAADXRyeUdldEJvb2xlYW4AAAABAAAAA2tleQQAAAADdmFsBAAAAAckbWF0Y2gwCQAEGwAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAHQm9vbGVhbgQAAAABYgUAAAAHJG1hdGNoMAUAAAABYgcFAAAAA3ZhbAEAAAAMdHJ5R2V0U3RyaW5nAAAAAQAAAANrZXkEAAAAA3ZhbAQAAAAHJG1hdGNo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AAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXmX8EYA", "height": 2198392, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AJVRdwRMi6GJH9X2y6uJqmEo3qAr9nLsRDyxiq7s4hfy Next: none Diff:
OldNewDifferences
4242
4343
4444 func getURL (id) = if (containsElement(split(tryGetString("gif_punk"), ","), id))
45- then (("https://images.wavespunks.com/mad/mutation/" + id) + ".gif")
46- else (("https://images.wavespunks.com/mad/mutation/" + id) + ".png")
45+ then (("https://images.wavespunks.com/mad/empire/" + id) + ".gif")
46+ else (("https://images.wavespunks.com/mad/empire/" + id) + ".png")
4747
4848
4949 func getTypePunk (id) = {
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let maxSupply = 1000
55
66 let waves = 100000000
77
88 func getPunkIDKey (id) = ("punk_" + id)
99
1010
1111 func tryGetInteger (key) = {
1212 let val = match getInteger(this, key) {
1313 case b: Int =>
1414 b
1515 case _ =>
1616 0
1717 }
1818 val
1919 }
2020
2121
2222 func tryGetBoolean (key) = {
2323 let val = match getBoolean(this, key) {
2424 case b: Boolean =>
2525 b
2626 case _ =>
2727 false
2828 }
2929 val
3030 }
3131
3232
3333 func tryGetString (key) = {
3434 let val = match getString(this, key) {
3535 case b: String =>
3636 b
3737 case _ =>
3838 ""
3939 }
4040 val
4141 }
4242
4343
4444 func getURL (id) = if (containsElement(split(tryGetString("gif_punk"), ","), id))
45- then (("https://images.wavespunks.com/mad/mutation/" + id) + ".gif")
46- else (("https://images.wavespunks.com/mad/mutation/" + id) + ".png")
45+ then (("https://images.wavespunks.com/mad/empire/" + id) + ".gif")
46+ else (("https://images.wavespunks.com/mad/empire/" + id) + ".png")
4747
4848
4949 func getTypePunk (id) = {
5050 let idINT = match parseInt(id) {
5151 case i: Int =>
5252 i
5353 case i: Unit =>
5454 0
5555 case _ =>
5656 throw("Match error")
5757 }
5858 if (containsElement(split(tryGetString("gif_punk"), ","), toString(idINT)))
5959 then "ultra-rare"
6060 else if ((29 >= idINT))
6161 then "rare"
6262 else "unique"
6363 }
6464
6565
6666 func getRandomNumber (variants,txId,heightBlock,offset) = {
6767 let randomSeedBlock = value(blockInfoByHeight((heightBlock - 1)))
6868 let randomHash = sha256_16Kb((txId + value(randomSeedBlock.vrf)))
6969 (toInt(randomHash, offset) % variants)
7070 }
7171
7272
7373 func calcWavesNeeded () = (waves * 6)
7474
7575
7676 func _mint (i,totalPunksSupply,availablePunks) = {
7777 let listAvailablePunks = split(availablePunks, ",")
7878 let rand = getRandomNumber((maxSupply - totalPunksSupply), i.transactionId, height, 0)
7979 let punkId = listAvailablePunks[rand]
8080 let name = ("MadPunk #" + punkId)
8181 let meta = tryGetString("collection_description")
8282 let asset = Issue(name, meta, 1, 0, false, unit, height)
8383 let assetId = calculateAssetId(asset)
8484 let tx = [IntegerEntry("punks_supply", (totalPunksSupply + 1)), StringEntry("available_punks", makeString(removeByIndex(listAvailablePunks, rand), ",")), asset, StringEntry(getPunkIDKey(punkId), toBase58String(assetId)), StringEntry((toBase58String(assetId) + "_id"), getPunkIDKey(punkId)), StringEntry((toBase58String(assetId) + "_type"), getTypePunk(punkId)), StringEntry((toBase58String(assetId) + "_url"), getURL(punkId)), StringEntry((toBase58String(assetId) + "_fraction"), tryGetString("fraction")), ScriptTransfer(i.caller, 1, assetId)]
8585 tx
8686 }
8787
8888
8989 @Callable(i)
9090 func mint () = {
9191 let punkId = toString(5)
9292 let name = ("MadPunk #" + punkId)
9393 let meta = tryGetString("collection_description")
9494 let asset = Issue(name, meta, 1, 0, false, unit, height)
9595 let assetId = calculateAssetId(asset)
9696 let tx = [asset, StringEntry(getPunkIDKey(punkId), toBase58String(assetId)), StringEntry((toBase58String(assetId) + "_id"), getPunkIDKey(punkId)), StringEntry((toBase58String(assetId) + "_type"), getTypePunk(punkId)), StringEntry((toBase58String(assetId) + "_url"), getURL(punkId)), StringEntry((toBase58String(assetId) + "_fraction"), tryGetString("fraction")), ScriptTransfer(i.caller, 1, assetId)]
9797 tx
9898 }
9999
100100
101101 @Verifier(tx)
102102 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
103103

github/deemru/w8io/026f985 
28.04 ms