tx · Dc6tVkfcmwork6VoKeYhFCQfrRfj9GrrRwaiiuP1wk5f 3NCN1t9DS51CKN9z5XQk8JEVCoeLuWcB9Ta: -0.01500000 Waves 2023.07.19 14:44 [2672694] smart account 3NCN1t9DS51CKN9z5XQk8JEVCoeLuWcB9Ta > SELF 0.00000000 Waves
{ "type": 13, "id": "Dc6tVkfcmwork6VoKeYhFCQfrRfj9GrrRwaiiuP1wk5f", "fee": 1500000, "feeAssetId": null, "timestamp": 1689767114126, "version": 2, "chainId": 84, "sender": "3NCN1t9DS51CKN9z5XQk8JEVCoeLuWcB9Ta", "senderPublicKey": "51oZnGJdivhLJkVbeVYpbwM47gdGthajooUXKadNJCmv", "proofs": [ "4yjVgqCUXGkZ7QKxL8D37wva2y5rERWAwZ5na6uuu1NQWVa4zQw8sqgqWPDTtnVZufYZco413k6NbtNRq2TYuDZ6" ], "script": "base64:AAIFAAAAAAAAACUIAhIDCgEIEgASBAoCCAESAwoBCBIDCgEIEgASAwoBCBIDCgEIAAAAFgAAAAADU0VQAgAAAAJfXwEAAAATa2V5TWFuYWdlclB1YmxpY0tleQAAAAACAAAAFCVzX19tYW5hZ2VyUHVibGljS2V5AQAAABZrZXlNYW5hZ2VyVmF1bHRBZGRyZXNzAAAAAAIAAAAXJXNfX21hbmFnZXJWYXVsdEFkZHJlc3MBAAAAB2tleVVzZXIAAAABAAAAB2FkZHJlc3MJAAS5AAAAAgkABEwAAAACAgAAAAIlcwkABEwAAAACBQAAAAdhZGRyZXNzBQAAAANuaWwFAAAAA1NFUAEAAAAKa2V5UmV2b2tlZAAAAAEAAAAHYWRkcmVzcwkABLkAAAACCQAETAAAAAICAAAABCVzJXMJAARMAAAAAgIAAAAHcmV2b2tlZAkABEwAAAACBQAAAAdhZGRyZXNzBQAAAANuaWwFAAAAA1NFUAEAAAAPa2V5UmV2b2tlZFRvdGFsAAAAAAkABLkAAAACCQAETAAAAAICAAAAAiVzCQAETAAAAAICAAAADHJldm9rZWRUb3RhbAUAAAADb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kZHJlc3MJAARMAAAAAgkBAAAABXZhbHVlAAAAAQkABB8AAAABCQEAAAARa2V5VXNlclZlc3RpbmdFbmQAAAABBQAAAAdhZGRyZXNzCQAETAAAAAIJAQAAABJnZXRVc2VyVG90YWxBbW91bnQAAAABBQAAAAdhZGRyZXNzCQAETAAAAAIJAQAAABRnZXRVc2VyQ2xhaW1lZEFtb3VudAAAAAEFAAAAB2FkZHJlc3MJAARMAAAAAgkBAAAAFmdldFVzZXJSZW1haW5pbmdBbW91bnQAAAABBQAAAAdhZGRyZXNzCQAETAAAAAIJAQAAABNhdmFpbGFibGVUb0NsYWltTm93AAAAAQUAAAAHYWRkcmVzcwUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAQAAAAPdGFyZ2V0UHVibGljS2V5BAAAAAckbWF0Y2gwCQEAAAAWbWFuYWdlclB1YmxpY0tleU9yVW5pdAAAAAADCQAAAQAAAAIFAAAAByRtYXRjaDACAAAACkJ5dGVWZWN0b3IEAAAAAnBrBQAAAAckbWF0Y2gwBQAAAAJwawMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAEVW5pdAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleQkAAAIAAAABAgAAAAtNYXRjaCBlcnJvcgkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAAD3RhcmdldFB1YmxpY0tleRlypHU=", "height": 2672694, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Aeqkyn2MPJEmnhtmvYzqe6NG17iU6oygrwd6xPfk5C5E Next: none Diff:
Old | New | Differences | |
---|---|---|---|
6 | 6 | func b () = "%s__managerPublicKey" | |
7 | 7 | ||
8 | 8 | ||
9 | - | func c () = "%s__ | |
9 | + | func c () = "%s__managerVaultAddress" | |
10 | 10 | ||
11 | 11 | ||
12 | 12 | func d (e) = makeString(["%s", e], a) | |
30 | 30 | func k () = makeString(["%s", "wxAssetId"], a) | |
31 | 31 | ||
32 | 32 | ||
33 | - | func l (m) = throw(makeString(["vesting.ride:", m], " ")) | |
33 | + | func l () = { | |
34 | + | let m = getString(c()) | |
35 | + | if ($isInstanceOf(m, "String")) | |
36 | + | then { | |
37 | + | let n = m | |
38 | + | addressFromStringValue(n) | |
39 | + | } | |
40 | + | else this | |
41 | + | } | |
34 | 42 | ||
35 | 43 | ||
36 | - | func n () = { | |
37 | - | let o = getString(b()) | |
38 | - | if ($isInstanceOf(o, "String")) | |
44 | + | func o (p) = throw(makeString(["vesting.ride:", p], " ")) | |
45 | + | ||
46 | + | ||
47 | + | func q () = { | |
48 | + | let r = l() | |
49 | + | let m = getString(r, b()) | |
50 | + | if ($isInstanceOf(m, "String")) | |
39 | 51 | then { | |
40 | - | let | |
41 | - | fromBase58String( | |
52 | + | let n = m | |
53 | + | fromBase58String(n) | |
42 | 54 | } | |
43 | - | else if ($isInstanceOf( | |
55 | + | else if ($isInstanceOf(m, "Unit")) | |
44 | 56 | then unit | |
45 | 57 | else throw("Match error") | |
46 | 58 | } | |
47 | 59 | ||
48 | 60 | ||
49 | - | func q () = { | |
50 | - | let o = getString(c()) | |
51 | - | if ($isInstanceOf(o, "String")) | |
61 | + | func s (t) = { | |
62 | + | let u = o("permission denied") | |
63 | + | let m = q() | |
64 | + | if ($isInstanceOf(m, "ByteVector")) | |
52 | 65 | then { | |
53 | - | let p = o | |
54 | - | fromBase58String(p) | |
66 | + | let v = m | |
67 | + | if ((t.callerPublicKey == v)) | |
68 | + | then true | |
69 | + | else u | |
55 | 70 | } | |
56 | - | else if ($isInstanceOf(o, "Unit")) | |
57 | - | then unit | |
71 | + | else if ($isInstanceOf(m, "Unit")) | |
72 | + | then if ((t.caller == this)) | |
73 | + | then true | |
74 | + | else u | |
58 | 75 | else throw("Match error") | |
59 | 76 | } | |
60 | 77 | ||
61 | 78 | ||
62 | - | func r (s) = { | |
63 | - | let t = l("permission denied") | |
64 | - | let o = n() | |
65 | - | if ($isInstanceOf(o, "ByteVector")) | |
66 | - | then { | |
67 | - | let u = o | |
68 | - | if ((s.callerPublicKey == u)) | |
69 | - | then true | |
70 | - | else t | |
71 | - | } | |
72 | - | else if ($isInstanceOf(o, "Unit")) | |
73 | - | then if ((s.caller == this)) | |
74 | - | then true | |
75 | - | else t | |
76 | - | else throw("Match error") | |
77 | - | } | |
79 | + | func w (x,y,z,A) = makeString(["%d%d%d%d%d", x, y, "0", z, A], a) | |
78 | 80 | ||
79 | 81 | ||
80 | - | func | |
82 | + | func B (x,y,z,A) = w(toString(x), toString(y), toString(z), toString(A)) | |
81 | 83 | ||
82 | 84 | ||
83 | - | func | |
85 | + | func C (e) = parseIntValue(split(value(getString(d(e))), a)[1]) | |
84 | 86 | ||
85 | 87 | ||
86 | - | func | |
88 | + | func D (e) = parseIntValue(split(value(getString(d(e))), a)[2]) | |
87 | 89 | ||
88 | 90 | ||
89 | - | func | |
91 | + | func E (e) = parseIntValue(split(value(getString(d(e))), a)[3]) | |
90 | 92 | ||
91 | 93 | ||
92 | - | func | |
94 | + | func F (e) = parseIntValue(split(value(getString(d(e))), a)[5]) | |
93 | 95 | ||
94 | 96 | ||
95 | - | func E (e) = parseIntValue(split(value(getString(d(e))), a)[5]) | |
96 | - | ||
97 | - | ||
98 | - | func F (e) = { | |
99 | - | let G = valueOrElse(getBoolean(f(e)), false) | |
100 | - | if (G) | |
101 | - | then C(e) | |
97 | + | func G (e) = { | |
98 | + | let H = valueOrElse(getBoolean(f(e)), false) | |
99 | + | if (H) | |
100 | + | then D(e) | |
102 | 101 | else { | |
103 | - | let | |
104 | - | if (( | |
102 | + | let I = F(e) | |
103 | + | if ((I >= height)) | |
105 | 104 | then 0 | |
106 | 105 | else { | |
107 | - | let | |
108 | - | if ((height > | |
109 | - | then | |
106 | + | let J = value(getInteger(i(e))) | |
107 | + | if ((height > J)) | |
108 | + | then D(e) | |
110 | 109 | else { | |
111 | - | let | |
112 | - | (value(getInteger(j(e))) * | |
110 | + | let K = (height - I) | |
111 | + | (value(getInteger(j(e))) * K) | |
113 | 112 | } | |
114 | 113 | } | |
115 | 114 | } | |
116 | 115 | } | |
117 | 116 | ||
118 | 117 | ||
119 | - | func | |
120 | - | let | |
121 | - | let | |
122 | - | let | |
123 | - | let | |
118 | + | func L (e) = { | |
119 | + | let M = addressFromStringValue(e) | |
120 | + | let N = fromBase58String(value(getString(k()))) | |
121 | + | let O = G(e) | |
122 | + | let P = if ((O != 0)) | |
124 | 123 | then true | |
125 | - | else | |
126 | - | if (( | |
124 | + | else o("nothing to claim") | |
125 | + | if ((P == P)) | |
127 | 126 | then { | |
128 | - | let w = B(e) | |
129 | 127 | let x = C(e) | |
130 | 128 | let y = D(e) | |
131 | - | let G = valueOrElse(getBoolean(f(e)), false) | |
132 | - | if (G) | |
133 | - | then [ScriptTransfer(L, x, M), StringEntry(d(e), A(w, 0, (y + x), height))] | |
134 | - | else [ScriptTransfer(L, N, M), StringEntry(d(e), A(w, (x - N), (y + N), height))] | |
129 | + | let z = E(e) | |
130 | + | let H = valueOrElse(getBoolean(f(e)), false) | |
131 | + | if (H) | |
132 | + | then [ScriptTransfer(M, y, N), StringEntry(d(e), B(x, 0, (z + y), height))] | |
133 | + | else [ScriptTransfer(M, O, N), StringEntry(d(e), B(x, (y - O), (z + O), height))] | |
135 | 134 | } | |
136 | 135 | else throw("Strict value is not equal to itself.") | |
137 | 136 | } | |
138 | 137 | ||
139 | 138 | ||
140 | - | @Callable( | |
141 | - | func constructor ( | |
142 | - | let | |
143 | - | if (( | |
144 | - | then [StringEntry(k(), | |
139 | + | @Callable(t) | |
140 | + | func constructor (Q) = { | |
141 | + | let R = s(t) | |
142 | + | if ((R == R)) | |
143 | + | then [StringEntry(k(), Q)] | |
145 | 144 | else throw("Strict value is not equal to itself.") | |
146 | 145 | } | |
147 | 146 | ||
148 | 147 | ||
149 | 148 | ||
150 | - | @Callable( | |
149 | + | @Callable(t) | |
151 | 150 | func withdrawRevoked () = { | |
152 | - | let | |
153 | - | let | |
154 | - | let | |
151 | + | let O = valueOrElse(getInteger(g()), 0) | |
152 | + | let N = fromBase58String(value(getString(k()))) | |
153 | + | let S = [s(t), if ((O > 0)) | |
155 | 154 | then true | |
156 | - | else | |
157 | - | if (( | |
158 | - | then [ScriptTransfer( | |
155 | + | else o("revoked amount is zero, nothing to withdraw")] | |
156 | + | if ((S == S)) | |
157 | + | then [ScriptTransfer(t.caller, O, N), IntegerEntry(g(), 0)] | |
159 | 158 | else throw("Strict value is not equal to itself.") | |
160 | 159 | } | |
161 | 160 | ||
162 | 161 | ||
163 | 162 | ||
164 | - | @Callable( | |
165 | - | func createDepositFor (e, | |
166 | - | let | |
167 | - | let | |
168 | - | let | |
169 | - | let | |
170 | - | let | |
163 | + | @Callable(t) | |
164 | + | func createDepositFor (e,T) = { | |
165 | + | let O = t.payments[0].amount | |
166 | + | let U = (height + T) | |
167 | + | let V = (U - height) | |
168 | + | let W = (O / V) | |
169 | + | let S = [if ((U > height)) | |
171 | 170 | then true | |
172 | - | else | |
171 | + | else o("endHeight must be more than height"), if ((getString(d(e)) == unit)) | |
173 | 172 | then true | |
174 | - | else | |
173 | + | else o("deposit for user already exists"), if ((toBase58String(value(t.payments[0].assetId)) == value(getString(k())))) | |
175 | 174 | then true | |
176 | - | else | |
175 | + | else o("attached payment is not WX"), if ((W != 0)) | |
177 | 176 | then true | |
178 | - | else | |
179 | - | if (( | |
180 | - | then [StringEntry(d(e), | |
177 | + | else o("attached amount too small or blocksDuration too large — will claimed zero per block")] | |
178 | + | if ((S == S)) | |
179 | + | then [StringEntry(d(e), B(O, O, 0, height)), IntegerEntry(h(e), height), IntegerEntry(i(e), U), IntegerEntry(j(e), W)] | |
181 | 180 | else throw("Strict value is not equal to itself.") | |
182 | 181 | } | |
183 | 182 | ||
184 | 183 | ||
185 | 184 | ||
186 | - | @Callable( | |
185 | + | @Callable(t) | |
187 | 186 | func increaseDepositFor (e) = { | |
188 | - | let | |
189 | - | let | |
190 | - | then | |
187 | + | let X = G(e) | |
188 | + | let Y = if ((X > 0)) | |
189 | + | then L(e) | |
191 | 190 | else unit | |
192 | - | if (( | |
191 | + | if ((Y == Y)) | |
193 | 192 | then { | |
194 | - | let N = s.payments[0].amount | |
195 | - | let T = value(getInteger(i(e))) | |
196 | - | let U = (T - height) | |
197 | - | let V = value(getInteger(j(e))) | |
198 | - | let Y = (N / U) | |
199 | - | let Z = B(e) | |
193 | + | let O = t.payments[0].amount | |
194 | + | let U = value(getInteger(i(e))) | |
195 | + | let V = (U - height) | |
196 | + | let W = value(getInteger(j(e))) | |
197 | + | let Z = (O / V) | |
200 | 198 | let aa = C(e) | |
201 | 199 | let ab = D(e) | |
202 | 200 | let ac = E(e) | |
203 | - | let R = [if ((valueOrElse(getBoolean(f(e)), false) == false)) | |
201 | + | let ad = F(e) | |
202 | + | let S = [if ((valueOrElse(getBoolean(f(e)), false) == false)) | |
204 | 203 | then true | |
205 | - | else | |
204 | + | else o("deposit for user is revoked"), if ((getString(d(e)) != unit)) | |
206 | 205 | then true | |
207 | - | else | |
206 | + | else o("deposit for user doesn't exists"), if ((toBase58String(value(t.payments[0].assetId)) == value(getString(k())))) | |
208 | 207 | then true | |
209 | - | else | |
208 | + | else o("attached payment is not WX"), if ((Z != 0)) | |
210 | 209 | then true | |
211 | - | else | |
212 | - | if (( | |
213 | - | then [StringEntry(d(e), | |
210 | + | else o("attached amount too small — increase is zero per block")] | |
211 | + | if ((S == S)) | |
212 | + | then [StringEntry(d(e), B((aa + O), (ab + O), ac, ad)), IntegerEntry(j(e), (W + Z))] | |
214 | 213 | else throw("Strict value is not equal to itself.") | |
215 | 214 | } | |
216 | 215 | else throw("Strict value is not equal to itself.") | |
218 | 217 | ||
219 | 218 | ||
220 | 219 | ||
221 | - | @Callable( | |
220 | + | @Callable(t) | |
222 | 221 | func revokeDepositFor (e) = { | |
223 | - | let w = B(e) | |
224 | 222 | let x = C(e) | |
225 | 223 | let y = D(e) | |
226 | 224 | let z = E(e) | |
227 | - | let ad = F(e) | |
228 | - | let ae = valueOrElse(getInteger(g()), 0) | |
229 | - | let af = (x - ad) | |
230 | - | let ag = (ae + af) | |
231 | - | let R = [r(s), if ((getString(d(e)) != unit)) | |
225 | + | let A = F(e) | |
226 | + | let ae = G(e) | |
227 | + | let af = valueOrElse(getInteger(g()), 0) | |
228 | + | let ag = (y - ae) | |
229 | + | let ah = (af + ag) | |
230 | + | let S = [s(t), if ((getString(d(e)) != unit)) | |
232 | 231 | then true | |
233 | - | else | |
232 | + | else o("deposit for user is not exists"), if ((ah > af)) | |
234 | 233 | then true | |
235 | - | else | |
236 | - | if (( | |
237 | - | then [BooleanEntry(f(e), true), IntegerEntry(g(), | |
234 | + | else o("newRevokedTotal can't be less or equal than revokedTotal")] | |
235 | + | if ((S == S)) | |
236 | + | then [BooleanEntry(f(e), true), IntegerEntry(g(), ah), StringEntry(d(e), B(x, ae, z, A))] | |
238 | 237 | else throw("Strict value is not equal to itself.") | |
239 | 238 | } | |
240 | 239 | ||
241 | 240 | ||
242 | 241 | ||
243 | - | @Callable( | |
244 | - | func claim () = | |
242 | + | @Callable(t) | |
243 | + | func claim () = L(toBase58String(t.caller.bytes)) | |
245 | 244 | ||
246 | 245 | ||
247 | 246 | ||
248 | - | @Callable( | |
247 | + | @Callable(t) | |
249 | 248 | func claimREADONLY (e) = { | |
250 | - | let | |
251 | - | $Tuple2(nil, | |
249 | + | let O = G(e) | |
250 | + | $Tuple2(nil, O) | |
252 | 251 | } | |
253 | 252 | ||
254 | 253 | ||
255 | 254 | ||
256 | - | @Callable( | |
257 | - | func stats (e) = $Tuple2(nil, [value(getInteger(h(e))), value(getInteger(i(e))), | |
255 | + | @Callable(t) | |
256 | + | func stats (e) = $Tuple2(nil, [value(getInteger(h(e))), value(getInteger(i(e))), C(e), E(e), D(e), G(e)]) | |
258 | 257 | ||
259 | 258 | ||
260 | - | ||
261 | - | @Callable(s) | |
262 | - | func setManager (ah) = { | |
263 | - | let ai = r(s) | |
264 | - | if ((ai == ai)) | |
265 | - | then { | |
266 | - | let aj = fromBase58String(ah) | |
267 | - | if ((aj == aj)) | |
268 | - | then [StringEntry(c(), ah)] | |
269 | - | else throw("Strict value is not equal to itself.") | |
270 | - | } | |
271 | - | else throw("Strict value is not equal to itself.") | |
272 | - | } | |
273 | - | ||
274 | - | ||
275 | - | ||
276 | - | @Callable(s) | |
277 | - | func confirmManager () = { | |
278 | - | let ak = q() | |
279 | - | let al = if (isDefined(ak)) | |
280 | - | then true | |
281 | - | else l("no pending manager") | |
282 | - | if ((al == al)) | |
283 | - | then { | |
284 | - | let am = if ((s.callerPublicKey == value(ak))) | |
285 | - | then true | |
286 | - | else l("you are not pending manager") | |
287 | - | if ((am == am)) | |
288 | - | then [StringEntry(b(), toBase58String(value(ak))), DeleteEntry(c())] | |
289 | - | else throw("Strict value is not equal to itself.") | |
290 | - | } | |
291 | - | else throw("Strict value is not equal to itself.") | |
292 | - | } | |
293 | - | ||
294 | - | ||
295 | - | @Verifier(an) | |
296 | - | func ao () = { | |
297 | - | let ap = { | |
298 | - | let o = n() | |
299 | - | if ($isInstanceOf(o, "ByteVector")) | |
259 | + | @Verifier(ai) | |
260 | + | func aj () = { | |
261 | + | let ak = { | |
262 | + | let m = q() | |
263 | + | if ($isInstanceOf(m, "ByteVector")) | |
300 | 264 | then { | |
301 | - | let | |
302 | - | | |
265 | + | let v = m | |
266 | + | v | |
303 | 267 | } | |
304 | - | else if ($isInstanceOf( | |
305 | - | then | |
268 | + | else if ($isInstanceOf(m, "Unit")) | |
269 | + | then ai.senderPublicKey | |
306 | 270 | else throw("Match error") | |
307 | 271 | } | |
308 | - | sigVerify( | |
272 | + | sigVerify(ai.bodyBytes, ai.proofs[0], ak) | |
309 | 273 | } | |
310 | 274 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "__" | |
5 | 5 | ||
6 | 6 | func b () = "%s__managerPublicKey" | |
7 | 7 | ||
8 | 8 | ||
9 | - | func c () = "%s__ | |
9 | + | func c () = "%s__managerVaultAddress" | |
10 | 10 | ||
11 | 11 | ||
12 | 12 | func d (e) = makeString(["%s", e], a) | |
13 | 13 | ||
14 | 14 | ||
15 | 15 | func f (e) = makeString(["%s%s", "revoked", e], a) | |
16 | 16 | ||
17 | 17 | ||
18 | 18 | func g () = makeString(["%s", "revokedTotal"], a) | |
19 | 19 | ||
20 | 20 | ||
21 | 21 | func h (e) = makeString(["%s%s", "vestingStart", e], a) | |
22 | 22 | ||
23 | 23 | ||
24 | 24 | func i (e) = makeString(["%s%s", "vestingEnd", e], a) | |
25 | 25 | ||
26 | 26 | ||
27 | 27 | func j (e) = makeString(["%s%s", "amountPerBlock", e], a) | |
28 | 28 | ||
29 | 29 | ||
30 | 30 | func k () = makeString(["%s", "wxAssetId"], a) | |
31 | 31 | ||
32 | 32 | ||
33 | - | func l (m) = throw(makeString(["vesting.ride:", m], " ")) | |
33 | + | func l () = { | |
34 | + | let m = getString(c()) | |
35 | + | if ($isInstanceOf(m, "String")) | |
36 | + | then { | |
37 | + | let n = m | |
38 | + | addressFromStringValue(n) | |
39 | + | } | |
40 | + | else this | |
41 | + | } | |
34 | 42 | ||
35 | 43 | ||
36 | - | func n () = { | |
37 | - | let o = getString(b()) | |
38 | - | if ($isInstanceOf(o, "String")) | |
44 | + | func o (p) = throw(makeString(["vesting.ride:", p], " ")) | |
45 | + | ||
46 | + | ||
47 | + | func q () = { | |
48 | + | let r = l() | |
49 | + | let m = getString(r, b()) | |
50 | + | if ($isInstanceOf(m, "String")) | |
39 | 51 | then { | |
40 | - | let | |
41 | - | fromBase58String( | |
52 | + | let n = m | |
53 | + | fromBase58String(n) | |
42 | 54 | } | |
43 | - | else if ($isInstanceOf( | |
55 | + | else if ($isInstanceOf(m, "Unit")) | |
44 | 56 | then unit | |
45 | 57 | else throw("Match error") | |
46 | 58 | } | |
47 | 59 | ||
48 | 60 | ||
49 | - | func q () = { | |
50 | - | let o = getString(c()) | |
51 | - | if ($isInstanceOf(o, "String")) | |
61 | + | func s (t) = { | |
62 | + | let u = o("permission denied") | |
63 | + | let m = q() | |
64 | + | if ($isInstanceOf(m, "ByteVector")) | |
52 | 65 | then { | |
53 | - | let p = o | |
54 | - | fromBase58String(p) | |
66 | + | let v = m | |
67 | + | if ((t.callerPublicKey == v)) | |
68 | + | then true | |
69 | + | else u | |
55 | 70 | } | |
56 | - | else if ($isInstanceOf(o, "Unit")) | |
57 | - | then unit | |
71 | + | else if ($isInstanceOf(m, "Unit")) | |
72 | + | then if ((t.caller == this)) | |
73 | + | then true | |
74 | + | else u | |
58 | 75 | else throw("Match error") | |
59 | 76 | } | |
60 | 77 | ||
61 | 78 | ||
62 | - | func r (s) = { | |
63 | - | let t = l("permission denied") | |
64 | - | let o = n() | |
65 | - | if ($isInstanceOf(o, "ByteVector")) | |
66 | - | then { | |
67 | - | let u = o | |
68 | - | if ((s.callerPublicKey == u)) | |
69 | - | then true | |
70 | - | else t | |
71 | - | } | |
72 | - | else if ($isInstanceOf(o, "Unit")) | |
73 | - | then if ((s.caller == this)) | |
74 | - | then true | |
75 | - | else t | |
76 | - | else throw("Match error") | |
77 | - | } | |
79 | + | func w (x,y,z,A) = makeString(["%d%d%d%d%d", x, y, "0", z, A], a) | |
78 | 80 | ||
79 | 81 | ||
80 | - | func | |
82 | + | func B (x,y,z,A) = w(toString(x), toString(y), toString(z), toString(A)) | |
81 | 83 | ||
82 | 84 | ||
83 | - | func | |
85 | + | func C (e) = parseIntValue(split(value(getString(d(e))), a)[1]) | |
84 | 86 | ||
85 | 87 | ||
86 | - | func | |
88 | + | func D (e) = parseIntValue(split(value(getString(d(e))), a)[2]) | |
87 | 89 | ||
88 | 90 | ||
89 | - | func | |
91 | + | func E (e) = parseIntValue(split(value(getString(d(e))), a)[3]) | |
90 | 92 | ||
91 | 93 | ||
92 | - | func | |
94 | + | func F (e) = parseIntValue(split(value(getString(d(e))), a)[5]) | |
93 | 95 | ||
94 | 96 | ||
95 | - | func E (e) = parseIntValue(split(value(getString(d(e))), a)[5]) | |
96 | - | ||
97 | - | ||
98 | - | func F (e) = { | |
99 | - | let G = valueOrElse(getBoolean(f(e)), false) | |
100 | - | if (G) | |
101 | - | then C(e) | |
97 | + | func G (e) = { | |
98 | + | let H = valueOrElse(getBoolean(f(e)), false) | |
99 | + | if (H) | |
100 | + | then D(e) | |
102 | 101 | else { | |
103 | - | let | |
104 | - | if (( | |
102 | + | let I = F(e) | |
103 | + | if ((I >= height)) | |
105 | 104 | then 0 | |
106 | 105 | else { | |
107 | - | let | |
108 | - | if ((height > | |
109 | - | then | |
106 | + | let J = value(getInteger(i(e))) | |
107 | + | if ((height > J)) | |
108 | + | then D(e) | |
110 | 109 | else { | |
111 | - | let | |
112 | - | (value(getInteger(j(e))) * | |
110 | + | let K = (height - I) | |
111 | + | (value(getInteger(j(e))) * K) | |
113 | 112 | } | |
114 | 113 | } | |
115 | 114 | } | |
116 | 115 | } | |
117 | 116 | ||
118 | 117 | ||
119 | - | func | |
120 | - | let | |
121 | - | let | |
122 | - | let | |
123 | - | let | |
118 | + | func L (e) = { | |
119 | + | let M = addressFromStringValue(e) | |
120 | + | let N = fromBase58String(value(getString(k()))) | |
121 | + | let O = G(e) | |
122 | + | let P = if ((O != 0)) | |
124 | 123 | then true | |
125 | - | else | |
126 | - | if (( | |
124 | + | else o("nothing to claim") | |
125 | + | if ((P == P)) | |
127 | 126 | then { | |
128 | - | let w = B(e) | |
129 | 127 | let x = C(e) | |
130 | 128 | let y = D(e) | |
131 | - | let G = valueOrElse(getBoolean(f(e)), false) | |
132 | - | if (G) | |
133 | - | then [ScriptTransfer(L, x, M), StringEntry(d(e), A(w, 0, (y + x), height))] | |
134 | - | else [ScriptTransfer(L, N, M), StringEntry(d(e), A(w, (x - N), (y + N), height))] | |
129 | + | let z = E(e) | |
130 | + | let H = valueOrElse(getBoolean(f(e)), false) | |
131 | + | if (H) | |
132 | + | then [ScriptTransfer(M, y, N), StringEntry(d(e), B(x, 0, (z + y), height))] | |
133 | + | else [ScriptTransfer(M, O, N), StringEntry(d(e), B(x, (y - O), (z + O), height))] | |
135 | 134 | } | |
136 | 135 | else throw("Strict value is not equal to itself.") | |
137 | 136 | } | |
138 | 137 | ||
139 | 138 | ||
140 | - | @Callable( | |
141 | - | func constructor ( | |
142 | - | let | |
143 | - | if (( | |
144 | - | then [StringEntry(k(), | |
139 | + | @Callable(t) | |
140 | + | func constructor (Q) = { | |
141 | + | let R = s(t) | |
142 | + | if ((R == R)) | |
143 | + | then [StringEntry(k(), Q)] | |
145 | 144 | else throw("Strict value is not equal to itself.") | |
146 | 145 | } | |
147 | 146 | ||
148 | 147 | ||
149 | 148 | ||
150 | - | @Callable( | |
149 | + | @Callable(t) | |
151 | 150 | func withdrawRevoked () = { | |
152 | - | let | |
153 | - | let | |
154 | - | let | |
151 | + | let O = valueOrElse(getInteger(g()), 0) | |
152 | + | let N = fromBase58String(value(getString(k()))) | |
153 | + | let S = [s(t), if ((O > 0)) | |
155 | 154 | then true | |
156 | - | else | |
157 | - | if (( | |
158 | - | then [ScriptTransfer( | |
155 | + | else o("revoked amount is zero, nothing to withdraw")] | |
156 | + | if ((S == S)) | |
157 | + | then [ScriptTransfer(t.caller, O, N), IntegerEntry(g(), 0)] | |
159 | 158 | else throw("Strict value is not equal to itself.") | |
160 | 159 | } | |
161 | 160 | ||
162 | 161 | ||
163 | 162 | ||
164 | - | @Callable( | |
165 | - | func createDepositFor (e, | |
166 | - | let | |
167 | - | let | |
168 | - | let | |
169 | - | let | |
170 | - | let | |
163 | + | @Callable(t) | |
164 | + | func createDepositFor (e,T) = { | |
165 | + | let O = t.payments[0].amount | |
166 | + | let U = (height + T) | |
167 | + | let V = (U - height) | |
168 | + | let W = (O / V) | |
169 | + | let S = [if ((U > height)) | |
171 | 170 | then true | |
172 | - | else | |
171 | + | else o("endHeight must be more than height"), if ((getString(d(e)) == unit)) | |
173 | 172 | then true | |
174 | - | else | |
173 | + | else o("deposit for user already exists"), if ((toBase58String(value(t.payments[0].assetId)) == value(getString(k())))) | |
175 | 174 | then true | |
176 | - | else | |
175 | + | else o("attached payment is not WX"), if ((W != 0)) | |
177 | 176 | then true | |
178 | - | else | |
179 | - | if (( | |
180 | - | then [StringEntry(d(e), | |
177 | + | else o("attached amount too small or blocksDuration too large — will claimed zero per block")] | |
178 | + | if ((S == S)) | |
179 | + | then [StringEntry(d(e), B(O, O, 0, height)), IntegerEntry(h(e), height), IntegerEntry(i(e), U), IntegerEntry(j(e), W)] | |
181 | 180 | else throw("Strict value is not equal to itself.") | |
182 | 181 | } | |
183 | 182 | ||
184 | 183 | ||
185 | 184 | ||
186 | - | @Callable( | |
185 | + | @Callable(t) | |
187 | 186 | func increaseDepositFor (e) = { | |
188 | - | let | |
189 | - | let | |
190 | - | then | |
187 | + | let X = G(e) | |
188 | + | let Y = if ((X > 0)) | |
189 | + | then L(e) | |
191 | 190 | else unit | |
192 | - | if (( | |
191 | + | if ((Y == Y)) | |
193 | 192 | then { | |
194 | - | let N = s.payments[0].amount | |
195 | - | let T = value(getInteger(i(e))) | |
196 | - | let U = (T - height) | |
197 | - | let V = value(getInteger(j(e))) | |
198 | - | let Y = (N / U) | |
199 | - | let Z = B(e) | |
193 | + | let O = t.payments[0].amount | |
194 | + | let U = value(getInteger(i(e))) | |
195 | + | let V = (U - height) | |
196 | + | let W = value(getInteger(j(e))) | |
197 | + | let Z = (O / V) | |
200 | 198 | let aa = C(e) | |
201 | 199 | let ab = D(e) | |
202 | 200 | let ac = E(e) | |
203 | - | let R = [if ((valueOrElse(getBoolean(f(e)), false) == false)) | |
201 | + | let ad = F(e) | |
202 | + | let S = [if ((valueOrElse(getBoolean(f(e)), false) == false)) | |
204 | 203 | then true | |
205 | - | else | |
204 | + | else o("deposit for user is revoked"), if ((getString(d(e)) != unit)) | |
206 | 205 | then true | |
207 | - | else | |
206 | + | else o("deposit for user doesn't exists"), if ((toBase58String(value(t.payments[0].assetId)) == value(getString(k())))) | |
208 | 207 | then true | |
209 | - | else | |
208 | + | else o("attached payment is not WX"), if ((Z != 0)) | |
210 | 209 | then true | |
211 | - | else | |
212 | - | if (( | |
213 | - | then [StringEntry(d(e), | |
210 | + | else o("attached amount too small — increase is zero per block")] | |
211 | + | if ((S == S)) | |
212 | + | then [StringEntry(d(e), B((aa + O), (ab + O), ac, ad)), IntegerEntry(j(e), (W + Z))] | |
214 | 213 | else throw("Strict value is not equal to itself.") | |
215 | 214 | } | |
216 | 215 | else throw("Strict value is not equal to itself.") | |
217 | 216 | } | |
218 | 217 | ||
219 | 218 | ||
220 | 219 | ||
221 | - | @Callable( | |
220 | + | @Callable(t) | |
222 | 221 | func revokeDepositFor (e) = { | |
223 | - | let w = B(e) | |
224 | 222 | let x = C(e) | |
225 | 223 | let y = D(e) | |
226 | 224 | let z = E(e) | |
227 | - | let ad = F(e) | |
228 | - | let ae = valueOrElse(getInteger(g()), 0) | |
229 | - | let af = (x - ad) | |
230 | - | let ag = (ae + af) | |
231 | - | let R = [r(s), if ((getString(d(e)) != unit)) | |
225 | + | let A = F(e) | |
226 | + | let ae = G(e) | |
227 | + | let af = valueOrElse(getInteger(g()), 0) | |
228 | + | let ag = (y - ae) | |
229 | + | let ah = (af + ag) | |
230 | + | let S = [s(t), if ((getString(d(e)) != unit)) | |
232 | 231 | then true | |
233 | - | else | |
232 | + | else o("deposit for user is not exists"), if ((ah > af)) | |
234 | 233 | then true | |
235 | - | else | |
236 | - | if (( | |
237 | - | then [BooleanEntry(f(e), true), IntegerEntry(g(), | |
234 | + | else o("newRevokedTotal can't be less or equal than revokedTotal")] | |
235 | + | if ((S == S)) | |
236 | + | then [BooleanEntry(f(e), true), IntegerEntry(g(), ah), StringEntry(d(e), B(x, ae, z, A))] | |
238 | 237 | else throw("Strict value is not equal to itself.") | |
239 | 238 | } | |
240 | 239 | ||
241 | 240 | ||
242 | 241 | ||
243 | - | @Callable( | |
244 | - | func claim () = | |
242 | + | @Callable(t) | |
243 | + | func claim () = L(toBase58String(t.caller.bytes)) | |
245 | 244 | ||
246 | 245 | ||
247 | 246 | ||
248 | - | @Callable( | |
247 | + | @Callable(t) | |
249 | 248 | func claimREADONLY (e) = { | |
250 | - | let | |
251 | - | $Tuple2(nil, | |
249 | + | let O = G(e) | |
250 | + | $Tuple2(nil, O) | |
252 | 251 | } | |
253 | 252 | ||
254 | 253 | ||
255 | 254 | ||
256 | - | @Callable( | |
257 | - | func stats (e) = $Tuple2(nil, [value(getInteger(h(e))), value(getInteger(i(e))), | |
255 | + | @Callable(t) | |
256 | + | func stats (e) = $Tuple2(nil, [value(getInteger(h(e))), value(getInteger(i(e))), C(e), E(e), D(e), G(e)]) | |
258 | 257 | ||
259 | 258 | ||
260 | - | ||
261 | - | @Callable(s) | |
262 | - | func setManager (ah) = { | |
263 | - | let ai = r(s) | |
264 | - | if ((ai == ai)) | |
265 | - | then { | |
266 | - | let aj = fromBase58String(ah) | |
267 | - | if ((aj == aj)) | |
268 | - | then [StringEntry(c(), ah)] | |
269 | - | else throw("Strict value is not equal to itself.") | |
270 | - | } | |
271 | - | else throw("Strict value is not equal to itself.") | |
272 | - | } | |
273 | - | ||
274 | - | ||
275 | - | ||
276 | - | @Callable(s) | |
277 | - | func confirmManager () = { | |
278 | - | let ak = q() | |
279 | - | let al = if (isDefined(ak)) | |
280 | - | then true | |
281 | - | else l("no pending manager") | |
282 | - | if ((al == al)) | |
283 | - | then { | |
284 | - | let am = if ((s.callerPublicKey == value(ak))) | |
285 | - | then true | |
286 | - | else l("you are not pending manager") | |
287 | - | if ((am == am)) | |
288 | - | then [StringEntry(b(), toBase58String(value(ak))), DeleteEntry(c())] | |
289 | - | else throw("Strict value is not equal to itself.") | |
290 | - | } | |
291 | - | else throw("Strict value is not equal to itself.") | |
292 | - | } | |
293 | - | ||
294 | - | ||
295 | - | @Verifier(an) | |
296 | - | func ao () = { | |
297 | - | let ap = { | |
298 | - | let o = n() | |
299 | - | if ($isInstanceOf(o, "ByteVector")) | |
259 | + | @Verifier(ai) | |
260 | + | func aj () = { | |
261 | + | let ak = { | |
262 | + | let m = q() | |
263 | + | if ($isInstanceOf(m, "ByteVector")) | |
300 | 264 | then { | |
301 | - | let | |
302 | - | | |
265 | + | let v = m | |
266 | + | v | |
303 | 267 | } | |
304 | - | else if ($isInstanceOf( | |
305 | - | then | |
268 | + | else if ($isInstanceOf(m, "Unit")) | |
269 | + | then ai.senderPublicKey | |
306 | 270 | else throw("Match error") | |
307 | 271 | } | |
308 | - | sigVerify( | |
272 | + | sigVerify(ai.bodyBytes, ai.proofs[0], ak) | |
309 | 273 | } | |
310 | 274 |
github/deemru/w8io/169f3d6 94.38 ms ◑