tx · CYqqpf62NWrwDvH6LzYBmAiydaXNgaW1g8sZxWdzuTFn 3MpiUwTkYopBwQEjyTf8sqy7iWLNwyq9Md4: -0.01800000 Waves 2024.12.09 16:59 [3407158] smart account 3MpiUwTkYopBwQEjyTf8sqy7iWLNwyq9Md4 > SELF 0.00000000 Waves
{ "type": 13, "id": "CYqqpf62NWrwDvH6LzYBmAiydaXNgaW1g8sZxWdzuTFn", "fee": 1800000, "feeAssetId": null, "timestamp": 1733752761399, "version": 2, "chainId": 84, "sender": "3MpiUwTkYopBwQEjyTf8sqy7iWLNwyq9Md4", "senderPublicKey": "9eCupW2UoCBhmiF1N9qWACCzkWT885DVzb65b8zxcSii", "proofs": [ "33WDepP6rkqbE7MBEEM8h4vTzZ5QqQfHMUFcQSAsdDwcdKxdMZGwZgynvN5MX2TzzvHq2tbRdd9c5eH7G9N2ww6p" ], "script": "base64:BwItCAISBQoDCAgIEgYKBAgICAgSBQoDCAgIEgQKAggEEgMKAQgSAwoBCBIDCgEIPwAJU0VQQVJBVE9SAgJfXwAMS0VZX01VTFRJU0lHAghNVUxUSVNJRwAKS0VZX1NUQVRVUwIGU1RBVFVTAAhLRVlfSU5JVAIESU5JVAANS0VZX1NFUVVFTkNFUgIJU0VRVUVOQ0VSABNLRVlfQUNDT1VOVF9TVE9SQUdFAg9BQ0NPVU5UX1NUT1JBR0UAEUtFWV9GRUVfUkVDSVBJRU5UAg1GRUVfUkVDSVBJRU5UAApLRVlfU1lNQk9MAgZTWU1CT0wAF0tFWV9PUkRFUl9GSUxMRURfQU1PVU5UAhNPUkRFUl9GSUxMRURfQU1PVU5UABZLRVlfUkVXQVJEX0RJU1RSSUJVVE9SAhJSRVdBUkRfRElTVFJJQlVUT1IAFkZVTkNfRVhURVJOQUxfVFJBTlNGRVICEGV4dGVybmFsVHJhbnNmZXIAEUZVTkNfQ0xBSU1fUkVXQVJEAgtjbGFpbVJld2FyZAALU1BPVF9XQUxMRVQCBFNQT1QAEE9SREVSX1RZUEVfT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Complexity": 0 } View: original | compacted Prev: FQi5iBpKorRvf6vjMgJwf5hwCYC9sPPCHSY6tXNi5q2T Next: 3uJdmYkbWwVbFaNh4BJLywXMi3vfWU4DmTqXD2xJPkvD Diff:
Old | New | Differences | |
---|---|---|---|
49 | 49 | ||
50 | 50 | let x = toBigInt(100000) | |
51 | 51 | ||
52 | - | let y = base58' | |
52 | + | let y = base58'7YXq4t' | |
53 | 53 | ||
54 | - | func z (A,B) = { | |
55 | - | let C = addressFromString(A) | |
56 | - | if ($isInstanceOf(C, "Address")) | |
54 | + | let z = base58'G5Nu92G2p7moXW9qjjN3na7gtq4dWCeVdaSjry' | |
55 | + | ||
56 | + | func A (B,C) = { | |
57 | + | let D = addressFromString(B) | |
58 | + | if ($isInstanceOf(D, "Address")) | |
57 | 59 | then { | |
58 | - | let | |
60 | + | let E = D | |
59 | 61 | true | |
60 | 62 | } | |
61 | - | else throw( | |
63 | + | else throw(C) | |
62 | 64 | } | |
63 | 65 | ||
64 | 66 | ||
65 | - | func | |
66 | - | then throw( | |
67 | + | func F (G,H,C) = if ((H > G)) | |
68 | + | then throw(C) | |
67 | 69 | else true | |
68 | 70 | ||
69 | 71 | ||
70 | - | func | |
71 | - | then throw( | |
72 | + | func I (J,K,C) = if ((J != K)) | |
73 | + | then throw(C) | |
72 | 74 | else true | |
73 | 75 | ||
74 | 76 | ||
75 | - | func | |
76 | - | then throw( | |
77 | + | func L (J,K,C) = if ((J == K)) | |
78 | + | then throw(C) | |
77 | 79 | else true | |
78 | 80 | ||
79 | 81 | ||
80 | - | func | |
82 | + | func M (G,C) = if (if ((0 >= size(G))) | |
81 | 83 | then true | |
82 | - | else contains( | |
83 | - | then throw( | |
84 | + | else contains(G, a)) | |
85 | + | then throw(C) | |
84 | 86 | else true | |
85 | 87 | ||
86 | 88 | ||
87 | - | func | |
88 | - | then throw( | |
89 | + | func N (J,K,C) = if ((J != K)) | |
90 | + | then throw(C) | |
89 | 91 | else true | |
90 | 92 | ||
91 | 93 | ||
92 | - | func | |
93 | - | let | |
94 | - | if ($isInstanceOf( | |
94 | + | func O () = { | |
95 | + | let D = getBoolean(d) | |
96 | + | if ($isInstanceOf(D, "Boolean")) | |
95 | 97 | then { | |
96 | - | let | |
97 | - | | |
98 | + | let E = D | |
99 | + | E | |
98 | 100 | } | |
99 | 101 | else false | |
100 | 102 | } | |
101 | 103 | ||
102 | 104 | ||
103 | - | func | |
105 | + | func P (Q) = [BooleanEntry(d, Q)] | |
104 | 106 | ||
105 | 107 | ||
106 | - | func | |
107 | - | let | |
108 | - | if ($isInstanceOf( | |
108 | + | func R () = { | |
109 | + | let D = getString(b) | |
110 | + | if ($isInstanceOf(D, "String")) | |
109 | 111 | then { | |
110 | - | let | |
111 | - | addressFromStringValue( | |
112 | + | let E = D | |
113 | + | addressFromStringValue(E) | |
112 | 114 | } | |
113 | 115 | else Address(base58'') | |
114 | 116 | } | |
115 | 117 | ||
116 | 118 | ||
117 | - | func | |
119 | + | func S (T) = [StringEntry(b, toString(T))] | |
118 | 120 | ||
119 | 121 | ||
120 | - | func | |
121 | - | let | |
122 | - | if ($isInstanceOf( | |
122 | + | func U () = { | |
123 | + | let D = getString(e) | |
124 | + | if ($isInstanceOf(D, "String")) | |
123 | 125 | then { | |
124 | - | let | |
125 | - | addressFromStringValue( | |
126 | + | let E = D | |
127 | + | addressFromStringValue(E) | |
126 | 128 | } | |
127 | 129 | else Address(base58'') | |
128 | 130 | } | |
129 | 131 | ||
130 | 132 | ||
131 | - | func | |
133 | + | func V (W) = [StringEntry(e, toString(W))] | |
132 | 134 | ||
133 | 135 | ||
134 | - | func | |
135 | - | let | |
136 | - | if ($isInstanceOf( | |
136 | + | func X () = { | |
137 | + | let D = getString(f) | |
138 | + | if ($isInstanceOf(D, "String")) | |
137 | 139 | then { | |
138 | - | let | |
139 | - | addressFromStringValue( | |
140 | + | let E = D | |
141 | + | addressFromStringValue(E) | |
140 | 142 | } | |
141 | 143 | else Address(base58'') | |
142 | 144 | } | |
143 | 145 | ||
144 | 146 | ||
145 | - | func | |
147 | + | func Y (Z) = [StringEntry(f, toString(Z))] | |
146 | 148 | ||
147 | 149 | ||
148 | - | func | |
149 | - | let | |
150 | - | if ($isInstanceOf( | |
150 | + | func aa () = { | |
151 | + | let D = getString(g) | |
152 | + | if ($isInstanceOf(D, "String")) | |
151 | 153 | then { | |
152 | - | let | |
153 | - | | |
154 | + | let E = D | |
155 | + | E | |
154 | 156 | } | |
155 | 157 | else "" | |
156 | 158 | } | |
157 | 159 | ||
158 | 160 | ||
159 | - | func | |
161 | + | func ab (ac) = [StringEntry(g, ac)] | |
160 | 162 | ||
161 | 163 | ||
162 | - | func | |
163 | - | let | |
164 | - | if ($isInstanceOf( | |
164 | + | func ad () = { | |
165 | + | let D = getString(j) | |
166 | + | if ($isInstanceOf(D, "String")) | |
165 | 167 | then { | |
166 | - | let | |
167 | - | | |
168 | + | let E = D | |
169 | + | E | |
168 | 170 | } | |
169 | 171 | else "" | |
170 | 172 | } | |
171 | 173 | ||
172 | 174 | ||
173 | - | func | |
175 | + | func ae (af) = [StringEntry(j, af)] | |
174 | 176 | ||
175 | 177 | ||
176 | - | func | |
177 | - | let | |
178 | - | if ($isInstanceOf( | |
178 | + | func ag (ah) = { | |
179 | + | let D = getBoolean(makeString([h, ah], a)) | |
180 | + | if ($isInstanceOf(D, "Boolean")) | |
179 | 181 | then { | |
180 | - | let | |
181 | - | | |
182 | + | let E = D | |
183 | + | E | |
182 | 184 | } | |
183 | 185 | else false | |
184 | 186 | } | |
185 | 187 | ||
186 | 188 | ||
187 | - | func | |
189 | + | func ai (ah,G) = [BooleanEntry(makeString([h, ah], a), G)] | |
188 | 190 | ||
189 | 191 | ||
190 | - | func | |
191 | - | let | |
192 | - | if ($isInstanceOf( | |
192 | + | func aj (ak) = { | |
193 | + | let D = getString(makeString([i, toBase58String(ak)], a)) | |
194 | + | if ($isInstanceOf(D, "String")) | |
193 | 195 | then { | |
194 | - | let | |
195 | - | parseBigIntValue( | |
196 | + | let E = D | |
197 | + | parseBigIntValue(E) | |
196 | 198 | } | |
197 | 199 | else u | |
198 | 200 | } | |
199 | 201 | ||
200 | 202 | ||
201 | - | func | |
203 | + | func al (ak,am) = [StringEntry(makeString([i, toBase58String(ak)], a), toString(am))] | |
202 | 204 | ||
203 | 205 | ||
204 | - | func | |
206 | + | func an (ao) = if ((ao != this)) | |
205 | 207 | then throw("_onlyThisContract: revert") | |
206 | 208 | else true | |
207 | 209 | ||
208 | 210 | ||
209 | - | func | |
211 | + | func ap () = if ((R() == Address(base58''))) | |
210 | 212 | then throw("_whenMultisigSet: revert") | |
211 | 213 | else true | |
212 | 214 | ||
213 | 215 | ||
214 | - | func | |
216 | + | func aq () = if (O()) | |
215 | 217 | then throw("_whenNotInitialized: revert") | |
216 | 218 | else true | |
217 | 219 | ||
218 | 220 | ||
219 | - | func | |
221 | + | func ar () = if (!(O())) | |
220 | 222 | then throw("_whenInitialized: revert") | |
221 | 223 | else true | |
222 | 224 | ||
223 | 225 | ||
224 | - | func | |
225 | - | then throw( | |
226 | + | func as (at,C) = if ((U() != at)) | |
227 | + | then throw(C) | |
226 | 228 | else true | |
227 | 229 | ||
228 | 230 | ||
229 | - | func | |
230 | - | then ( | |
231 | + | func au (av,aw,C) = if (if ((av != n)) | |
232 | + | then (av != o) | |
231 | 233 | else false) | |
232 | - | then throw( | |
233 | - | else if (( | |
234 | - | then throw( | |
234 | + | then throw(C) | |
235 | + | else if ((aw != p)) | |
236 | + | then throw(C) | |
235 | 237 | else true | |
236 | 238 | ||
237 | 239 | ||
238 | - | func | |
239 | - | then throw( | |
240 | + | func ax (ah,C) = if (!(ag(ah))) | |
241 | + | then throw(C) | |
240 | 242 | else true | |
241 | 243 | ||
242 | 244 | ||
243 | - | func | |
244 | - | then ( | |
245 | + | func ay (az,C) = if (if ((az != q)) | |
246 | + | then (az != r) | |
245 | 247 | else false) | |
246 | - | then throw( | |
248 | + | then throw(C) | |
247 | 249 | else true | |
248 | 250 | ||
249 | 251 | ||
250 | - | func | |
251 | - | let | |
252 | + | func aA (aB,aC,aD,aE,C) = { | |
253 | + | let aF = if ((aE == o)) | |
252 | 254 | then true | |
253 | - | else if (( | |
254 | - | then ( | |
255 | - | else if (( | |
256 | - | then ( | |
255 | + | else if ((aD == q)) | |
256 | + | then (aC >= aB) | |
257 | + | else if ((aD == r)) | |
258 | + | then (aB >= aC) | |
257 | 259 | else false | |
258 | - | if (!( | |
259 | - | then throw( | |
260 | + | if (!(aF)) | |
261 | + | then throw(C) | |
260 | 262 | else true | |
261 | 263 | } | |
262 | 264 | ||
263 | 265 | ||
264 | - | func | |
265 | - | then if ((size( | |
266 | - | then throw( | |
266 | + | func aG (aH,aI,C) = if ((aI == s)) | |
267 | + | then if ((size(aH) != 64)) | |
268 | + | then throw(C) | |
267 | 269 | else true | |
268 | - | else if (( | |
269 | - | then if ((size( | |
270 | - | then throw( | |
270 | + | else if ((aI == t)) | |
271 | + | then if ((size(aH) != 65)) | |
272 | + | then throw(C) | |
271 | 273 | else true | |
272 | - | else throw(( | |
274 | + | else throw((C + ": inv alg")) | |
273 | 275 | ||
274 | 276 | ||
275 | - | func | |
276 | - | then if ((size( | |
277 | - | then throw( | |
277 | + | func aJ (aK,aI,C) = if ((aI == s)) | |
278 | + | then if ((size(aK) != 32)) | |
279 | + | then throw(C) | |
278 | 280 | else true | |
279 | - | else if (( | |
280 | - | then if ((size( | |
281 | - | then throw( | |
281 | + | else if ((aI == t)) | |
282 | + | then if ((size(aK) != 20)) | |
283 | + | then throw(C) | |
282 | 284 | else true | |
283 | - | else throw(( | |
285 | + | else throw((C + ": inv alg")) | |
284 | 286 | ||
285 | 287 | ||
286 | - | func | |
287 | - | then toString(addressFromPublicKey( | |
288 | - | else if (( | |
289 | - | then ("0x" + toBase16String( | |
288 | + | func aL (aK,aI) = if ((aI == s)) | |
289 | + | then toString(addressFromPublicKey(aK)) | |
290 | + | else if ((aI == t)) | |
291 | + | then ("0x" + toBase16String(aK)) | |
290 | 292 | else throw("_convertWeb3IdToAddress: revert") | |
291 | 293 | ||
292 | 294 | ||
293 | - | func aL (aj,aG,aJ,aH,B) = { | |
294 | - | let aE = if ((aH == s)) | |
295 | - | then sigVerify(aj, aG, aJ) | |
296 | - | else if ((aH == t)) | |
295 | + | func aM (ak,aH,aK,aI,C) = { | |
296 | + | let aF = if ((aI == s)) | |
297 | + | then { | |
298 | + | let aN = keccak256_16Kb((y + toBytes(toBase58String(ak)))) | |
299 | + | sigVerify(aN, aH, aK) | |
300 | + | } | |
301 | + | else if ((aI == t)) | |
297 | 302 | then { | |
298 | - | let | |
299 | - | (takeRight(keccak256_16Kb(ecrecover( | |
303 | + | let aN = keccak256_16Kb((z + ak)) | |
304 | + | (takeRight(keccak256_16Kb(ecrecover(aN, aH)), 20) == aK) | |
300 | 305 | } | |
301 | - | else throw(( | |
302 | - | if (!( | |
303 | - | then throw( | |
306 | + | else throw((C + ": inv alg")) | |
307 | + | if (!(aF)) | |
308 | + | then throw(C) | |
304 | 309 | else true | |
305 | 310 | } | |
306 | 311 | ||
307 | 312 | ||
308 | - | func | |
309 | - | then throw( | |
313 | + | func aO (am,aP,C) = if ((aP > fraction(am, x, w, DOWN))) | |
314 | + | then throw(C) | |
310 | 315 | else true | |
311 | 316 | ||
312 | 317 | ||
313 | - | func | |
314 | - | let | |
315 | - | let | |
316 | - | let | |
317 | - | let | |
318 | - | let | |
319 | - | let | |
320 | - | let | |
321 | - | let | |
322 | - | let | |
323 | - | let | |
324 | - | then ( | |
318 | + | func aQ (aR,C) = { | |
319 | + | let aS = split(aR, a) | |
320 | + | let aT = valueOrErrorMessage(parseInt(aS[0]), (C + ": inv type")) | |
321 | + | let aU = valueOrErrorMessage(parseInt(aS[1]), (C + ": inv version")) | |
322 | + | let aV = aS[2] | |
323 | + | let aW = valueOrErrorMessage(parseInt(aS[3]), (C + ": inv side")) | |
324 | + | let aX = valueOrErrorMessage(parseInt(aS[4]), (C + ": inv ts")) | |
325 | + | let aY = fromBase58String(aS[5]) | |
326 | + | let aZ = valueOrErrorMessage(parseInt(aS[6]), (C + ": inv alg")) | |
327 | + | let ba = fromBase58String(aS[7]) | |
328 | + | let bb = if (if ((aT == n)) | |
329 | + | then (aU == p) | |
325 | 330 | else false) | |
326 | 331 | then { | |
327 | - | let | |
328 | - | let | |
329 | - | let | |
330 | - | $Tuple4( | |
332 | + | let bc = valueOrErrorMessage(parseBigInt(aS[8]), (C + ": inv price")) | |
333 | + | let bd = valueOrErrorMessage(parseBigInt(aS[9]), (C + ": inv amount")) | |
334 | + | let be = (toBytes(bc) + toBytes(bd)) | |
335 | + | $Tuple4(bc, bd, u, be) | |
331 | 336 | } | |
332 | - | else if (if (( | |
333 | - | then ( | |
337 | + | else if (if ((aT == o)) | |
338 | + | then (aU == p) | |
334 | 339 | else false) | |
335 | 340 | then { | |
336 | - | let | |
337 | - | let | |
341 | + | let bd = valueOrErrorMessage(parseBigInt(aS[8]), (C + ": inv amount")) | |
342 | + | let bf = if ((valueOrErrorMessage(parseBigInt(aS[9]), (C + ": inv isBaseAmount")) == u)) | |
338 | 343 | then false | |
339 | 344 | else true | |
340 | - | if ( | |
341 | - | then $Tuple4(u, | |
342 | - | else $Tuple4(u, u, | |
345 | + | if (bf) | |
346 | + | then $Tuple4(u, bd, u, (toBytes(bd) + toBytes(v))) | |
347 | + | else $Tuple4(u, u, bd, (toBytes(bd) + toBytes(u))) | |
343 | 348 | } | |
344 | - | else throw(( | |
345 | - | let | |
346 | - | let | |
347 | - | let | |
348 | - | let | |
349 | - | let | |
350 | - | let | |
351 | - | let | |
352 | - | then | |
349 | + | else throw((C + ": inv type & version")) | |
350 | + | let bc = bb._1 | |
351 | + | let bg = bb._2 | |
352 | + | let bh = bb._3 | |
353 | + | let be = bb._4 | |
354 | + | let bi = ((((((((toBytes(aT) + toBytes(aU)) + toBytes(size(aV))) + toBytes(aV)) + toBytes(aW)) + toBytes(aX)) + aY) + toBytes(aZ)) + be) | |
355 | + | let bj = keccak256_32Kb(bi) | |
356 | + | let bk = if (if (if (if (if (if (if (au(aT, aU, (C + ": inv order type"))) | |
357 | + | then ax(aV, (C + ": inv order symbol")) | |
353 | 358 | else false) | |
354 | - | then | |
359 | + | then ay(aW, (C + ": inv order side")) | |
355 | 360 | else false) | |
356 | - | then | |
361 | + | then aJ(aY, aZ, (C + ": inv order web3Id")) | |
357 | 362 | else false) | |
358 | - | then | |
363 | + | then aG(ba, aZ, (C + ": inv sig format")) | |
359 | 364 | else false) | |
360 | - | then | |
365 | + | then F(bc, u, (C + ": neg price")) | |
361 | 366 | else false) | |
362 | - | then | |
367 | + | then F(bg, u, (C + ": neg base amount")) | |
363 | 368 | else false) | |
364 | - | then | |
369 | + | then F(bh, u, (C + ": neg quote amount")) | |
365 | 370 | else false | |
366 | - | if (( | |
367 | - | then $Tuple10( | |
371 | + | if ((bk == bk)) | |
372 | + | then $Tuple10(aT, aV, aW, bc, bg, bh, bj, aY, aZ, ba) | |
368 | 373 | else throw("Strict value is not equal to itself.") | |
369 | 374 | } | |
370 | 375 | ||
371 | 376 | ||
372 | - | @Callable(bk) | |
373 | - | func init (V,Y,ab) = { | |
374 | - | let bj = if (if (if (if (if (am(bk.caller)) | |
377 | + | @Callable(bl) | |
378 | + | func init (W,Z,ac) = { | |
379 | + | let bk = if (if (if (if (if (an(bl.caller)) | |
380 | + | then aq() | |
381 | + | else false) | |
375 | 382 | then ap() | |
376 | 383 | else false) | |
377 | - | then | |
384 | + | then A(W, "init: invalid sequencer") | |
378 | 385 | else false) | |
379 | - | then | |
386 | + | then A(Z, "init: invalid accountStorage") | |
380 | 387 | else false) | |
381 | - | then z(Y, "init: invalid accountStorage") | |
382 | - | else false) | |
383 | - | then L(ab, "init: invalid feeRecipient") | |
388 | + | then M(ac, "init: invalid feeRecipient") | |
384 | 389 | else false | |
385 | - | if (( | |
386 | - | then $Tuple2(((( | |
390 | + | if ((bk == bk)) | |
391 | + | then $Tuple2((((P(true) ++ V(addressFromStringValue(W))) ++ Y(addressFromStringValue(Z))) ++ ab(ac)), unit) | |
387 | 392 | else throw("Strict value is not equal to itself.") | |
388 | 393 | } | |
389 | 394 | ||
390 | 395 | ||
391 | 396 | ||
392 | - | @Callable( | |
393 | - | func trade ( | |
394 | - | let | |
395 | - | let | |
396 | - | let | |
397 | - | let | |
398 | - | let | |
399 | - | let | |
400 | - | let | |
401 | - | let | |
402 | - | let | |
403 | - | let | |
404 | - | let | |
405 | - | let | |
406 | - | let | |
407 | - | let | |
408 | - | let | |
409 | - | let | |
410 | - | let | |
411 | - | let | |
412 | - | let | |
413 | - | let | |
414 | - | let | |
415 | - | let | |
416 | - | let | |
417 | - | let | |
418 | - | let | |
419 | - | let | |
420 | - | let | |
421 | - | let | |
422 | - | let | |
423 | - | then fraction(( | |
424 | - | else ( | |
425 | - | let | |
426 | - | let | |
427 | - | let | |
428 | - | then | |
397 | + | @Callable(bl) | |
398 | + | func trade (bm,bn,bo,bp) = { | |
399 | + | let bq = aQ(bm, "trade: invalid maker order") | |
400 | + | let br = bq._1 | |
401 | + | let bs = bq._2 | |
402 | + | let bt = bq._3 | |
403 | + | let bu = bq._4 | |
404 | + | let bv = bq._5 | |
405 | + | let bw = bq._6 | |
406 | + | let bx = bq._7 | |
407 | + | let by = bq._8 | |
408 | + | let bz = bq._9 | |
409 | + | let bA = bq._10 | |
410 | + | let bB = aQ(bn, "trade: invalid taker order") | |
411 | + | let bC = bB._1 | |
412 | + | let bD = bB._2 | |
413 | + | let bE = bB._3 | |
414 | + | let bF = bB._4 | |
415 | + | let bG = bB._5 | |
416 | + | let bH = bB._6 | |
417 | + | let bI = bB._7 | |
418 | + | let bJ = bB._8 | |
419 | + | let bK = bB._9 | |
420 | + | let bL = bB._10 | |
421 | + | let bM = valueOrErrorMessage(parseBigInt(bo), "trade: baseFee not int") | |
422 | + | let bN = valueOrErrorMessage(parseBigInt(bp), "trade: quoteFee not int") | |
423 | + | let bO = bu | |
424 | + | let bP = aj(bx) | |
425 | + | let bQ = (bv - bP) | |
426 | + | let bR = aj(bI) | |
427 | + | let bS = if ((bG == u)) | |
428 | + | then fraction((bH - bR), w, bO, DOWN) | |
429 | + | else (bG - bR) | |
430 | + | let bT = min([bQ, bS]) | |
431 | + | let bU = fraction(bT, bO, w, DOWN) | |
432 | + | let bk = if (if (if (if (if (if (if (if (if (as(bl.caller, "trade: invalid sequencer")) | |
433 | + | then F(bT, u, "trade: neg trade amount") | |
429 | 434 | else false) | |
430 | - | then | |
435 | + | then I(br, n, "trade: maker is not limit") | |
431 | 436 | else false) | |
432 | - | then | |
437 | + | then N(bs, bD, "trade: symbol mismatch") | |
433 | 438 | else false) | |
434 | - | then | |
439 | + | then L(bt, bE, "trade: side mismatch") | |
435 | 440 | else false) | |
436 | - | then | |
441 | + | then aM(bx, bA, by, bz, "trade: invalid maker sig") | |
437 | 442 | else false) | |
438 | - | then | |
443 | + | then aM(bI, bL, bJ, bK, "trade: invalid taker sig") | |
439 | 444 | else false) | |
440 | - | then | |
445 | + | then aO(bT, bM, "trade: base fee too much") | |
441 | 446 | else false) | |
442 | - | then | |
447 | + | then aO(bU, bN, "trade: quote fee too much") | |
443 | 448 | else false) | |
444 | - | then | |
449 | + | then aA(bu, bF, bE, bC, "trade: prices mismatch") | |
445 | 450 | else false | |
446 | - | if (( | |
451 | + | if ((bk == bk)) | |
447 | 452 | then { | |
448 | - | let | |
449 | - | let | |
450 | - | let | |
451 | - | then $Tuple2( | |
452 | - | else $Tuple2( | |
453 | - | let | |
454 | - | let | |
455 | - | let | |
456 | - | let | |
457 | - | let | |
458 | - | let | |
459 | - | let | |
460 | - | if (( | |
453 | + | let bV = aL(by, bz) | |
454 | + | let bW = aL(bJ, bK) | |
455 | + | let bX = if ((bt == q)) | |
456 | + | then $Tuple2(bV, bW) | |
457 | + | else $Tuple2(bW, bV) | |
458 | + | let bY = bX._1 | |
459 | + | let bZ = bX._2 | |
460 | + | let ca = split(bs, "-") | |
461 | + | let cb = ca[0] | |
462 | + | let cc = ca[1] | |
463 | + | let cd = aa() | |
464 | + | let ce = invoke(X(), k, [m, cb, bZ, bY, toString(bT), toString(bM), cd], nil) | |
465 | + | if ((ce == ce)) | |
461 | 466 | then { | |
462 | - | let | |
463 | - | if (( | |
467 | + | let cf = invoke(X(), k, [m, cc, bY, bZ, toString(bU), toString(bN), cd], nil) | |
468 | + | if ((cf == cf)) | |
464 | 469 | then { | |
465 | - | let | |
466 | - | let | |
467 | - | then ( | |
468 | - | else ( | |
469 | - | $Tuple2(( | |
470 | + | let cg = (bP + bT) | |
471 | + | let ch = if ((bG == u)) | |
472 | + | then (bR + bU) | |
473 | + | else (bR + bT) | |
474 | + | $Tuple2((al(bx, cg) ++ al(bI, ch)), unit) | |
470 | 475 | } | |
471 | 476 | else throw("Strict value is not equal to itself.") | |
472 | 477 | } | |
477 | 482 | ||
478 | 483 | ||
479 | 484 | ||
480 | - | @Callable( | |
481 | - | func claimReward ( | |
482 | - | let | |
483 | - | let | |
484 | - | then | |
485 | + | @Callable(bl) | |
486 | + | func claimReward (ci,cj,am) = { | |
487 | + | let bd = valueOrErrorMessage(parseBigInt(am), "claimReward: amount not int") | |
488 | + | let bk = if (if (if (as(bl.caller, "claimReward: invalid sequencer")) | |
489 | + | then M(ci, "claimReward: invalid user") | |
485 | 490 | else false) | |
486 | - | then | |
491 | + | then M(cj, "claimReward: invalid currency") | |
487 | 492 | else false) | |
488 | - | then | |
493 | + | then F(bd, u, "claimReward: neg amount") | |
489 | 494 | else false | |
490 | - | if (( | |
495 | + | if ((bk == bk)) | |
491 | 496 | then { | |
492 | - | let | |
493 | - | if (( | |
497 | + | let ce = invoke(X(), l, [ad(), ci, cj, am], nil) | |
498 | + | if ((ce == ce)) | |
494 | 499 | then $Tuple2(nil, unit) | |
495 | 500 | else throw("Strict value is not equal to itself.") | |
496 | 501 | } | |
499 | 504 | ||
500 | 505 | ||
501 | 506 | ||
502 | - | @Callable( | |
503 | - | func updateSymbol ( | |
504 | - | let | |
505 | - | then | |
507 | + | @Callable(bl) | |
508 | + | func updateSymbol (ah,ck) = { | |
509 | + | let bk = if (an(bl.caller)) | |
510 | + | then M(ah, "updateSymbol: invalid symbol") | |
506 | 511 | else false | |
507 | - | if (( | |
508 | - | then $Tuple2(ah | |
512 | + | if ((bk == bk)) | |
513 | + | then $Tuple2(ai(ah, ck), unit) | |
509 | 514 | else throw("Strict value is not equal to itself.") | |
510 | 515 | } | |
511 | 516 | ||
512 | 517 | ||
513 | 518 | ||
514 | - | @Callable( | |
515 | - | func updateFeeRecipient ( | |
516 | - | let | |
517 | - | then | |
519 | + | @Callable(bl) | |
520 | + | func updateFeeRecipient (ac) = { | |
521 | + | let bk = if (if (an(bl.caller)) | |
522 | + | then ar() | |
518 | 523 | else false) | |
519 | - | then | |
524 | + | then M(ac, "updateFeeRecipient: invalid feeRecipient") | |
520 | 525 | else false | |
521 | - | if (( | |
522 | - | then $Tuple2( | |
526 | + | if ((bk == bk)) | |
527 | + | then $Tuple2(ab(ac), unit) | |
523 | 528 | else throw("Strict value is not equal to itself.") | |
524 | 529 | } | |
525 | 530 | ||
526 | 531 | ||
527 | 532 | ||
528 | - | @Callable( | |
529 | - | func updateRewardDistributor ( | |
530 | - | let | |
531 | - | then | |
533 | + | @Callable(bl) | |
534 | + | func updateRewardDistributor (cl) = { | |
535 | + | let bk = if (if (an(bl.caller)) | |
536 | + | then ar() | |
532 | 537 | else false) | |
533 | - | then | |
538 | + | then M(cl, "updateRewardDistributor: invalid rewardDistributor") | |
534 | 539 | else false | |
535 | - | if (( | |
536 | - | then $Tuple2( | |
540 | + | if ((bk == bk)) | |
541 | + | then $Tuple2(ae(cl), unit) | |
537 | 542 | else throw("Strict value is not equal to itself.") | |
538 | 543 | } | |
539 | 544 | ||
540 | 545 | ||
541 | 546 | ||
542 | - | @Callable( | |
543 | - | func setMultisig ( | |
544 | - | let | |
545 | - | then | |
547 | + | @Callable(bl) | |
548 | + | func setMultisig (T) = { | |
549 | + | let bk = if (an(bl.caller)) | |
550 | + | then A(T, "setMultisig: invalid multisig") | |
546 | 551 | else false | |
547 | - | if (( | |
548 | - | then $Tuple2( | |
552 | + | if ((bk == bk)) | |
553 | + | then $Tuple2(S(addressFromStringValue(T)), unit) | |
549 | 554 | else throw("Strict value is not equal to itself.") | |
550 | 555 | } | |
551 | 556 | ||
552 | 557 | ||
553 | - | @Verifier( | |
554 | - | func | |
555 | - | let | |
556 | - | if ($isInstanceOf( | |
558 | + | @Verifier(cm) | |
559 | + | func cn () = { | |
560 | + | let D = getString(b) | |
561 | + | if ($isInstanceOf(D, "String")) | |
557 | 562 | then { | |
558 | - | let | |
559 | - | valueOrElse(getBoolean(addressFromStringValue( | |
563 | + | let co = D | |
564 | + | valueOrElse(getBoolean(addressFromStringValue(co), makeString([c, toString(this), toBase58String(cm.id)], a)), false) | |
560 | 565 | } | |
561 | - | else sigVerify( | |
566 | + | else sigVerify(cm.bodyBytes, cm.proofs[0], cm.senderPublicKey) | |
562 | 567 | } | |
563 | 568 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 7 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "__" | |
5 | 5 | ||
6 | 6 | let b = "MULTISIG" | |
7 | 7 | ||
8 | 8 | let c = "STATUS" | |
9 | 9 | ||
10 | 10 | let d = "INIT" | |
11 | 11 | ||
12 | 12 | let e = "SEQUENCER" | |
13 | 13 | ||
14 | 14 | let f = "ACCOUNT_STORAGE" | |
15 | 15 | ||
16 | 16 | let g = "FEE_RECIPIENT" | |
17 | 17 | ||
18 | 18 | let h = "SYMBOL" | |
19 | 19 | ||
20 | 20 | let i = "ORDER_FILLED_AMOUNT" | |
21 | 21 | ||
22 | 22 | let j = "REWARD_DISTRIBUTOR" | |
23 | 23 | ||
24 | 24 | let k = "externalTransfer" | |
25 | 25 | ||
26 | 26 | let l = "claimReward" | |
27 | 27 | ||
28 | 28 | let m = "SPOT" | |
29 | 29 | ||
30 | 30 | let n = 1 | |
31 | 31 | ||
32 | 32 | let o = 2 | |
33 | 33 | ||
34 | 34 | let p = 1 | |
35 | 35 | ||
36 | 36 | let q = 1 | |
37 | 37 | ||
38 | 38 | let r = 2 | |
39 | 39 | ||
40 | 40 | let s = 1 | |
41 | 41 | ||
42 | 42 | let t = 2 | |
43 | 43 | ||
44 | 44 | let u = toBigInt(0) | |
45 | 45 | ||
46 | 46 | let v = toBigInt(1) | |
47 | 47 | ||
48 | 48 | let w = toBigInt(100000000) | |
49 | 49 | ||
50 | 50 | let x = toBigInt(100000) | |
51 | 51 | ||
52 | - | let y = base58' | |
52 | + | let y = base58'7YXq4t' | |
53 | 53 | ||
54 | - | func z (A,B) = { | |
55 | - | let C = addressFromString(A) | |
56 | - | if ($isInstanceOf(C, "Address")) | |
54 | + | let z = base58'G5Nu92G2p7moXW9qjjN3na7gtq4dWCeVdaSjry' | |
55 | + | ||
56 | + | func A (B,C) = { | |
57 | + | let D = addressFromString(B) | |
58 | + | if ($isInstanceOf(D, "Address")) | |
57 | 59 | then { | |
58 | - | let | |
60 | + | let E = D | |
59 | 61 | true | |
60 | 62 | } | |
61 | - | else throw( | |
63 | + | else throw(C) | |
62 | 64 | } | |
63 | 65 | ||
64 | 66 | ||
65 | - | func | |
66 | - | then throw( | |
67 | + | func F (G,H,C) = if ((H > G)) | |
68 | + | then throw(C) | |
67 | 69 | else true | |
68 | 70 | ||
69 | 71 | ||
70 | - | func | |
71 | - | then throw( | |
72 | + | func I (J,K,C) = if ((J != K)) | |
73 | + | then throw(C) | |
72 | 74 | else true | |
73 | 75 | ||
74 | 76 | ||
75 | - | func | |
76 | - | then throw( | |
77 | + | func L (J,K,C) = if ((J == K)) | |
78 | + | then throw(C) | |
77 | 79 | else true | |
78 | 80 | ||
79 | 81 | ||
80 | - | func | |
82 | + | func M (G,C) = if (if ((0 >= size(G))) | |
81 | 83 | then true | |
82 | - | else contains( | |
83 | - | then throw( | |
84 | + | else contains(G, a)) | |
85 | + | then throw(C) | |
84 | 86 | else true | |
85 | 87 | ||
86 | 88 | ||
87 | - | func | |
88 | - | then throw( | |
89 | + | func N (J,K,C) = if ((J != K)) | |
90 | + | then throw(C) | |
89 | 91 | else true | |
90 | 92 | ||
91 | 93 | ||
92 | - | func | |
93 | - | let | |
94 | - | if ($isInstanceOf( | |
94 | + | func O () = { | |
95 | + | let D = getBoolean(d) | |
96 | + | if ($isInstanceOf(D, "Boolean")) | |
95 | 97 | then { | |
96 | - | let | |
97 | - | | |
98 | + | let E = D | |
99 | + | E | |
98 | 100 | } | |
99 | 101 | else false | |
100 | 102 | } | |
101 | 103 | ||
102 | 104 | ||
103 | - | func | |
105 | + | func P (Q) = [BooleanEntry(d, Q)] | |
104 | 106 | ||
105 | 107 | ||
106 | - | func | |
107 | - | let | |
108 | - | if ($isInstanceOf( | |
108 | + | func R () = { | |
109 | + | let D = getString(b) | |
110 | + | if ($isInstanceOf(D, "String")) | |
109 | 111 | then { | |
110 | - | let | |
111 | - | addressFromStringValue( | |
112 | + | let E = D | |
113 | + | addressFromStringValue(E) | |
112 | 114 | } | |
113 | 115 | else Address(base58'') | |
114 | 116 | } | |
115 | 117 | ||
116 | 118 | ||
117 | - | func | |
119 | + | func S (T) = [StringEntry(b, toString(T))] | |
118 | 120 | ||
119 | 121 | ||
120 | - | func | |
121 | - | let | |
122 | - | if ($isInstanceOf( | |
122 | + | func U () = { | |
123 | + | let D = getString(e) | |
124 | + | if ($isInstanceOf(D, "String")) | |
123 | 125 | then { | |
124 | - | let | |
125 | - | addressFromStringValue( | |
126 | + | let E = D | |
127 | + | addressFromStringValue(E) | |
126 | 128 | } | |
127 | 129 | else Address(base58'') | |
128 | 130 | } | |
129 | 131 | ||
130 | 132 | ||
131 | - | func | |
133 | + | func V (W) = [StringEntry(e, toString(W))] | |
132 | 134 | ||
133 | 135 | ||
134 | - | func | |
135 | - | let | |
136 | - | if ($isInstanceOf( | |
136 | + | func X () = { | |
137 | + | let D = getString(f) | |
138 | + | if ($isInstanceOf(D, "String")) | |
137 | 139 | then { | |
138 | - | let | |
139 | - | addressFromStringValue( | |
140 | + | let E = D | |
141 | + | addressFromStringValue(E) | |
140 | 142 | } | |
141 | 143 | else Address(base58'') | |
142 | 144 | } | |
143 | 145 | ||
144 | 146 | ||
145 | - | func | |
147 | + | func Y (Z) = [StringEntry(f, toString(Z))] | |
146 | 148 | ||
147 | 149 | ||
148 | - | func | |
149 | - | let | |
150 | - | if ($isInstanceOf( | |
150 | + | func aa () = { | |
151 | + | let D = getString(g) | |
152 | + | if ($isInstanceOf(D, "String")) | |
151 | 153 | then { | |
152 | - | let | |
153 | - | | |
154 | + | let E = D | |
155 | + | E | |
154 | 156 | } | |
155 | 157 | else "" | |
156 | 158 | } | |
157 | 159 | ||
158 | 160 | ||
159 | - | func | |
161 | + | func ab (ac) = [StringEntry(g, ac)] | |
160 | 162 | ||
161 | 163 | ||
162 | - | func | |
163 | - | let | |
164 | - | if ($isInstanceOf( | |
164 | + | func ad () = { | |
165 | + | let D = getString(j) | |
166 | + | if ($isInstanceOf(D, "String")) | |
165 | 167 | then { | |
166 | - | let | |
167 | - | | |
168 | + | let E = D | |
169 | + | E | |
168 | 170 | } | |
169 | 171 | else "" | |
170 | 172 | } | |
171 | 173 | ||
172 | 174 | ||
173 | - | func | |
175 | + | func ae (af) = [StringEntry(j, af)] | |
174 | 176 | ||
175 | 177 | ||
176 | - | func | |
177 | - | let | |
178 | - | if ($isInstanceOf( | |
178 | + | func ag (ah) = { | |
179 | + | let D = getBoolean(makeString([h, ah], a)) | |
180 | + | if ($isInstanceOf(D, "Boolean")) | |
179 | 181 | then { | |
180 | - | let | |
181 | - | | |
182 | + | let E = D | |
183 | + | E | |
182 | 184 | } | |
183 | 185 | else false | |
184 | 186 | } | |
185 | 187 | ||
186 | 188 | ||
187 | - | func | |
189 | + | func ai (ah,G) = [BooleanEntry(makeString([h, ah], a), G)] | |
188 | 190 | ||
189 | 191 | ||
190 | - | func | |
191 | - | let | |
192 | - | if ($isInstanceOf( | |
192 | + | func aj (ak) = { | |
193 | + | let D = getString(makeString([i, toBase58String(ak)], a)) | |
194 | + | if ($isInstanceOf(D, "String")) | |
193 | 195 | then { | |
194 | - | let | |
195 | - | parseBigIntValue( | |
196 | + | let E = D | |
197 | + | parseBigIntValue(E) | |
196 | 198 | } | |
197 | 199 | else u | |
198 | 200 | } | |
199 | 201 | ||
200 | 202 | ||
201 | - | func | |
203 | + | func al (ak,am) = [StringEntry(makeString([i, toBase58String(ak)], a), toString(am))] | |
202 | 204 | ||
203 | 205 | ||
204 | - | func | |
206 | + | func an (ao) = if ((ao != this)) | |
205 | 207 | then throw("_onlyThisContract: revert") | |
206 | 208 | else true | |
207 | 209 | ||
208 | 210 | ||
209 | - | func | |
211 | + | func ap () = if ((R() == Address(base58''))) | |
210 | 212 | then throw("_whenMultisigSet: revert") | |
211 | 213 | else true | |
212 | 214 | ||
213 | 215 | ||
214 | - | func | |
216 | + | func aq () = if (O()) | |
215 | 217 | then throw("_whenNotInitialized: revert") | |
216 | 218 | else true | |
217 | 219 | ||
218 | 220 | ||
219 | - | func | |
221 | + | func ar () = if (!(O())) | |
220 | 222 | then throw("_whenInitialized: revert") | |
221 | 223 | else true | |
222 | 224 | ||
223 | 225 | ||
224 | - | func | |
225 | - | then throw( | |
226 | + | func as (at,C) = if ((U() != at)) | |
227 | + | then throw(C) | |
226 | 228 | else true | |
227 | 229 | ||
228 | 230 | ||
229 | - | func | |
230 | - | then ( | |
231 | + | func au (av,aw,C) = if (if ((av != n)) | |
232 | + | then (av != o) | |
231 | 233 | else false) | |
232 | - | then throw( | |
233 | - | else if (( | |
234 | - | then throw( | |
234 | + | then throw(C) | |
235 | + | else if ((aw != p)) | |
236 | + | then throw(C) | |
235 | 237 | else true | |
236 | 238 | ||
237 | 239 | ||
238 | - | func | |
239 | - | then throw( | |
240 | + | func ax (ah,C) = if (!(ag(ah))) | |
241 | + | then throw(C) | |
240 | 242 | else true | |
241 | 243 | ||
242 | 244 | ||
243 | - | func | |
244 | - | then ( | |
245 | + | func ay (az,C) = if (if ((az != q)) | |
246 | + | then (az != r) | |
245 | 247 | else false) | |
246 | - | then throw( | |
248 | + | then throw(C) | |
247 | 249 | else true | |
248 | 250 | ||
249 | 251 | ||
250 | - | func | |
251 | - | let | |
252 | + | func aA (aB,aC,aD,aE,C) = { | |
253 | + | let aF = if ((aE == o)) | |
252 | 254 | then true | |
253 | - | else if (( | |
254 | - | then ( | |
255 | - | else if (( | |
256 | - | then ( | |
255 | + | else if ((aD == q)) | |
256 | + | then (aC >= aB) | |
257 | + | else if ((aD == r)) | |
258 | + | then (aB >= aC) | |
257 | 259 | else false | |
258 | - | if (!( | |
259 | - | then throw( | |
260 | + | if (!(aF)) | |
261 | + | then throw(C) | |
260 | 262 | else true | |
261 | 263 | } | |
262 | 264 | ||
263 | 265 | ||
264 | - | func | |
265 | - | then if ((size( | |
266 | - | then throw( | |
266 | + | func aG (aH,aI,C) = if ((aI == s)) | |
267 | + | then if ((size(aH) != 64)) | |
268 | + | then throw(C) | |
267 | 269 | else true | |
268 | - | else if (( | |
269 | - | then if ((size( | |
270 | - | then throw( | |
270 | + | else if ((aI == t)) | |
271 | + | then if ((size(aH) != 65)) | |
272 | + | then throw(C) | |
271 | 273 | else true | |
272 | - | else throw(( | |
274 | + | else throw((C + ": inv alg")) | |
273 | 275 | ||
274 | 276 | ||
275 | - | func | |
276 | - | then if ((size( | |
277 | - | then throw( | |
277 | + | func aJ (aK,aI,C) = if ((aI == s)) | |
278 | + | then if ((size(aK) != 32)) | |
279 | + | then throw(C) | |
278 | 280 | else true | |
279 | - | else if (( | |
280 | - | then if ((size( | |
281 | - | then throw( | |
281 | + | else if ((aI == t)) | |
282 | + | then if ((size(aK) != 20)) | |
283 | + | then throw(C) | |
282 | 284 | else true | |
283 | - | else throw(( | |
285 | + | else throw((C + ": inv alg")) | |
284 | 286 | ||
285 | 287 | ||
286 | - | func | |
287 | - | then toString(addressFromPublicKey( | |
288 | - | else if (( | |
289 | - | then ("0x" + toBase16String( | |
288 | + | func aL (aK,aI) = if ((aI == s)) | |
289 | + | then toString(addressFromPublicKey(aK)) | |
290 | + | else if ((aI == t)) | |
291 | + | then ("0x" + toBase16String(aK)) | |
290 | 292 | else throw("_convertWeb3IdToAddress: revert") | |
291 | 293 | ||
292 | 294 | ||
293 | - | func aL (aj,aG,aJ,aH,B) = { | |
294 | - | let aE = if ((aH == s)) | |
295 | - | then sigVerify(aj, aG, aJ) | |
296 | - | else if ((aH == t)) | |
295 | + | func aM (ak,aH,aK,aI,C) = { | |
296 | + | let aF = if ((aI == s)) | |
297 | + | then { | |
298 | + | let aN = keccak256_16Kb((y + toBytes(toBase58String(ak)))) | |
299 | + | sigVerify(aN, aH, aK) | |
300 | + | } | |
301 | + | else if ((aI == t)) | |
297 | 302 | then { | |
298 | - | let | |
299 | - | (takeRight(keccak256_16Kb(ecrecover( | |
303 | + | let aN = keccak256_16Kb((z + ak)) | |
304 | + | (takeRight(keccak256_16Kb(ecrecover(aN, aH)), 20) == aK) | |
300 | 305 | } | |
301 | - | else throw(( | |
302 | - | if (!( | |
303 | - | then throw( | |
306 | + | else throw((C + ": inv alg")) | |
307 | + | if (!(aF)) | |
308 | + | then throw(C) | |
304 | 309 | else true | |
305 | 310 | } | |
306 | 311 | ||
307 | 312 | ||
308 | - | func | |
309 | - | then throw( | |
313 | + | func aO (am,aP,C) = if ((aP > fraction(am, x, w, DOWN))) | |
314 | + | then throw(C) | |
310 | 315 | else true | |
311 | 316 | ||
312 | 317 | ||
313 | - | func | |
314 | - | let | |
315 | - | let | |
316 | - | let | |
317 | - | let | |
318 | - | let | |
319 | - | let | |
320 | - | let | |
321 | - | let | |
322 | - | let | |
323 | - | let | |
324 | - | then ( | |
318 | + | func aQ (aR,C) = { | |
319 | + | let aS = split(aR, a) | |
320 | + | let aT = valueOrErrorMessage(parseInt(aS[0]), (C + ": inv type")) | |
321 | + | let aU = valueOrErrorMessage(parseInt(aS[1]), (C + ": inv version")) | |
322 | + | let aV = aS[2] | |
323 | + | let aW = valueOrErrorMessage(parseInt(aS[3]), (C + ": inv side")) | |
324 | + | let aX = valueOrErrorMessage(parseInt(aS[4]), (C + ": inv ts")) | |
325 | + | let aY = fromBase58String(aS[5]) | |
326 | + | let aZ = valueOrErrorMessage(parseInt(aS[6]), (C + ": inv alg")) | |
327 | + | let ba = fromBase58String(aS[7]) | |
328 | + | let bb = if (if ((aT == n)) | |
329 | + | then (aU == p) | |
325 | 330 | else false) | |
326 | 331 | then { | |
327 | - | let | |
328 | - | let | |
329 | - | let | |
330 | - | $Tuple4( | |
332 | + | let bc = valueOrErrorMessage(parseBigInt(aS[8]), (C + ": inv price")) | |
333 | + | let bd = valueOrErrorMessage(parseBigInt(aS[9]), (C + ": inv amount")) | |
334 | + | let be = (toBytes(bc) + toBytes(bd)) | |
335 | + | $Tuple4(bc, bd, u, be) | |
331 | 336 | } | |
332 | - | else if (if (( | |
333 | - | then ( | |
337 | + | else if (if ((aT == o)) | |
338 | + | then (aU == p) | |
334 | 339 | else false) | |
335 | 340 | then { | |
336 | - | let | |
337 | - | let | |
341 | + | let bd = valueOrErrorMessage(parseBigInt(aS[8]), (C + ": inv amount")) | |
342 | + | let bf = if ((valueOrErrorMessage(parseBigInt(aS[9]), (C + ": inv isBaseAmount")) == u)) | |
338 | 343 | then false | |
339 | 344 | else true | |
340 | - | if ( | |
341 | - | then $Tuple4(u, | |
342 | - | else $Tuple4(u, u, | |
345 | + | if (bf) | |
346 | + | then $Tuple4(u, bd, u, (toBytes(bd) + toBytes(v))) | |
347 | + | else $Tuple4(u, u, bd, (toBytes(bd) + toBytes(u))) | |
343 | 348 | } | |
344 | - | else throw(( | |
345 | - | let | |
346 | - | let | |
347 | - | let | |
348 | - | let | |
349 | - | let | |
350 | - | let | |
351 | - | let | |
352 | - | then | |
349 | + | else throw((C + ": inv type & version")) | |
350 | + | let bc = bb._1 | |
351 | + | let bg = bb._2 | |
352 | + | let bh = bb._3 | |
353 | + | let be = bb._4 | |
354 | + | let bi = ((((((((toBytes(aT) + toBytes(aU)) + toBytes(size(aV))) + toBytes(aV)) + toBytes(aW)) + toBytes(aX)) + aY) + toBytes(aZ)) + be) | |
355 | + | let bj = keccak256_32Kb(bi) | |
356 | + | let bk = if (if (if (if (if (if (if (au(aT, aU, (C + ": inv order type"))) | |
357 | + | then ax(aV, (C + ": inv order symbol")) | |
353 | 358 | else false) | |
354 | - | then | |
359 | + | then ay(aW, (C + ": inv order side")) | |
355 | 360 | else false) | |
356 | - | then | |
361 | + | then aJ(aY, aZ, (C + ": inv order web3Id")) | |
357 | 362 | else false) | |
358 | - | then | |
363 | + | then aG(ba, aZ, (C + ": inv sig format")) | |
359 | 364 | else false) | |
360 | - | then | |
365 | + | then F(bc, u, (C + ": neg price")) | |
361 | 366 | else false) | |
362 | - | then | |
367 | + | then F(bg, u, (C + ": neg base amount")) | |
363 | 368 | else false) | |
364 | - | then | |
369 | + | then F(bh, u, (C + ": neg quote amount")) | |
365 | 370 | else false | |
366 | - | if (( | |
367 | - | then $Tuple10( | |
371 | + | if ((bk == bk)) | |
372 | + | then $Tuple10(aT, aV, aW, bc, bg, bh, bj, aY, aZ, ba) | |
368 | 373 | else throw("Strict value is not equal to itself.") | |
369 | 374 | } | |
370 | 375 | ||
371 | 376 | ||
372 | - | @Callable(bk) | |
373 | - | func init (V,Y,ab) = { | |
374 | - | let bj = if (if (if (if (if (am(bk.caller)) | |
377 | + | @Callable(bl) | |
378 | + | func init (W,Z,ac) = { | |
379 | + | let bk = if (if (if (if (if (an(bl.caller)) | |
380 | + | then aq() | |
381 | + | else false) | |
375 | 382 | then ap() | |
376 | 383 | else false) | |
377 | - | then | |
384 | + | then A(W, "init: invalid sequencer") | |
378 | 385 | else false) | |
379 | - | then | |
386 | + | then A(Z, "init: invalid accountStorage") | |
380 | 387 | else false) | |
381 | - | then z(Y, "init: invalid accountStorage") | |
382 | - | else false) | |
383 | - | then L(ab, "init: invalid feeRecipient") | |
388 | + | then M(ac, "init: invalid feeRecipient") | |
384 | 389 | else false | |
385 | - | if (( | |
386 | - | then $Tuple2(((( | |
390 | + | if ((bk == bk)) | |
391 | + | then $Tuple2((((P(true) ++ V(addressFromStringValue(W))) ++ Y(addressFromStringValue(Z))) ++ ab(ac)), unit) | |
387 | 392 | else throw("Strict value is not equal to itself.") | |
388 | 393 | } | |
389 | 394 | ||
390 | 395 | ||
391 | 396 | ||
392 | - | @Callable( | |
393 | - | func trade ( | |
394 | - | let | |
395 | - | let | |
396 | - | let | |
397 | - | let | |
398 | - | let | |
399 | - | let | |
400 | - | let | |
401 | - | let | |
402 | - | let | |
403 | - | let | |
404 | - | let | |
405 | - | let | |
406 | - | let | |
407 | - | let | |
408 | - | let | |
409 | - | let | |
410 | - | let | |
411 | - | let | |
412 | - | let | |
413 | - | let | |
414 | - | let | |
415 | - | let | |
416 | - | let | |
417 | - | let | |
418 | - | let | |
419 | - | let | |
420 | - | let | |
421 | - | let | |
422 | - | let | |
423 | - | then fraction(( | |
424 | - | else ( | |
425 | - | let | |
426 | - | let | |
427 | - | let | |
428 | - | then | |
397 | + | @Callable(bl) | |
398 | + | func trade (bm,bn,bo,bp) = { | |
399 | + | let bq = aQ(bm, "trade: invalid maker order") | |
400 | + | let br = bq._1 | |
401 | + | let bs = bq._2 | |
402 | + | let bt = bq._3 | |
403 | + | let bu = bq._4 | |
404 | + | let bv = bq._5 | |
405 | + | let bw = bq._6 | |
406 | + | let bx = bq._7 | |
407 | + | let by = bq._8 | |
408 | + | let bz = bq._9 | |
409 | + | let bA = bq._10 | |
410 | + | let bB = aQ(bn, "trade: invalid taker order") | |
411 | + | let bC = bB._1 | |
412 | + | let bD = bB._2 | |
413 | + | let bE = bB._3 | |
414 | + | let bF = bB._4 | |
415 | + | let bG = bB._5 | |
416 | + | let bH = bB._6 | |
417 | + | let bI = bB._7 | |
418 | + | let bJ = bB._8 | |
419 | + | let bK = bB._9 | |
420 | + | let bL = bB._10 | |
421 | + | let bM = valueOrErrorMessage(parseBigInt(bo), "trade: baseFee not int") | |
422 | + | let bN = valueOrErrorMessage(parseBigInt(bp), "trade: quoteFee not int") | |
423 | + | let bO = bu | |
424 | + | let bP = aj(bx) | |
425 | + | let bQ = (bv - bP) | |
426 | + | let bR = aj(bI) | |
427 | + | let bS = if ((bG == u)) | |
428 | + | then fraction((bH - bR), w, bO, DOWN) | |
429 | + | else (bG - bR) | |
430 | + | let bT = min([bQ, bS]) | |
431 | + | let bU = fraction(bT, bO, w, DOWN) | |
432 | + | let bk = if (if (if (if (if (if (if (if (if (as(bl.caller, "trade: invalid sequencer")) | |
433 | + | then F(bT, u, "trade: neg trade amount") | |
429 | 434 | else false) | |
430 | - | then | |
435 | + | then I(br, n, "trade: maker is not limit") | |
431 | 436 | else false) | |
432 | - | then | |
437 | + | then N(bs, bD, "trade: symbol mismatch") | |
433 | 438 | else false) | |
434 | - | then | |
439 | + | then L(bt, bE, "trade: side mismatch") | |
435 | 440 | else false) | |
436 | - | then | |
441 | + | then aM(bx, bA, by, bz, "trade: invalid maker sig") | |
437 | 442 | else false) | |
438 | - | then | |
443 | + | then aM(bI, bL, bJ, bK, "trade: invalid taker sig") | |
439 | 444 | else false) | |
440 | - | then | |
445 | + | then aO(bT, bM, "trade: base fee too much") | |
441 | 446 | else false) | |
442 | - | then | |
447 | + | then aO(bU, bN, "trade: quote fee too much") | |
443 | 448 | else false) | |
444 | - | then | |
449 | + | then aA(bu, bF, bE, bC, "trade: prices mismatch") | |
445 | 450 | else false | |
446 | - | if (( | |
451 | + | if ((bk == bk)) | |
447 | 452 | then { | |
448 | - | let | |
449 | - | let | |
450 | - | let | |
451 | - | then $Tuple2( | |
452 | - | else $Tuple2( | |
453 | - | let | |
454 | - | let | |
455 | - | let | |
456 | - | let | |
457 | - | let | |
458 | - | let | |
459 | - | let | |
460 | - | if (( | |
453 | + | let bV = aL(by, bz) | |
454 | + | let bW = aL(bJ, bK) | |
455 | + | let bX = if ((bt == q)) | |
456 | + | then $Tuple2(bV, bW) | |
457 | + | else $Tuple2(bW, bV) | |
458 | + | let bY = bX._1 | |
459 | + | let bZ = bX._2 | |
460 | + | let ca = split(bs, "-") | |
461 | + | let cb = ca[0] | |
462 | + | let cc = ca[1] | |
463 | + | let cd = aa() | |
464 | + | let ce = invoke(X(), k, [m, cb, bZ, bY, toString(bT), toString(bM), cd], nil) | |
465 | + | if ((ce == ce)) | |
461 | 466 | then { | |
462 | - | let | |
463 | - | if (( | |
467 | + | let cf = invoke(X(), k, [m, cc, bY, bZ, toString(bU), toString(bN), cd], nil) | |
468 | + | if ((cf == cf)) | |
464 | 469 | then { | |
465 | - | let | |
466 | - | let | |
467 | - | then ( | |
468 | - | else ( | |
469 | - | $Tuple2(( | |
470 | + | let cg = (bP + bT) | |
471 | + | let ch = if ((bG == u)) | |
472 | + | then (bR + bU) | |
473 | + | else (bR + bT) | |
474 | + | $Tuple2((al(bx, cg) ++ al(bI, ch)), unit) | |
470 | 475 | } | |
471 | 476 | else throw("Strict value is not equal to itself.") | |
472 | 477 | } | |
473 | 478 | else throw("Strict value is not equal to itself.") | |
474 | 479 | } | |
475 | 480 | else throw("Strict value is not equal to itself.") | |
476 | 481 | } | |
477 | 482 | ||
478 | 483 | ||
479 | 484 | ||
480 | - | @Callable( | |
481 | - | func claimReward ( | |
482 | - | let | |
483 | - | let | |
484 | - | then | |
485 | + | @Callable(bl) | |
486 | + | func claimReward (ci,cj,am) = { | |
487 | + | let bd = valueOrErrorMessage(parseBigInt(am), "claimReward: amount not int") | |
488 | + | let bk = if (if (if (as(bl.caller, "claimReward: invalid sequencer")) | |
489 | + | then M(ci, "claimReward: invalid user") | |
485 | 490 | else false) | |
486 | - | then | |
491 | + | then M(cj, "claimReward: invalid currency") | |
487 | 492 | else false) | |
488 | - | then | |
493 | + | then F(bd, u, "claimReward: neg amount") | |
489 | 494 | else false | |
490 | - | if (( | |
495 | + | if ((bk == bk)) | |
491 | 496 | then { | |
492 | - | let | |
493 | - | if (( | |
497 | + | let ce = invoke(X(), l, [ad(), ci, cj, am], nil) | |
498 | + | if ((ce == ce)) | |
494 | 499 | then $Tuple2(nil, unit) | |
495 | 500 | else throw("Strict value is not equal to itself.") | |
496 | 501 | } | |
497 | 502 | else throw("Strict value is not equal to itself.") | |
498 | 503 | } | |
499 | 504 | ||
500 | 505 | ||
501 | 506 | ||
502 | - | @Callable( | |
503 | - | func updateSymbol ( | |
504 | - | let | |
505 | - | then | |
507 | + | @Callable(bl) | |
508 | + | func updateSymbol (ah,ck) = { | |
509 | + | let bk = if (an(bl.caller)) | |
510 | + | then M(ah, "updateSymbol: invalid symbol") | |
506 | 511 | else false | |
507 | - | if (( | |
508 | - | then $Tuple2(ah | |
512 | + | if ((bk == bk)) | |
513 | + | then $Tuple2(ai(ah, ck), unit) | |
509 | 514 | else throw("Strict value is not equal to itself.") | |
510 | 515 | } | |
511 | 516 | ||
512 | 517 | ||
513 | 518 | ||
514 | - | @Callable( | |
515 | - | func updateFeeRecipient ( | |
516 | - | let | |
517 | - | then | |
519 | + | @Callable(bl) | |
520 | + | func updateFeeRecipient (ac) = { | |
521 | + | let bk = if (if (an(bl.caller)) | |
522 | + | then ar() | |
518 | 523 | else false) | |
519 | - | then | |
524 | + | then M(ac, "updateFeeRecipient: invalid feeRecipient") | |
520 | 525 | else false | |
521 | - | if (( | |
522 | - | then $Tuple2( | |
526 | + | if ((bk == bk)) | |
527 | + | then $Tuple2(ab(ac), unit) | |
523 | 528 | else throw("Strict value is not equal to itself.") | |
524 | 529 | } | |
525 | 530 | ||
526 | 531 | ||
527 | 532 | ||
528 | - | @Callable( | |
529 | - | func updateRewardDistributor ( | |
530 | - | let | |
531 | - | then | |
533 | + | @Callable(bl) | |
534 | + | func updateRewardDistributor (cl) = { | |
535 | + | let bk = if (if (an(bl.caller)) | |
536 | + | then ar() | |
532 | 537 | else false) | |
533 | - | then | |
538 | + | then M(cl, "updateRewardDistributor: invalid rewardDistributor") | |
534 | 539 | else false | |
535 | - | if (( | |
536 | - | then $Tuple2( | |
540 | + | if ((bk == bk)) | |
541 | + | then $Tuple2(ae(cl), unit) | |
537 | 542 | else throw("Strict value is not equal to itself.") | |
538 | 543 | } | |
539 | 544 | ||
540 | 545 | ||
541 | 546 | ||
542 | - | @Callable( | |
543 | - | func setMultisig ( | |
544 | - | let | |
545 | - | then | |
547 | + | @Callable(bl) | |
548 | + | func setMultisig (T) = { | |
549 | + | let bk = if (an(bl.caller)) | |
550 | + | then A(T, "setMultisig: invalid multisig") | |
546 | 551 | else false | |
547 | - | if (( | |
548 | - | then $Tuple2( | |
552 | + | if ((bk == bk)) | |
553 | + | then $Tuple2(S(addressFromStringValue(T)), unit) | |
549 | 554 | else throw("Strict value is not equal to itself.") | |
550 | 555 | } | |
551 | 556 | ||
552 | 557 | ||
553 | - | @Verifier( | |
554 | - | func | |
555 | - | let | |
556 | - | if ($isInstanceOf( | |
558 | + | @Verifier(cm) | |
559 | + | func cn () = { | |
560 | + | let D = getString(b) | |
561 | + | if ($isInstanceOf(D, "String")) | |
557 | 562 | then { | |
558 | - | let | |
559 | - | valueOrElse(getBoolean(addressFromStringValue( | |
563 | + | let co = D | |
564 | + | valueOrElse(getBoolean(addressFromStringValue(co), makeString([c, toString(this), toBase58String(cm.id)], a)), false) | |
560 | 565 | } | |
561 | - | else sigVerify( | |
566 | + | else sigVerify(cm.bodyBytes, cm.proofs[0], cm.senderPublicKey) | |
562 | 567 | } | |
563 | 568 |
github/deemru/w8io/169f3d6 155.30 ms ◑