tx · 4zErmhgTQAwzcg5BXwwQMWWVnkhKUX5vhBbU3fJKqCM5

3Muey1cqNaBjjcxXfKHF8qqTZeyGPAsvCpP:  -0.00900000 Waves

2022.08.17 17:39 [2188605] smart account 3Muey1cqNaBjjcxXfKHF8qqTZeyGPAsvCpP > SELF 0.00000000 Waves

{ "type": 13, "id": "4zErmhgTQAwzcg5BXwwQMWWVnkhKUX5vhBbU3fJKqCM5", "fee": 900000, "feeAssetId": null, "timestamp": 1660747190264, "version": 2, "chainId": 84, "sender": "3Muey1cqNaBjjcxXfKHF8qqTZeyGPAsvCpP", "senderPublicKey": "3bPATHM3GnqSGjJb8saHmYMvsaioqu2etEGkZDiuRCcn", "proofs": [ "5vW511swBMGMq9q2DL7gjJRTBDRvf8XjQByPjZfLHSFbmS4xpUjX5469dhApx4BVUhKZKvJf2iF4T6UXfuNR8t3j" ], "script": "base64:AAIFAAAAAAAAAAQIAhIAAAAACgAAAAAJbWF4U3VwcGx5AAAAAAAAAAPoAAAAAAV3YXZlcwAAAAAABfXhAAEAAAAMZ2V0UHVua0lES2V5AAAAAQAAAAJpZAkAASwAAAACAgAAAAVwdW5rXwUAAAACaWQBAAAADXRyeUdldEludGVnZXIAAAABAAAAA2tleQQAAAADdmFsBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFiBQAAAAckbWF0Y2gwBQAAAAFiAAAAAAAAAAAABQAAAAN2YWwBAAAADHRyeUdldFN0cmluZwAAAAEAAAADa2V5BAAAAAN2YWwEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAWIFAAAAByRtYXRjaDAFAAAAAWICAAAAAAUAAAADdmFsAQAAAAZnZXRVUkwAAAABAAAAAmlkAwkBAAAAD2NvbnRhaW5zRWxlbWVudAAAAAIJAAS1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J5AAAAAgIAAAAPcHJlbWludF9hZGRyZXNzCQAEuQAAAAIJAARRAAAAAgUAAAAOcHJlTWludEFkZHJlc3MFAAAABWluZGV4AgAAAAEsBQAAAANuaWwFAAAABHRlbXADCQAAZgAAAAIFAAAACXN0YXJ0TWludAgFAAAACWxhc3RCbG9jawAAAAl0aW1lc3RhbXAJAAACAAAAAQIAAAAVTWludCBoYXNuYHQgeWV0IGJlZ3VuAwUAAAAQZmlyc3RQYXltZW50Qm9vbAkAAAIAAAABAgAAACRQYXltZW50IG11c3QgYmUgaW4gV2F2ZXMgdG9rZW5zIG9ubHkDCQAAZgAAAAIFAAAAC3dhdmVzTmVlZGVkCAUAAAAMZmlyc3RQYXltZW50AAAABmFtb3VudAkAAAIAAAABAgAAABJJbnN1ZmZpY2llbnQgZnVuZHMJAQAAAAVfbWludAAAAAMFAAAAAWkFAAAAEHRvdGFsUHVua3NTdXBwbHkFAAAADmF2YWlsYWJsZVB1bmtzAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkhF4XS", "height": 2188605, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7yDCRbunnWVFtUj8WKGm9yRGioQGmxq5xbXPjC4eqGXT Next: 4tkabmMuPbXRwGxZceEPc2cPGyNNRAwHuuruvaQCQBMt Diff:
OldNewDifferences
7979 let A = o((a - x), n.transactionId, height, 0)
8080 let B = z[A]
8181 let C = ("MadPunk #" + B)
82- let D = "Free Nomads: bounty hunters, raiders, sheriffs, tribal warriors and adrenaline junkies. Created by @WavesPunks"
82+ let D = j("collection_description")
8383 let E = Issue(C, D, 1, 0, false, unit, height)
8484 let F = calculateAssetId(E)
85- let G = [IntegerEntry("punks_supply", (x + 1)), StringEntry("available_punks", makeString(removeByIndex(z, A), ",")), E, StringEntry(c(B), toBase58String(F)), StringEntry((toBase58String(F) + "_id"), c(B)), StringEntry((toBase58String(F) + "_type"), l(B)), StringEntry((toBase58String(F) + "_url"), k(B)), StringEntry((toBase58String(F) + "_fraction"), "Free Nomads"), ScriptTransfer(n.caller, 1, F)]
85+ let G = [IntegerEntry("punks_supply", (x + 1)), StringEntry("available_punks", makeString(removeByIndex(z, A), ",")), E, StringEntry(c(B), toBase58String(F)), StringEntry((toBase58String(F) + "_id"), c(B)), StringEntry((toBase58String(F) + "_type"), l(B)), StringEntry((toBase58String(F) + "_url"), k(B)), StringEntry((toBase58String(F) + "_fraction"), j("fraction")), ScriptTransfer(n.caller, 1, F)]
8686 G
8787 }
8888
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = 1000
55
66 let b = 100000000
77
88 func c (d) = ("punk_" + d)
99
1010
1111 func e (f) = {
1212 let g = {
1313 let h = getInteger(this, f)
1414 if ($isInstanceOf(h, "Int"))
1515 then {
1616 let i = h
1717 i
1818 }
1919 else 0
2020 }
2121 g
2222 }
2323
2424
2525 func j (f) = {
2626 let g = {
2727 let h = getString(this, f)
2828 if ($isInstanceOf(h, "String"))
2929 then {
3030 let i = h
3131 i
3232 }
3333 else ""
3434 }
3535 g
3636 }
3737
3838
3939 func k (d) = if (containsElement(split(j("gif_punk"), ","), d))
4040 then (("https://mypunks.wavespunks.com/mad/m" + d) + ".gif")
4141 else (("https://mypunks.wavespunks.com/mad/m" + d) + ".png")
4242
4343
4444 func l (d) = {
4545 let m = {
4646 let h = parseInt(d)
4747 if ($isInstanceOf(h, "Int"))
4848 then {
4949 let n = h
5050 n
5151 }
5252 else if ($isInstanceOf(h, "Unit"))
5353 then {
5454 let n = h
5555 0
5656 }
5757 else throw("Match error")
5858 }
5959 if (containsElement(split(j("gif_punk"), ","), toString(m)))
6060 then "ultra-rare"
6161 else if ((29 >= m))
6262 then "rare"
6363 else "unique"
6464 }
6565
6666
6767 func o (p,q,r,s) = {
6868 let t = value(blockInfoByHeight((r - 1)))
6969 let u = sha256_16Kb((q + value(t.vrf)))
7070 (toInt(u, s) % p)
7171 }
7272
7373
7474 func v () = (b * 6)
7575
7676
7777 func w (n,x,y) = {
7878 let z = split(y, ",")
7979 let A = o((a - x), n.transactionId, height, 0)
8080 let B = z[A]
8181 let C = ("MadPunk #" + B)
82- let D = "Free Nomads: bounty hunters, raiders, sheriffs, tribal warriors and adrenaline junkies. Created by @WavesPunks"
82+ let D = j("collection_description")
8383 let E = Issue(C, D, 1, 0, false, unit, height)
8484 let F = calculateAssetId(E)
85- let G = [IntegerEntry("punks_supply", (x + 1)), StringEntry("available_punks", makeString(removeByIndex(z, A), ",")), E, StringEntry(c(B), toBase58String(F)), StringEntry((toBase58String(F) + "_id"), c(B)), StringEntry((toBase58String(F) + "_type"), l(B)), StringEntry((toBase58String(F) + "_url"), k(B)), StringEntry((toBase58String(F) + "_fraction"), "Free Nomads"), ScriptTransfer(n.caller, 1, F)]
85+ let G = [IntegerEntry("punks_supply", (x + 1)), StringEntry("available_punks", makeString(removeByIndex(z, A), ",")), E, StringEntry(c(B), toBase58String(F)), StringEntry((toBase58String(F) + "_id"), c(B)), StringEntry((toBase58String(F) + "_type"), l(B)), StringEntry((toBase58String(F) + "_url"), k(B)), StringEntry((toBase58String(F) + "_fraction"), j("fraction")), ScriptTransfer(n.caller, 1, F)]
8686 G
8787 }
8888
8989
9090 @Callable(n)
9191 func mint () = {
9292 let x = e("punks_supply")
9393 let y = j("available_punks")
9494 let H = split(j("premint_address"), ",")
9595 let I = e("start_mint")
9696 let J = v()
9797 let K = value(n.payments[0])
9898 let L = {
9999 let h = K.assetId
100100 if ($isInstanceOf(h, "ByteVector"))
101101 then {
102102 let M = h
103103 true
104104 }
105105 else if ($isInstanceOf(h, "Unit"))
106106 then {
107107 let N = h
108108 false
109109 }
110110 else throw("Match error")
111111 }
112112 if ((x == a))
113113 then throw("All punks are minted")
114114 else if ((y == ""))
115115 then throw("No punks available")
116116 else if (containsElement(H, toString(n.caller)))
117117 then {
118118 let O = {
119119 let h = indexOf(H, toString(n.caller))
120120 if ($isInstanceOf(h, "Int"))
121121 then {
122122 let i = h
123123 i
124124 }
125125 else if ($isInstanceOf(h, "Unit"))
126126 then {
127127 let i = h
128128 0
129129 }
130130 else throw("Match error")
131131 }
132132 let P = (w(n, x, y) ++ [StringEntry("premint_address", makeString(removeByIndex(H, O), ","))])
133133 P
134134 }
135135 else if ((I > lastBlock.timestamp))
136136 then throw("Mint hasn`t yet begun")
137137 else if (L)
138138 then throw("Payment must be in Waves tokens only")
139139 else if ((J > K.amount))
140140 then throw("Insufficient funds")
141141 else w(n, x, y)
142142 }
143143
144144
145145 @Verifier(G)
146146 func Q () = sigVerify(G.bodyBytes, G.proofs[0], G.senderPublicKey)
147147

github/deemru/w8io/169f3d6 
30.16 ms