tx · Ga8ix3Wcaf4Hr4JJR7B1r4T3TtmjmwKU4yRqNorkHQGZ 3N1HdGqmcf4nVsUgmWiwB8p6p8ErWBmvQua: -0.01000000 Waves 2023.11.16 15:43 [2845952] smart account 3N1HdGqmcf4nVsUgmWiwB8p6p8ErWBmvQua > SELF 0.00000000 Waves
{ "type": 13, "id": "Ga8ix3Wcaf4Hr4JJR7B1r4T3TtmjmwKU4yRqNorkHQGZ", "fee": 1000000, "feeAssetId": null, "timestamp": 1700138659692, "version": 2, "chainId": 84, "sender": "3N1HdGqmcf4nVsUgmWiwB8p6p8ErWBmvQua", "senderPublicKey": "JAEVvs5E9kGyXWx3YQaivUpUP3vb3pgr2eS6UrYr1A8P", "proofs": [ "eaiDtjvXCH6QToxjBgX4QDLWpjmFNBgwJYrfQwHuGFHzFdvjrXJHSCnrC8FZT2WrD6n44cM21Kf9rj39kXAGyKq" ], "script": "base64:AAIFAAAAAAAAAAYIAhIAEgAAAAANAAAAAAtTVEFLRV9BU1NFVAEAAAAg+yz52JX9bMBBBD7WcJozZ6kHlw3R1qS6Jzk7Sn1TrCIAAAAACkVBUk5fQVNTRVQBAAAAIPss+diV/WzAQQQ+1nCaM2epB5cN0dakuic5O0p9U6wiAAAAAA1UT0tFTlNfUEVSX01TAAAAAAAAAAABAAAAAANTRVACAAAAAl9fAAAAAAtERU5PTUlOQVRPUgAN4Lazp2QAAAEAAAAQdXNlckRlcG9zaXRlZEtleQAAAAEAAAAEdXNlcgkABLkAAAACCQAETAAAAAICAAAAAnVkCQAETAAAAAIJAAJYAAAAAQgFAAAABHVzZXIAAAAFYnl0ZXMFAAAAA25pbAUAAAADU0VQAQAAABF0b3RhbERlcG9zaXRlZEtleQAAAAACAAAAAnRkAQAAAA1sYXN0VXBkYXRlS2V5AAAAAAIAAAACbHUBAAAAF3Jld2FyZFBlclRva2VuU3RvcmVkS2V5AAAAAAIAAAAEcnB0cwEAAAAZdXNlclJld2FyZFBlclRva2VuUGFpZEtleQAAAAEAAAA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l0ZWQFAAAADXVzZXJEZXBvc2l0ZWQJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAQAAAA1sYXN0VXBkYXRlS2V5AAAAAAgFAAAACWxhc3RCbG9jawAAAAl0aW1lc3RhbXAJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAAA11c2VyRGVwb3NpdGVkBQAAAAtTVEFLRV9BU1NFVAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAADGVhcm5lZFRva2VucwUAAAAKRUFSTl9BU1NFVAkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQEAAAAXcmV3YXJkUGVyVG9rZW5TdG9yZWRLZXkAAAAACQABpgAAAAEJAQAAABhjYWxjUmV3YXJkUGVyVG9rZW5TdG9yZWQAAAAACQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIJAQAAABl1c2VyUmV3YXJkUGVyVG9rZW5QYWlkS2V5AAAAAQgFAAAAAWkAAAAGY2FsbGVyCQABpgAAAAEJAQAAABhjYWxjUmV3YXJkUGVyVG9rZW5TdG9yZWQAAAAACQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQEAAAALdXNlclJld2FyZHMAAAABCAUAAAABaQAAAAZjYWxsZXIAAAAAAAAAAAAFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5xwshwA==", "height": 2845952, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Gr3wQvFqWEQmDpPUeQnfFazxu5tqRDW1agfzAVU15tTc Next: 4Dqtd1ucyeBYQGnhd2rjxCgyLSiKGrYLdSKynpGHaN5A Diff:
Old | New | Differences | |
---|---|---|---|
14 | 14 | func f (g) = makeString(["ud", toBase58String(g.bytes)], d) | |
15 | 15 | ||
16 | 16 | ||
17 | - | func h ( | |
17 | + | func h () = "td" | |
18 | 18 | ||
19 | 19 | ||
20 | - | func i () = " | |
20 | + | func i () = "lu" | |
21 | 21 | ||
22 | 22 | ||
23 | - | func j () = " | |
23 | + | func j () = "rpts" | |
24 | 24 | ||
25 | 25 | ||
26 | - | func k () = " | |
26 | + | func k (g) = makeString(["urpd", toBase58String(g.bytes)], d) | |
27 | 27 | ||
28 | 28 | ||
29 | - | func l (g) = makeString([" | |
29 | + | func l (g) = makeString(["ur", toBase58String(g.bytes)], d) | |
30 | 30 | ||
31 | 31 | ||
32 | - | func m (g) = makeString(["ur", toBase58String(g.bytes)], d) | |
33 | - | ||
34 | - | ||
35 | - | func n () = { | |
36 | - | let o = toBigInt({ | |
37 | - | let p = getInteger(i()) | |
38 | - | if ($isInstanceOf(p, "Int")) | |
32 | + | func m () = { | |
33 | + | let n = toBigInt({ | |
34 | + | let o = getInteger(h()) | |
35 | + | if ($isInstanceOf(o, "Int")) | |
39 | 36 | then { | |
40 | - | let | |
41 | - | | |
37 | + | let p = o | |
38 | + | p | |
42 | 39 | } | |
43 | 40 | else 0 | |
44 | 41 | }) | |
45 | - | let | |
46 | - | let | |
47 | - | if ($isInstanceOf( | |
42 | + | let q = toBigInt({ | |
43 | + | let o = getInteger(i()) | |
44 | + | if ($isInstanceOf(o, "Int")) | |
48 | 45 | then { | |
49 | - | let | |
50 | - | | |
46 | + | let p = o | |
47 | + | p | |
51 | 48 | } | |
52 | 49 | else lastBlock.timestamp | |
53 | 50 | }) | |
54 | - | let | |
55 | - | let | |
56 | - | if ($isInstanceOf( | |
51 | + | let r = parseBigIntValue({ | |
52 | + | let o = getString(j()) | |
53 | + | if ($isInstanceOf(o, "String")) | |
57 | 54 | then { | |
58 | - | let | |
59 | - | | |
55 | + | let p = o | |
56 | + | p | |
60 | 57 | } | |
61 | 58 | else "0" | |
62 | 59 | }) | |
63 | - | if (( | |
64 | - | then | |
65 | - | else ( | |
60 | + | if ((n == toBigInt(0))) | |
61 | + | then r | |
62 | + | else (r + (((toBigInt(c) * (toBigInt(lastBlock.timestamp) - q)) * toBigInt(e)) / n)) | |
66 | 63 | } | |
67 | 64 | ||
68 | 65 | ||
69 | - | func | |
70 | - | let | |
71 | - | let | |
72 | - | if ($isInstanceOf( | |
66 | + | func s (g) = { | |
67 | + | let t = toBigInt({ | |
68 | + | let o = getInteger(f(g)) | |
69 | + | if ($isInstanceOf(o, "Int")) | |
73 | 70 | then { | |
74 | - | let | |
75 | - | | |
71 | + | let p = o | |
72 | + | p | |
76 | 73 | } | |
77 | 74 | else 0 | |
78 | 75 | }) | |
79 | - | let | |
80 | - | let | |
81 | - | let | |
82 | - | if ($isInstanceOf( | |
76 | + | let u = parseBigIntValue(getStringValue(k(g))) | |
77 | + | let v = toBigInt({ | |
78 | + | let o = getInteger(l(g)) | |
79 | + | if ($isInstanceOf(o, "Int")) | |
83 | 80 | then { | |
84 | - | let | |
85 | - | | |
81 | + | let p = o | |
82 | + | p | |
86 | 83 | } | |
87 | 84 | else 0 | |
88 | 85 | }) | |
89 | - | (fraction( | |
86 | + | (fraction(t, (m() - u), toBigInt(e)) + v) | |
90 | 87 | } | |
91 | 88 | ||
92 | 89 | ||
93 | - | @Callable( | |
94 | - | func deposit () = if (if ((size( | |
90 | + | @Callable(w) | |
91 | + | func deposit () = if (if ((size(w.payments) != 1)) | |
95 | 92 | then true | |
96 | - | else ( | |
93 | + | else (w.payments[0].assetId != a)) | |
97 | 94 | then throw("incorrect asset deposits") | |
98 | 95 | else { | |
99 | - | let | |
100 | - | let | |
101 | - | if ($isInstanceOf( | |
96 | + | let t = { | |
97 | + | let o = getInteger(f(w.caller)) | |
98 | + | if ($isInstanceOf(o, "Int")) | |
102 | 99 | then { | |
103 | - | let | |
104 | - | | |
100 | + | let p = o | |
101 | + | p | |
105 | 102 | } | |
106 | 103 | else 0 | |
107 | 104 | } | |
108 | - | let | |
109 | - | let | |
110 | - | if ($isInstanceOf( | |
105 | + | let n = { | |
106 | + | let o = getInteger(h()) | |
107 | + | if ($isInstanceOf(o, "Int")) | |
111 | 108 | then { | |
112 | - | let | |
113 | - | | |
109 | + | let p = o | |
110 | + | p | |
114 | 111 | } | |
115 | 112 | else 0 | |
116 | 113 | } | |
117 | - | [IntegerEntry(f( | |
114 | + | [IntegerEntry(f(w.caller), (t + w.payments[0].amount)), IntegerEntry(h(), (n + w.payments[0].amount)), IntegerEntry(i(), lastBlock.timestamp), StringEntry(j(), toString(m())), StringEntry(k(w.caller), toString(m())), IntegerEntry(l(w.caller), if ((t == 0)) | |
118 | 115 | then 0 | |
119 | - | else toInt( | |
116 | + | else toInt(s(w.caller)))] | |
120 | 117 | } | |
121 | 118 | ||
122 | 119 | ||
123 | 120 | ||
124 | - | @Callable( | |
121 | + | @Callable(w) | |
125 | 122 | func withdraw () = { | |
126 | - | let | |
127 | - | let | |
128 | - | if ($isInstanceOf( | |
123 | + | let t = { | |
124 | + | let o = getInteger(f(w.caller)) | |
125 | + | if ($isInstanceOf(o, "Int")) | |
129 | 126 | then { | |
130 | - | let | |
131 | - | | |
127 | + | let p = o | |
128 | + | p | |
132 | 129 | } | |
133 | 130 | else 0 | |
134 | 131 | } | |
135 | - | let | |
136 | - | let | |
137 | - | if ($isInstanceOf( | |
132 | + | let n = { | |
133 | + | let o = getInteger(h()) | |
134 | + | if ($isInstanceOf(o, "Int")) | |
138 | 135 | then { | |
139 | - | let | |
140 | - | | |
136 | + | let p = o | |
137 | + | p | |
141 | 138 | } | |
142 | 139 | else 0 | |
143 | 140 | } | |
144 | - | let y = toInt(t(x.caller)) | |
145 | - | [IntegerEntry(f(x.caller), 0), IntegerEntry(i(), (o - u)), IntegerEntry(j(), lastBlock.timestamp), ScriptTransfer(x.caller, u, a), ScriptTransfer(x.caller, y, b), StringEntry(k(), toString(n())), StringEntry(l(x.caller), toString(n())), IntegerEntry(m(x.caller), 0)] | |
141 | + | let x = toInt(s(w.caller)) | |
142 | + | if ((t == 0)) | |
143 | + | then throw("empty deposit") | |
144 | + | else [IntegerEntry(f(w.caller), 0), IntegerEntry(h(), (n - t)), IntegerEntry(i(), lastBlock.timestamp), ScriptTransfer(w.caller, t, a), ScriptTransfer(w.caller, x, b), StringEntry(j(), toString(m())), StringEntry(k(w.caller), toString(m())), IntegerEntry(l(w.caller), 0)] | |
146 | 145 | } | |
147 | 146 | ||
148 | 147 | ||
149 | - | @Verifier( | |
150 | - | func | |
148 | + | @Verifier(y) | |
149 | + | func z () = sigVerify(y.bodyBytes, y.proofs[0], y.senderPublicKey) | |
151 | 150 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = base58'HuV7L2uJ4v2SDS5xqZLWPHhimTUgEMKstmxwfBY17SX3' | |
5 | 5 | ||
6 | 6 | let b = base58'HuV7L2uJ4v2SDS5xqZLWPHhimTUgEMKstmxwfBY17SX3' | |
7 | 7 | ||
8 | 8 | let c = 1 | |
9 | 9 | ||
10 | 10 | let d = "__" | |
11 | 11 | ||
12 | 12 | let e = 1000000000000000000 | |
13 | 13 | ||
14 | 14 | func f (g) = makeString(["ud", toBase58String(g.bytes)], d) | |
15 | 15 | ||
16 | 16 | ||
17 | - | func h ( | |
17 | + | func h () = "td" | |
18 | 18 | ||
19 | 19 | ||
20 | - | func i () = " | |
20 | + | func i () = "lu" | |
21 | 21 | ||
22 | 22 | ||
23 | - | func j () = " | |
23 | + | func j () = "rpts" | |
24 | 24 | ||
25 | 25 | ||
26 | - | func k () = " | |
26 | + | func k (g) = makeString(["urpd", toBase58String(g.bytes)], d) | |
27 | 27 | ||
28 | 28 | ||
29 | - | func l (g) = makeString([" | |
29 | + | func l (g) = makeString(["ur", toBase58String(g.bytes)], d) | |
30 | 30 | ||
31 | 31 | ||
32 | - | func m (g) = makeString(["ur", toBase58String(g.bytes)], d) | |
33 | - | ||
34 | - | ||
35 | - | func n () = { | |
36 | - | let o = toBigInt({ | |
37 | - | let p = getInteger(i()) | |
38 | - | if ($isInstanceOf(p, "Int")) | |
32 | + | func m () = { | |
33 | + | let n = toBigInt({ | |
34 | + | let o = getInteger(h()) | |
35 | + | if ($isInstanceOf(o, "Int")) | |
39 | 36 | then { | |
40 | - | let | |
41 | - | | |
37 | + | let p = o | |
38 | + | p | |
42 | 39 | } | |
43 | 40 | else 0 | |
44 | 41 | }) | |
45 | - | let | |
46 | - | let | |
47 | - | if ($isInstanceOf( | |
42 | + | let q = toBigInt({ | |
43 | + | let o = getInteger(i()) | |
44 | + | if ($isInstanceOf(o, "Int")) | |
48 | 45 | then { | |
49 | - | let | |
50 | - | | |
46 | + | let p = o | |
47 | + | p | |
51 | 48 | } | |
52 | 49 | else lastBlock.timestamp | |
53 | 50 | }) | |
54 | - | let | |
55 | - | let | |
56 | - | if ($isInstanceOf( | |
51 | + | let r = parseBigIntValue({ | |
52 | + | let o = getString(j()) | |
53 | + | if ($isInstanceOf(o, "String")) | |
57 | 54 | then { | |
58 | - | let | |
59 | - | | |
55 | + | let p = o | |
56 | + | p | |
60 | 57 | } | |
61 | 58 | else "0" | |
62 | 59 | }) | |
63 | - | if (( | |
64 | - | then | |
65 | - | else ( | |
60 | + | if ((n == toBigInt(0))) | |
61 | + | then r | |
62 | + | else (r + (((toBigInt(c) * (toBigInt(lastBlock.timestamp) - q)) * toBigInt(e)) / n)) | |
66 | 63 | } | |
67 | 64 | ||
68 | 65 | ||
69 | - | func | |
70 | - | let | |
71 | - | let | |
72 | - | if ($isInstanceOf( | |
66 | + | func s (g) = { | |
67 | + | let t = toBigInt({ | |
68 | + | let o = getInteger(f(g)) | |
69 | + | if ($isInstanceOf(o, "Int")) | |
73 | 70 | then { | |
74 | - | let | |
75 | - | | |
71 | + | let p = o | |
72 | + | p | |
76 | 73 | } | |
77 | 74 | else 0 | |
78 | 75 | }) | |
79 | - | let | |
80 | - | let | |
81 | - | let | |
82 | - | if ($isInstanceOf( | |
76 | + | let u = parseBigIntValue(getStringValue(k(g))) | |
77 | + | let v = toBigInt({ | |
78 | + | let o = getInteger(l(g)) | |
79 | + | if ($isInstanceOf(o, "Int")) | |
83 | 80 | then { | |
84 | - | let | |
85 | - | | |
81 | + | let p = o | |
82 | + | p | |
86 | 83 | } | |
87 | 84 | else 0 | |
88 | 85 | }) | |
89 | - | (fraction( | |
86 | + | (fraction(t, (m() - u), toBigInt(e)) + v) | |
90 | 87 | } | |
91 | 88 | ||
92 | 89 | ||
93 | - | @Callable( | |
94 | - | func deposit () = if (if ((size( | |
90 | + | @Callable(w) | |
91 | + | func deposit () = if (if ((size(w.payments) != 1)) | |
95 | 92 | then true | |
96 | - | else ( | |
93 | + | else (w.payments[0].assetId != a)) | |
97 | 94 | then throw("incorrect asset deposits") | |
98 | 95 | else { | |
99 | - | let | |
100 | - | let | |
101 | - | if ($isInstanceOf( | |
96 | + | let t = { | |
97 | + | let o = getInteger(f(w.caller)) | |
98 | + | if ($isInstanceOf(o, "Int")) | |
102 | 99 | then { | |
103 | - | let | |
104 | - | | |
100 | + | let p = o | |
101 | + | p | |
105 | 102 | } | |
106 | 103 | else 0 | |
107 | 104 | } | |
108 | - | let | |
109 | - | let | |
110 | - | if ($isInstanceOf( | |
105 | + | let n = { | |
106 | + | let o = getInteger(h()) | |
107 | + | if ($isInstanceOf(o, "Int")) | |
111 | 108 | then { | |
112 | - | let | |
113 | - | | |
109 | + | let p = o | |
110 | + | p | |
114 | 111 | } | |
115 | 112 | else 0 | |
116 | 113 | } | |
117 | - | [IntegerEntry(f( | |
114 | + | [IntegerEntry(f(w.caller), (t + w.payments[0].amount)), IntegerEntry(h(), (n + w.payments[0].amount)), IntegerEntry(i(), lastBlock.timestamp), StringEntry(j(), toString(m())), StringEntry(k(w.caller), toString(m())), IntegerEntry(l(w.caller), if ((t == 0)) | |
118 | 115 | then 0 | |
119 | - | else toInt( | |
116 | + | else toInt(s(w.caller)))] | |
120 | 117 | } | |
121 | 118 | ||
122 | 119 | ||
123 | 120 | ||
124 | - | @Callable( | |
121 | + | @Callable(w) | |
125 | 122 | func withdraw () = { | |
126 | - | let | |
127 | - | let | |
128 | - | if ($isInstanceOf( | |
123 | + | let t = { | |
124 | + | let o = getInteger(f(w.caller)) | |
125 | + | if ($isInstanceOf(o, "Int")) | |
129 | 126 | then { | |
130 | - | let | |
131 | - | | |
127 | + | let p = o | |
128 | + | p | |
132 | 129 | } | |
133 | 130 | else 0 | |
134 | 131 | } | |
135 | - | let | |
136 | - | let | |
137 | - | if ($isInstanceOf( | |
132 | + | let n = { | |
133 | + | let o = getInteger(h()) | |
134 | + | if ($isInstanceOf(o, "Int")) | |
138 | 135 | then { | |
139 | - | let | |
140 | - | | |
136 | + | let p = o | |
137 | + | p | |
141 | 138 | } | |
142 | 139 | else 0 | |
143 | 140 | } | |
144 | - | let y = toInt(t(x.caller)) | |
145 | - | [IntegerEntry(f(x.caller), 0), IntegerEntry(i(), (o - u)), IntegerEntry(j(), lastBlock.timestamp), ScriptTransfer(x.caller, u, a), ScriptTransfer(x.caller, y, b), StringEntry(k(), toString(n())), StringEntry(l(x.caller), toString(n())), IntegerEntry(m(x.caller), 0)] | |
141 | + | let x = toInt(s(w.caller)) | |
142 | + | if ((t == 0)) | |
143 | + | then throw("empty deposit") | |
144 | + | else [IntegerEntry(f(w.caller), 0), IntegerEntry(h(), (n - t)), IntegerEntry(i(), lastBlock.timestamp), ScriptTransfer(w.caller, t, a), ScriptTransfer(w.caller, x, b), StringEntry(j(), toString(m())), StringEntry(k(w.caller), toString(m())), IntegerEntry(l(w.caller), 0)] | |
146 | 145 | } | |
147 | 146 | ||
148 | 147 | ||
149 | - | @Verifier( | |
150 | - | func | |
148 | + | @Verifier(y) | |
149 | + | func z () = sigVerify(y.bodyBytes, y.proofs[0], y.senderPublicKey) | |
151 | 150 |
github/deemru/w8io/026f985 45.43 ms ◑