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