tx · HEYUNyhNxe4BQhy8t9eWrpxxQUkPwPvUfitybtLeZLUs 3MydZBLyjvR1dzf6nzucCbpCDZgaL4zWPwg: -0.01400000 Waves 2022.01.25 12:33 [1894261] smart account 3MydZBLyjvR1dzf6nzucCbpCDZgaL4zWPwg > SELF 0.00000000 Waves
{ "type": 13, "id": "HEYUNyhNxe4BQhy8t9eWrpxxQUkPwPvUfitybtLeZLUs", "fee": 1400000, "feeAssetId": null, "timestamp": 1643103246447, "version": 2, "chainId": 84, "sender": "3MydZBLyjvR1dzf6nzucCbpCDZgaL4zWPwg", "senderPublicKey": "2STNTL69cCYwATq85AKghuBwWjSiZGJcmmmLYVW5wQbx", "proofs": [ "4hxnMMjNenDjPMZcm9mm8WGTrzETnBAB2ihc9q5E3D2hAz2XYAmSQP9ZYRZ5UwYxuWEAXd2DwP3e6iAkLCSFTG5w" ], "script": "base64:AAIFAAAAAAAAAoQIAhIDCgEIGggKAUESA3JlZhoTCgFCEg5hdmFpbGFibGVQdW5rcxoQCgFDEgt3YXZlc05lZWRlZBoRCgFEEgxmaXJzdFBheW1lbnQaFQoBRRIQZmlyc3RQYXltZW50Qm9vbBoGCgFGEgF0GgYKAUcSAXcaFwoBSBISbGlzdEF2YWlsYWJsZVB1bmtzGgkKAUkSBHJhbmQaCwoBShIGcHVua0lkGgkKAUsSBG5hbWUaCQoBTBIEbWV0YRoKCgFNEgVhc3NldBoMCgFOEgdhc3NldElkGhMKAU8SDnJlZmVyYWxBZGRyZXNzGgcKAVASAnR4GgsKAVESBnZlcmlmeRoOCgFhEgltYXhTdXBwbHkaCgoBYhIFd2F2ZXMaEQoBYxIMZ2V0UHVua0lES2V5GgcKAWQSAmlkGhIKAWUSDXRyeUdldEludGVnZXIaCAoBZhIDa2V5GggKAWcSA3ZhbBoMCgFoEgckbWF0Y2gwGgYKAWkSAWIaEQoBahIMdHJ5R2V0U3RyaW5nGhIKAWsSDXRyeUdldEFkZHJlc3MaCQoBbBIEYWRkchoGCgFtEgFhG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naHQEAAAAAU4JAAQ4AAAAAQUAAAABTQQAAAABTwkBAAAAAWsAAAABBQAAAAFBCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACAgAAAAxwdW5rc19zdXBwbHkJAABkAAAAAgUAAAABegAAAAAAAAAAAQkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACAgAAAA9hdmFpbGFibGVfcHVua3MJAAS5AAAAAgkABFEAAAACBQAAAAFIBQAAAAFJAgAAAAEsCQAETAAAAAIFAAAAAU0JAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkBAAAAAWMAAAABBQAAAAFKCQACWAAAAAEFAAAAAU4JAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkAAlgAAAABBQAAAAFOCQEAAAABYwAAAAEFAAAAAUoJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAXAAAAAGY2FsbGVyAAAAAAAAAAABBQAAAAFOCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMFAAAAAU8JAABpAAAAAggFAAAAAUQAAAAGYW1vdW50AAAAAAAAAAAKBQAAAAR1bml0BQAAAANuaWwAAAABAAAAAVABAAAAAVEAAAAACQAB9AAAAAMIBQAAAAFQAAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAABUAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAFQAAAAD3NlbmRlclB1YmxpY0tleR4ZqJ0=", "height": 1894261, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: J62cjciWVHfYVMB4CwL8CgUXQ5dxEJKiB4spDToivn7n Next: 9DYQvaMj2UsCahB8Yz7uv1NmxVLHxS4oGAwVVagbpXeM Diff:
Old | New | Differences | |
---|---|---|---|
143 | 143 | let H = split(B, ",") | |
144 | 144 | let I = r((a - z), p.transactionId, height, 0) | |
145 | 145 | let J = H[I] | |
146 | - | let K = (" | |
146 | + | let K = ("ZombiePunk #" + J) | |
147 | 147 | let L = (((((("{\"id\": " + J) + ", \"type\": \"") + n(J)) + "\", \"url\": \"") + q(J)) + "\"}") | |
148 | 148 | let M = Issue(K, L, 1, 0, false, unit, height) | |
149 | 149 | let N = calculateAssetId(M) |
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 = 300000000 | |
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 (l) = { | |
40 | 40 | let g = { | |
41 | 41 | let h = addressFromString(l) | |
42 | 42 | if ($isInstanceOf(h, "Address")) | |
43 | 43 | then { | |
44 | 44 | let m = h | |
45 | 45 | m | |
46 | 46 | } | |
47 | 47 | else if ($isInstanceOf(h, "Unit")) | |
48 | 48 | then { | |
49 | 49 | let m = h | |
50 | 50 | Address(base58'3Msrw9Kxa6RgHYQ63sSib9uESmaBU9gH6Gy') | |
51 | 51 | } | |
52 | 52 | else throw("Match error") | |
53 | 53 | } | |
54 | 54 | g | |
55 | 55 | } | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | func n (d) = { | |
59 | 59 | let o = { | |
60 | 60 | let h = parseInt(d) | |
61 | 61 | if ($isInstanceOf(h, "Int")) | |
62 | 62 | then { | |
63 | 63 | let p = h | |
64 | 64 | p | |
65 | 65 | } | |
66 | 66 | else if ($isInstanceOf(h, "Unit")) | |
67 | 67 | then { | |
68 | 68 | let p = h | |
69 | 69 | 0 | |
70 | 70 | } | |
71 | 71 | else throw("Match error") | |
72 | 72 | } | |
73 | 73 | if ((o == 0)) | |
74 | 74 | then "ultra-rare" | |
75 | 75 | else if ((40 >= o)) | |
76 | 76 | then "rare" | |
77 | 77 | else "unique" | |
78 | 78 | } | |
79 | 79 | ||
80 | 80 | ||
81 | 81 | func q (d) = { | |
82 | 82 | let o = { | |
83 | 83 | let h = parseInt(d) | |
84 | 84 | if ($isInstanceOf(h, "Int")) | |
85 | 85 | then { | |
86 | 86 | let p = h | |
87 | 87 | p | |
88 | 88 | } | |
89 | 89 | else if ($isInstanceOf(h, "Unit")) | |
90 | 90 | then { | |
91 | 91 | let p = h | |
92 | 92 | 0 | |
93 | 93 | } | |
94 | 94 | else throw("Match error") | |
95 | 95 | } | |
96 | 96 | if ((o == 0)) | |
97 | 97 | then (("https://wavespunks.com/zombie/z" + d) + ".gif") | |
98 | 98 | else (("https://wavespunks.com/zombie/z" + d) + ".png") | |
99 | 99 | } | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func r (s,t,u,v) = { | |
103 | 103 | let w = value(blockInfoByHeight((u - 1))) | |
104 | 104 | let x = sha256_16Kb((t + value(w.vrf))) | |
105 | 105 | (toInt(x, v) % s) | |
106 | 106 | } | |
107 | 107 | ||
108 | 108 | ||
109 | 109 | func y (z) = if ((z == 0)) | |
110 | 110 | then b | |
111 | 111 | else (((z / 200) + 1) * b) | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | @Callable(p) | |
115 | 115 | func mint (A) = { | |
116 | 116 | let z = e("punks_supply") | |
117 | 117 | let B = j("available_punks") | |
118 | 118 | let C = y(z) | |
119 | 119 | let D = value(p.payments[0]) | |
120 | 120 | let E = { | |
121 | 121 | let h = D.assetId | |
122 | 122 | if ($isInstanceOf(h, "ByteVector")) | |
123 | 123 | then { | |
124 | 124 | let F = h | |
125 | 125 | true | |
126 | 126 | } | |
127 | 127 | else if ($isInstanceOf(h, "Unit")) | |
128 | 128 | then { | |
129 | 129 | let G = h | |
130 | 130 | false | |
131 | 131 | } | |
132 | 132 | else throw("Match error") | |
133 | 133 | } | |
134 | 134 | if ((z == a)) | |
135 | 135 | then throw("All punks are minted") | |
136 | 136 | else if ((B == "")) | |
137 | 137 | then throw("No punks available") | |
138 | 138 | else if (E) | |
139 | 139 | then throw("Payment must be in Waves tokens only") | |
140 | 140 | else if ((C > D.amount)) | |
141 | 141 | then throw("Insufficient funds") | |
142 | 142 | else { | |
143 | 143 | let H = split(B, ",") | |
144 | 144 | let I = r((a - z), p.transactionId, height, 0) | |
145 | 145 | let J = H[I] | |
146 | - | let K = (" | |
146 | + | let K = ("ZombiePunk #" + J) | |
147 | 147 | let L = (((((("{\"id\": " + J) + ", \"type\": \"") + n(J)) + "\", \"url\": \"") + q(J)) + "\"}") | |
148 | 148 | let M = Issue(K, L, 1, 0, false, unit, height) | |
149 | 149 | let N = calculateAssetId(M) | |
150 | 150 | let O = k(A) | |
151 | 151 | [IntegerEntry("punks_supply", (z + 1)), StringEntry("available_punks", makeString(removeByIndex(H, I), ",")), M, StringEntry(c(J), toBase58String(N)), StringEntry(toBase58String(N), c(J)), ScriptTransfer(p.caller, 1, N), ScriptTransfer(O, (D.amount / 10), unit)] | |
152 | 152 | } | |
153 | 153 | } | |
154 | 154 | ||
155 | 155 | ||
156 | 156 | @Verifier(P) | |
157 | 157 | func Q () = sigVerify(P.bodyBytes, P.proofs[0], P.senderPublicKey) | |
158 | 158 |
github/deemru/w8io/026f985 27.80 ms ◑