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