tx · AgMHbHJaZuitT99dBfvrpeMs9TbYzsaAyjJ85MUhQtAG 3Mpv2qZ8P3tXj3uKwmw8ULr9yxANxbadQEW: -0.01400000 Waves 2021.12.13 15:45 [1832499] smart account 3Mpv2qZ8P3tXj3uKwmw8ULr9yxANxbadQEW > SELF 0.00000000 Waves
{ "type": 13, "id": "AgMHbHJaZuitT99dBfvrpeMs9TbYzsaAyjJ85MUhQtAG", "fee": 1400000, "feeAssetId": null, "timestamp": 1639399536248, "version": 2, "chainId": 84, "sender": "3Mpv2qZ8P3tXj3uKwmw8ULr9yxANxbadQEW", "senderPublicKey": "J7yipDGS56f1CWQUaHM6k8TXt1iWw3DrzeqjSEUqL4Uv", "proofs": [ "3g7nx6PSZZpdXWYX9SAkfkHNjRk4mAwGCSaGteDikGMXRJ4owwqrefTYxtcTeJZ4VdFtnmTmQvfMH7SfHRkG9brJ" ], "script": "base64:AAIFAAAAAAAAAA4IAhIDCgEIEgUKAwgBCAAAAAEBAAAAC2lzUGF5bWVudE9rAAAAAgAAAAFpAAAABXByaWNlBAAAABFhY2NlcHRhYmxlQXNzZXRJZAEAAAAgBi7WREUMKdJnPRpCCOky/DKzvRQlW1GeENSHUVBimooDCQAAAAAAAAIJAAGQAAAAAQgFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAJAAACAAAAAQIAAAAUUGF5bWVudCBub3QgYXR0YWNoZWQEAAAAAXAJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAEAAAAByRtYXRjaDAIBQAAAAFwAAAAB2Fzc2V0SWQDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAACkJ5dGVWZWN0b3IEAAAAB2Fzc2V0SWQFAAAAByRtYXRjaDADCQAAAAAAAAIFAAAAB2Fzc2V0SWQFAAAAEWFjY2VwdGFibGVBc3NldElkCQAAZwAAAAIIBQAAAAFwAAAABmFtb3VudAUAAAAFcHJpY2UHCQAAAgAAAAECAAAAE0JhZCBhc3NldCBvciBhbW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lzdAUAAAALbW9uZXlhcnRpc3QFAAAABm1kc3RpZAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAAAt3YWxsZXRvd25lcgUAAAAKbW9uZXlvd25lcgUAAAAGbWRzdGlkBQAAAANuaWwJAAACAAAAAQIAAAAdV3JvbmcgcGF5bWVudCBhbW91bnQgb3IgYXNzZXQAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleUqZG4U=", "height": 1832499, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HGuL4D683NzonbtFTSEZ96EtKSfFVQmGRgHHKx3bBMXY Next: XdUmQYfF8iYiBFP84GLkYWr4uSAt7WZomKr37o11EZF Diff:
Old | New | Differences | |
---|---|---|---|
60 | 60 | let w = split(v[5], "=") | |
61 | 61 | let x = ((w[0] + "=") + r) | |
62 | 62 | let y = ((((((((((((((((((((((v[0] + ",") + v[1]) + ",") + v[2]) + ",") + v[3]) + ",") + v[4]) + ",") + x) + "',") + v[6]) + ",") + "false") + ",") + v[8]) + ",") + v[9]) + ",") + k) + ",") + v[11]) | |
63 | - | let c = v[8] | |
63 | + | let c = parseIntValue(v[8]) | |
64 | 64 | let z = (size(b.payments) * 10000) | |
65 | - | let A = ( | |
66 | - | let B = ( | |
67 | - | let C = ( | |
65 | + | let A = (c / 2) | |
66 | + | let B = (c / 4) | |
67 | + | let C = (c / 4) | |
68 | 68 | let D = base58'R8sQUmwwAENBL6B5ejGztDh3RzJ3MbKRqK7GtspFxKT' | |
69 | - | let E = base58'3MzXqo2rBxc3XEKPVcYHDrsgP7jmE6cGg6C' | |
70 | - | let F = drop(v[0], 1) | |
71 | - | let G = dropRight(F, 1) | |
72 | - | let H = drop(v[2], 1) | |
73 | - | let I = dropRight(H, 1) | |
74 | - | let J = addressFromStringValue(G) | |
75 | - | let K = addressFromStringValue(I) | |
69 | + | let E = drop(v[0], 1) | |
70 | + | let F = dropRight(E, 1) | |
71 | + | let G = drop(v[2], 1) | |
72 | + | let H = dropRight(G, 1) | |
73 | + | let I = addressFromStringValue(F) | |
74 | + | let J = addressFromStringValue(H) | |
76 | 75 | let n = Issue(m, y, 1, 0, false) | |
77 | 76 | let o = calculateAssetId(n) | |
78 | - | let | |
79 | - | if (if ((q > | |
80 | - | then ( | |
77 | + | let K = parseIntValue(v[9]) | |
78 | + | if (if ((q > K)) | |
79 | + | then (K != 0) | |
81 | 80 | else false) | |
82 | 81 | then throw("Mint impossible, max NFT amount exceeded") | |
83 | - | else if (a(b, | |
84 | - | then [n, ScriptTransfer(b.caller, 1, o), ScriptTransfer( | |
82 | + | else if (a(b, c)) | |
83 | + | then [n, ScriptTransfer(b.caller, 1, o), ScriptTransfer(I, A, D), ScriptTransfer(J, B, D)] | |
85 | 84 | else throw("Wrong payment amount or asset") | |
86 | 85 | } | |
87 | 86 | ||
88 | 87 | ||
89 | - | @Verifier( | |
90 | - | func | |
88 | + | @Verifier(L) | |
89 | + | func M () = sigVerify(L.bodyBytes, L.proofs[0], L.senderPublicKey) | |
91 | 90 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func a (b,c) = { | |
5 | 5 | let d = base58'R8sQUmwwAENBL6B5ejGztDh3RzJ3MbKRqK7GtspFxKT' | |
6 | 6 | if ((size(b.payments) == 0)) | |
7 | 7 | then throw("Payment not attached") | |
8 | 8 | else { | |
9 | 9 | let e = b.payments[0] | |
10 | 10 | let f = e.assetId | |
11 | 11 | if ($isInstanceOf(f, "ByteVector")) | |
12 | 12 | then { | |
13 | 13 | let g = f | |
14 | 14 | if ((g == d)) | |
15 | 15 | then (e.amount >= c) | |
16 | 16 | else false | |
17 | 17 | } | |
18 | 18 | else throw("Bad asset or amount") | |
19 | 19 | } | |
20 | 20 | } | |
21 | 21 | ||
22 | 22 | ||
23 | 23 | @Callable(b) | |
24 | 24 | func mintme (h) = { | |
25 | 25 | let i = { | |
26 | 26 | let f = getInteger(this, "counter") | |
27 | 27 | if ($isInstanceOf(f, "Int")) | |
28 | 28 | then { | |
29 | 29 | let j = f | |
30 | 30 | (j + 1) | |
31 | 31 | } | |
32 | 32 | else 0 | |
33 | 33 | } | |
34 | 34 | let k = toString(i) | |
35 | 35 | let l = "MDST-NFT #" | |
36 | 36 | let m = (l + k) | |
37 | 37 | let n = Issue(m, h, 1, 0, false) | |
38 | 38 | let o = calculateAssetId(n) | |
39 | 39 | [n, ScriptTransfer(b.caller, n.quantity, o), IntegerEntry("counter", i)] | |
40 | 40 | } | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | ||
44 | 44 | @Callable(b) | |
45 | 45 | func buynft (p,q,r) = { | |
46 | 46 | let k = toString(q) | |
47 | 47 | let m = ("MDST-COPY#" + k) | |
48 | 48 | let h = "kiki bikit" | |
49 | 49 | let s = fromBase58String(p) | |
50 | 50 | let t = { | |
51 | 51 | let f = assetInfo(s) | |
52 | 52 | if ($isInstanceOf(f, "Asset")) | |
53 | 53 | then { | |
54 | 54 | let u = f | |
55 | 55 | u.description | |
56 | 56 | } | |
57 | 57 | else throw("Can't find this NFT") | |
58 | 58 | } | |
59 | 59 | let v = split(t, ",") | |
60 | 60 | let w = split(v[5], "=") | |
61 | 61 | let x = ((w[0] + "=") + r) | |
62 | 62 | let y = ((((((((((((((((((((((v[0] + ",") + v[1]) + ",") + v[2]) + ",") + v[3]) + ",") + v[4]) + ",") + x) + "',") + v[6]) + ",") + "false") + ",") + v[8]) + ",") + v[9]) + ",") + k) + ",") + v[11]) | |
63 | - | let c = v[8] | |
63 | + | let c = parseIntValue(v[8]) | |
64 | 64 | let z = (size(b.payments) * 10000) | |
65 | - | let A = ( | |
66 | - | let B = ( | |
67 | - | let C = ( | |
65 | + | let A = (c / 2) | |
66 | + | let B = (c / 4) | |
67 | + | let C = (c / 4) | |
68 | 68 | let D = base58'R8sQUmwwAENBL6B5ejGztDh3RzJ3MbKRqK7GtspFxKT' | |
69 | - | let E = base58'3MzXqo2rBxc3XEKPVcYHDrsgP7jmE6cGg6C' | |
70 | - | let F = drop(v[0], 1) | |
71 | - | let G = dropRight(F, 1) | |
72 | - | let H = drop(v[2], 1) | |
73 | - | let I = dropRight(H, 1) | |
74 | - | let J = addressFromStringValue(G) | |
75 | - | let K = addressFromStringValue(I) | |
69 | + | let E = drop(v[0], 1) | |
70 | + | let F = dropRight(E, 1) | |
71 | + | let G = drop(v[2], 1) | |
72 | + | let H = dropRight(G, 1) | |
73 | + | let I = addressFromStringValue(F) | |
74 | + | let J = addressFromStringValue(H) | |
76 | 75 | let n = Issue(m, y, 1, 0, false) | |
77 | 76 | let o = calculateAssetId(n) | |
78 | - | let | |
79 | - | if (if ((q > | |
80 | - | then ( | |
77 | + | let K = parseIntValue(v[9]) | |
78 | + | if (if ((q > K)) | |
79 | + | then (K != 0) | |
81 | 80 | else false) | |
82 | 81 | then throw("Mint impossible, max NFT amount exceeded") | |
83 | - | else if (a(b, | |
84 | - | then [n, ScriptTransfer(b.caller, 1, o), ScriptTransfer( | |
82 | + | else if (a(b, c)) | |
83 | + | then [n, ScriptTransfer(b.caller, 1, o), ScriptTransfer(I, A, D), ScriptTransfer(J, B, D)] | |
85 | 84 | else throw("Wrong payment amount or asset") | |
86 | 85 | } | |
87 | 86 | ||
88 | 87 | ||
89 | - | @Verifier( | |
90 | - | func | |
88 | + | @Verifier(L) | |
89 | + | func M () = sigVerify(L.bodyBytes, L.proofs[0], L.senderPublicKey) | |
91 | 90 |
github/deemru/w8io/026f985 25.07 ms ◑