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:AAIFAAAAAAAAAAQIAhIAAAAACgAAAAAJbWF4U3VwcGx5AAAAAAAAAAPoAAAAAAV3YXZlcwAAAAAABfXhAAEAAAAMZ2V0UHVua0lES2V5AAAAAQAAAAJpZAkAASwAAAACAgAAAAVwdW5rXwUAAAACaWQBAAAADXRyeUdldEludGVnZXIAAAABAAAAA2tleQQAAAADdmFsBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFiBQAAAAckbWF0Y2gwBQAAAAFiAAAAAAAAAAAABQAAAAN2YWwBAAAADHRyeUdldFN0cmluZwAAAAEAAAADa2V5BAAAAAN2YWwEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAWIFAAAAByRtYXRjaDAFAAAAAWICAAAAAAUAAAADdmFsAQAAAAZnZXRVUkwAAAABAAAAAmlkAwkBAAAAD2NvbnRhaW5zRWxlbWVudAAAAAIJAAS1A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5AAAAAgIAAAAPcHJlbWludF9hZGRyZXNzCQAEuQAAAAIJAARRAAAAAgUAAAAOcHJlTWludEFkZHJlc3MFAAAABWluZGV4AgAAAAEsBQAAAANuaWwFAAAABHRlbXADCQAAZgAAAAIFAAAACXN0YXJ0TWludAgFAAAACWxhc3RCbG9jawAAAAl0aW1lc3RhbXAJAAACAAAAAQIAAAAVTWludCBoYXNuYHQgeWV0IGJlZ3VuAwUAAAAQZmlyc3RQYXltZW50Qm9vbAkAAAIAAAABAgAAACRQYXltZW50IG11c3QgYmUgaW4gV2F2ZXMgdG9rZW5zIG9ubHkDCQAAZgAAAAIFAAAAC3dhdmVzTmVlZGVkCAUAAAAMZmlyc3RQYXltZW50AAAABmFtb3VudAkAAAIAAAABAgAAABJJbnN1ZmZpY2llbnQgZnVuZHMJAQAAAAVfbWludAAAAAMFAAAAAWkFAAAAEHRvdGFsUHVua3NTdXBwbHkFAAAADmF2YWlsYWJsZVB1bmtzAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkhF4XS", "height": 2188605, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7yDCRbunnWVFtUj8WKGm9yRGioQGmxq5xbXPjC4eqGXT Next: 4tkabmMuPbXRwGxZceEPc2cPGyNNRAwHuuruvaQCQBMt Diff:
Old | New | Differences | |
---|---|---|---|
79 | 79 | let A = o((a - x), n.transactionId, height, 0) | |
80 | 80 | let B = z[A] | |
81 | 81 | let C = ("MadPunk #" + B) | |
82 | - | let D = " | |
82 | + | let D = j("collection_description") | |
83 | 83 | let E = Issue(C, D, 1, 0, false, unit, height) | |
84 | 84 | 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"), " | |
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)] | |
86 | 86 | G | |
87 | 87 | } | |
88 | 88 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = 1000 | |
5 | 5 | ||
6 | 6 | let b = 100000000 | |
7 | 7 | ||
8 | 8 | func c (d) = ("punk_" + d) | |
9 | 9 | ||
10 | 10 | ||
11 | 11 | func e (f) = { | |
12 | 12 | let g = { | |
13 | 13 | let h = getInteger(this, f) | |
14 | 14 | if ($isInstanceOf(h, "Int")) | |
15 | 15 | then { | |
16 | 16 | let i = h | |
17 | 17 | i | |
18 | 18 | } | |
19 | 19 | else 0 | |
20 | 20 | } | |
21 | 21 | g | |
22 | 22 | } | |
23 | 23 | ||
24 | 24 | ||
25 | 25 | func j (f) = { | |
26 | 26 | let g = { | |
27 | 27 | let h = getString(this, f) | |
28 | 28 | if ($isInstanceOf(h, "String")) | |
29 | 29 | then { | |
30 | 30 | let i = h | |
31 | 31 | i | |
32 | 32 | } | |
33 | 33 | else "" | |
34 | 34 | } | |
35 | 35 | g | |
36 | 36 | } | |
37 | 37 | ||
38 | 38 | ||
39 | 39 | func k (d) = if (containsElement(split(j("gif_punk"), ","), d)) | |
40 | 40 | then (("https://mypunks.wavespunks.com/mad/m" + d) + ".gif") | |
41 | 41 | else (("https://mypunks.wavespunks.com/mad/m" + d) + ".png") | |
42 | 42 | ||
43 | 43 | ||
44 | 44 | func l (d) = { | |
45 | 45 | let m = { | |
46 | 46 | let h = parseInt(d) | |
47 | 47 | if ($isInstanceOf(h, "Int")) | |
48 | 48 | then { | |
49 | 49 | let n = h | |
50 | 50 | n | |
51 | 51 | } | |
52 | 52 | else if ($isInstanceOf(h, "Unit")) | |
53 | 53 | then { | |
54 | 54 | let n = h | |
55 | 55 | 0 | |
56 | 56 | } | |
57 | 57 | else throw("Match error") | |
58 | 58 | } | |
59 | 59 | if (containsElement(split(j("gif_punk"), ","), toString(m))) | |
60 | 60 | then "ultra-rare" | |
61 | 61 | else if ((29 >= m)) | |
62 | 62 | then "rare" | |
63 | 63 | else "unique" | |
64 | 64 | } | |
65 | 65 | ||
66 | 66 | ||
67 | 67 | func o (p,q,r,s) = { | |
68 | 68 | let t = value(blockInfoByHeight((r - 1))) | |
69 | 69 | let u = sha256_16Kb((q + value(t.vrf))) | |
70 | 70 | (toInt(u, s) % p) | |
71 | 71 | } | |
72 | 72 | ||
73 | 73 | ||
74 | 74 | func v () = (b * 6) | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | func w (n,x,y) = { | |
78 | 78 | let z = split(y, ",") | |
79 | 79 | let A = o((a - x), n.transactionId, height, 0) | |
80 | 80 | let B = z[A] | |
81 | 81 | let C = ("MadPunk #" + B) | |
82 | - | let D = " | |
82 | + | let D = j("collection_description") | |
83 | 83 | let E = Issue(C, D, 1, 0, false, unit, height) | |
84 | 84 | 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"), " | |
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)] | |
86 | 86 | G | |
87 | 87 | } | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | @Callable(n) | |
91 | 91 | func mint () = { | |
92 | 92 | let x = e("punks_supply") | |
93 | 93 | let y = j("available_punks") | |
94 | 94 | let H = split(j("premint_address"), ",") | |
95 | 95 | let I = e("start_mint") | |
96 | 96 | let J = v() | |
97 | 97 | let K = value(n.payments[0]) | |
98 | 98 | let L = { | |
99 | 99 | let h = K.assetId | |
100 | 100 | if ($isInstanceOf(h, "ByteVector")) | |
101 | 101 | then { | |
102 | 102 | let M = h | |
103 | 103 | true | |
104 | 104 | } | |
105 | 105 | else if ($isInstanceOf(h, "Unit")) | |
106 | 106 | then { | |
107 | 107 | let N = h | |
108 | 108 | false | |
109 | 109 | } | |
110 | 110 | else throw("Match error") | |
111 | 111 | } | |
112 | 112 | if ((x == a)) | |
113 | 113 | then throw("All punks are minted") | |
114 | 114 | else if ((y == "")) | |
115 | 115 | then throw("No punks available") | |
116 | 116 | else if (containsElement(H, toString(n.caller))) | |
117 | 117 | then { | |
118 | 118 | let O = { | |
119 | 119 | let h = indexOf(H, toString(n.caller)) | |
120 | 120 | if ($isInstanceOf(h, "Int")) | |
121 | 121 | then { | |
122 | 122 | let i = h | |
123 | 123 | i | |
124 | 124 | } | |
125 | 125 | else if ($isInstanceOf(h, "Unit")) | |
126 | 126 | then { | |
127 | 127 | let i = h | |
128 | 128 | 0 | |
129 | 129 | } | |
130 | 130 | else throw("Match error") | |
131 | 131 | } | |
132 | 132 | let P = (w(n, x, y) ++ [StringEntry("premint_address", makeString(removeByIndex(H, O), ","))]) | |
133 | 133 | P | |
134 | 134 | } | |
135 | 135 | else if ((I > lastBlock.timestamp)) | |
136 | 136 | then throw("Mint hasn`t yet begun") | |
137 | 137 | else if (L) | |
138 | 138 | then throw("Payment must be in Waves tokens only") | |
139 | 139 | else if ((J > K.amount)) | |
140 | 140 | then throw("Insufficient funds") | |
141 | 141 | else w(n, x, y) | |
142 | 142 | } | |
143 | 143 | ||
144 | 144 | ||
145 | 145 | @Verifier(G) | |
146 | 146 | func Q () = sigVerify(G.bodyBytes, G.proofs[0], G.senderPublicKey) | |
147 | 147 |
github/deemru/w8io/169f3d6 30.16 ms ◑