tx · 5ySNNs18VUCV1gq1zmdTwCehGED83PrY5CxEaDdwgoBT 3Mx1vNMiWzJ2NgY1t8bqsj8vvpxjaTLJWyo: -0.01400000 Waves 2021.11.15 10:05 [1791820] smart account 3Mx1vNMiWzJ2NgY1t8bqsj8vvpxjaTLJWyo > SELF 0.00000000 Waves
{ "type": 13, "id": "5ySNNs18VUCV1gq1zmdTwCehGED83PrY5CxEaDdwgoBT", "fee": 1400000, "feeAssetId": null, "timestamp": 1636959966674, "version": 2, "chainId": 84, "sender": "3Mx1vNMiWzJ2NgY1t8bqsj8vvpxjaTLJWyo", "senderPublicKey": "5fUyPtPgB9o1mWXPYifKATuZc8PG2ErT5CGABbC7pu3", "proofs": [ "2QubWE6PEZENnACi3HXySTmKhgGX3oSyEfeD64rimpEv8skYtwmkj7KkMfhXWrRqPuJK72gxYosav8KkeNtX4WP6" ], "script": "base64:AAIFAAAAAAAAAAcIAhIDCgEIAAAACgAAAAAJbWF4U3VwcGx5AAAAAAAAAAPoAAAAAAV3YXZlcwAAAAAABfXhAAEAAAAMZ2V0UHVua0lES2V5AAAAAQAAAAJpZAkAASwAAAACAgAAAAVwdW5rXwUAAAACaWQBAAAADXRyeUdldEludGVnZXIAAAABAAAAA2tleQQAAAADdmFsBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFiBQAAAAckbWF0Y2gwBQAAAAFiAAAAAAAAAAAABQAAAAN2YWwBAAAADHRyeUdldFN0cmluZwAAAAEAAAADa2V5BAAAAAN2YWwEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAWIFAAAAByRtYXRjaDAFAAAAAWICAAAAAAUAAAADdmFsAQAAAA10cnlHZXRBZGRyZXNzAAAAAQAAAARhZGRyBAAAAAN2YWwEAAAAByRtYXRja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AMZ2V0UHVua0lES2V5AAAAAQUAAAAGcHVua0lkCQACWAAAAAEFAAAAB2Fzc2V0SWQJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkAAlgAAAABBQAAAAdhc3NldElkCQEAAAAMZ2V0UHVua0lES2V5AAAAAQUAAAAGcHVua0lkCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgAAAAAAAAAAAQUAAAAHYXNzZXRJZAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAAA5yZWZlcmFsQWRkcmVzcwkAAGkAAAACCAUAAAAMZmlyc3RQYXltZW50AAAABmFtb3VudAAAAAAAAAAACgUAAAAEdW5pdAUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXn1tH+X", "height": 1791820, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GiHAFUyWrVDoyWvjGMZvdPJNZxbBbEQtfsZmHw7XgF3s Next: none Diff:
Old | New | Differences | |
---|---|---|---|
108 | 108 | let H = p((a - x), y.transactionId, height, 0) | |
109 | 109 | let I = G[H] | |
110 | 110 | let J = ("WavesPunk #" + I) | |
111 | - | let K = (((((("{\"id\":" + I) + ", \"type\":") + n(I)) + ", \"url\":") + o(I)) + "}") | |
111 | + | let K = (((((("{\"id\":" + I) + ", \"type\": \"") + n(I)) + "\", \"url\": \"") + o(I)) + "\"}") | |
112 | 112 | let L = Issue(J, K, 1, 0, false, unit, height) | |
113 | 113 | let M = calculateAssetId(L) | |
114 | 114 | let N = k(z) |
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 (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) = if ((d != "0")) | |
59 | 59 | then "unique" | |
60 | 60 | else "rare" | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | func o (d) = (("https://wavespunks.com/punks/" + d) + ".png") | |
64 | 64 | ||
65 | 65 | ||
66 | 66 | func p (q,r,s,t) = { | |
67 | 67 | let u = value(blockInfoByHeight((s - 1))) | |
68 | 68 | let v = sha256_16Kb((r + value(u.vrf))) | |
69 | 69 | (toInt(v, t) % q) | |
70 | 70 | } | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | func w (x) = if ((x == 0)) | |
74 | 74 | then b | |
75 | 75 | else (((x / 100) + 1) * b) | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | @Callable(y) | |
79 | 79 | func mint (z) = { | |
80 | 80 | let x = e("punks_supply") | |
81 | 81 | let A = j("available_punks") | |
82 | 82 | let B = w(x) | |
83 | 83 | let C = value(y.payments[0]) | |
84 | 84 | let D = { | |
85 | 85 | let h = C.assetId | |
86 | 86 | if ($isInstanceOf(h, "ByteVector")) | |
87 | 87 | then { | |
88 | 88 | let E = h | |
89 | 89 | true | |
90 | 90 | } | |
91 | 91 | else if ($isInstanceOf(h, "Unit")) | |
92 | 92 | then { | |
93 | 93 | let F = h | |
94 | 94 | false | |
95 | 95 | } | |
96 | 96 | else throw("Match error") | |
97 | 97 | } | |
98 | 98 | if ((x == a)) | |
99 | 99 | then throw("All punks are minted") | |
100 | 100 | else if ((A == "")) | |
101 | 101 | then throw("No punks available") | |
102 | 102 | else if (D) | |
103 | 103 | then throw("Payment must be in Waves tokens only") | |
104 | 104 | else if ((B > C.amount)) | |
105 | 105 | then throw("Insufficient funds") | |
106 | 106 | else { | |
107 | 107 | let G = split(A, ",") | |
108 | 108 | let H = p((a - x), y.transactionId, height, 0) | |
109 | 109 | let I = G[H] | |
110 | 110 | let J = ("WavesPunk #" + I) | |
111 | - | let K = (((((("{\"id\":" + I) + ", \"type\":") + n(I)) + ", \"url\":") + o(I)) + "}") | |
111 | + | let K = (((((("{\"id\":" + I) + ", \"type\": \"") + n(I)) + "\", \"url\": \"") + o(I)) + "\"}") | |
112 | 112 | let L = Issue(J, K, 1, 0, false, unit, height) | |
113 | 113 | let M = calculateAssetId(L) | |
114 | 114 | let N = k(z) | |
115 | 115 | [IntegerEntry("punks_supply", (x + 1)), StringEntry("available_punks", makeString(removeByIndex(G, H), ",")), L, StringEntry(c(I), toBase58String(M)), StringEntry(toBase58String(M), c(I)), ScriptTransfer(y.caller, 1, M), ScriptTransfer(N, (C.amount / 10), unit)] | |
116 | 116 | } | |
117 | 117 | } | |
118 | 118 | ||
119 | 119 | ||
120 | 120 | @Verifier(O) | |
121 | 121 | func P () = sigVerify(O.bodyBytes, O.proofs[0], O.senderPublicKey) | |
122 | 122 |
github/deemru/w8io/03bedc9 61.12 ms ◑![]()