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