tx · 7Bb7u6xVj2aHpjs4EQnjgV4EqqygKJ2tCMFW1Yov7SHi 3MyhShghYtSMxRopenEtGdcsugm5RYRoqvZ: -0.04300000 Waves 2023.04.14 14:33 [2534153] smart account 3MyhShghYtSMxRopenEtGdcsugm5RYRoqvZ > SELF 0.00000000 Waves
{ "type": 13, "id": "7Bb7u6xVj2aHpjs4EQnjgV4EqqygKJ2tCMFW1Yov7SHi", "fee": 4300000, "feeAssetId": null, "timestamp": 1681472047544, "version": 2, "chainId": 84, "sender": "3MyhShghYtSMxRopenEtGdcsugm5RYRoqvZ", "senderPublicKey": "DvyZieHyb6PvkwA6qQewKLDVGGmNqS6nc6DHo48yjQce", "proofs": [ "maCQk9PoFWMMB5vDvtMUmaFt6Y2j4JZrTmJooW6XAxc8uEMr2q8QDmvCypGYaeAXnvCThU2SVkR5uX5rZhG4xsE" ], "script": "base64:BgL3NwgCEgASBQoDAQQBEgcKBQEEAQgBEgMKAQgSABIECgIBBBIDCgEBEgQKAgEEEgQKAggBEgQKAggBEgQKAggBEgUKAwEIARIAEgQKAgEBEgMKAQESBQoDAQEBEgQKAggIEgASABIDCgEIEgUKAwEBARIECgIBARIECgIIARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCBIAEgMKAQESAwoBARIECgIIASIKbFBkZWNpbWFscyIGc2NhbGU4IgxzY2FsZThCaWdJbnQiB3NjYWxlMTgiCnplcm9CaWdJbnQiBGJpZzAiBGJpZzEiBGJpZzIiC3dhdmVzU3RyaW5nIgNTRVAiClBvb2xBY3RpdmUiD1Bvb2xQdXREaXNhYmxlZCITUG9vbE1hdGNoZXJEaXNhYmxlZCIMUG9vbFNodXRkb3duIg5pZHhQb29sQWRkcmVzcyINaWR4UG9vbFN0YXR1cyIQaWR4UG9vbExQQXNzZXRJZCINaWR4QW10QXNzZXRJZCIPaWR4UHJpY2VBc3NldElkIg5pZHhBbXRBc3NldERjbSIQaWR4UHJpY2VBc3NldERjbSIOaWR4SUFtdEFzc2V0SWQiEG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FAmltAwMDBQJhSwUCYU0HBQJhTgcGCQECYUoEBQJhSwUCYUwFAmFNBQJhTgMJAAECBQJiVgIUU2V0U2NyaXB0VHJhbnNhY3Rpb24EAmdpBQJiVgMJAPQDAwgFAmlqCWJvZHlCeXRlcwkAkQMCCAUCaWoGcHJvb2ZzAAAFAmlsBgQCaW8JAPYDAQkBBXZhbHVlAQgFAmdpBnNjcmlwdAQCaXAJANsEAQkBBXZhbHVlAQkAnQgCBQJhVgkBAmFGAAQCaXEJAPEHAQUEdGhpcwMJAAACBQJpcAUCaW8JAQIhPQIFAmlxBQJpbwcJAPQDAwgFAmlqCWJvZHlCeXRlcwkAkQMCCAUCaWoGcHJvb2ZzAAAFAmlsLmY3kQ==", "height": 2534153, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HEDCGY6MSft9KNdwVxEusAijNq9qzMVpKhu4TmGou4zJ Next: 9SHtN5odGTJUbN6iSkQMwWzRG8ZQyD6xWFXJvxF7Hb7j Diff:
Old | New | Differences | |
---|---|---|---|
168 | 168 | ||
169 | 169 | let aG = "%s__feeCollectorAddress" | |
170 | 170 | ||
171 | - | func aH (aI | |
171 | + | func aH (aI) = ("%s%s__skipOrderValidation__" + aI) | |
172 | 172 | ||
173 | 173 | ||
174 | - | func | |
174 | + | func aJ (aK,aL,aM,aN) = throw((((((((("order validation failed: orderValid=" + toString(aK)) + " (") + aL) + ")") + " senderValid=") + toString(aM)) + " matcherValid=") + toString(aN))) | |
175 | 175 | ||
176 | 176 | ||
177 | - | func | |
177 | + | func aO (aP,aQ) = valueOrErrorMessage(getString(aP, aQ), makeString(["mandatory ", toString(aP), ".", aQ, " is not defined"], "")) | |
178 | 178 | ||
179 | 179 | ||
180 | - | func | |
180 | + | func aR (aP,aQ) = valueOrErrorMessage(getInteger(aP, aQ), makeString(["mandatory ", toString(aP), ".", aQ, " is not defined"], "")) | |
181 | 181 | ||
182 | 182 | ||
183 | - | func aS ( | |
183 | + | func aS (aT) = throw(makeString(["lp.ride:", aT], " ")) | |
184 | 184 | ||
185 | 185 | ||
186 | - | ||
186 | + | func aU (aT) = makeString(["lp.ride:", aT], " ") | |
187 | 187 | ||
188 | - | let aU = addressFromStringValue(aM(aT, aG)) | |
189 | 188 | ||
190 | - | let aV = { | |
191 | - | let aW = invoke(aT, "getInFeeREADONLY", [toString(this)], nil) | |
192 | - | if ($isInstanceOf(aW, "Int")) | |
193 | - | then aW | |
194 | - | else throw(($getType(aW) + " couldn't be cast to Int")) | |
189 | + | let aV = addressFromStringValue(aO(this, T())) | |
190 | + | ||
191 | + | let aW = addressFromStringValue(aO(aV, aG)) | |
192 | + | ||
193 | + | let aX = { | |
194 | + | let aY = invoke(aV, "getInFeeREADONLY", [toString(this)], nil) | |
195 | + | if ($isInstanceOf(aY, "Int")) | |
196 | + | then aY | |
197 | + | else throw(($getType(aY) + " couldn't be cast to Int")) | |
195 | 198 | } | |
196 | 199 | ||
197 | - | let | |
198 | - | let | |
199 | - | if ($isInstanceOf( | |
200 | - | then | |
201 | - | else throw(($getType( | |
200 | + | let aZ = { | |
201 | + | let aY = invoke(aV, "getOutFeeREADONLY", [toString(this)], nil) | |
202 | + | if ($isInstanceOf(aY, "Int")) | |
203 | + | then aY | |
204 | + | else throw(($getType(aY) + " couldn't be cast to Int")) | |
202 | 205 | } | |
203 | 206 | ||
204 | - | func | |
207 | + | func ba () = valueOrElse(getBoolean(aV, aC()), false) | |
205 | 208 | ||
206 | 209 | ||
207 | - | func | |
210 | + | func bb () = fromBase58String(aO(aV, au())) | |
208 | 211 | ||
209 | 212 | ||
210 | - | func | |
211 | - | let | |
212 | - | let | |
213 | - | let az = | |
214 | - | let ay = | |
215 | - | split( | |
213 | + | func bc () = { | |
214 | + | let bd = aO(this, ae()) | |
215 | + | let be = aO(this, af()) | |
216 | + | let az = aR(aV, aA(be)) | |
217 | + | let ay = aR(aV, aA(bd)) | |
218 | + | split(aO(aV, ax(toString(ay), toString(az))), j) | |
216 | 219 | } | |
217 | 220 | ||
218 | 221 | ||
219 | - | func | |
222 | + | func bf (bg) = if ((bg == i)) | |
220 | 223 | then unit | |
221 | - | else fromBase58String( | |
224 | + | else fromBase58String(bg) | |
222 | 225 | ||
223 | 226 | ||
224 | - | func | |
227 | + | func bh (bg) = if ((bg == unit)) | |
225 | 228 | then i | |
226 | - | else toBase58String(value( | |
229 | + | else toBase58String(value(bg)) | |
227 | 230 | ||
228 | 231 | ||
229 | - | func | |
232 | + | func bi (bj) = $Tuple7(addressFromStringValue(bj[o]), parseIntValue(bj[p]), fromBase58String(bj[q]), bf(bj[r]), bf(bj[s]), parseIntValue(bj[t]), parseIntValue(bj[u])) | |
230 | 233 | ||
231 | 234 | ||
232 | - | let | |
235 | + | let bk = bi(bc()) | |
233 | 236 | ||
234 | - | let | |
237 | + | let bl = bk | |
235 | 238 | ||
236 | - | let | |
239 | + | let bm = bl._1 | |
237 | 240 | ||
238 | - | let | |
241 | + | let bn = bl._2 | |
239 | 242 | ||
240 | - | let | |
243 | + | let bo = bl._3 | |
241 | 244 | ||
242 | - | let | |
245 | + | let bp = bl._4 | |
243 | 246 | ||
244 | - | let | |
247 | + | let bq = bl._5 | |
245 | 248 | ||
246 | - | let | |
249 | + | let br = bl._6 | |
247 | 250 | ||
248 | - | let | |
251 | + | let bs = bl._7 | |
249 | 252 | ||
250 | - | func | |
253 | + | func bt () = split(aO(aV, at()), j) | |
251 | 254 | ||
252 | 255 | ||
253 | - | let | |
256 | + | let bu = valueOrErrorMessage(addressFromString(bt()[B]), "incorrect staking address") | |
254 | 257 | ||
255 | - | let | |
258 | + | let bv = valueOrErrorMessage(addressFromString(bt()[C]), "incorrect staking address") | |
256 | 259 | ||
257 | - | func | |
260 | + | func bw (bx,by,bz,bA,bB,bC,bD,bE,bF,bG) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bx), toString(by), toString(bz), toString(bA), toString(bB), toString(bC), toString(bD), toString(bE), toString(bF), toString(bG)], j) | |
258 | 261 | ||
259 | 262 | ||
260 | - | func | |
263 | + | func bH (bI,bJ,bK,bA,bD,bE) = makeString(["%d%d%d%d%d%d", toString(bI), toString(bJ), toString(bK), toString(bA), toString(bD), toString(bE)], j) | |
261 | 264 | ||
262 | 265 | ||
263 | - | func | |
264 | - | let | |
266 | + | func bL (ap) = { | |
267 | + | let bM = if ((ap == "WAVES")) | |
265 | 268 | then wavesBalance(this).available | |
266 | 269 | else assetBalance(this, fromBase58String(ap)) | |
267 | - | let | |
268 | - | max([0, | |
270 | + | let bN = ((bM + ar(ap)) - as(ap)) | |
271 | + | max([0, bN]) | |
269 | 272 | } | |
270 | 273 | ||
271 | 274 | ||
272 | - | func | |
275 | + | func bO (bP,bQ) = fraction(bP, d, bQ) | |
273 | 276 | ||
274 | 277 | ||
275 | - | func | |
278 | + | func bR (bP,bQ,L) = fraction(bP, d, bQ, L) | |
276 | 279 | ||
277 | 280 | ||
278 | - | func | |
279 | - | let | |
280 | - | if (( | |
281 | + | func bS (bT) = { | |
282 | + | let bU = invoke(bT, "getRate", nil, nil) | |
283 | + | if ((bU == bU)) | |
281 | 284 | then { | |
282 | - | let | |
283 | - | if ($isInstanceOf( | |
285 | + | let bV = bU | |
286 | + | if ($isInstanceOf(bV, "Int")) | |
284 | 287 | then { | |
285 | - | let | |
286 | - | | |
288 | + | let bW = bV | |
289 | + | bW | |
287 | 290 | } | |
288 | - | else | |
291 | + | else aS("proxy.getRate() unexpected value") | |
289 | 292 | } | |
290 | 293 | else throw("Strict value is not equal to itself.") | |
291 | 294 | } | |
292 | 295 | ||
293 | 296 | ||
294 | - | func | |
295 | - | let | |
296 | - | if (( | |
297 | + | func bX (ap,bY,bZ,bT) = { | |
298 | + | let ca = ar(ap) | |
299 | + | if ((ca == ca)) | |
297 | 300 | then { | |
298 | - | let | |
299 | - | if (( | |
301 | + | let cb = as(bZ) | |
302 | + | if ((cb == cb)) | |
300 | 303 | then { | |
301 | - | let | |
302 | - | if (( | |
304 | + | let cc = bf(ap) | |
305 | + | if ((bY > 0)) | |
303 | 306 | then { | |
304 | - | let | |
305 | - | if (( | |
307 | + | let cd = invoke(bT, "deposit", nil, [AttachedPayment(cc, bY)]) | |
308 | + | if ((cd == cd)) | |
306 | 309 | then { | |
307 | - | let | |
308 | - | if ($isInstanceOf( | |
310 | + | let bV = cd | |
311 | + | if ($isInstanceOf(bV, "Int")) | |
309 | 312 | then { | |
310 | - | let | |
311 | - | let | |
312 | - | let | |
313 | - | [IntegerEntry(ao(ap), | |
313 | + | let ce = bV | |
314 | + | let cf = (ca + bY) | |
315 | + | let cg = (cb + ce) | |
316 | + | [IntegerEntry(ao(ap), cf), IntegerEntry(aq(bZ), cg)] | |
314 | 317 | } | |
315 | 318 | else nil | |
316 | 319 | } | |
324 | 327 | } | |
325 | 328 | ||
326 | 329 | ||
327 | - | func | |
328 | - | let | |
329 | - | if (( | |
330 | + | func ch (ap,bY,bZ,bT,ci,cj) = { | |
331 | + | let ca = ar(ap) | |
332 | + | if ((ca == ca)) | |
330 | 333 | then { | |
331 | - | let | |
332 | - | if (( | |
334 | + | let cb = as(bZ) | |
335 | + | if ((cb == cb)) | |
333 | 336 | then { | |
334 | - | let | |
335 | - | if (( | |
337 | + | let ck = bS(bT) | |
338 | + | if ((ck == ck)) | |
336 | 339 | then { | |
337 | - | let | |
338 | - | let | |
339 | - | let | |
340 | - | let | |
341 | - | let | |
342 | - | if (( | |
340 | + | let cl = fraction(ci, ca, cb) | |
341 | + | let cm = bf(bZ) | |
342 | + | let cn = fraction(ci, bY, cl) | |
343 | + | let co = fraction(ci, bY, ck) | |
344 | + | let cp = max([0, (cn - co)]) | |
345 | + | if ((co > 0)) | |
343 | 346 | then { | |
344 | - | let | |
345 | - | if (( | |
347 | + | let cq = invoke(bT, "withdraw", nil, [AttachedPayment(cm, co)]) | |
348 | + | if ((cq == cq)) | |
346 | 349 | then { | |
347 | - | let | |
348 | - | if ($isInstanceOf( | |
350 | + | let bV = cq | |
351 | + | if ($isInstanceOf(bV, "Int")) | |
349 | 352 | then { | |
350 | - | let | |
351 | - | let | |
352 | - | let | |
353 | - | [IntegerEntry(ao(ap), | |
353 | + | let cr = bV | |
354 | + | let cf = (ca - cr) | |
355 | + | let cg = ((cb - co) - cp) | |
356 | + | [IntegerEntry(ao(ap), cf), IntegerEntry(aq(bZ), cg), ScriptTransfer(cj, cp, bf(bZ))] | |
354 | 357 | } | |
355 | 358 | else nil | |
356 | 359 | } | |
366 | 369 | } | |
367 | 370 | ||
368 | 371 | ||
369 | - | func | |
370 | - | let | |
371 | - | if ($isInstanceOf( | |
372 | + | func cs (ap) = { | |
373 | + | let bV = invoke(aV, "getPoolLeaseConfigREADONLY", [toString(this), ap], nil) | |
374 | + | if ($isInstanceOf(bV, "(Boolean, Int, Int, String, String, Int, String)")) | |
372 | 375 | then { | |
373 | - | let | |
374 | - | | |
376 | + | let ct = bV | |
377 | + | ct | |
375 | 378 | } | |
376 | - | else | |
379 | + | else aS((("[" + ap) + "] getLeaseProxyConfig() error")) | |
377 | 380 | } | |
378 | 381 | ||
379 | 382 | ||
380 | - | func | |
381 | - | let | |
382 | - | if (( | |
383 | + | func cu (cv,ap,bZ,cw,bT,ci,cj) = { | |
384 | + | let ca = ar(ap) | |
385 | + | if ((ca == ca)) | |
383 | 386 | then { | |
384 | - | let | |
385 | - | if (( | |
387 | + | let cb = as(bZ) | |
388 | + | if ((cb == cb)) | |
386 | 389 | then { | |
387 | - | let | |
388 | - | let | |
389 | - | let | |
390 | - | if (( | |
390 | + | let cx = max([0, (bL(ap) - cw)]) | |
391 | + | let cy = fraction(cv, cx, 100) | |
392 | + | let cz = (ca - cy) | |
393 | + | if ((cz == 0)) | |
391 | 394 | then nil | |
392 | - | else if ((0 > | |
395 | + | else if ((0 > cz)) | |
393 | 396 | then { | |
394 | - | let | |
395 | - | | |
397 | + | let cA = -(cz) | |
398 | + | bX(ap, cA, bZ, bT) | |
396 | 399 | } | |
397 | 400 | else { | |
398 | - | let | |
399 | - | | |
401 | + | let cB = cz | |
402 | + | ch(ap, cB, bZ, bT, ci, cj) | |
400 | 403 | } | |
401 | 404 | } | |
402 | 405 | else throw("Strict value is not equal to itself.") | |
405 | 408 | } | |
406 | 409 | ||
407 | 410 | ||
408 | - | func | |
409 | - | let | |
410 | - | let | |
411 | - | let | |
412 | - | let | |
413 | - | let | |
414 | - | let | |
415 | - | let | |
416 | - | let | |
417 | - | if ( | |
418 | - | then | |
411 | + | func cC (ap) = { | |
412 | + | let cD = cs(ap) | |
413 | + | let cE = cD._1 | |
414 | + | let cF = cD._2 | |
415 | + | let cw = cD._3 | |
416 | + | let cG = cD._4 | |
417 | + | let cH = cD._5 | |
418 | + | let ci = cD._6 | |
419 | + | let cI = cD._7 | |
420 | + | if (cE) | |
421 | + | then cu(cF, ap, cH, cw, addressFromStringValue(cG), ci, addressFromStringValue(cI)) | |
419 | 422 | else nil | |
420 | 423 | } | |
421 | 424 | ||
422 | 425 | ||
423 | - | func | |
424 | - | let | |
425 | - | let | |
426 | - | let | |
427 | - | let | |
428 | - | let | |
429 | - | let | |
430 | - | let | |
431 | - | let | |
432 | - | if ( | |
426 | + | func cJ (ap,cK) = { | |
427 | + | let cL = cs(ap) | |
428 | + | let cE = cL._1 | |
429 | + | let cF = cL._2 | |
430 | + | let cw = cL._3 | |
431 | + | let cG = cL._4 | |
432 | + | let cH = cL._5 | |
433 | + | let ci = cL._6 | |
434 | + | let cI = cL._7 | |
435 | + | if (cE) | |
433 | 436 | then { | |
434 | - | let | |
435 | - | if (( | |
437 | + | let cM = max([0, ((bL(ap) - cK) - cw)]) | |
438 | + | if ((cM == cM)) | |
436 | 439 | then { | |
437 | - | let | |
438 | - | if (( | |
440 | + | let cf = fraction(cF, cM, 100) | |
441 | + | if ((cf == cf)) | |
439 | 442 | then { | |
440 | - | let | |
441 | - | if (( | |
442 | - | then if ((0 > | |
443 | - | then | |
444 | - | else | |
443 | + | let cN = (ar(ap) - cf) | |
444 | + | if ((cN == cN)) | |
445 | + | then if ((0 > cN)) | |
446 | + | then bX(ap, -(cN), cH, addressFromStringValue(cG)) | |
447 | + | else ch(ap, cN, cH, addressFromStringValue(cG), ci, addressFromStringValue(cI)) | |
445 | 448 | else throw("Strict value is not equal to itself.") | |
446 | 449 | } | |
447 | 450 | else throw("Strict value is not equal to itself.") | |
452 | 455 | } | |
453 | 456 | ||
454 | 457 | ||
455 | - | func | |
456 | - | let | |
457 | - | let | |
458 | - | ( | |
458 | + | func cO (cP,cQ) = { | |
459 | + | let cR = cJ(aO(this, ae()), cP) | |
460 | + | let cS = cJ(aO(this, af()), cQ) | |
461 | + | (cR ++ cS) | |
459 | 462 | } | |
460 | 463 | ||
461 | 464 | ||
462 | - | func | |
463 | - | let | |
464 | - | let | |
465 | - | | |
465 | + | func cT (cU,cV,cW,cX) = { | |
466 | + | let cY = D(cW, cU) | |
467 | + | let cZ = D(cX, cV) | |
468 | + | bO(cZ, cY) | |
466 | 469 | } | |
467 | 470 | ||
468 | 471 | ||
469 | - | func | |
470 | - | let | |
471 | - | let | |
472 | - | let | |
473 | - | let | |
474 | - | let | |
475 | - | let | |
476 | - | let | |
477 | - | let | |
478 | - | let | |
479 | - | [ | |
472 | + | func da (cW,cX,db) = { | |
473 | + | let dc = bc() | |
474 | + | let dd = parseIntValue(dc[t]) | |
475 | + | let de = parseIntValue(dc[u]) | |
476 | + | let df = cT(dd, de, cW, cX) | |
477 | + | let bQ = D(cW, dd) | |
478 | + | let bP = D(cX, de) | |
479 | + | let dg = D(db, b) | |
480 | + | let dh = bO(bQ, dg) | |
481 | + | let di = bO(bP, dg) | |
482 | + | [df, dh, di] | |
480 | 483 | } | |
481 | 484 | ||
482 | 485 | ||
483 | - | func | |
484 | - | let | |
485 | - | [H( | |
486 | + | func dj (cW,cX,db) = { | |
487 | + | let dk = da(cW, cX, db) | |
488 | + | [H(dk[0], b), H(dk[1], b), H(dk[2], b)] | |
486 | 489 | } | |
487 | 490 | ||
488 | 491 | ||
489 | - | func | |
490 | - | let | |
491 | - | let | |
492 | - | let | |
493 | - | let | |
494 | - | let | |
495 | - | let | |
496 | - | let | |
497 | - | let | |
498 | - | if (( | |
492 | + | func dl (dm,dn,do,ab) = { | |
493 | + | let dc = bc() | |
494 | + | let dp = dc[q] | |
495 | + | let dq = dc[r] | |
496 | + | let dr = dc[s] | |
497 | + | let cU = parseIntValue(dc[t]) | |
498 | + | let cV = parseIntValue(dc[u]) | |
499 | + | let ds = dc[p] | |
500 | + | let dt = valueOrErrorMessage(assetInfo(fromBase58String(dp)), (("Asset " + dp) + " doesn't exist")).quantity | |
501 | + | if ((dp != dn)) | |
499 | 502 | then throw("Invalid asset passed.") | |
500 | 503 | else { | |
501 | - | let | |
502 | - | let | |
503 | - | let | |
504 | - | let | |
505 | - | let | |
506 | - | let | |
507 | - | let | |
508 | - | let | |
509 | - | let | |
510 | - | let | |
511 | - | let | |
512 | - | let | |
513 | - | let | |
504 | + | let du = bL(dq) | |
505 | + | let dv = D(du, cU) | |
506 | + | let dw = bL(dr) | |
507 | + | let dx = D(dw, cV) | |
508 | + | let dy = bO(dx, dv) | |
509 | + | let dz = H(dy, b) | |
510 | + | let dA = D(do, b) | |
511 | + | let dB = D(dt, b) | |
512 | + | let dC = fraction(dv, dA, dB) | |
513 | + | let dD = fraction(dx, dA, dB) | |
514 | + | let dE = K(dC, cU, FLOOR) | |
515 | + | let dF = K(dD, cV, FLOOR) | |
516 | + | let dG = if ((dm == "")) | |
514 | 517 | then nil | |
515 | - | else [ScriptTransfer(ab, | |
518 | + | else [ScriptTransfer(ab, dE, if ((dq == "WAVES")) | |
516 | 519 | then unit | |
517 | - | else fromBase58String( | |
520 | + | else fromBase58String(dq)), ScriptTransfer(ab, dF, if ((dr == "WAVES")) | |
518 | 521 | then unit | |
519 | - | else fromBase58String( | |
520 | - | $Tuple10( | |
522 | + | else fromBase58String(dr)), StringEntry(ad(toString(ab), dm), bH(dE, dF, do, dz, height, lastBlock.timestamp)), IntegerEntry(W(), dz), IntegerEntry(X(height, lastBlock.timestamp), dz)] | |
523 | + | $Tuple10(dE, dF, dq, dr, du, dw, dt, dy, ds, dG) | |
521 | 524 | } | |
522 | 525 | } | |
523 | 526 | ||
524 | 527 | ||
525 | - | func | |
526 | - | let | |
527 | - | let | |
528 | - | let | |
529 | - | let | |
530 | - | let | |
531 | - | let | |
532 | - | let | |
533 | - | let | |
534 | - | let | |
535 | - | let | |
536 | - | let | |
537 | - | let | |
538 | - | if (if (( | |
528 | + | func dH (dm,dI,dJ,dK,dL,dM,ab,dN,dO) = { | |
529 | + | let dc = bc() | |
530 | + | let dp = fromBase58String(dc[q]) | |
531 | + | let dP = dc[r] | |
532 | + | let dQ = dc[s] | |
533 | + | let dR = dc[v] | |
534 | + | let dS = dc[w] | |
535 | + | let dd = parseIntValue(dc[t]) | |
536 | + | let de = parseIntValue(dc[u]) | |
537 | + | let ds = dc[p] | |
538 | + | let dt = valueOrErrorMessage(assetInfo(dp), (("Asset " + toBase58String(dp)) + " doesn't exist")).quantity | |
539 | + | let dT = toBase58String(valueOrElse(dK, fromBase58String("WAVES"))) | |
540 | + | let dU = toBase58String(valueOrElse(dM, fromBase58String("WAVES"))) | |
541 | + | if (if ((dP != dT)) | |
539 | 542 | then true | |
540 | - | else ( | |
543 | + | else (dQ != dU)) | |
541 | 544 | then throw("Invalid amt or price asset passed.") | |
542 | 545 | else { | |
543 | - | let | |
544 | - | then | |
545 | - | else ( | |
546 | - | let | |
547 | - | then | |
548 | - | else ( | |
549 | - | let | |
550 | - | let | |
551 | - | let | |
552 | - | let | |
553 | - | let | |
554 | - | let | |
546 | + | let du = if (dN) | |
547 | + | then bL(dP) | |
548 | + | else (bL(dP) - dJ) | |
549 | + | let dw = if (dN) | |
550 | + | then bL(dQ) | |
551 | + | else (bL(dQ) - dL) | |
552 | + | let dV = D(dJ, dd) | |
553 | + | let dW = D(dL, de) | |
554 | + | let dX = bO(dW, dV) | |
555 | + | let dv = D(du, dd) | |
556 | + | let dx = D(dw, de) | |
557 | + | let dY = if ((dt == 0)) | |
555 | 558 | then { | |
556 | - | let | |
557 | - | let | |
558 | - | let | |
559 | - | $Tuple5(H( | |
559 | + | let dy = e | |
560 | + | let dZ = e | |
561 | + | let dg = pow((dV * dW), 0, toBigInt(5), 1, 0, DOWN) | |
562 | + | $Tuple5(H(dg, b), H(dV, dd), H(dW, de), bO((dx + dW), (dv + dV)), dZ) | |
560 | 563 | } | |
561 | 564 | else { | |
562 | - | let | |
563 | - | let | |
564 | - | let | |
565 | - | if (if (( | |
566 | - | then ( | |
565 | + | let dy = bO(dx, dv) | |
566 | + | let dZ = fraction(R((dy - dX)), d, dy) | |
567 | + | let ea = D(dI, b) | |
568 | + | if (if ((dy != e)) | |
569 | + | then (dZ > ea) | |
567 | 570 | else false) | |
568 | - | then throw(((("Price slippage " + toString( | |
571 | + | then throw(((("Price slippage " + toString(dZ)) + " exceeded the passed limit of ") + toString(ea))) | |
569 | 572 | else { | |
570 | - | let | |
571 | - | let | |
572 | - | let | |
573 | - | let | |
574 | - | then $Tuple2( | |
575 | - | else $Tuple2( | |
576 | - | let | |
577 | - | let | |
578 | - | let | |
579 | - | $Tuple5(K( | |
573 | + | let dB = D(dt, b) | |
574 | + | let eb = fraction(dV, bR(dx, dv, CEILING), d, CEILING) | |
575 | + | let ec = fraction(dW, d, bR(dx, dv, FLOOR), CEILING) | |
576 | + | let ed = if ((eb > dW)) | |
577 | + | then $Tuple2(ec, dW) | |
578 | + | else $Tuple2(dV, eb) | |
579 | + | let ee = ed._1 | |
580 | + | let ef = ed._2 | |
581 | + | let dg = fraction(dB, ef, dx, FLOOR) | |
582 | + | $Tuple5(K(dg, b, FLOOR), K(ee, dd, CEILING), K(ef, de, CEILING), dy, dZ) | |
580 | 583 | } | |
581 | 584 | } | |
582 | - | let | |
583 | - | let | |
584 | - | let | |
585 | - | let | |
586 | - | let | |
587 | - | if ((0 >= | |
585 | + | let eg = dY._1 | |
586 | + | let eh = dY._2 | |
587 | + | let ei = dY._3 | |
588 | + | let dz = H(dY._4, b) | |
589 | + | let ej = H(dY._5, b) | |
590 | + | if ((0 >= eg)) | |
588 | 591 | then throw("Invalid calculations. LP calculated is less than zero.") | |
589 | 592 | else { | |
590 | - | let | |
593 | + | let ek = if (!(dO)) | |
591 | 594 | then 0 | |
592 | - | else | |
593 | - | let | |
594 | - | let | |
595 | - | let | |
596 | - | $Tuple13( | |
595 | + | else eg | |
596 | + | let el = (dJ - eh) | |
597 | + | let em = (dL - ei) | |
598 | + | let en = [IntegerEntry(W(), dz), IntegerEntry(X(height, lastBlock.timestamp), dz), StringEntry(aa(ab, dm), bw(eh, ei, ek, dz, dI, ej, height, lastBlock.timestamp, el, em))] | |
599 | + | $Tuple13(eg, ek, dz, du, dw, dt, dp, ds, en, el, em, dK, dM) | |
597 | 600 | } | |
598 | 601 | } | |
599 | 602 | } | |
600 | 603 | ||
601 | 604 | ||
602 | - | func | |
603 | - | let | |
604 | - | let | |
605 | - | let | |
606 | - | if (( | |
605 | + | func eo (ep,eq,dt) = { | |
606 | + | let er = G(ep, toBigInt(br)) | |
607 | + | let es = G(eq, toBigInt(bs)) | |
608 | + | let et = fraction(pow((er * es), 0, toBigInt(5), 1, 18, DOWN), g, dt) | |
609 | + | if ((dt == f)) | |
607 | 610 | then f | |
608 | - | else | |
611 | + | else et | |
609 | 612 | } | |
610 | 613 | ||
611 | 614 | ||
612 | - | func | |
613 | - | let | |
614 | - | let | |
615 | - | let | |
616 | - | let | |
617 | - | | |
615 | + | func eu (ev,ew,ex) = { | |
616 | + | let ey = (toBigInt(bL(bh(bp))) - ev) | |
617 | + | let ez = (toBigInt(bL(bh(bq))) - ew) | |
618 | + | let eA = (toBigInt(value(assetInfo(bo)).quantity) - ex) | |
619 | + | let eB = eo(ey, ez, eA) | |
620 | + | eB | |
618 | 621 | } | |
619 | 622 | ||
620 | 623 | ||
621 | - | func | |
622 | - | let | |
623 | - | let | |
624 | - | let | |
625 | - | let | |
626 | - | let | |
627 | - | $Tuple2( | |
624 | + | func eC (eD,eE,ex) = { | |
625 | + | let ey = (bL(bh(bp)) + eD) | |
626 | + | let ez = (bL(bh(bq)) + eE) | |
627 | + | let eA = (value(assetInfo(bo)).quantity + ex) | |
628 | + | let et = eo(toBigInt(ey), toBigInt(ez), toBigInt(eA)) | |
629 | + | let eF = [IntegerEntry(ak, height), StringEntry(aj, toString(et))] | |
630 | + | $Tuple2(eF, et) | |
628 | 631 | } | |
629 | 632 | ||
630 | 633 | ||
631 | - | func eE (eF,er) = if ((er >= eF)) | |
632 | - | then true | |
633 | - | else aQ(makeString(["updated KLp lower than current KLp", toString(eF), toString(er)], " ")) | |
634 | + | func eG () = valueOrElse(getBoolean(aV, aH(toString(this))), false) | |
634 | 635 | ||
635 | 636 | ||
636 | - | func eG (eH) = { | |
637 | - | let ew = bJ(bf(bn)) | |
638 | - | let ex = bJ(bf(bo)) | |
639 | - | let eI = eH.amount | |
640 | - | let eJ = fraction(eH.amount, eH.price, b, FLOOR) | |
641 | - | let eK = if ((eH.orderType == Buy)) | |
642 | - | then $Tuple2(eI, -(eJ)) | |
643 | - | else $Tuple2(-(eI), eJ) | |
644 | - | let eB = eK._1 | |
645 | - | let eC = eK._2 | |
646 | - | if (if (if (aY()) | |
637 | + | func eH (eI,et) = if ((et >= eI)) | |
638 | + | then true | |
639 | + | else aS(makeString(["updated KLp lower than current KLp", toString(eI), toString(et)], " ")) | |
640 | + | ||
641 | + | ||
642 | + | func eJ (eK) = { | |
643 | + | let ey = bL(bh(bp)) | |
644 | + | let ez = bL(bh(bq)) | |
645 | + | let eL = eK.amount | |
646 | + | let eM = fraction(eK.amount, eK.price, b, FLOOR) | |
647 | + | let eN = if ((eK.orderType == Buy)) | |
648 | + | then $Tuple2(eL, -(eM)) | |
649 | + | else $Tuple2(-(eL), eM) | |
650 | + | let eD = eN._1 | |
651 | + | let eE = eN._2 | |
652 | + | if (if (if (ba()) | |
647 | 653 | then true | |
648 | - | else ( | |
654 | + | else (bn == m)) | |
649 | 655 | then true | |
650 | - | else ( | |
656 | + | else (bn == n)) | |
651 | 657 | then throw("Exchange operations disabled") | |
652 | - | else if (if (( | |
658 | + | else if (if ((eK.assetPair.amountAsset != bp)) | |
653 | 659 | then true | |
654 | - | else ( | |
660 | + | else (eK.assetPair.priceAsset != bq)) | |
655 | 661 | then throw("Wrong order assets.") | |
656 | 662 | else { | |
657 | - | let | |
658 | - | let | |
659 | - | let | |
660 | - | let | |
661 | - | let | |
662 | - | let | |
663 | - | $Tuple2( | |
663 | + | let eO = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, aj), "0")), aU("invalid kLp")) | |
664 | + | let eP = eC(eD, eE, 0) | |
665 | + | let eQ = eP._1 | |
666 | + | let eR = eP._2 | |
667 | + | let eS = (eR >= eO) | |
668 | + | let eT = makeString(["kLp=", toString(eO), " kLpNew=", toString(eR), " amountAssetBalance=", toString(ey), " priceAssetBalance=", toString(ez), " amountAssetBalanceDelta=", toString(eD), " priceAssetBalanceDelta=", toString(eE), " height=", toString(height)], "") | |
669 | + | $Tuple2(eS, eT) | |
664 | 670 | } | |
665 | 671 | } | |
666 | 672 | ||
667 | 673 | ||
668 | - | func | |
674 | + | func eU (eV) = if ((size(eV.payments) != 1)) | |
669 | 675 | then throw("exactly 1 payment is expected") | |
670 | 676 | else { | |
671 | - | let | |
672 | - | let | |
673 | - | let | |
674 | - | let | |
675 | - | let | |
676 | - | let | |
677 | - | let | |
678 | - | let | |
679 | - | if (if ( | |
677 | + | let eW = value(eV.payments[0]) | |
678 | + | let dn = value(eW.assetId) | |
679 | + | let eX = eW.amount | |
680 | + | let dY = dl(toBase58String(eV.transactionId), toBase58String(dn), eX, eV.caller) | |
681 | + | let dE = dY._1 | |
682 | + | let dF = dY._2 | |
683 | + | let ds = parseIntValue(dY._9) | |
684 | + | let dG = dY._10 | |
685 | + | if (if (ba()) | |
680 | 686 | then true | |
681 | - | else ( | |
682 | - | then throw(("Get operation is blocked by admin. Status = " + toString( | |
683 | - | else $Tuple5( | |
687 | + | else (ds == n)) | |
688 | + | then throw(("Get operation is blocked by admin. Status = " + toString(ds))) | |
689 | + | else $Tuple5(dE, dF, eX, dn, dG) | |
684 | 690 | } | |
685 | 691 | ||
686 | 692 | ||
687 | - | func | |
693 | + | func eY (eV,dI,dO) = if ((size(eV.payments) != 2)) | |
688 | 694 | then throw("exactly 2 payments are expected") | |
689 | 695 | else { | |
690 | - | let | |
691 | - | let | |
692 | - | let | |
693 | - | let | |
694 | - | if (if (if ( | |
696 | + | let eZ = value(eV.payments[0]) | |
697 | + | let fa = value(eV.payments[1]) | |
698 | + | let fb = dH(toBase58String(eV.transactionId), dI, eZ.amount, eZ.assetId, fa.amount, fa.assetId, toString(eV.caller), false, dO) | |
699 | + | let ds = parseIntValue(fb._8) | |
700 | + | if (if (if (ba()) | |
695 | 701 | then true | |
696 | - | else ( | |
702 | + | else (ds == l)) | |
697 | 703 | then true | |
698 | - | else ( | |
699 | - | then throw(("Put operation is blocked by admin. Status = " + toString( | |
700 | - | else | |
704 | + | else (ds == n)) | |
705 | + | then throw(("Put operation is blocked by admin. Status = " + toString(ds))) | |
706 | + | else fb | |
701 | 707 | } | |
702 | 708 | ||
703 | 709 | ||
704 | - | func | |
705 | - | let | |
706 | - | if (( | |
710 | + | func fc (bY) = { | |
711 | + | let fd = invoke(aV, "emit", [bY], nil) | |
712 | + | if ((fd == fd)) | |
707 | 713 | then { | |
708 | - | let | |
709 | - | let | |
710 | - | if ($isInstanceOf( | |
714 | + | let fe = { | |
715 | + | let bV = fd | |
716 | + | if ($isInstanceOf(bV, "Address")) | |
711 | 717 | then { | |
712 | - | let | |
713 | - | invoke( | |
718 | + | let ff = bV | |
719 | + | invoke(ff, "emit", [bY], nil) | |
714 | 720 | } | |
715 | 721 | else unit | |
716 | 722 | } | |
717 | - | if (( | |
718 | - | then | |
723 | + | if ((fe == fe)) | |
724 | + | then bY | |
719 | 725 | else throw("Strict value is not equal to itself.") | |
720 | 726 | } | |
721 | 727 | else throw("Strict value is not equal to itself.") | |
722 | 728 | } | |
723 | 729 | ||
724 | 730 | ||
725 | - | func | |
726 | - | let | |
731 | + | func fg (bY,ai) = { | |
732 | + | let fh = if ((ai == 0)) | |
727 | 733 | then 0 | |
728 | - | else fraction( | |
729 | - | $Tuple2(( | |
734 | + | else fraction(bY, ai, b) | |
735 | + | $Tuple2((bY - fh), fh) | |
730 | 736 | } | |
731 | 737 | ||
732 | 738 | ||
733 | - | func | |
734 | - | let | |
735 | - | let | |
736 | - | let | |
737 | - | let | |
739 | + | func fi (fj,fk,ab,ac) = { | |
740 | + | let fl = (ac == unit) | |
741 | + | let fm = bL(bh(bp)) | |
742 | + | let fn = bL(bh(bq)) | |
743 | + | let fo = if ((fk == bp)) | |
738 | 744 | then true | |
739 | - | else if (( | |
745 | + | else if ((fk == bq)) | |
740 | 746 | then false | |
741 | - | else aQ("invalid asset") | |
742 | - | let fm = if (fi) | |
743 | - | then $Tuple2(fj, fk) | |
744 | - | else if (fl) | |
745 | - | then $Tuple2((fj - fg), fk) | |
746 | - | else $Tuple2(fj, (fk - fg)) | |
747 | - | let fn = fm._1 | |
748 | - | let fo = fm._2 | |
747 | + | else aS("invalid asset") | |
749 | 748 | let fp = if (fl) | |
750 | - | then $Tuple2(fg, 0) | |
751 | - | else $Tuple2(0, fg) | |
749 | + | then $Tuple2(fm, fn) | |
750 | + | else if (fo) | |
751 | + | then $Tuple2((fm - fj), fn) | |
752 | + | else $Tuple2(fm, (fn - fj)) | |
752 | 753 | let fq = fp._1 | |
753 | 754 | let fr = fp._2 | |
754 | - | let | |
755 | - | | |
756 | - | | |
755 | + | let fs = if (fo) | |
756 | + | then $Tuple2(fj, 0) | |
757 | + | else $Tuple2(0, fj) | |
757 | 758 | let ft = fs._1 | |
758 | - | let fe = fs._2 | |
759 | - | let fu = (fn + eI) | |
760 | - | let fv = (fo + eJ) | |
761 | - | let fw = bM(D(fv, bq), D(fu, bp)) | |
762 | - | let fx = H(fw, b) | |
763 | - | let fy = if (fl) | |
764 | - | then fn | |
765 | - | else fo | |
766 | - | let fz = toBigInt(fy) | |
767 | - | let fA = toBigInt(valueOrErrorMessage(assetInfo(bm), (("asset " + toBase58String(bm)) + " doesn't exist")).quantity) | |
768 | - | let fB = if ((fA > f)) | |
759 | + | let fu = fs._2 | |
760 | + | let eL = fg(ft, aX)._1 | |
761 | + | let eM = fg(fu, aX)._1 | |
762 | + | let fv = fg(fj, aX) | |
763 | + | let fw = fv._1 | |
764 | + | let fh = fv._2 | |
765 | + | let fx = (fq + eL) | |
766 | + | let fy = (fr + eM) | |
767 | + | let fz = bO(D(fy, bs), D(fx, br)) | |
768 | + | let fA = H(fz, b) | |
769 | + | let fB = if (fo) | |
770 | + | then fq | |
771 | + | else fr | |
772 | + | let fC = toBigInt(fB) | |
773 | + | let fD = toBigInt(valueOrErrorMessage(assetInfo(bo), (("asset " + toBase58String(bo)) + " doesn't exist")).quantity) | |
774 | + | let fE = if ((fD > f)) | |
769 | 775 | then true | |
770 | - | else | |
771 | - | if (( | |
776 | + | else aS("initial deposit requires all coins") | |
777 | + | if ((fE == fE)) | |
772 | 778 | then { | |
773 | - | let | |
774 | - | let | |
775 | - | let | |
779 | + | let fF = toBigInt(fw) | |
780 | + | let fG = max([0, toInt(((fD * (sqrtBigInt((d + ((fF * d) / fC)), 18, 18, DOWN) - d)) / d))]) | |
781 | + | let en = if (fl) | |
776 | 782 | then nil | |
777 | - | else [IntegerEntry(W(), | |
778 | - | let | |
779 | - | let | |
780 | - | let | |
781 | - | let | |
782 | - | then $Tuple2( | |
783 | - | else $Tuple2( | |
784 | - | let | |
785 | - | let | |
786 | - | let | |
787 | - | fraction(( | |
783 | + | else [IntegerEntry(W(), fA), IntegerEntry(X(height, lastBlock.timestamp), fA), StringEntry(aa(toString(value(ab)), toBase58String(value(ac))), bw(ft, fu, fG, fA, 0, 0, height, lastBlock.timestamp, 0, 0))] | |
784 | + | let fH = bO(D(fr, bs), D(fq, br)) | |
785 | + | let fI = H(fH, b) | |
786 | + | let fJ = { | |
787 | + | let fK = if (fo) | |
788 | + | then $Tuple2(ft, fq) | |
789 | + | else $Tuple2(fu, fr) | |
790 | + | let bY = fK._1 | |
791 | + | let fL = fK._2 | |
792 | + | let fM = toInt(fraction(fD, toBigInt((bY / 2)), toBigInt(fL))) | |
793 | + | fraction((fG - fM), b, fM) | |
788 | 794 | } | |
789 | - | $Tuple5( | |
795 | + | $Tuple5(fG, en, fh, fJ, fo) | |
790 | 796 | } | |
791 | 797 | else throw("Strict value is not equal to itself.") | |
792 | 798 | } | |
793 | 799 | ||
794 | 800 | ||
795 | - | func | |
796 | - | let | |
797 | - | let | |
798 | - | let | |
799 | - | let | |
800 | - | let | |
801 | + | func fN (fO,fw,fk,ab,ac) = { | |
802 | + | let fl = (ac == unit) | |
803 | + | let dc = bc() | |
804 | + | let dd = parseIntValue(dc[t]) | |
805 | + | let de = parseIntValue(dc[u]) | |
806 | + | let fP = [if ((fk == bo)) | |
801 | 807 | then true | |
802 | - | else | |
803 | - | if (( | |
808 | + | else aS("invalid lp asset")] | |
809 | + | if ((fP == fP)) | |
804 | 810 | then { | |
805 | - | let | |
811 | + | let fQ = if ((fO == bp)) | |
806 | 812 | then true | |
807 | - | else if (( | |
813 | + | else if ((fO == bq)) | |
808 | 814 | then false | |
809 | - | else | |
810 | - | let | |
811 | - | then toBigInt( | |
812 | - | else toBigInt( | |
813 | - | let | |
814 | - | then | |
815 | - | else | |
816 | - | let | |
817 | - | let | |
818 | - | let | |
819 | - | then | |
820 | - | else | |
821 | - | let | |
822 | - | let | |
823 | - | let | |
824 | - | let | |
825 | - | let | |
826 | - | let | |
827 | - | let | |
828 | - | let | |
829 | - | then $Tuple4( | |
830 | - | else $Tuple4(0, | |
831 | - | let | |
832 | - | let | |
833 | - | let | |
834 | - | let | |
835 | - | let | |
836 | - | let | |
837 | - | let | |
815 | + | else aS("invalid asset") | |
816 | + | let fR = if (fQ) | |
817 | + | then toBigInt(bL(bh(bp))) | |
818 | + | else toBigInt(bL(bh(bq))) | |
819 | + | let fS = if (fQ) | |
820 | + | then dd | |
821 | + | else de | |
822 | + | let fT = bL(bh(bp)) | |
823 | + | let fU = bL(bh(bq)) | |
824 | + | let fV = if (fQ) | |
825 | + | then fT | |
826 | + | else fU | |
827 | + | let fW = toBigInt(fV) | |
828 | + | let fD = toBigInt(valueOrErrorMessage(assetInfo(bo), (("asset " + toBase58String(bo)) + " doesn't exist")).quantity) | |
829 | + | let fX = toBigInt(fw) | |
830 | + | let fY = max([0, toInt(((fR * (d - pow((d - ((fX * d) / fD)), 18, h, 0, 18, DOWN))) / d))]) | |
831 | + | let fZ = fg(fY, aZ) | |
832 | + | let ga = fZ._1 | |
833 | + | let fh = fZ._2 | |
834 | + | let gb = if (fQ) | |
835 | + | then $Tuple4(ga, 0, (fT - fY), fU) | |
836 | + | else $Tuple4(0, ga, fT, (fU - fY)) | |
837 | + | let gc = gb._1 | |
838 | + | let gd = gb._2 | |
839 | + | let ge = gb._3 | |
840 | + | let gf = gb._4 | |
841 | + | let fz = bO(D(gf, bs), D(ge, br)) | |
842 | + | let fA = H(fz, b) | |
843 | + | let en = if (fl) | |
838 | 844 | then nil | |
839 | - | else [StringEntry(ad(toString(value(ab)), toBase58String(value(ac))), | |
840 | - | let | |
841 | - | let | |
842 | - | let | |
843 | - | let | |
844 | - | fraction(( | |
845 | + | else [StringEntry(ad(toString(value(ab)), toBase58String(value(ac))), bH(gc, gd, fw, fA, height, lastBlock.timestamp)), IntegerEntry(W(), fA), IntegerEntry(X(height, lastBlock.timestamp), fA)] | |
846 | + | let fH = bO(D(fU, bs), D(fT, br)) | |
847 | + | let fI = H(fH, b) | |
848 | + | let fJ = { | |
849 | + | let gg = (toInt(fraction(fR, fX, fD)) * 2) | |
850 | + | fraction((ga - gg), b, gg) | |
845 | 851 | } | |
846 | - | $Tuple5( | |
852 | + | $Tuple5(ga, en, fh, fJ, fQ) | |
847 | 853 | } | |
848 | 854 | else throw("Strict value is not equal to itself.") | |
849 | 855 | } | |
850 | 856 | ||
851 | 857 | ||
852 | - | func | |
853 | - | let | |
854 | - | if ($isInstanceOf( | |
858 | + | func gh () = { | |
859 | + | let bV = getString(U()) | |
860 | + | if ($isInstanceOf(bV, "String")) | |
855 | 861 | then { | |
856 | - | let | |
857 | - | fromBase58String( | |
862 | + | let gi = bV | |
863 | + | fromBase58String(gi) | |
858 | 864 | } | |
859 | - | else if ($isInstanceOf( | |
865 | + | else if ($isInstanceOf(bV, "Unit")) | |
860 | 866 | then unit | |
861 | 867 | else throw("Match error") | |
862 | 868 | } | |
863 | 869 | ||
864 | 870 | ||
865 | - | func | |
866 | - | let | |
867 | - | if ($isInstanceOf( | |
871 | + | func gj () = { | |
872 | + | let bV = getString(V()) | |
873 | + | if ($isInstanceOf(bV, "String")) | |
868 | 874 | then { | |
869 | - | let | |
870 | - | fromBase58String( | |
875 | + | let gi = bV | |
876 | + | fromBase58String(gi) | |
871 | 877 | } | |
872 | - | else if ($isInstanceOf( | |
878 | + | else if ($isInstanceOf(bV, "Unit")) | |
873 | 879 | then unit | |
874 | 880 | else throw("Match error") | |
875 | 881 | } | |
876 | 882 | ||
877 | 883 | ||
878 | - | func | |
879 | - | let | |
880 | - | if ($isInstanceOf( | |
884 | + | func gk (eV) = { | |
885 | + | let bV = gh() | |
886 | + | if ($isInstanceOf(bV, "ByteVector")) | |
881 | 887 | then { | |
882 | - | let | |
883 | - | ( | |
888 | + | let gl = bV | |
889 | + | (eV.callerPublicKey == gl) | |
884 | 890 | } | |
885 | - | else if ($isInstanceOf( | |
886 | - | then ( | |
891 | + | else if ($isInstanceOf(bV, "Unit")) | |
892 | + | then (eV.caller == this) | |
887 | 893 | else throw("Match error") | |
888 | 894 | } | |
889 | 895 | ||
890 | 896 | ||
891 | - | func | |
892 | - | let | |
893 | - | let | |
894 | - | if ($isInstanceOf( | |
897 | + | func gm (eV) = { | |
898 | + | let gn = throw("Permission denied") | |
899 | + | let bV = gh() | |
900 | + | if ($isInstanceOf(bV, "ByteVector")) | |
895 | 901 | then { | |
896 | - | let | |
897 | - | if (( | |
902 | + | let gl = bV | |
903 | + | if ((eV.callerPublicKey == gl)) | |
898 | 904 | then true | |
899 | - | else | |
905 | + | else gn | |
900 | 906 | } | |
901 | - | else if ($isInstanceOf( | |
902 | - | then if (( | |
907 | + | else if ($isInstanceOf(bV, "Unit")) | |
908 | + | then if ((eV.caller == this)) | |
903 | 909 | then true | |
904 | - | else | |
910 | + | else gn | |
905 | 911 | else throw("Match error") | |
906 | 912 | } | |
907 | 913 | ||
908 | 914 | ||
909 | - | @Callable( | |
910 | - | func rebalance () = ( | |
915 | + | @Callable(eV) | |
916 | + | func rebalance () = (cC(aO(this, ae())) ++ cC(aO(this, af()))) | |
911 | 917 | ||
912 | 918 | ||
913 | 919 | ||
914 | - | @Callable( | |
915 | - | func calculateAmountOutForSwapREADONLY ( | |
916 | - | let | |
920 | + | @Callable(eV) | |
921 | + | func calculateAmountOutForSwapREADONLY (go,gp,gq) = { | |
922 | + | let gr = if ((gp == false)) | |
917 | 923 | then { | |
918 | - | let | |
919 | - | let | |
920 | - | $Tuple2( | |
924 | + | let gs = aO(this, af()) | |
925 | + | let gt = aO(this, ae()) | |
926 | + | $Tuple2(gs, gt) | |
921 | 927 | } | |
922 | 928 | else { | |
923 | - | let | |
924 | - | let | |
925 | - | $Tuple2( | |
929 | + | let gs = aO(this, ae()) | |
930 | + | let gt = aO(this, af()) | |
931 | + | $Tuple2(gs, gt) | |
926 | 932 | } | |
927 | - | let | |
928 | - | let | |
929 | - | let | |
930 | - | let | |
931 | - | let | |
932 | - | let | |
933 | - | let | |
934 | - | let | |
933 | + | let gs = gr._1 | |
934 | + | let gt = gr._2 | |
935 | + | let gu = bL(gt) | |
936 | + | let gv = bL(gs) | |
937 | + | let gw = fraction(gv, go, (gu + go)) | |
938 | + | let gx = (toBigInt(gu) * toBigInt(gv)) | |
939 | + | let gy = (((toBigInt(bL(gt)) + toBigInt(go)) + toBigInt(gq)) * (toBigInt(bL(gs)) - toBigInt(gw))) | |
940 | + | let gz = if ((gy >= gx)) | |
935 | 941 | then true | |
936 | 942 | else throw("new K is fewer error") | |
937 | - | if (( | |
938 | - | then $Tuple2(nil, | |
943 | + | if ((gz == gz)) | |
944 | + | then $Tuple2(nil, gw) | |
939 | 945 | else throw("Strict value is not equal to itself.") | |
940 | 946 | } | |
941 | 947 | ||
942 | 948 | ||
943 | 949 | ||
944 | - | @Callable( | |
945 | - | func calculateAmountOutForSwapAndSendTokens ( | |
946 | - | let | |
947 | - | let | |
948 | - | if ($isInstanceOf( | |
949 | - | then | |
950 | - | else throw(($getType( | |
950 | + | @Callable(eV) | |
951 | + | func calculateAmountOutForSwapAndSendTokens (go,gp,gA,gB,gq) = { | |
952 | + | let gC = { | |
953 | + | let aY = invoke(aV, "getSwapContractREADONLY", nil, nil) | |
954 | + | if ($isInstanceOf(aY, "String")) | |
955 | + | then aY | |
956 | + | else throw(($getType(aY) + " couldn't be cast to String")) | |
951 | 957 | } | |
952 | - | let | |
958 | + | let fP = [if ((value(eV.payments[0]).amount >= go)) | |
953 | 959 | then true | |
954 | - | else | |
960 | + | else aS("Wrong amount"), if ((eV.caller == addressFromStringValue(gC))) | |
955 | 961 | then true | |
956 | - | else | |
957 | - | if (( | |
962 | + | else aS("Permission denied")] | |
963 | + | if ((fP == fP)) | |
958 | 964 | then { | |
959 | - | let | |
960 | - | let | |
961 | - | let | |
962 | - | then | |
963 | - | else | |
964 | - | let | |
965 | - | let | |
966 | - | let | |
967 | - | let | |
968 | - | let | |
969 | - | let | |
965 | + | let eW = value(eV.payments[0]) | |
966 | + | let gt = bh(eW.assetId) | |
967 | + | let gs = if ((gp == false)) | |
968 | + | then aO(this, af()) | |
969 | + | else aO(this, ae()) | |
970 | + | let gu = (bL(gt) - value(eV.payments[0]).amount) | |
971 | + | let gv = bL(gs) | |
972 | + | let gw = fraction(gv, go, (gu + go)) | |
973 | + | let gx = (toBigInt(gu) * toBigInt(gv)) | |
974 | + | let gy = ((toBigInt(bL(gt)) + toBigInt(gq)) * (toBigInt(bL(gs)) - toBigInt(gw))) | |
975 | + | let gz = if ((gy >= gx)) | |
970 | 976 | then true | |
971 | 977 | else throw("new K is fewer error") | |
972 | - | if (( | |
978 | + | if ((gz == gz)) | |
973 | 979 | then { | |
974 | - | let | |
980 | + | let gD = if ((gw >= gA)) | |
975 | 981 | then true | |
976 | 982 | else throw("Exchange result is fewer coins than expected") | |
977 | - | if (( | |
983 | + | if ((gD == gD)) | |
978 | 984 | then { | |
979 | - | let | |
980 | - | if (( | |
985 | + | let gE = cC(gt) | |
986 | + | if ((gE == gE)) | |
981 | 987 | then { | |
982 | - | let | |
983 | - | if (( | |
984 | - | then $Tuple2((( | |
988 | + | let gF = cJ(gs, gw) | |
989 | + | if ((gF == gF)) | |
990 | + | then $Tuple2(((gF ++ gE) ++ [ScriptTransfer(addressFromStringValue(gB), gw, bf(gs))]), gw) | |
985 | 991 | else throw("Strict value is not equal to itself.") | |
986 | 992 | } | |
987 | 993 | else throw("Strict value is not equal to itself.") | |
995 | 1001 | ||
996 | 1002 | ||
997 | 1003 | ||
998 | - | @Callable( | |
999 | - | func setManager ( | |
1000 | - | let | |
1001 | - | if (( | |
1004 | + | @Callable(eV) | |
1005 | + | func setManager (gG) = { | |
1006 | + | let gH = gm(eV) | |
1007 | + | if ((gH == gH)) | |
1002 | 1008 | then { | |
1003 | - | let | |
1004 | - | if (( | |
1005 | - | then [StringEntry(V(), | |
1009 | + | let gI = fromBase58String(gG) | |
1010 | + | if ((gI == gI)) | |
1011 | + | then [StringEntry(V(), gG)] | |
1006 | 1012 | else throw("Strict value is not equal to itself.") | |
1007 | 1013 | } | |
1008 | 1014 | else throw("Strict value is not equal to itself.") | |
1010 | 1016 | ||
1011 | 1017 | ||
1012 | 1018 | ||
1013 | - | @Callable( | |
1019 | + | @Callable(eV) | |
1014 | 1020 | func confirmManager () = { | |
1015 | - | let | |
1016 | - | let | |
1021 | + | let gJ = gj() | |
1022 | + | let gK = if (isDefined(gJ)) | |
1017 | 1023 | then true | |
1018 | 1024 | else throw("No pending manager") | |
1019 | - | if (( | |
1025 | + | if ((gK == gK)) | |
1020 | 1026 | then { | |
1021 | - | let | |
1027 | + | let gL = if ((eV.callerPublicKey == value(gJ))) | |
1022 | 1028 | then true | |
1023 | 1029 | else throw("You are not pending manager") | |
1024 | - | if (( | |
1025 | - | then [StringEntry(U(), toBase58String(value( | |
1030 | + | if ((gL == gL)) | |
1031 | + | then [StringEntry(U(), toBase58String(value(gJ))), DeleteEntry(V())] | |
1026 | 1032 | else throw("Strict value is not equal to itself.") | |
1027 | 1033 | } | |
1028 | 1034 | else throw("Strict value is not equal to itself.") | |
1030 | 1036 | ||
1031 | 1037 | ||
1032 | 1038 | ||
1033 | - | @Callable( | |
1034 | - | func put ( | |
1039 | + | @Callable(eV) | |
1040 | + | func put (dI,gM) = if ((0 > dI)) | |
1035 | 1041 | then throw("Invalid slippageTolerance passed") | |
1036 | 1042 | else { | |
1037 | - | let | |
1038 | - | let | |
1039 | - | let | |
1040 | - | let | |
1041 | - | let | |
1042 | - | let | |
1043 | - | let | |
1044 | - | let | |
1045 | - | let | |
1046 | - | let | |
1047 | - | let | |
1048 | - | if (( | |
1043 | + | let fb = eY(eV, dI, true) | |
1044 | + | let ek = fb._2 | |
1045 | + | let dp = fb._7 | |
1046 | + | let dG = fb._9 | |
1047 | + | let el = fb._10 | |
1048 | + | let em = fb._11 | |
1049 | + | let gN = fb._12 | |
1050 | + | let gO = fb._13 | |
1051 | + | let eZ = toBigInt(value(eV.payments[0]).amount) | |
1052 | + | let fa = toBigInt(value(eV.payments[1]).amount) | |
1053 | + | let eB = eu(eZ, fa, toBigInt(0)) | |
1054 | + | if ((eB == eB)) | |
1049 | 1055 | then { | |
1050 | - | let | |
1051 | - | if (( | |
1056 | + | let fd = invoke(aV, "emit", [ek], nil) | |
1057 | + | if ((fd == fd)) | |
1052 | 1058 | then { | |
1053 | - | let | |
1054 | - | let | |
1055 | - | if ($isInstanceOf( | |
1059 | + | let fe = { | |
1060 | + | let bV = fd | |
1061 | + | if ($isInstanceOf(bV, "Address")) | |
1056 | 1062 | then { | |
1057 | - | let | |
1058 | - | invoke( | |
1063 | + | let ff = bV | |
1064 | + | invoke(ff, "emit", [ek], nil) | |
1059 | 1065 | } | |
1060 | 1066 | else unit | |
1061 | 1067 | } | |
1062 | - | if (( | |
1068 | + | if ((fe == fe)) | |
1063 | 1069 | then { | |
1064 | - | let | |
1065 | - | then invoke( | |
1070 | + | let gP = if ((el > 0)) | |
1071 | + | then invoke(bv, "put", nil, [AttachedPayment(gN, el)]) | |
1066 | 1072 | else nil | |
1067 | - | if (( | |
1073 | + | if ((gP == gP)) | |
1068 | 1074 | then { | |
1069 | - | let | |
1070 | - | then invoke( | |
1075 | + | let gQ = if ((em > 0)) | |
1076 | + | then invoke(bv, "put", nil, [AttachedPayment(gO, em)]) | |
1071 | 1077 | else nil | |
1072 | - | if (( | |
1078 | + | if ((gQ == gQ)) | |
1073 | 1079 | then { | |
1074 | - | let | |
1080 | + | let gR = if (gM) | |
1075 | 1081 | then { | |
1076 | - | let | |
1077 | - | if (( | |
1082 | + | let gS = invoke(bu, "stake", nil, [AttachedPayment(dp, ek)]) | |
1083 | + | if ((gS == gS)) | |
1078 | 1084 | then nil | |
1079 | 1085 | else throw("Strict value is not equal to itself.") | |
1080 | 1086 | } | |
1081 | - | else [ScriptTransfer( | |
1082 | - | let | |
1083 | - | if (( | |
1087 | + | else [ScriptTransfer(eV.caller, ek, dp)] | |
1088 | + | let gT = eC(0, 0, 0) | |
1089 | + | if ((gT == gT)) | |
1084 | 1090 | then { | |
1085 | - | let | |
1086 | - | let | |
1087 | - | let | |
1088 | - | if (( | |
1091 | + | let et = gT._2 | |
1092 | + | let gU = gT._1 | |
1093 | + | let gV = eH(eB, et) | |
1094 | + | if ((gV == gV)) | |
1089 | 1095 | then { | |
1090 | - | let | |
1091 | - | if (( | |
1092 | - | then (( | |
1096 | + | let gW = invoke(this, "rebalance", nil, nil) | |
1097 | + | if ((gW == gW)) | |
1098 | + | then ((dG ++ gR) ++ gU) | |
1093 | 1099 | else throw("Strict value is not equal to itself.") | |
1094 | 1100 | } | |
1095 | 1101 | else throw("Strict value is not equal to itself.") | |
1109 | 1115 | ||
1110 | 1116 | ||
1111 | 1117 | ||
1112 | - | @Callable( | |
1113 | - | func putForFree ( | |
1118 | + | @Callable(eV) | |
1119 | + | func putForFree (gX) = if ((0 > gX)) | |
1114 | 1120 | then throw("Invalid value passed") | |
1115 | 1121 | else { | |
1116 | - | let | |
1117 | - | let | |
1118 | - | let | |
1119 | - | let | |
1120 | - | let | |
1121 | - | if (( | |
1122 | + | let fb = eY(eV, gX, false) | |
1123 | + | let dG = fb._9 | |
1124 | + | let eZ = toBigInt(value(eV.payments[0]).amount) | |
1125 | + | let fa = toBigInt(value(eV.payments[1]).amount) | |
1126 | + | let eB = eu(eZ, fa, toBigInt(0)) | |
1127 | + | if ((eB == eB)) | |
1122 | 1128 | then { | |
1123 | - | let | |
1124 | - | let | |
1125 | - | let | |
1126 | - | let | |
1127 | - | if (( | |
1128 | - | then ( | |
1129 | + | let gY = eC(0, 0, 0) | |
1130 | + | let gU = gY._1 | |
1131 | + | let et = gY._2 | |
1132 | + | let gV = eH(eB, et) | |
1133 | + | if ((gV == gV)) | |
1134 | + | then (dG ++ gU) | |
1129 | 1135 | else throw("Strict value is not equal to itself.") | |
1130 | 1136 | } | |
1131 | 1137 | else throw("Strict value is not equal to itself.") | |
1133 | 1139 | ||
1134 | 1140 | ||
1135 | 1141 | ||
1136 | - | @Callable( | |
1137 | - | func putOneTkn ( | |
1138 | - | let | |
1139 | - | let | |
1140 | - | if ($isInstanceOf( | |
1141 | - | then | |
1142 | - | else throw(($getType( | |
1142 | + | @Callable(eV) | |
1143 | + | func putOneTkn (gZ,ha) = { | |
1144 | + | let hb = { | |
1145 | + | let aY = invoke(aV, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1146 | + | if ($isInstanceOf(aY, "Boolean")) | |
1147 | + | then aY | |
1148 | + | else throw(($getType(aY) + " couldn't be cast to Boolean")) | |
1143 | 1149 | } | |
1144 | - | let | |
1150 | + | let hc = if (if (if (ba()) | |
1145 | 1151 | then true | |
1146 | - | else ( | |
1152 | + | else (bn == l)) | |
1147 | 1153 | then true | |
1148 | - | else ( | |
1154 | + | else (bn == n)) | |
1149 | 1155 | then true | |
1150 | - | else | |
1151 | - | let | |
1156 | + | else hb | |
1157 | + | let fP = [if (if (!(hc)) | |
1152 | 1158 | then true | |
1153 | - | else | |
1159 | + | else gk(eV)) | |
1154 | 1160 | then true | |
1155 | - | else | |
1161 | + | else aS("put operation is blocked by admin"), if ((size(eV.payments) == 1)) | |
1156 | 1162 | then true | |
1157 | - | else | |
1158 | - | if (( | |
1163 | + | else aS("exactly 1 payment are expected")] | |
1164 | + | if ((fP == fP)) | |
1159 | 1165 | then { | |
1160 | - | let | |
1161 | - | let | |
1162 | - | let | |
1163 | - | let | |
1164 | - | then | |
1165 | - | else if (( | |
1166 | - | then | |
1167 | - | else | |
1168 | - | if (( | |
1166 | + | let hd = eV.payments[0] | |
1167 | + | let fk = hd.assetId | |
1168 | + | let fj = hd.amount | |
1169 | + | let eB = if ((fk == bp)) | |
1170 | + | then eu(toBigInt(fj), toBigInt(0), toBigInt(0)) | |
1171 | + | else if ((fk == bq)) | |
1172 | + | then eu(toBigInt(0), toBigInt(fj), toBigInt(0)) | |
1173 | + | else aS("payment asset is not supported") | |
1174 | + | if ((eB == eB)) | |
1169 | 1175 | then { | |
1170 | - | let ab = | |
1171 | - | let ac = | |
1172 | - | let | |
1173 | - | if (( | |
1176 | + | let ab = eV.caller | |
1177 | + | let ac = eV.transactionId | |
1178 | + | let he = fi(fj, fk, ab, ac) | |
1179 | + | if ((he == he)) | |
1174 | 1180 | then { | |
1175 | - | let | |
1176 | - | let | |
1177 | - | let | |
1178 | - | let | |
1179 | - | let | |
1180 | - | let | |
1181 | - | then ( | |
1181 | + | let fo = he._5 | |
1182 | + | let hf = he._4 | |
1183 | + | let fh = he._3 | |
1184 | + | let en = he._2 | |
1185 | + | let hg = he._1 | |
1186 | + | let hh = if (if ((gZ > 0)) | |
1187 | + | then (gZ > hg) | |
1182 | 1188 | else false) | |
1183 | - | then | |
1184 | - | else | |
1185 | - | let | |
1186 | - | if (( | |
1189 | + | then aS(makeString(["amount to receive is less than ", toString(gZ)], "")) | |
1190 | + | else hg | |
1191 | + | let fd = fc(hh) | |
1192 | + | if ((fd == fd)) | |
1187 | 1193 | then { | |
1188 | - | let | |
1194 | + | let gR = if (ha) | |
1189 | 1195 | then { | |
1190 | - | let | |
1191 | - | if (( | |
1196 | + | let hi = invoke(bu, "stake", nil, [AttachedPayment(bo, hh)]) | |
1197 | + | if ((hi == hi)) | |
1192 | 1198 | then nil | |
1193 | 1199 | else throw("Strict value is not equal to itself.") | |
1194 | 1200 | } | |
1195 | - | else [ScriptTransfer( | |
1196 | - | let | |
1197 | - | then [ScriptTransfer( | |
1201 | + | else [ScriptTransfer(eV.caller, hh, bo)] | |
1202 | + | let hj = if ((fh > 0)) | |
1203 | + | then [ScriptTransfer(aW, fh, fk)] | |
1198 | 1204 | else nil | |
1199 | - | let | |
1205 | + | let hk = if ((this == aW)) | |
1200 | 1206 | then $Tuple2(0, 0) | |
1201 | - | else if ( | |
1202 | - | then $Tuple2(-( | |
1203 | - | else $Tuple2(0, -( | |
1204 | - | let | |
1205 | - | let | |
1206 | - | let | |
1207 | - | let | |
1208 | - | let | |
1209 | - | let | |
1210 | - | let | |
1211 | - | if (( | |
1207 | + | else if (fo) | |
1208 | + | then $Tuple2(-(fh), 0) | |
1209 | + | else $Tuple2(0, -(fh)) | |
1210 | + | let eD = hk._1 | |
1211 | + | let eE = hk._2 | |
1212 | + | let hl = eC(eD, eE, 0) | |
1213 | + | let gU = hl._1 | |
1214 | + | let et = hl._2 | |
1215 | + | let eO = value(getString(aj)) | |
1216 | + | let gV = eH(eB, et) | |
1217 | + | if ((gV == gV)) | |
1212 | 1218 | then { | |
1213 | - | let | |
1214 | - | if (( | |
1215 | - | then $Tuple2(((( | |
1219 | + | let gW = invoke(this, "rebalance", nil, nil) | |
1220 | + | if ((gW == gW)) | |
1221 | + | then $Tuple2((((en ++ gR) ++ hj) ++ gU), hh) | |
1216 | 1222 | else throw("Strict value is not equal to itself.") | |
1217 | 1223 | } | |
1218 | 1224 | else throw("Strict value is not equal to itself.") | |
1228 | 1234 | ||
1229 | 1235 | ||
1230 | 1236 | ||
1231 | - | @Callable( | |
1232 | - | func putOneTknREADONLY ( | |
1233 | - | let | |
1234 | - | let | |
1235 | - | let | |
1236 | - | let | |
1237 | - | let | |
1238 | - | let | |
1239 | - | $Tuple2(nil, $Tuple3( | |
1237 | + | @Callable(eV) | |
1238 | + | func putOneTknREADONLY (fk,fj) = { | |
1239 | + | let hm = fi(fj, bf(fk), unit, unit) | |
1240 | + | let hg = hm._1 | |
1241 | + | let en = hm._2 | |
1242 | + | let fh = hm._3 | |
1243 | + | let hf = hm._4 | |
1244 | + | let fo = hm._5 | |
1245 | + | $Tuple2(nil, $Tuple3(hg, fh, hf)) | |
1240 | 1246 | } | |
1241 | 1247 | ||
1242 | 1248 | ||
1243 | 1249 | ||
1244 | - | @Callable( | |
1245 | - | func getOneTkn ( | |
1246 | - | let | |
1247 | - | let | |
1248 | - | if ($isInstanceOf( | |
1249 | - | then | |
1250 | - | else throw(($getType( | |
1250 | + | @Callable(eV) | |
1251 | + | func getOneTkn (hn,gZ) = { | |
1252 | + | let hb = { | |
1253 | + | let aY = invoke(aV, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1254 | + | if ($isInstanceOf(aY, "Boolean")) | |
1255 | + | then aY | |
1256 | + | else throw(($getType(aY) + " couldn't be cast to Boolean")) | |
1251 | 1257 | } | |
1252 | - | let | |
1258 | + | let ho = if (if (ba()) | |
1253 | 1259 | then true | |
1254 | - | else ( | |
1260 | + | else (bn == n)) | |
1255 | 1261 | then true | |
1256 | - | else | |
1257 | - | let | |
1262 | + | else hb | |
1263 | + | let fP = [if (if (!(ho)) | |
1258 | 1264 | then true | |
1259 | - | else | |
1265 | + | else gk(eV)) | |
1260 | 1266 | then true | |
1261 | - | else | |
1267 | + | else aS("get operation is blocked by admin"), if ((size(eV.payments) == 1)) | |
1262 | 1268 | then true | |
1263 | - | else | |
1264 | - | if (( | |
1269 | + | else aS("exactly 1 payment are expected")] | |
1270 | + | if ((fP == fP)) | |
1265 | 1271 | then { | |
1266 | - | let | |
1267 | - | let | |
1268 | - | let | |
1269 | - | let | |
1270 | - | let | |
1271 | - | if (( | |
1272 | + | let fO = bf(hn) | |
1273 | + | let hd = eV.payments[0] | |
1274 | + | let fk = hd.assetId | |
1275 | + | let fw = hd.amount | |
1276 | + | let eB = eu(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1277 | + | if ((eB == eB)) | |
1272 | 1278 | then { | |
1273 | - | let ab = | |
1274 | - | let ac = | |
1275 | - | let | |
1276 | - | if (( | |
1279 | + | let ab = eV.caller | |
1280 | + | let ac = eV.transactionId | |
1281 | + | let hp = fN(fO, fw, fk, ab, ac) | |
1282 | + | if ((hp == hp)) | |
1277 | 1283 | then { | |
1278 | - | let | |
1279 | - | let | |
1280 | - | let | |
1281 | - | let | |
1282 | - | let | |
1283 | - | let | |
1284 | - | then ( | |
1284 | + | let fQ = hp._5 | |
1285 | + | let hf = hp._4 | |
1286 | + | let fh = hp._3 | |
1287 | + | let en = hp._2 | |
1288 | + | let hq = hp._1 | |
1289 | + | let bY = if (if ((gZ > 0)) | |
1290 | + | then (gZ > hq) | |
1285 | 1291 | else false) | |
1286 | - | then | |
1287 | - | else | |
1288 | - | let | |
1289 | - | if (( | |
1292 | + | then aS(makeString(["amount to receive is less than ", toString(gZ)], "")) | |
1293 | + | else hq | |
1294 | + | let hr = invoke(aV, "burn", [fw], [AttachedPayment(fk, fw)]) | |
1295 | + | if ((hr == hr)) | |
1290 | 1296 | then { | |
1291 | - | let | |
1292 | - | let | |
1293 | - | let | |
1294 | - | then [ScriptTransfer( | |
1297 | + | let gF = cJ(hn, (bY + max([0, fh]))) | |
1298 | + | let hs = [ScriptTransfer(ab, bY, fO)] | |
1299 | + | let hj = if ((fh > 0)) | |
1300 | + | then [ScriptTransfer(aW, fh, fO)] | |
1295 | 1301 | else nil | |
1296 | - | let | |
1297 | - | let | |
1302 | + | let ht = { | |
1303 | + | let hu = if ((this == aW)) | |
1298 | 1304 | then 0 | |
1299 | - | else | |
1300 | - | if ( | |
1301 | - | then $Tuple2(-(( | |
1302 | - | else $Tuple2(0, -(( | |
1305 | + | else fh | |
1306 | + | if (fQ) | |
1307 | + | then $Tuple2(-((bY + hu)), 0) | |
1308 | + | else $Tuple2(0, -((bY + hu))) | |
1303 | 1309 | } | |
1304 | - | let | |
1305 | - | let | |
1306 | - | let | |
1307 | - | let | |
1308 | - | let | |
1309 | - | let | |
1310 | - | if (( | |
1311 | - | then $Tuple2((((( | |
1310 | + | let eD = ht._1 | |
1311 | + | let eE = ht._2 | |
1312 | + | let hv = eC(eD, eE, 0) | |
1313 | + | let gU = hv._1 | |
1314 | + | let et = hv._2 | |
1315 | + | let gV = eH(eB, et) | |
1316 | + | if ((gV == gV)) | |
1317 | + | then $Tuple2(((((en ++ gF) ++ hs) ++ hj) ++ gU), bY) | |
1312 | 1318 | else throw("Strict value is not equal to itself.") | |
1313 | 1319 | } | |
1314 | 1320 | else throw("Strict value is not equal to itself.") | |
1322 | 1328 | ||
1323 | 1329 | ||
1324 | 1330 | ||
1325 | - | @Callable( | |
1326 | - | func getOneTknREADONLY ( | |
1327 | - | let | |
1328 | - | let | |
1329 | - | let | |
1330 | - | let | |
1331 | - | let | |
1332 | - | let | |
1333 | - | $Tuple2(nil, $Tuple3( | |
1331 | + | @Callable(eV) | |
1332 | + | func getOneTknREADONLY (fO,fw) = { | |
1333 | + | let hw = fN(bf(fO), fw, bo, unit, unit) | |
1334 | + | let hq = hw._1 | |
1335 | + | let en = hw._2 | |
1336 | + | let fh = hw._3 | |
1337 | + | let hf = hw._4 | |
1338 | + | let fQ = hw._5 | |
1339 | + | $Tuple2(nil, $Tuple3(hq, fh, hf)) | |
1334 | 1340 | } | |
1335 | 1341 | ||
1336 | 1342 | ||
1337 | 1343 | ||
1338 | - | @Callable( | |
1339 | - | func unstakeAndGetOneTkn ( | |
1340 | - | let | |
1341 | - | let | |
1342 | - | if ($isInstanceOf( | |
1343 | - | then | |
1344 | - | else throw(($getType( | |
1344 | + | @Callable(eV) | |
1345 | + | func unstakeAndGetOneTkn (hx,hn,gZ) = { | |
1346 | + | let hb = { | |
1347 | + | let aY = invoke(aV, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1348 | + | if ($isInstanceOf(aY, "Boolean")) | |
1349 | + | then aY | |
1350 | + | else throw(($getType(aY) + " couldn't be cast to Boolean")) | |
1345 | 1351 | } | |
1346 | - | let | |
1352 | + | let ho = if (if (ba()) | |
1347 | 1353 | then true | |
1348 | - | else ( | |
1354 | + | else (bn == n)) | |
1349 | 1355 | then true | |
1350 | - | else | |
1351 | - | let | |
1356 | + | else hb | |
1357 | + | let fP = [if (if (!(ho)) | |
1352 | 1358 | then true | |
1353 | - | else | |
1359 | + | else gk(eV)) | |
1354 | 1360 | then true | |
1355 | - | else | |
1361 | + | else aS("get operation is blocked by admin"), if ((size(eV.payments) == 0)) | |
1356 | 1362 | then true | |
1357 | - | else | |
1358 | - | if (( | |
1363 | + | else aS("no payments are expected")] | |
1364 | + | if ((fP == fP)) | |
1359 | 1365 | then { | |
1360 | - | let | |
1361 | - | let ab = | |
1362 | - | let ac = | |
1363 | - | let | |
1364 | - | if (( | |
1366 | + | let fO = bf(hn) | |
1367 | + | let ab = eV.caller | |
1368 | + | let ac = eV.transactionId | |
1369 | + | let eB = eu(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1370 | + | if ((eB == eB)) | |
1365 | 1371 | then { | |
1366 | - | let | |
1367 | - | if (( | |
1372 | + | let hy = invoke(bu, "unstake", [toBase58String(bo), hx], nil) | |
1373 | + | if ((hy == hy)) | |
1368 | 1374 | then { | |
1369 | - | let | |
1370 | - | if (( | |
1375 | + | let hz = fN(fO, hx, bo, ab, ac) | |
1376 | + | if ((hz == hz)) | |
1371 | 1377 | then { | |
1372 | - | let | |
1373 | - | let | |
1374 | - | let | |
1375 | - | let | |
1376 | - | let | |
1377 | - | let | |
1378 | - | then ( | |
1378 | + | let fQ = hz._5 | |
1379 | + | let hf = hz._4 | |
1380 | + | let fh = hz._3 | |
1381 | + | let en = hz._2 | |
1382 | + | let hq = hz._1 | |
1383 | + | let bY = if (if ((gZ > 0)) | |
1384 | + | then (gZ > hq) | |
1379 | 1385 | else false) | |
1380 | - | then | |
1381 | - | else | |
1382 | - | let | |
1383 | - | if (( | |
1386 | + | then aS(makeString(["amount to receive is less than ", toString(gZ)], "")) | |
1387 | + | else hq | |
1388 | + | let hr = invoke(aV, "burn", [hx], [AttachedPayment(bo, hx)]) | |
1389 | + | if ((hr == hr)) | |
1384 | 1390 | then { | |
1385 | - | let | |
1386 | - | let | |
1387 | - | let | |
1388 | - | then [ScriptTransfer( | |
1391 | + | let gF = cJ(hn, (bY + max([0, fh]))) | |
1392 | + | let hs = [ScriptTransfer(eV.caller, bY, fO)] | |
1393 | + | let hj = if ((fh > 0)) | |
1394 | + | then [ScriptTransfer(aW, fh, fO)] | |
1389 | 1395 | else nil | |
1390 | - | let | |
1391 | - | let | |
1396 | + | let hA = { | |
1397 | + | let hu = if ((this == aW)) | |
1392 | 1398 | then 0 | |
1393 | - | else | |
1394 | - | if ( | |
1395 | - | then $Tuple2(-(( | |
1396 | - | else $Tuple2(0, -(( | |
1399 | + | else fh | |
1400 | + | if (fQ) | |
1401 | + | then $Tuple2(-((bY + hu)), 0) | |
1402 | + | else $Tuple2(0, -((bY + hu))) | |
1397 | 1403 | } | |
1398 | - | let | |
1399 | - | let | |
1400 | - | let | |
1401 | - | let | |
1402 | - | let | |
1403 | - | let | |
1404 | - | if (( | |
1405 | - | then $Tuple2((((( | |
1404 | + | let eD = hA._1 | |
1405 | + | let eE = hA._2 | |
1406 | + | let hB = eC(eD, eE, 0) | |
1407 | + | let gU = hB._1 | |
1408 | + | let et = hB._2 | |
1409 | + | let gV = eH(eB, et) | |
1410 | + | if ((gV == gV)) | |
1411 | + | then $Tuple2(((((en ++ gF) ++ hs) ++ hj) ++ gU), bY) | |
1406 | 1412 | else throw("Strict value is not equal to itself.") | |
1407 | 1413 | } | |
1408 | 1414 | else throw("Strict value is not equal to itself.") | |
1418 | 1424 | ||
1419 | 1425 | ||
1420 | 1426 | ||
1421 | - | @Callable( | |
1427 | + | @Callable(eV) | |
1422 | 1428 | func get () = { | |
1423 | - | let | |
1424 | - | let | |
1425 | - | let | |
1426 | - | let | |
1427 | - | let | |
1428 | - | let | |
1429 | - | let | |
1430 | - | let | |
1431 | - | if (( | |
1429 | + | let dY = eU(eV) | |
1430 | + | let dE = dY._1 | |
1431 | + | let dF = dY._2 | |
1432 | + | let eX = dY._3 | |
1433 | + | let dn = dY._4 | |
1434 | + | let dG = dY._5 | |
1435 | + | let gF = cO(dE, dF) | |
1436 | + | let eB = eu(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1437 | + | if ((eB == eB)) | |
1432 | 1438 | then { | |
1433 | - | let | |
1434 | - | if (( | |
1439 | + | let hC = invoke(aV, "burn", [eX], [AttachedPayment(dn, eX)]) | |
1440 | + | if ((hC == hC)) | |
1435 | 1441 | then { | |
1436 | - | let | |
1437 | - | let | |
1438 | - | let | |
1439 | - | let | |
1440 | - | if (( | |
1441 | - | then (( | |
1442 | + | let hD = eC(-(dE), -(dF), 0) | |
1443 | + | let gU = hD._1 | |
1444 | + | let et = hD._2 | |
1445 | + | let gV = eH(eB, et) | |
1446 | + | if ((gV == gV)) | |
1447 | + | then ((gF ++ dG) ++ gU) | |
1442 | 1448 | else throw("Strict value is not equal to itself.") | |
1443 | 1449 | } | |
1444 | 1450 | else throw("Strict value is not equal to itself.") | |
1448 | 1454 | ||
1449 | 1455 | ||
1450 | 1456 | ||
1451 | - | @Callable( | |
1452 | - | func getNoLess ( | |
1453 | - | let | |
1454 | - | let | |
1455 | - | let | |
1456 | - | let | |
1457 | - | let | |
1458 | - | let | |
1459 | - | if (( | |
1460 | - | then throw(((("noLessThenAmtAsset failed: " + toString( | |
1461 | - | else if (( | |
1462 | - | then throw(((("noLessThenPriceAsset failed: " + toString( | |
1457 | + | @Callable(eV) | |
1458 | + | func getNoLess (hE,hF) = { | |
1459 | + | let dY = eU(eV) | |
1460 | + | let dE = dY._1 | |
1461 | + | let dF = dY._2 | |
1462 | + | let eX = dY._3 | |
1463 | + | let dn = dY._4 | |
1464 | + | let dG = dY._5 | |
1465 | + | if ((hE > dE)) | |
1466 | + | then throw(((("noLessThenAmtAsset failed: " + toString(dE)) + " < ") + toString(hE))) | |
1467 | + | else if ((hF > dF)) | |
1468 | + | then throw(((("noLessThenPriceAsset failed: " + toString(dF)) + " < ") + toString(hF))) | |
1463 | 1469 | else { | |
1464 | - | let | |
1465 | - | let | |
1466 | - | if (( | |
1470 | + | let gF = cO(dE, dF) | |
1471 | + | let eB = eu(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1472 | + | if ((eB == eB)) | |
1467 | 1473 | then { | |
1468 | - | let | |
1469 | - | if (( | |
1474 | + | let hC = invoke(aV, "burn", [eX], [AttachedPayment(dn, eX)]) | |
1475 | + | if ((hC == hC)) | |
1470 | 1476 | then { | |
1471 | - | let | |
1472 | - | let | |
1473 | - | let | |
1474 | - | let | |
1475 | - | if (( | |
1476 | - | then (( | |
1477 | + | let hG = eC(-(dE), -(dF), 0) | |
1478 | + | let gU = hG._1 | |
1479 | + | let et = hG._2 | |
1480 | + | let gV = eH(eB, et) | |
1481 | + | if ((gV == gV)) | |
1482 | + | then ((gF ++ dG) ++ gU) | |
1477 | 1483 | else throw("Strict value is not equal to itself.") | |
1478 | 1484 | } | |
1479 | 1485 | else throw("Strict value is not equal to itself.") | |
1484 | 1490 | ||
1485 | 1491 | ||
1486 | 1492 | ||
1487 | - | @Callable( | |
1488 | - | func unstakeAndGet ( | |
1489 | - | let | |
1493 | + | @Callable(eV) | |
1494 | + | func unstakeAndGet (bY) = { | |
1495 | + | let hH = if ((size(eV.payments) != 0)) | |
1490 | 1496 | then throw("No payments are expected") | |
1491 | 1497 | else true | |
1492 | - | if (( | |
1498 | + | if ((hH == hH)) | |
1493 | 1499 | then { | |
1494 | - | let | |
1495 | - | let | |
1496 | - | let | |
1497 | - | if (( | |
1500 | + | let dc = bc() | |
1501 | + | let dp = fromBase58String(dc[q]) | |
1502 | + | let eB = eu(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1503 | + | if ((eB == eB)) | |
1498 | 1504 | then { | |
1499 | - | let | |
1500 | - | if (( | |
1505 | + | let hy = invoke(bu, "unstake", [toBase58String(dp), bY], nil) | |
1506 | + | if ((hy == hy)) | |
1501 | 1507 | then { | |
1502 | - | let | |
1503 | - | let | |
1504 | - | let | |
1505 | - | let | |
1506 | - | let | |
1507 | - | let | |
1508 | - | let | |
1508 | + | let dY = dl(toBase58String(eV.transactionId), toBase58String(dp), bY, eV.caller) | |
1509 | + | let dE = dY._1 | |
1510 | + | let dF = dY._2 | |
1511 | + | let ds = parseIntValue(dY._9) | |
1512 | + | let dG = dY._10 | |
1513 | + | let gF = cO(dE, dF) | |
1514 | + | let hI = if (if (ba()) | |
1509 | 1515 | then true | |
1510 | - | else ( | |
1511 | - | then throw(("Get operation is blocked by admin. Status = " + toString( | |
1516 | + | else (ds == n)) | |
1517 | + | then throw(("Get operation is blocked by admin. Status = " + toString(ds))) | |
1512 | 1518 | else true | |
1513 | - | if (( | |
1519 | + | if ((hI == hI)) | |
1514 | 1520 | then { | |
1515 | - | let | |
1516 | - | if (( | |
1521 | + | let hC = invoke(aV, "burn", [bY], [AttachedPayment(dp, bY)]) | |
1522 | + | if ((hC == hC)) | |
1517 | 1523 | then { | |
1518 | - | let | |
1519 | - | let | |
1520 | - | let | |
1521 | - | let | |
1522 | - | if (( | |
1523 | - | then (( | |
1524 | + | let hJ = eC(-(dE), -(dF), 0) | |
1525 | + | let gU = hJ._1 | |
1526 | + | let et = hJ._2 | |
1527 | + | let gV = eH(eB, et) | |
1528 | + | if ((gV == gV)) | |
1529 | + | then ((gF ++ dG) ++ gU) | |
1524 | 1530 | else throw("Strict value is not equal to itself.") | |
1525 | 1531 | } | |
1526 | 1532 | else throw("Strict value is not equal to itself.") | |
1536 | 1542 | ||
1537 | 1543 | ||
1538 | 1544 | ||
1539 | - | @Callable( | |
1540 | - | func unstakeAndGetNoLess ( | |
1541 | - | let | |
1545 | + | @Callable(eV) | |
1546 | + | func unstakeAndGetNoLess (hx,hK,hF) = { | |
1547 | + | let ho = if (ba()) | |
1542 | 1548 | then true | |
1543 | - | else ( | |
1544 | - | let | |
1549 | + | else (bn == n) | |
1550 | + | let fP = [if (!(ho)) | |
1545 | 1551 | then true | |
1546 | - | else throw("get operation is blocked by admin"), if ((size( | |
1552 | + | else throw("get operation is blocked by admin"), if ((size(eV.payments) == 0)) | |
1547 | 1553 | then true | |
1548 | 1554 | else throw("no payments are expected")] | |
1549 | - | if (( | |
1555 | + | if ((fP == fP)) | |
1550 | 1556 | then { | |
1551 | - | let | |
1552 | - | if (( | |
1557 | + | let eB = eu(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1558 | + | if ((eB == eB)) | |
1553 | 1559 | then { | |
1554 | - | let | |
1555 | - | if (( | |
1560 | + | let hy = invoke(bu, "unstake", [toBase58String(bo), hx], nil) | |
1561 | + | if ((hy == hy)) | |
1556 | 1562 | then { | |
1557 | - | let | |
1558 | - | let | |
1559 | - | let | |
1560 | - | let | |
1561 | - | let | |
1562 | - | let | |
1563 | + | let dY = dl(toBase58String(eV.transactionId), toBase58String(bo), hx, eV.caller) | |
1564 | + | let dE = dY._1 | |
1565 | + | let dF = dY._2 | |
1566 | + | let dG = dY._10 | |
1567 | + | let gF = cO(dE, dF) | |
1568 | + | let hL = [if ((dE >= hK)) | |
1563 | 1569 | then true | |
1564 | - | else throw(makeString(["amount asset amount to receive is less than ", toString( | |
1570 | + | else throw(makeString(["amount asset amount to receive is less than ", toString(hK)], "")), if ((dF >= hF)) | |
1565 | 1571 | then true | |
1566 | - | else throw(makeString(["price asset amount to receive is less than ", toString( | |
1567 | - | if (( | |
1572 | + | else throw(makeString(["price asset amount to receive is less than ", toString(hF)], ""))] | |
1573 | + | if ((hL == hL)) | |
1568 | 1574 | then { | |
1569 | - | let | |
1570 | - | if (( | |
1575 | + | let hC = invoke(aV, "burn", [hx], [AttachedPayment(bo, hx)]) | |
1576 | + | if ((hC == hC)) | |
1571 | 1577 | then { | |
1572 | - | let | |
1573 | - | let | |
1574 | - | let | |
1575 | - | let | |
1576 | - | if (( | |
1577 | - | then (( | |
1578 | + | let hM = eC(-(dE), -(dF), 0) | |
1579 | + | let gU = hM._1 | |
1580 | + | let et = hM._2 | |
1581 | + | let gV = eH(eB, et) | |
1582 | + | if ((gV == gV)) | |
1583 | + | then ((gF ++ dG) ++ gU) | |
1578 | 1584 | else throw("Strict value is not equal to itself.") | |
1579 | 1585 | } | |
1580 | 1586 | else throw("Strict value is not equal to itself.") | |
1590 | 1596 | ||
1591 | 1597 | ||
1592 | 1598 | ||
1593 | - | @Callable( | |
1594 | - | func activate ( | |
1599 | + | @Callable(eV) | |
1600 | + | func activate (hN,hO) = if ((toString(eV.caller) != toString(aV))) | |
1595 | 1601 | then throw("permissions denied") | |
1596 | - | else $Tuple2([StringEntry(ae(), | |
1602 | + | else $Tuple2([StringEntry(ae(), hN), StringEntry(af(), hO)], "success") | |
1597 | 1603 | ||
1598 | 1604 | ||
1599 | 1605 | ||
1600 | - | @Callable( | |
1606 | + | @Callable(eV) | |
1601 | 1607 | func refreshKLp () = { | |
1602 | - | let | |
1603 | - | let | |
1608 | + | let hP = valueOrElse(getInteger(ak), 0) | |
1609 | + | let hQ = if (((height - hP) >= an)) | |
1604 | 1610 | then unit | |
1605 | - | else | |
1606 | - | if (( | |
1611 | + | else aS(makeString([toString(an), " blocks have not passed since the previous call"], "")) | |
1612 | + | if ((hQ == hQ)) | |
1607 | 1613 | then { | |
1608 | - | let | |
1609 | - | let | |
1610 | - | let | |
1611 | - | let | |
1612 | - | let | |
1613 | - | then | |
1614 | - | else | |
1615 | - | $Tuple2( | |
1614 | + | let eO = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, aj), "0")), aU("invalid kLp")) | |
1615 | + | let hR = eC(0, 0, 0) | |
1616 | + | let hS = hR._1 | |
1617 | + | let et = hR._2 | |
1618 | + | let eF = if ((eO != et)) | |
1619 | + | then hS | |
1620 | + | else aS("nothing to refresh") | |
1621 | + | $Tuple2(eF, toString(et)) | |
1616 | 1622 | } | |
1617 | 1623 | else throw("Strict value is not equal to itself.") | |
1618 | 1624 | } | |
1619 | 1625 | ||
1620 | 1626 | ||
1621 | 1627 | ||
1622 | - | @Callable( | |
1623 | - | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, | |
1628 | + | @Callable(eV) | |
1629 | + | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, bc()) | |
1624 | 1630 | ||
1625 | 1631 | ||
1626 | 1632 | ||
1627 | - | @Callable( | |
1628 | - | func getAccBalanceWrapperREADONLY (ap) = $Tuple2(nil, | |
1633 | + | @Callable(eV) | |
1634 | + | func getAccBalanceWrapperREADONLY (ap) = $Tuple2(nil, bL(ap)) | |
1629 | 1635 | ||
1630 | 1636 | ||
1631 | 1637 | ||
1632 | - | @Callable( | |
1633 | - | func calcPricesWrapperREADONLY ( | |
1634 | - | let | |
1635 | - | $Tuple2(nil, [toString( | |
1638 | + | @Callable(eV) | |
1639 | + | func calcPricesWrapperREADONLY (cW,cX,db) = { | |
1640 | + | let dk = da(cW, cX, db) | |
1641 | + | $Tuple2(nil, [toString(dk[0]), toString(dk[1]), toString(dk[2])]) | |
1636 | 1642 | } | |
1637 | 1643 | ||
1638 | 1644 | ||
1639 | 1645 | ||
1640 | - | @Callable( | |
1646 | + | @Callable(eV) | |
1641 | 1647 | func toX18WrapperREADONLY (E,F) = $Tuple2(nil, toString(D(E, F))) | |
1642 | 1648 | ||
1643 | 1649 | ||
1644 | 1650 | ||
1645 | - | @Callable( | |
1651 | + | @Callable(eV) | |
1646 | 1652 | func fromX18WrapperREADONLY (I,J) = $Tuple2(nil, H(parseBigIntValue(I), J)) | |
1647 | 1653 | ||
1648 | 1654 | ||
1649 | 1655 | ||
1650 | - | @Callable( | |
1651 | - | func calcPriceBigIntWrapperREADONLY ( | |
1656 | + | @Callable(eV) | |
1657 | + | func calcPriceBigIntWrapperREADONLY (bP,bQ) = $Tuple2(nil, toString(bO(parseBigIntValue(bP), parseBigIntValue(bQ)))) | |
1652 | 1658 | ||
1653 | 1659 | ||
1654 | 1660 | ||
1655 | - | @Callable( | |
1656 | - | func estimatePutOperationWrapperREADONLY ( | |
1661 | + | @Callable(eV) | |
1662 | + | func estimatePutOperationWrapperREADONLY (dm,dI,dJ,dK,dL,dM,ab,dN,dO) = $Tuple2(nil, dH(dm, dI, dJ, dK, dL, dM, ab, dN, dO)) | |
1657 | 1663 | ||
1658 | 1664 | ||
1659 | 1665 | ||
1660 | - | @Callable( | |
1661 | - | func estimateGetOperationWrapperREADONLY ( | |
1662 | - | let | |
1663 | - | $Tuple2(nil, $Tuple10( | |
1666 | + | @Callable(eV) | |
1667 | + | func estimateGetOperationWrapperREADONLY (dm,dn,do,ab) = { | |
1668 | + | let dY = dl(dm, dn, do, addressFromStringValue(ab)) | |
1669 | + | $Tuple2(nil, $Tuple10(dY._1, dY._2, dY._3, dY._4, dY._5, dY._6, dY._7, toString(dY._8), dY._9, dY._10)) | |
1664 | 1670 | } | |
1665 | 1671 | ||
1666 | 1672 | ||
1667 | 1673 | ||
1668 | - | @Callable( | |
1674 | + | @Callable(eV) | |
1669 | 1675 | func statsREADONLY () = { | |
1670 | - | let | |
1671 | - | let | |
1672 | - | let | |
1673 | - | let | |
1674 | - | let | |
1675 | - | let | |
1676 | - | let | |
1677 | - | let | |
1678 | - | let | |
1679 | - | let | |
1680 | - | let | |
1681 | - | let | |
1676 | + | let dc = bc() | |
1677 | + | let dp = fromBase58String(dc[q]) | |
1678 | + | let hT = dc[r] | |
1679 | + | let hU = dc[s] | |
1680 | + | let dR = dc[v] | |
1681 | + | let dS = dc[w] | |
1682 | + | let dd = parseIntValue(dc[t]) | |
1683 | + | let de = parseIntValue(dc[u]) | |
1684 | + | let hV = valueOrErrorMessage(assetInfo(dp), (("Asset " + toBase58String(dp)) + " doesn't exist")).quantity | |
1685 | + | let hW = bL(hT) | |
1686 | + | let hX = bL(hU) | |
1687 | + | let hY = if ((hV == 0)) | |
1682 | 1688 | then [e, e, e] | |
1683 | - | else | |
1684 | - | let | |
1685 | - | let | |
1686 | - | let | |
1687 | - | let | |
1688 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString( | |
1689 | + | else da(hW, hX, hV) | |
1690 | + | let dz = 0 | |
1691 | + | let hZ = H(hY[1], b) | |
1692 | + | let ia = H(hY[2], b) | |
1693 | + | let ib = value(getInteger(aV, aD(toString(this)))) | |
1694 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(hW), toString(hX), toString(hV), toString(dz), toString(hZ), toString(ia), toString(ib)], j)) | |
1689 | 1695 | } | |
1690 | 1696 | ||
1691 | 1697 | ||
1692 | 1698 | ||
1693 | - | @Callable( | |
1694 | - | func evaluatePutByAmountAssetREADONLY ( | |
1695 | - | let | |
1696 | - | let | |
1697 | - | let | |
1698 | - | let | |
1699 | - | let | |
1700 | - | let | |
1701 | - | let | |
1702 | - | let | |
1703 | - | let | |
1704 | - | let | |
1705 | - | let | |
1706 | - | let | |
1707 | - | let | |
1708 | - | let | |
1709 | - | let | |
1699 | + | @Callable(eV) | |
1700 | + | func evaluatePutByAmountAssetREADONLY (dJ) = { | |
1701 | + | let dc = bc() | |
1702 | + | let dp = fromBase58String(dc[q]) | |
1703 | + | let dP = dc[r] | |
1704 | + | let dq = fromBase58String(dP) | |
1705 | + | let dQ = dc[s] | |
1706 | + | let dr = fromBase58String(dQ) | |
1707 | + | let dd = parseIntValue(dc[t]) | |
1708 | + | let de = parseIntValue(dc[u]) | |
1709 | + | let ds = dc[p] | |
1710 | + | let hV = valueOrErrorMessage(assetInfo(dp), (("Asset " + toBase58String(dp)) + " doesn't exist")).quantity | |
1711 | + | let hW = bL(dP) | |
1712 | + | let hX = bL(dQ) | |
1713 | + | let cY = D(hW, dd) | |
1714 | + | let cZ = D(hX, de) | |
1715 | + | let dy = if ((hV == 0)) | |
1710 | 1716 | then e | |
1711 | - | else | |
1712 | - | let | |
1713 | - | let | |
1714 | - | let | |
1715 | - | let | |
1716 | - | let | |
1717 | - | let | |
1718 | - | let | |
1719 | - | let | |
1720 | - | let | |
1721 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString( | |
1717 | + | else bO(cZ, cY) | |
1718 | + | let dV = D(dJ, dd) | |
1719 | + | let dW = fraction(dV, dy, d) | |
1720 | + | let dL = H(dW, de) | |
1721 | + | let fb = dH("", 500000, dJ, dq, dL, dr, "", true, false) | |
1722 | + | let eg = fb._1 | |
1723 | + | let ic = fb._3 | |
1724 | + | let du = fb._4 | |
1725 | + | let dw = fb._5 | |
1726 | + | let dt = fb._6 | |
1727 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(eg), toString(H(dy, b)), toString(du), toString(dw), toString(dt), ds, toString(dJ), toString(dL)], j)) | |
1722 | 1728 | } | |
1723 | 1729 | ||
1724 | 1730 | ||
1725 | 1731 | ||
1726 | - | @Callable( | |
1727 | - | func evaluatePutByPriceAssetREADONLY ( | |
1728 | - | let | |
1729 | - | let | |
1730 | - | let | |
1731 | - | let | |
1732 | - | let | |
1733 | - | let | |
1734 | - | let | |
1735 | - | let | |
1736 | - | let | |
1737 | - | let | |
1738 | - | let | |
1739 | - | let | |
1740 | - | let | |
1741 | - | let | |
1742 | - | let | |
1732 | + | @Callable(eV) | |
1733 | + | func evaluatePutByPriceAssetREADONLY (dL) = { | |
1734 | + | let dc = bc() | |
1735 | + | let dp = fromBase58String(dc[q]) | |
1736 | + | let dP = dc[r] | |
1737 | + | let dq = fromBase58String(dP) | |
1738 | + | let dQ = dc[s] | |
1739 | + | let dr = fromBase58String(dQ) | |
1740 | + | let dd = parseIntValue(dc[t]) | |
1741 | + | let de = parseIntValue(dc[u]) | |
1742 | + | let ds = dc[p] | |
1743 | + | let hV = valueOrErrorMessage(assetInfo(dp), (("Asset " + toBase58String(dp)) + " doesn't exist")).quantity | |
1744 | + | let id = bL(dP) | |
1745 | + | let ie = bL(dQ) | |
1746 | + | let if = D(id, dd) | |
1747 | + | let ig = D(ie, de) | |
1748 | + | let dy = if ((hV == 0)) | |
1743 | 1749 | then e | |
1744 | - | else | |
1745 | - | let | |
1746 | - | let | |
1747 | - | let | |
1748 | - | let | |
1749 | - | let | |
1750 | - | let | |
1751 | - | let | |
1752 | - | let | |
1753 | - | let | |
1754 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString( | |
1750 | + | else bO(ig, if) | |
1751 | + | let dW = D(dL, de) | |
1752 | + | let dV = fraction(dW, d, dy) | |
1753 | + | let dJ = H(dV, dd) | |
1754 | + | let fb = dH("", 500000, dJ, dq, dL, dr, "", true, false) | |
1755 | + | let eg = fb._1 | |
1756 | + | let ic = fb._3 | |
1757 | + | let du = fb._4 | |
1758 | + | let dw = fb._5 | |
1759 | + | let dt = fb._6 | |
1760 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(eg), toString(H(dy, b)), toString(du), toString(dw), toString(dt), ds, toString(dJ), toString(dL)], j)) | |
1755 | 1761 | } | |
1756 | 1762 | ||
1757 | 1763 | ||
1758 | 1764 | ||
1759 | - | @Callable( | |
1760 | - | func evaluateGetREADONLY ( | |
1761 | - | let | |
1762 | - | let | |
1763 | - | let | |
1764 | - | let | |
1765 | - | let | |
1766 | - | let | |
1767 | - | let | |
1768 | - | let | |
1769 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString( | |
1765 | + | @Callable(eV) | |
1766 | + | func evaluateGetREADONLY (ih,ii) = { | |
1767 | + | let dY = dl("", ih, ii, this) | |
1768 | + | let dE = dY._1 | |
1769 | + | let dF = dY._2 | |
1770 | + | let du = dY._5 | |
1771 | + | let dw = dY._6 | |
1772 | + | let dt = dY._7 | |
1773 | + | let dz = dY._8 | |
1774 | + | let ds = parseIntValue(dY._9) | |
1775 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(dE), toString(dF), toString(du), toString(dw), toString(dt), toString(dz), toString(ds)], j)) | |
1770 | 1776 | } | |
1771 | 1777 | ||
1772 | 1778 | ||
1773 | - | @Verifier( | |
1774 | - | func | |
1775 | - | let | |
1776 | - | let | |
1777 | - | if ($isInstanceOf( | |
1779 | + | @Verifier(ij) | |
1780 | + | func ik () = { | |
1781 | + | let il = { | |
1782 | + | let bV = gh() | |
1783 | + | if ($isInstanceOf(bV, "ByteVector")) | |
1778 | 1784 | then { | |
1779 | - | let | |
1780 | - | | |
1785 | + | let gl = bV | |
1786 | + | gl | |
1781 | 1787 | } | |
1782 | - | else if ($isInstanceOf( | |
1783 | - | then | |
1788 | + | else if ($isInstanceOf(bV, "Unit")) | |
1789 | + | then ij.senderPublicKey | |
1784 | 1790 | else throw("Match error") | |
1785 | 1791 | } | |
1786 | - | let | |
1787 | - | if ($isInstanceOf( | |
1792 | + | let bV = ij | |
1793 | + | if ($isInstanceOf(bV, "Order")) | |
1788 | 1794 | then { | |
1789 | - | let eH = bT | |
1790 | - | let ij = aZ() | |
1791 | - | let ik = eG(eH) | |
1792 | - | let aI = ik._1 | |
1793 | - | let aJ = ik._2 | |
1794 | - | let aK = sigVerify(eH.bodyBytes, eH.proofs[0], eH.senderPublicKey) | |
1795 | - | let aL = sigVerify(eH.bodyBytes, eH.proofs[1], ij) | |
1796 | - | if (if (if (aI) | |
1797 | - | then aK | |
1795 | + | let eK = bV | |
1796 | + | let im = bb() | |
1797 | + | let in = if (eG()) | |
1798 | + | then $Tuple2(true, "") | |
1799 | + | else eJ(eK) | |
1800 | + | let aK = in._1 | |
1801 | + | let aL = in._2 | |
1802 | + | let aM = sigVerify(eK.bodyBytes, eK.proofs[0], eK.senderPublicKey) | |
1803 | + | let aN = sigVerify(eK.bodyBytes, eK.proofs[1], im) | |
1804 | + | if (if (if (aK) | |
1805 | + | then aM | |
1798 | 1806 | else false) | |
1799 | - | then | |
1807 | + | then aN | |
1800 | 1808 | else false) | |
1801 | 1809 | then true | |
1802 | - | else | |
1810 | + | else aJ(aK, aL, aM, aN) | |
1803 | 1811 | } | |
1804 | - | else if ($isInstanceOf( | |
1812 | + | else if ($isInstanceOf(bV, "SetScriptTransaction")) | |
1805 | 1813 | then { | |
1806 | - | let | |
1807 | - | if (sigVerify( | |
1814 | + | let gi = bV | |
1815 | + | if (sigVerify(ij.bodyBytes, ij.proofs[0], il)) | |
1808 | 1816 | then true | |
1809 | 1817 | else { | |
1810 | - | let | |
1811 | - | let | |
1812 | - | let | |
1813 | - | if (( | |
1814 | - | then ( | |
1818 | + | let io = blake2b256(value(gi.script)) | |
1819 | + | let ip = fromBase64String(value(getString(aV, aF()))) | |
1820 | + | let iq = scriptHash(this) | |
1821 | + | if ((ip == io)) | |
1822 | + | then (iq != io) | |
1815 | 1823 | else false | |
1816 | 1824 | } | |
1817 | 1825 | } | |
1818 | - | else sigVerify( | |
1826 | + | else sigVerify(ij.bodyBytes, ij.proofs[0], il) | |
1819 | 1827 | } | |
1820 | 1828 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = 8 | |
5 | 5 | ||
6 | 6 | let b = 100000000 | |
7 | 7 | ||
8 | 8 | let c = toBigInt(100000000) | |
9 | 9 | ||
10 | 10 | let d = toBigInt(1000000000000000000) | |
11 | 11 | ||
12 | 12 | let e = toBigInt(0) | |
13 | 13 | ||
14 | 14 | let f = toBigInt(0) | |
15 | 15 | ||
16 | 16 | let g = toBigInt(1) | |
17 | 17 | ||
18 | 18 | let h = toBigInt(2) | |
19 | 19 | ||
20 | 20 | let i = "WAVES" | |
21 | 21 | ||
22 | 22 | let j = "__" | |
23 | 23 | ||
24 | 24 | let k = 1 | |
25 | 25 | ||
26 | 26 | let l = 2 | |
27 | 27 | ||
28 | 28 | let m = 3 | |
29 | 29 | ||
30 | 30 | let n = 4 | |
31 | 31 | ||
32 | 32 | let o = 1 | |
33 | 33 | ||
34 | 34 | let p = 2 | |
35 | 35 | ||
36 | 36 | let q = 3 | |
37 | 37 | ||
38 | 38 | let r = 4 | |
39 | 39 | ||
40 | 40 | let s = 5 | |
41 | 41 | ||
42 | 42 | let t = 6 | |
43 | 43 | ||
44 | 44 | let u = 7 | |
45 | 45 | ||
46 | 46 | let v = 8 | |
47 | 47 | ||
48 | 48 | let w = 9 | |
49 | 49 | ||
50 | 50 | let x = 10 | |
51 | 51 | ||
52 | 52 | let y = 1 | |
53 | 53 | ||
54 | 54 | let z = 2 | |
55 | 55 | ||
56 | 56 | let A = 3 | |
57 | 57 | ||
58 | 58 | let B = 1 | |
59 | 59 | ||
60 | 60 | let C = 7 | |
61 | 61 | ||
62 | 62 | func D (E,F) = fraction(toBigInt(E), d, toBigInt(F)) | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | func G (E,F) = fraction(E, d, F) | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | func H (I,J) = toInt(fraction(I, toBigInt(J), d)) | |
69 | 69 | ||
70 | 70 | ||
71 | 71 | func K (I,J,L) = toInt(fraction(I, toBigInt(J), d, L)) | |
72 | 72 | ||
73 | 73 | ||
74 | 74 | func M (N,O,P) = fraction(N, O, P) | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | func Q (I) = if ((0 > I)) | |
78 | 78 | then -(I) | |
79 | 79 | else I | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | func R (I) = if ((e > I)) | |
83 | 83 | then -(I) | |
84 | 84 | else I | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func S () = "%s__swapContract" | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func T () = "%s__factoryContract" | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | func U () = "%s__managerPublicKey" | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | func V () = "%s__pendingManagerPublicKey" | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | func W () = "%s%s__price__last" | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func X (Y,Z) = makeString(["%s%s%d%d__price__history", toString(Y), toString(Z)], j) | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func aa (ab,ac) = ((("%s%s%s__P__" + ab) + "__") + ac) | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | func ad (ab,ac) = ((("%s%s%s__G__" + ab) + "__") + ac) | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | func ae () = "%s__amountAsset" | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | func af () = "%s__priceAsset" | |
115 | 115 | ||
116 | 116 | ||
117 | 117 | let ag = "%s__fee" | |
118 | 118 | ||
119 | 119 | let ah = fraction(10, b, 10000) | |
120 | 120 | ||
121 | 121 | let ai = valueOrElse(getInteger(this, ag), ah) | |
122 | 122 | ||
123 | 123 | let aj = makeString(["%s", "kLp"], j) | |
124 | 124 | ||
125 | 125 | let ak = makeString(["%s", "kLpRefreshedHeight"], j) | |
126 | 126 | ||
127 | 127 | let al = makeString(["%s", "refreshKLpDelay"], j) | |
128 | 128 | ||
129 | 129 | let am = 30 | |
130 | 130 | ||
131 | 131 | let an = valueOrElse(getInteger(this, al), am) | |
132 | 132 | ||
133 | 133 | func ao (ap) = makeString(["%s%s", "stakedBalance", ap], j) | |
134 | 134 | ||
135 | 135 | ||
136 | 136 | func aq (ap) = makeString(["%s%s", "shareAssetBalance", ap], j) | |
137 | 137 | ||
138 | 138 | ||
139 | 139 | func ar (ap) = valueOrElse(getInteger(this, ao(ap)), 0) | |
140 | 140 | ||
141 | 141 | ||
142 | 142 | func as (ap) = valueOrElse(getInteger(this, aq(ap)), 0) | |
143 | 143 | ||
144 | 144 | ||
145 | 145 | func at () = "%s__factoryConfig" | |
146 | 146 | ||
147 | 147 | ||
148 | 148 | func au () = "%s%s__matcher__publicKey" | |
149 | 149 | ||
150 | 150 | ||
151 | 151 | func av (aw) = (("%s%s%s__" + aw) + "__mappings__poolContract2LpAsset") | |
152 | 152 | ||
153 | 153 | ||
154 | 154 | func ax (ay,az) = (((("%d%d%s__" + ay) + "__") + az) + "__config") | |
155 | 155 | ||
156 | 156 | ||
157 | 157 | func aA (aB) = ("%s%s%s__mappings__baseAsset2internalId__" + aB) | |
158 | 158 | ||
159 | 159 | ||
160 | 160 | func aC () = "%s__shutdown" | |
161 | 161 | ||
162 | 162 | ||
163 | 163 | func aD (aE) = ("%s%s__poolWeight__" + aE) | |
164 | 164 | ||
165 | 165 | ||
166 | 166 | func aF () = "%s__allowedLpScriptHash" | |
167 | 167 | ||
168 | 168 | ||
169 | 169 | let aG = "%s__feeCollectorAddress" | |
170 | 170 | ||
171 | - | func aH (aI | |
171 | + | func aH (aI) = ("%s%s__skipOrderValidation__" + aI) | |
172 | 172 | ||
173 | 173 | ||
174 | - | func | |
174 | + | func aJ (aK,aL,aM,aN) = throw((((((((("order validation failed: orderValid=" + toString(aK)) + " (") + aL) + ")") + " senderValid=") + toString(aM)) + " matcherValid=") + toString(aN))) | |
175 | 175 | ||
176 | 176 | ||
177 | - | func | |
177 | + | func aO (aP,aQ) = valueOrErrorMessage(getString(aP, aQ), makeString(["mandatory ", toString(aP), ".", aQ, " is not defined"], "")) | |
178 | 178 | ||
179 | 179 | ||
180 | - | func | |
180 | + | func aR (aP,aQ) = valueOrErrorMessage(getInteger(aP, aQ), makeString(["mandatory ", toString(aP), ".", aQ, " is not defined"], "")) | |
181 | 181 | ||
182 | 182 | ||
183 | - | func aS ( | |
183 | + | func aS (aT) = throw(makeString(["lp.ride:", aT], " ")) | |
184 | 184 | ||
185 | 185 | ||
186 | - | ||
186 | + | func aU (aT) = makeString(["lp.ride:", aT], " ") | |
187 | 187 | ||
188 | - | let aU = addressFromStringValue(aM(aT, aG)) | |
189 | 188 | ||
190 | - | let aV = { | |
191 | - | let aW = invoke(aT, "getInFeeREADONLY", [toString(this)], nil) | |
192 | - | if ($isInstanceOf(aW, "Int")) | |
193 | - | then aW | |
194 | - | else throw(($getType(aW) + " couldn't be cast to Int")) | |
189 | + | let aV = addressFromStringValue(aO(this, T())) | |
190 | + | ||
191 | + | let aW = addressFromStringValue(aO(aV, aG)) | |
192 | + | ||
193 | + | let aX = { | |
194 | + | let aY = invoke(aV, "getInFeeREADONLY", [toString(this)], nil) | |
195 | + | if ($isInstanceOf(aY, "Int")) | |
196 | + | then aY | |
197 | + | else throw(($getType(aY) + " couldn't be cast to Int")) | |
195 | 198 | } | |
196 | 199 | ||
197 | - | let | |
198 | - | let | |
199 | - | if ($isInstanceOf( | |
200 | - | then | |
201 | - | else throw(($getType( | |
200 | + | let aZ = { | |
201 | + | let aY = invoke(aV, "getOutFeeREADONLY", [toString(this)], nil) | |
202 | + | if ($isInstanceOf(aY, "Int")) | |
203 | + | then aY | |
204 | + | else throw(($getType(aY) + " couldn't be cast to Int")) | |
202 | 205 | } | |
203 | 206 | ||
204 | - | func | |
207 | + | func ba () = valueOrElse(getBoolean(aV, aC()), false) | |
205 | 208 | ||
206 | 209 | ||
207 | - | func | |
210 | + | func bb () = fromBase58String(aO(aV, au())) | |
208 | 211 | ||
209 | 212 | ||
210 | - | func | |
211 | - | let | |
212 | - | let | |
213 | - | let az = | |
214 | - | let ay = | |
215 | - | split( | |
213 | + | func bc () = { | |
214 | + | let bd = aO(this, ae()) | |
215 | + | let be = aO(this, af()) | |
216 | + | let az = aR(aV, aA(be)) | |
217 | + | let ay = aR(aV, aA(bd)) | |
218 | + | split(aO(aV, ax(toString(ay), toString(az))), j) | |
216 | 219 | } | |
217 | 220 | ||
218 | 221 | ||
219 | - | func | |
222 | + | func bf (bg) = if ((bg == i)) | |
220 | 223 | then unit | |
221 | - | else fromBase58String( | |
224 | + | else fromBase58String(bg) | |
222 | 225 | ||
223 | 226 | ||
224 | - | func | |
227 | + | func bh (bg) = if ((bg == unit)) | |
225 | 228 | then i | |
226 | - | else toBase58String(value( | |
229 | + | else toBase58String(value(bg)) | |
227 | 230 | ||
228 | 231 | ||
229 | - | func | |
232 | + | func bi (bj) = $Tuple7(addressFromStringValue(bj[o]), parseIntValue(bj[p]), fromBase58String(bj[q]), bf(bj[r]), bf(bj[s]), parseIntValue(bj[t]), parseIntValue(bj[u])) | |
230 | 233 | ||
231 | 234 | ||
232 | - | let | |
235 | + | let bk = bi(bc()) | |
233 | 236 | ||
234 | - | let | |
237 | + | let bl = bk | |
235 | 238 | ||
236 | - | let | |
239 | + | let bm = bl._1 | |
237 | 240 | ||
238 | - | let | |
241 | + | let bn = bl._2 | |
239 | 242 | ||
240 | - | let | |
243 | + | let bo = bl._3 | |
241 | 244 | ||
242 | - | let | |
245 | + | let bp = bl._4 | |
243 | 246 | ||
244 | - | let | |
247 | + | let bq = bl._5 | |
245 | 248 | ||
246 | - | let | |
249 | + | let br = bl._6 | |
247 | 250 | ||
248 | - | let | |
251 | + | let bs = bl._7 | |
249 | 252 | ||
250 | - | func | |
253 | + | func bt () = split(aO(aV, at()), j) | |
251 | 254 | ||
252 | 255 | ||
253 | - | let | |
256 | + | let bu = valueOrErrorMessage(addressFromString(bt()[B]), "incorrect staking address") | |
254 | 257 | ||
255 | - | let | |
258 | + | let bv = valueOrErrorMessage(addressFromString(bt()[C]), "incorrect staking address") | |
256 | 259 | ||
257 | - | func | |
260 | + | func bw (bx,by,bz,bA,bB,bC,bD,bE,bF,bG) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bx), toString(by), toString(bz), toString(bA), toString(bB), toString(bC), toString(bD), toString(bE), toString(bF), toString(bG)], j) | |
258 | 261 | ||
259 | 262 | ||
260 | - | func | |
263 | + | func bH (bI,bJ,bK,bA,bD,bE) = makeString(["%d%d%d%d%d%d", toString(bI), toString(bJ), toString(bK), toString(bA), toString(bD), toString(bE)], j) | |
261 | 264 | ||
262 | 265 | ||
263 | - | func | |
264 | - | let | |
266 | + | func bL (ap) = { | |
267 | + | let bM = if ((ap == "WAVES")) | |
265 | 268 | then wavesBalance(this).available | |
266 | 269 | else assetBalance(this, fromBase58String(ap)) | |
267 | - | let | |
268 | - | max([0, | |
270 | + | let bN = ((bM + ar(ap)) - as(ap)) | |
271 | + | max([0, bN]) | |
269 | 272 | } | |
270 | 273 | ||
271 | 274 | ||
272 | - | func | |
275 | + | func bO (bP,bQ) = fraction(bP, d, bQ) | |
273 | 276 | ||
274 | 277 | ||
275 | - | func | |
278 | + | func bR (bP,bQ,L) = fraction(bP, d, bQ, L) | |
276 | 279 | ||
277 | 280 | ||
278 | - | func | |
279 | - | let | |
280 | - | if (( | |
281 | + | func bS (bT) = { | |
282 | + | let bU = invoke(bT, "getRate", nil, nil) | |
283 | + | if ((bU == bU)) | |
281 | 284 | then { | |
282 | - | let | |
283 | - | if ($isInstanceOf( | |
285 | + | let bV = bU | |
286 | + | if ($isInstanceOf(bV, "Int")) | |
284 | 287 | then { | |
285 | - | let | |
286 | - | | |
288 | + | let bW = bV | |
289 | + | bW | |
287 | 290 | } | |
288 | - | else | |
291 | + | else aS("proxy.getRate() unexpected value") | |
289 | 292 | } | |
290 | 293 | else throw("Strict value is not equal to itself.") | |
291 | 294 | } | |
292 | 295 | ||
293 | 296 | ||
294 | - | func | |
295 | - | let | |
296 | - | if (( | |
297 | + | func bX (ap,bY,bZ,bT) = { | |
298 | + | let ca = ar(ap) | |
299 | + | if ((ca == ca)) | |
297 | 300 | then { | |
298 | - | let | |
299 | - | if (( | |
301 | + | let cb = as(bZ) | |
302 | + | if ((cb == cb)) | |
300 | 303 | then { | |
301 | - | let | |
302 | - | if (( | |
304 | + | let cc = bf(ap) | |
305 | + | if ((bY > 0)) | |
303 | 306 | then { | |
304 | - | let | |
305 | - | if (( | |
307 | + | let cd = invoke(bT, "deposit", nil, [AttachedPayment(cc, bY)]) | |
308 | + | if ((cd == cd)) | |
306 | 309 | then { | |
307 | - | let | |
308 | - | if ($isInstanceOf( | |
310 | + | let bV = cd | |
311 | + | if ($isInstanceOf(bV, "Int")) | |
309 | 312 | then { | |
310 | - | let | |
311 | - | let | |
312 | - | let | |
313 | - | [IntegerEntry(ao(ap), | |
313 | + | let ce = bV | |
314 | + | let cf = (ca + bY) | |
315 | + | let cg = (cb + ce) | |
316 | + | [IntegerEntry(ao(ap), cf), IntegerEntry(aq(bZ), cg)] | |
314 | 317 | } | |
315 | 318 | else nil | |
316 | 319 | } | |
317 | 320 | else throw("Strict value is not equal to itself.") | |
318 | 321 | } | |
319 | 322 | else nil | |
320 | 323 | } | |
321 | 324 | else throw("Strict value is not equal to itself.") | |
322 | 325 | } | |
323 | 326 | else throw("Strict value is not equal to itself.") | |
324 | 327 | } | |
325 | 328 | ||
326 | 329 | ||
327 | - | func | |
328 | - | let | |
329 | - | if (( | |
330 | + | func ch (ap,bY,bZ,bT,ci,cj) = { | |
331 | + | let ca = ar(ap) | |
332 | + | if ((ca == ca)) | |
330 | 333 | then { | |
331 | - | let | |
332 | - | if (( | |
334 | + | let cb = as(bZ) | |
335 | + | if ((cb == cb)) | |
333 | 336 | then { | |
334 | - | let | |
335 | - | if (( | |
337 | + | let ck = bS(bT) | |
338 | + | if ((ck == ck)) | |
336 | 339 | then { | |
337 | - | let | |
338 | - | let | |
339 | - | let | |
340 | - | let | |
341 | - | let | |
342 | - | if (( | |
340 | + | let cl = fraction(ci, ca, cb) | |
341 | + | let cm = bf(bZ) | |
342 | + | let cn = fraction(ci, bY, cl) | |
343 | + | let co = fraction(ci, bY, ck) | |
344 | + | let cp = max([0, (cn - co)]) | |
345 | + | if ((co > 0)) | |
343 | 346 | then { | |
344 | - | let | |
345 | - | if (( | |
347 | + | let cq = invoke(bT, "withdraw", nil, [AttachedPayment(cm, co)]) | |
348 | + | if ((cq == cq)) | |
346 | 349 | then { | |
347 | - | let | |
348 | - | if ($isInstanceOf( | |
350 | + | let bV = cq | |
351 | + | if ($isInstanceOf(bV, "Int")) | |
349 | 352 | then { | |
350 | - | let | |
351 | - | let | |
352 | - | let | |
353 | - | [IntegerEntry(ao(ap), | |
353 | + | let cr = bV | |
354 | + | let cf = (ca - cr) | |
355 | + | let cg = ((cb - co) - cp) | |
356 | + | [IntegerEntry(ao(ap), cf), IntegerEntry(aq(bZ), cg), ScriptTransfer(cj, cp, bf(bZ))] | |
354 | 357 | } | |
355 | 358 | else nil | |
356 | 359 | } | |
357 | 360 | else throw("Strict value is not equal to itself.") | |
358 | 361 | } | |
359 | 362 | else nil | |
360 | 363 | } | |
361 | 364 | else throw("Strict value is not equal to itself.") | |
362 | 365 | } | |
363 | 366 | else throw("Strict value is not equal to itself.") | |
364 | 367 | } | |
365 | 368 | else throw("Strict value is not equal to itself.") | |
366 | 369 | } | |
367 | 370 | ||
368 | 371 | ||
369 | - | func | |
370 | - | let | |
371 | - | if ($isInstanceOf( | |
372 | + | func cs (ap) = { | |
373 | + | let bV = invoke(aV, "getPoolLeaseConfigREADONLY", [toString(this), ap], nil) | |
374 | + | if ($isInstanceOf(bV, "(Boolean, Int, Int, String, String, Int, String)")) | |
372 | 375 | then { | |
373 | - | let | |
374 | - | | |
376 | + | let ct = bV | |
377 | + | ct | |
375 | 378 | } | |
376 | - | else | |
379 | + | else aS((("[" + ap) + "] getLeaseProxyConfig() error")) | |
377 | 380 | } | |
378 | 381 | ||
379 | 382 | ||
380 | - | func | |
381 | - | let | |
382 | - | if (( | |
383 | + | func cu (cv,ap,bZ,cw,bT,ci,cj) = { | |
384 | + | let ca = ar(ap) | |
385 | + | if ((ca == ca)) | |
383 | 386 | then { | |
384 | - | let | |
385 | - | if (( | |
387 | + | let cb = as(bZ) | |
388 | + | if ((cb == cb)) | |
386 | 389 | then { | |
387 | - | let | |
388 | - | let | |
389 | - | let | |
390 | - | if (( | |
390 | + | let cx = max([0, (bL(ap) - cw)]) | |
391 | + | let cy = fraction(cv, cx, 100) | |
392 | + | let cz = (ca - cy) | |
393 | + | if ((cz == 0)) | |
391 | 394 | then nil | |
392 | - | else if ((0 > | |
395 | + | else if ((0 > cz)) | |
393 | 396 | then { | |
394 | - | let | |
395 | - | | |
397 | + | let cA = -(cz) | |
398 | + | bX(ap, cA, bZ, bT) | |
396 | 399 | } | |
397 | 400 | else { | |
398 | - | let | |
399 | - | | |
401 | + | let cB = cz | |
402 | + | ch(ap, cB, bZ, bT, ci, cj) | |
400 | 403 | } | |
401 | 404 | } | |
402 | 405 | else throw("Strict value is not equal to itself.") | |
403 | 406 | } | |
404 | 407 | else throw("Strict value is not equal to itself.") | |
405 | 408 | } | |
406 | 409 | ||
407 | 410 | ||
408 | - | func | |
409 | - | let | |
410 | - | let | |
411 | - | let | |
412 | - | let | |
413 | - | let | |
414 | - | let | |
415 | - | let | |
416 | - | let | |
417 | - | if ( | |
418 | - | then | |
411 | + | func cC (ap) = { | |
412 | + | let cD = cs(ap) | |
413 | + | let cE = cD._1 | |
414 | + | let cF = cD._2 | |
415 | + | let cw = cD._3 | |
416 | + | let cG = cD._4 | |
417 | + | let cH = cD._5 | |
418 | + | let ci = cD._6 | |
419 | + | let cI = cD._7 | |
420 | + | if (cE) | |
421 | + | then cu(cF, ap, cH, cw, addressFromStringValue(cG), ci, addressFromStringValue(cI)) | |
419 | 422 | else nil | |
420 | 423 | } | |
421 | 424 | ||
422 | 425 | ||
423 | - | func | |
424 | - | let | |
425 | - | let | |
426 | - | let | |
427 | - | let | |
428 | - | let | |
429 | - | let | |
430 | - | let | |
431 | - | let | |
432 | - | if ( | |
426 | + | func cJ (ap,cK) = { | |
427 | + | let cL = cs(ap) | |
428 | + | let cE = cL._1 | |
429 | + | let cF = cL._2 | |
430 | + | let cw = cL._3 | |
431 | + | let cG = cL._4 | |
432 | + | let cH = cL._5 | |
433 | + | let ci = cL._6 | |
434 | + | let cI = cL._7 | |
435 | + | if (cE) | |
433 | 436 | then { | |
434 | - | let | |
435 | - | if (( | |
437 | + | let cM = max([0, ((bL(ap) - cK) - cw)]) | |
438 | + | if ((cM == cM)) | |
436 | 439 | then { | |
437 | - | let | |
438 | - | if (( | |
440 | + | let cf = fraction(cF, cM, 100) | |
441 | + | if ((cf == cf)) | |
439 | 442 | then { | |
440 | - | let | |
441 | - | if (( | |
442 | - | then if ((0 > | |
443 | - | then | |
444 | - | else | |
443 | + | let cN = (ar(ap) - cf) | |
444 | + | if ((cN == cN)) | |
445 | + | then if ((0 > cN)) | |
446 | + | then bX(ap, -(cN), cH, addressFromStringValue(cG)) | |
447 | + | else ch(ap, cN, cH, addressFromStringValue(cG), ci, addressFromStringValue(cI)) | |
445 | 448 | else throw("Strict value is not equal to itself.") | |
446 | 449 | } | |
447 | 450 | else throw("Strict value is not equal to itself.") | |
448 | 451 | } | |
449 | 452 | else throw("Strict value is not equal to itself.") | |
450 | 453 | } | |
451 | 454 | else nil | |
452 | 455 | } | |
453 | 456 | ||
454 | 457 | ||
455 | - | func | |
456 | - | let | |
457 | - | let | |
458 | - | ( | |
458 | + | func cO (cP,cQ) = { | |
459 | + | let cR = cJ(aO(this, ae()), cP) | |
460 | + | let cS = cJ(aO(this, af()), cQ) | |
461 | + | (cR ++ cS) | |
459 | 462 | } | |
460 | 463 | ||
461 | 464 | ||
462 | - | func | |
463 | - | let | |
464 | - | let | |
465 | - | | |
465 | + | func cT (cU,cV,cW,cX) = { | |
466 | + | let cY = D(cW, cU) | |
467 | + | let cZ = D(cX, cV) | |
468 | + | bO(cZ, cY) | |
466 | 469 | } | |
467 | 470 | ||
468 | 471 | ||
469 | - | func | |
470 | - | let | |
471 | - | let | |
472 | - | let | |
473 | - | let | |
474 | - | let | |
475 | - | let | |
476 | - | let | |
477 | - | let | |
478 | - | let | |
479 | - | [ | |
472 | + | func da (cW,cX,db) = { | |
473 | + | let dc = bc() | |
474 | + | let dd = parseIntValue(dc[t]) | |
475 | + | let de = parseIntValue(dc[u]) | |
476 | + | let df = cT(dd, de, cW, cX) | |
477 | + | let bQ = D(cW, dd) | |
478 | + | let bP = D(cX, de) | |
479 | + | let dg = D(db, b) | |
480 | + | let dh = bO(bQ, dg) | |
481 | + | let di = bO(bP, dg) | |
482 | + | [df, dh, di] | |
480 | 483 | } | |
481 | 484 | ||
482 | 485 | ||
483 | - | func | |
484 | - | let | |
485 | - | [H( | |
486 | + | func dj (cW,cX,db) = { | |
487 | + | let dk = da(cW, cX, db) | |
488 | + | [H(dk[0], b), H(dk[1], b), H(dk[2], b)] | |
486 | 489 | } | |
487 | 490 | ||
488 | 491 | ||
489 | - | func | |
490 | - | let | |
491 | - | let | |
492 | - | let | |
493 | - | let | |
494 | - | let | |
495 | - | let | |
496 | - | let | |
497 | - | let | |
498 | - | if (( | |
492 | + | func dl (dm,dn,do,ab) = { | |
493 | + | let dc = bc() | |
494 | + | let dp = dc[q] | |
495 | + | let dq = dc[r] | |
496 | + | let dr = dc[s] | |
497 | + | let cU = parseIntValue(dc[t]) | |
498 | + | let cV = parseIntValue(dc[u]) | |
499 | + | let ds = dc[p] | |
500 | + | let dt = valueOrErrorMessage(assetInfo(fromBase58String(dp)), (("Asset " + dp) + " doesn't exist")).quantity | |
501 | + | if ((dp != dn)) | |
499 | 502 | then throw("Invalid asset passed.") | |
500 | 503 | else { | |
501 | - | let | |
502 | - | let | |
503 | - | let | |
504 | - | let | |
505 | - | let | |
506 | - | let | |
507 | - | let | |
508 | - | let | |
509 | - | let | |
510 | - | let | |
511 | - | let | |
512 | - | let | |
513 | - | let | |
504 | + | let du = bL(dq) | |
505 | + | let dv = D(du, cU) | |
506 | + | let dw = bL(dr) | |
507 | + | let dx = D(dw, cV) | |
508 | + | let dy = bO(dx, dv) | |
509 | + | let dz = H(dy, b) | |
510 | + | let dA = D(do, b) | |
511 | + | let dB = D(dt, b) | |
512 | + | let dC = fraction(dv, dA, dB) | |
513 | + | let dD = fraction(dx, dA, dB) | |
514 | + | let dE = K(dC, cU, FLOOR) | |
515 | + | let dF = K(dD, cV, FLOOR) | |
516 | + | let dG = if ((dm == "")) | |
514 | 517 | then nil | |
515 | - | else [ScriptTransfer(ab, | |
518 | + | else [ScriptTransfer(ab, dE, if ((dq == "WAVES")) | |
516 | 519 | then unit | |
517 | - | else fromBase58String( | |
520 | + | else fromBase58String(dq)), ScriptTransfer(ab, dF, if ((dr == "WAVES")) | |
518 | 521 | then unit | |
519 | - | else fromBase58String( | |
520 | - | $Tuple10( | |
522 | + | else fromBase58String(dr)), StringEntry(ad(toString(ab), dm), bH(dE, dF, do, dz, height, lastBlock.timestamp)), IntegerEntry(W(), dz), IntegerEntry(X(height, lastBlock.timestamp), dz)] | |
523 | + | $Tuple10(dE, dF, dq, dr, du, dw, dt, dy, ds, dG) | |
521 | 524 | } | |
522 | 525 | } | |
523 | 526 | ||
524 | 527 | ||
525 | - | func | |
526 | - | let | |
527 | - | let | |
528 | - | let | |
529 | - | let | |
530 | - | let | |
531 | - | let | |
532 | - | let | |
533 | - | let | |
534 | - | let | |
535 | - | let | |
536 | - | let | |
537 | - | let | |
538 | - | if (if (( | |
528 | + | func dH (dm,dI,dJ,dK,dL,dM,ab,dN,dO) = { | |
529 | + | let dc = bc() | |
530 | + | let dp = fromBase58String(dc[q]) | |
531 | + | let dP = dc[r] | |
532 | + | let dQ = dc[s] | |
533 | + | let dR = dc[v] | |
534 | + | let dS = dc[w] | |
535 | + | let dd = parseIntValue(dc[t]) | |
536 | + | let de = parseIntValue(dc[u]) | |
537 | + | let ds = dc[p] | |
538 | + | let dt = valueOrErrorMessage(assetInfo(dp), (("Asset " + toBase58String(dp)) + " doesn't exist")).quantity | |
539 | + | let dT = toBase58String(valueOrElse(dK, fromBase58String("WAVES"))) | |
540 | + | let dU = toBase58String(valueOrElse(dM, fromBase58String("WAVES"))) | |
541 | + | if (if ((dP != dT)) | |
539 | 542 | then true | |
540 | - | else ( | |
543 | + | else (dQ != dU)) | |
541 | 544 | then throw("Invalid amt or price asset passed.") | |
542 | 545 | else { | |
543 | - | let | |
544 | - | then | |
545 | - | else ( | |
546 | - | let | |
547 | - | then | |
548 | - | else ( | |
549 | - | let | |
550 | - | let | |
551 | - | let | |
552 | - | let | |
553 | - | let | |
554 | - | let | |
546 | + | let du = if (dN) | |
547 | + | then bL(dP) | |
548 | + | else (bL(dP) - dJ) | |
549 | + | let dw = if (dN) | |
550 | + | then bL(dQ) | |
551 | + | else (bL(dQ) - dL) | |
552 | + | let dV = D(dJ, dd) | |
553 | + | let dW = D(dL, de) | |
554 | + | let dX = bO(dW, dV) | |
555 | + | let dv = D(du, dd) | |
556 | + | let dx = D(dw, de) | |
557 | + | let dY = if ((dt == 0)) | |
555 | 558 | then { | |
556 | - | let | |
557 | - | let | |
558 | - | let | |
559 | - | $Tuple5(H( | |
559 | + | let dy = e | |
560 | + | let dZ = e | |
561 | + | let dg = pow((dV * dW), 0, toBigInt(5), 1, 0, DOWN) | |
562 | + | $Tuple5(H(dg, b), H(dV, dd), H(dW, de), bO((dx + dW), (dv + dV)), dZ) | |
560 | 563 | } | |
561 | 564 | else { | |
562 | - | let | |
563 | - | let | |
564 | - | let | |
565 | - | if (if (( | |
566 | - | then ( | |
565 | + | let dy = bO(dx, dv) | |
566 | + | let dZ = fraction(R((dy - dX)), d, dy) | |
567 | + | let ea = D(dI, b) | |
568 | + | if (if ((dy != e)) | |
569 | + | then (dZ > ea) | |
567 | 570 | else false) | |
568 | - | then throw(((("Price slippage " + toString( | |
571 | + | then throw(((("Price slippage " + toString(dZ)) + " exceeded the passed limit of ") + toString(ea))) | |
569 | 572 | else { | |
570 | - | let | |
571 | - | let | |
572 | - | let | |
573 | - | let | |
574 | - | then $Tuple2( | |
575 | - | else $Tuple2( | |
576 | - | let | |
577 | - | let | |
578 | - | let | |
579 | - | $Tuple5(K( | |
573 | + | let dB = D(dt, b) | |
574 | + | let eb = fraction(dV, bR(dx, dv, CEILING), d, CEILING) | |
575 | + | let ec = fraction(dW, d, bR(dx, dv, FLOOR), CEILING) | |
576 | + | let ed = if ((eb > dW)) | |
577 | + | then $Tuple2(ec, dW) | |
578 | + | else $Tuple2(dV, eb) | |
579 | + | let ee = ed._1 | |
580 | + | let ef = ed._2 | |
581 | + | let dg = fraction(dB, ef, dx, FLOOR) | |
582 | + | $Tuple5(K(dg, b, FLOOR), K(ee, dd, CEILING), K(ef, de, CEILING), dy, dZ) | |
580 | 583 | } | |
581 | 584 | } | |
582 | - | let | |
583 | - | let | |
584 | - | let | |
585 | - | let | |
586 | - | let | |
587 | - | if ((0 >= | |
585 | + | let eg = dY._1 | |
586 | + | let eh = dY._2 | |
587 | + | let ei = dY._3 | |
588 | + | let dz = H(dY._4, b) | |
589 | + | let ej = H(dY._5, b) | |
590 | + | if ((0 >= eg)) | |
588 | 591 | then throw("Invalid calculations. LP calculated is less than zero.") | |
589 | 592 | else { | |
590 | - | let | |
593 | + | let ek = if (!(dO)) | |
591 | 594 | then 0 | |
592 | - | else | |
593 | - | let | |
594 | - | let | |
595 | - | let | |
596 | - | $Tuple13( | |
595 | + | else eg | |
596 | + | let el = (dJ - eh) | |
597 | + | let em = (dL - ei) | |
598 | + | let en = [IntegerEntry(W(), dz), IntegerEntry(X(height, lastBlock.timestamp), dz), StringEntry(aa(ab, dm), bw(eh, ei, ek, dz, dI, ej, height, lastBlock.timestamp, el, em))] | |
599 | + | $Tuple13(eg, ek, dz, du, dw, dt, dp, ds, en, el, em, dK, dM) | |
597 | 600 | } | |
598 | 601 | } | |
599 | 602 | } | |
600 | 603 | ||
601 | 604 | ||
602 | - | func | |
603 | - | let | |
604 | - | let | |
605 | - | let | |
606 | - | if (( | |
605 | + | func eo (ep,eq,dt) = { | |
606 | + | let er = G(ep, toBigInt(br)) | |
607 | + | let es = G(eq, toBigInt(bs)) | |
608 | + | let et = fraction(pow((er * es), 0, toBigInt(5), 1, 18, DOWN), g, dt) | |
609 | + | if ((dt == f)) | |
607 | 610 | then f | |
608 | - | else | |
611 | + | else et | |
609 | 612 | } | |
610 | 613 | ||
611 | 614 | ||
612 | - | func | |
613 | - | let | |
614 | - | let | |
615 | - | let | |
616 | - | let | |
617 | - | | |
615 | + | func eu (ev,ew,ex) = { | |
616 | + | let ey = (toBigInt(bL(bh(bp))) - ev) | |
617 | + | let ez = (toBigInt(bL(bh(bq))) - ew) | |
618 | + | let eA = (toBigInt(value(assetInfo(bo)).quantity) - ex) | |
619 | + | let eB = eo(ey, ez, eA) | |
620 | + | eB | |
618 | 621 | } | |
619 | 622 | ||
620 | 623 | ||
621 | - | func | |
622 | - | let | |
623 | - | let | |
624 | - | let | |
625 | - | let | |
626 | - | let | |
627 | - | $Tuple2( | |
624 | + | func eC (eD,eE,ex) = { | |
625 | + | let ey = (bL(bh(bp)) + eD) | |
626 | + | let ez = (bL(bh(bq)) + eE) | |
627 | + | let eA = (value(assetInfo(bo)).quantity + ex) | |
628 | + | let et = eo(toBigInt(ey), toBigInt(ez), toBigInt(eA)) | |
629 | + | let eF = [IntegerEntry(ak, height), StringEntry(aj, toString(et))] | |
630 | + | $Tuple2(eF, et) | |
628 | 631 | } | |
629 | 632 | ||
630 | 633 | ||
631 | - | func eE (eF,er) = if ((er >= eF)) | |
632 | - | then true | |
633 | - | else aQ(makeString(["updated KLp lower than current KLp", toString(eF), toString(er)], " ")) | |
634 | + | func eG () = valueOrElse(getBoolean(aV, aH(toString(this))), false) | |
634 | 635 | ||
635 | 636 | ||
636 | - | func eG (eH) = { | |
637 | - | let ew = bJ(bf(bn)) | |
638 | - | let ex = bJ(bf(bo)) | |
639 | - | let eI = eH.amount | |
640 | - | let eJ = fraction(eH.amount, eH.price, b, FLOOR) | |
641 | - | let eK = if ((eH.orderType == Buy)) | |
642 | - | then $Tuple2(eI, -(eJ)) | |
643 | - | else $Tuple2(-(eI), eJ) | |
644 | - | let eB = eK._1 | |
645 | - | let eC = eK._2 | |
646 | - | if (if (if (aY()) | |
637 | + | func eH (eI,et) = if ((et >= eI)) | |
638 | + | then true | |
639 | + | else aS(makeString(["updated KLp lower than current KLp", toString(eI), toString(et)], " ")) | |
640 | + | ||
641 | + | ||
642 | + | func eJ (eK) = { | |
643 | + | let ey = bL(bh(bp)) | |
644 | + | let ez = bL(bh(bq)) | |
645 | + | let eL = eK.amount | |
646 | + | let eM = fraction(eK.amount, eK.price, b, FLOOR) | |
647 | + | let eN = if ((eK.orderType == Buy)) | |
648 | + | then $Tuple2(eL, -(eM)) | |
649 | + | else $Tuple2(-(eL), eM) | |
650 | + | let eD = eN._1 | |
651 | + | let eE = eN._2 | |
652 | + | if (if (if (ba()) | |
647 | 653 | then true | |
648 | - | else ( | |
654 | + | else (bn == m)) | |
649 | 655 | then true | |
650 | - | else ( | |
656 | + | else (bn == n)) | |
651 | 657 | then throw("Exchange operations disabled") | |
652 | - | else if (if (( | |
658 | + | else if (if ((eK.assetPair.amountAsset != bp)) | |
653 | 659 | then true | |
654 | - | else ( | |
660 | + | else (eK.assetPair.priceAsset != bq)) | |
655 | 661 | then throw("Wrong order assets.") | |
656 | 662 | else { | |
657 | - | let | |
658 | - | let | |
659 | - | let | |
660 | - | let | |
661 | - | let | |
662 | - | let | |
663 | - | $Tuple2( | |
663 | + | let eO = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, aj), "0")), aU("invalid kLp")) | |
664 | + | let eP = eC(eD, eE, 0) | |
665 | + | let eQ = eP._1 | |
666 | + | let eR = eP._2 | |
667 | + | let eS = (eR >= eO) | |
668 | + | let eT = makeString(["kLp=", toString(eO), " kLpNew=", toString(eR), " amountAssetBalance=", toString(ey), " priceAssetBalance=", toString(ez), " amountAssetBalanceDelta=", toString(eD), " priceAssetBalanceDelta=", toString(eE), " height=", toString(height)], "") | |
669 | + | $Tuple2(eS, eT) | |
664 | 670 | } | |
665 | 671 | } | |
666 | 672 | ||
667 | 673 | ||
668 | - | func | |
674 | + | func eU (eV) = if ((size(eV.payments) != 1)) | |
669 | 675 | then throw("exactly 1 payment is expected") | |
670 | 676 | else { | |
671 | - | let | |
672 | - | let | |
673 | - | let | |
674 | - | let | |
675 | - | let | |
676 | - | let | |
677 | - | let | |
678 | - | let | |
679 | - | if (if ( | |
677 | + | let eW = value(eV.payments[0]) | |
678 | + | let dn = value(eW.assetId) | |
679 | + | let eX = eW.amount | |
680 | + | let dY = dl(toBase58String(eV.transactionId), toBase58String(dn), eX, eV.caller) | |
681 | + | let dE = dY._1 | |
682 | + | let dF = dY._2 | |
683 | + | let ds = parseIntValue(dY._9) | |
684 | + | let dG = dY._10 | |
685 | + | if (if (ba()) | |
680 | 686 | then true | |
681 | - | else ( | |
682 | - | then throw(("Get operation is blocked by admin. Status = " + toString( | |
683 | - | else $Tuple5( | |
687 | + | else (ds == n)) | |
688 | + | then throw(("Get operation is blocked by admin. Status = " + toString(ds))) | |
689 | + | else $Tuple5(dE, dF, eX, dn, dG) | |
684 | 690 | } | |
685 | 691 | ||
686 | 692 | ||
687 | - | func | |
693 | + | func eY (eV,dI,dO) = if ((size(eV.payments) != 2)) | |
688 | 694 | then throw("exactly 2 payments are expected") | |
689 | 695 | else { | |
690 | - | let | |
691 | - | let | |
692 | - | let | |
693 | - | let | |
694 | - | if (if (if ( | |
696 | + | let eZ = value(eV.payments[0]) | |
697 | + | let fa = value(eV.payments[1]) | |
698 | + | let fb = dH(toBase58String(eV.transactionId), dI, eZ.amount, eZ.assetId, fa.amount, fa.assetId, toString(eV.caller), false, dO) | |
699 | + | let ds = parseIntValue(fb._8) | |
700 | + | if (if (if (ba()) | |
695 | 701 | then true | |
696 | - | else ( | |
702 | + | else (ds == l)) | |
697 | 703 | then true | |
698 | - | else ( | |
699 | - | then throw(("Put operation is blocked by admin. Status = " + toString( | |
700 | - | else | |
704 | + | else (ds == n)) | |
705 | + | then throw(("Put operation is blocked by admin. Status = " + toString(ds))) | |
706 | + | else fb | |
701 | 707 | } | |
702 | 708 | ||
703 | 709 | ||
704 | - | func | |
705 | - | let | |
706 | - | if (( | |
710 | + | func fc (bY) = { | |
711 | + | let fd = invoke(aV, "emit", [bY], nil) | |
712 | + | if ((fd == fd)) | |
707 | 713 | then { | |
708 | - | let | |
709 | - | let | |
710 | - | if ($isInstanceOf( | |
714 | + | let fe = { | |
715 | + | let bV = fd | |
716 | + | if ($isInstanceOf(bV, "Address")) | |
711 | 717 | then { | |
712 | - | let | |
713 | - | invoke( | |
718 | + | let ff = bV | |
719 | + | invoke(ff, "emit", [bY], nil) | |
714 | 720 | } | |
715 | 721 | else unit | |
716 | 722 | } | |
717 | - | if (( | |
718 | - | then | |
723 | + | if ((fe == fe)) | |
724 | + | then bY | |
719 | 725 | else throw("Strict value is not equal to itself.") | |
720 | 726 | } | |
721 | 727 | else throw("Strict value is not equal to itself.") | |
722 | 728 | } | |
723 | 729 | ||
724 | 730 | ||
725 | - | func | |
726 | - | let | |
731 | + | func fg (bY,ai) = { | |
732 | + | let fh = if ((ai == 0)) | |
727 | 733 | then 0 | |
728 | - | else fraction( | |
729 | - | $Tuple2(( | |
734 | + | else fraction(bY, ai, b) | |
735 | + | $Tuple2((bY - fh), fh) | |
730 | 736 | } | |
731 | 737 | ||
732 | 738 | ||
733 | - | func | |
734 | - | let | |
735 | - | let | |
736 | - | let | |
737 | - | let | |
739 | + | func fi (fj,fk,ab,ac) = { | |
740 | + | let fl = (ac == unit) | |
741 | + | let fm = bL(bh(bp)) | |
742 | + | let fn = bL(bh(bq)) | |
743 | + | let fo = if ((fk == bp)) | |
738 | 744 | then true | |
739 | - | else if (( | |
745 | + | else if ((fk == bq)) | |
740 | 746 | then false | |
741 | - | else aQ("invalid asset") | |
742 | - | let fm = if (fi) | |
743 | - | then $Tuple2(fj, fk) | |
744 | - | else if (fl) | |
745 | - | then $Tuple2((fj - fg), fk) | |
746 | - | else $Tuple2(fj, (fk - fg)) | |
747 | - | let fn = fm._1 | |
748 | - | let fo = fm._2 | |
747 | + | else aS("invalid asset") | |
749 | 748 | let fp = if (fl) | |
750 | - | then $Tuple2(fg, 0) | |
751 | - | else $Tuple2(0, fg) | |
749 | + | then $Tuple2(fm, fn) | |
750 | + | else if (fo) | |
751 | + | then $Tuple2((fm - fj), fn) | |
752 | + | else $Tuple2(fm, (fn - fj)) | |
752 | 753 | let fq = fp._1 | |
753 | 754 | let fr = fp._2 | |
754 | - | let | |
755 | - | | |
756 | - | | |
755 | + | let fs = if (fo) | |
756 | + | then $Tuple2(fj, 0) | |
757 | + | else $Tuple2(0, fj) | |
757 | 758 | let ft = fs._1 | |
758 | - | let fe = fs._2 | |
759 | - | let fu = (fn + eI) | |
760 | - | let fv = (fo + eJ) | |
761 | - | let fw = bM(D(fv, bq), D(fu, bp)) | |
762 | - | let fx = H(fw, b) | |
763 | - | let fy = if (fl) | |
764 | - | then fn | |
765 | - | else fo | |
766 | - | let fz = toBigInt(fy) | |
767 | - | let fA = toBigInt(valueOrErrorMessage(assetInfo(bm), (("asset " + toBase58String(bm)) + " doesn't exist")).quantity) | |
768 | - | let fB = if ((fA > f)) | |
759 | + | let fu = fs._2 | |
760 | + | let eL = fg(ft, aX)._1 | |
761 | + | let eM = fg(fu, aX)._1 | |
762 | + | let fv = fg(fj, aX) | |
763 | + | let fw = fv._1 | |
764 | + | let fh = fv._2 | |
765 | + | let fx = (fq + eL) | |
766 | + | let fy = (fr + eM) | |
767 | + | let fz = bO(D(fy, bs), D(fx, br)) | |
768 | + | let fA = H(fz, b) | |
769 | + | let fB = if (fo) | |
770 | + | then fq | |
771 | + | else fr | |
772 | + | let fC = toBigInt(fB) | |
773 | + | let fD = toBigInt(valueOrErrorMessage(assetInfo(bo), (("asset " + toBase58String(bo)) + " doesn't exist")).quantity) | |
774 | + | let fE = if ((fD > f)) | |
769 | 775 | then true | |
770 | - | else | |
771 | - | if (( | |
776 | + | else aS("initial deposit requires all coins") | |
777 | + | if ((fE == fE)) | |
772 | 778 | then { | |
773 | - | let | |
774 | - | let | |
775 | - | let | |
779 | + | let fF = toBigInt(fw) | |
780 | + | let fG = max([0, toInt(((fD * (sqrtBigInt((d + ((fF * d) / fC)), 18, 18, DOWN) - d)) / d))]) | |
781 | + | let en = if (fl) | |
776 | 782 | then nil | |
777 | - | else [IntegerEntry(W(), | |
778 | - | let | |
779 | - | let | |
780 | - | let | |
781 | - | let | |
782 | - | then $Tuple2( | |
783 | - | else $Tuple2( | |
784 | - | let | |
785 | - | let | |
786 | - | let | |
787 | - | fraction(( | |
783 | + | else [IntegerEntry(W(), fA), IntegerEntry(X(height, lastBlock.timestamp), fA), StringEntry(aa(toString(value(ab)), toBase58String(value(ac))), bw(ft, fu, fG, fA, 0, 0, height, lastBlock.timestamp, 0, 0))] | |
784 | + | let fH = bO(D(fr, bs), D(fq, br)) | |
785 | + | let fI = H(fH, b) | |
786 | + | let fJ = { | |
787 | + | let fK = if (fo) | |
788 | + | then $Tuple2(ft, fq) | |
789 | + | else $Tuple2(fu, fr) | |
790 | + | let bY = fK._1 | |
791 | + | let fL = fK._2 | |
792 | + | let fM = toInt(fraction(fD, toBigInt((bY / 2)), toBigInt(fL))) | |
793 | + | fraction((fG - fM), b, fM) | |
788 | 794 | } | |
789 | - | $Tuple5( | |
795 | + | $Tuple5(fG, en, fh, fJ, fo) | |
790 | 796 | } | |
791 | 797 | else throw("Strict value is not equal to itself.") | |
792 | 798 | } | |
793 | 799 | ||
794 | 800 | ||
795 | - | func | |
796 | - | let | |
797 | - | let | |
798 | - | let | |
799 | - | let | |
800 | - | let | |
801 | + | func fN (fO,fw,fk,ab,ac) = { | |
802 | + | let fl = (ac == unit) | |
803 | + | let dc = bc() | |
804 | + | let dd = parseIntValue(dc[t]) | |
805 | + | let de = parseIntValue(dc[u]) | |
806 | + | let fP = [if ((fk == bo)) | |
801 | 807 | then true | |
802 | - | else | |
803 | - | if (( | |
808 | + | else aS("invalid lp asset")] | |
809 | + | if ((fP == fP)) | |
804 | 810 | then { | |
805 | - | let | |
811 | + | let fQ = if ((fO == bp)) | |
806 | 812 | then true | |
807 | - | else if (( | |
813 | + | else if ((fO == bq)) | |
808 | 814 | then false | |
809 | - | else | |
810 | - | let | |
811 | - | then toBigInt( | |
812 | - | else toBigInt( | |
813 | - | let | |
814 | - | then | |
815 | - | else | |
816 | - | let | |
817 | - | let | |
818 | - | let | |
819 | - | then | |
820 | - | else | |
821 | - | let | |
822 | - | let | |
823 | - | let | |
824 | - | let | |
825 | - | let | |
826 | - | let | |
827 | - | let | |
828 | - | let | |
829 | - | then $Tuple4( | |
830 | - | else $Tuple4(0, | |
831 | - | let | |
832 | - | let | |
833 | - | let | |
834 | - | let | |
835 | - | let | |
836 | - | let | |
837 | - | let | |
815 | + | else aS("invalid asset") | |
816 | + | let fR = if (fQ) | |
817 | + | then toBigInt(bL(bh(bp))) | |
818 | + | else toBigInt(bL(bh(bq))) | |
819 | + | let fS = if (fQ) | |
820 | + | then dd | |
821 | + | else de | |
822 | + | let fT = bL(bh(bp)) | |
823 | + | let fU = bL(bh(bq)) | |
824 | + | let fV = if (fQ) | |
825 | + | then fT | |
826 | + | else fU | |
827 | + | let fW = toBigInt(fV) | |
828 | + | let fD = toBigInt(valueOrErrorMessage(assetInfo(bo), (("asset " + toBase58String(bo)) + " doesn't exist")).quantity) | |
829 | + | let fX = toBigInt(fw) | |
830 | + | let fY = max([0, toInt(((fR * (d - pow((d - ((fX * d) / fD)), 18, h, 0, 18, DOWN))) / d))]) | |
831 | + | let fZ = fg(fY, aZ) | |
832 | + | let ga = fZ._1 | |
833 | + | let fh = fZ._2 | |
834 | + | let gb = if (fQ) | |
835 | + | then $Tuple4(ga, 0, (fT - fY), fU) | |
836 | + | else $Tuple4(0, ga, fT, (fU - fY)) | |
837 | + | let gc = gb._1 | |
838 | + | let gd = gb._2 | |
839 | + | let ge = gb._3 | |
840 | + | let gf = gb._4 | |
841 | + | let fz = bO(D(gf, bs), D(ge, br)) | |
842 | + | let fA = H(fz, b) | |
843 | + | let en = if (fl) | |
838 | 844 | then nil | |
839 | - | else [StringEntry(ad(toString(value(ab)), toBase58String(value(ac))), | |
840 | - | let | |
841 | - | let | |
842 | - | let | |
843 | - | let | |
844 | - | fraction(( | |
845 | + | else [StringEntry(ad(toString(value(ab)), toBase58String(value(ac))), bH(gc, gd, fw, fA, height, lastBlock.timestamp)), IntegerEntry(W(), fA), IntegerEntry(X(height, lastBlock.timestamp), fA)] | |
846 | + | let fH = bO(D(fU, bs), D(fT, br)) | |
847 | + | let fI = H(fH, b) | |
848 | + | let fJ = { | |
849 | + | let gg = (toInt(fraction(fR, fX, fD)) * 2) | |
850 | + | fraction((ga - gg), b, gg) | |
845 | 851 | } | |
846 | - | $Tuple5( | |
852 | + | $Tuple5(ga, en, fh, fJ, fQ) | |
847 | 853 | } | |
848 | 854 | else throw("Strict value is not equal to itself.") | |
849 | 855 | } | |
850 | 856 | ||
851 | 857 | ||
852 | - | func | |
853 | - | let | |
854 | - | if ($isInstanceOf( | |
858 | + | func gh () = { | |
859 | + | let bV = getString(U()) | |
860 | + | if ($isInstanceOf(bV, "String")) | |
855 | 861 | then { | |
856 | - | let | |
857 | - | fromBase58String( | |
862 | + | let gi = bV | |
863 | + | fromBase58String(gi) | |
858 | 864 | } | |
859 | - | else if ($isInstanceOf( | |
865 | + | else if ($isInstanceOf(bV, "Unit")) | |
860 | 866 | then unit | |
861 | 867 | else throw("Match error") | |
862 | 868 | } | |
863 | 869 | ||
864 | 870 | ||
865 | - | func | |
866 | - | let | |
867 | - | if ($isInstanceOf( | |
871 | + | func gj () = { | |
872 | + | let bV = getString(V()) | |
873 | + | if ($isInstanceOf(bV, "String")) | |
868 | 874 | then { | |
869 | - | let | |
870 | - | fromBase58String( | |
875 | + | let gi = bV | |
876 | + | fromBase58String(gi) | |
871 | 877 | } | |
872 | - | else if ($isInstanceOf( | |
878 | + | else if ($isInstanceOf(bV, "Unit")) | |
873 | 879 | then unit | |
874 | 880 | else throw("Match error") | |
875 | 881 | } | |
876 | 882 | ||
877 | 883 | ||
878 | - | func | |
879 | - | let | |
880 | - | if ($isInstanceOf( | |
884 | + | func gk (eV) = { | |
885 | + | let bV = gh() | |
886 | + | if ($isInstanceOf(bV, "ByteVector")) | |
881 | 887 | then { | |
882 | - | let | |
883 | - | ( | |
888 | + | let gl = bV | |
889 | + | (eV.callerPublicKey == gl) | |
884 | 890 | } | |
885 | - | else if ($isInstanceOf( | |
886 | - | then ( | |
891 | + | else if ($isInstanceOf(bV, "Unit")) | |
892 | + | then (eV.caller == this) | |
887 | 893 | else throw("Match error") | |
888 | 894 | } | |
889 | 895 | ||
890 | 896 | ||
891 | - | func | |
892 | - | let | |
893 | - | let | |
894 | - | if ($isInstanceOf( | |
897 | + | func gm (eV) = { | |
898 | + | let gn = throw("Permission denied") | |
899 | + | let bV = gh() | |
900 | + | if ($isInstanceOf(bV, "ByteVector")) | |
895 | 901 | then { | |
896 | - | let | |
897 | - | if (( | |
902 | + | let gl = bV | |
903 | + | if ((eV.callerPublicKey == gl)) | |
898 | 904 | then true | |
899 | - | else | |
905 | + | else gn | |
900 | 906 | } | |
901 | - | else if ($isInstanceOf( | |
902 | - | then if (( | |
907 | + | else if ($isInstanceOf(bV, "Unit")) | |
908 | + | then if ((eV.caller == this)) | |
903 | 909 | then true | |
904 | - | else | |
910 | + | else gn | |
905 | 911 | else throw("Match error") | |
906 | 912 | } | |
907 | 913 | ||
908 | 914 | ||
909 | - | @Callable( | |
910 | - | func rebalance () = ( | |
915 | + | @Callable(eV) | |
916 | + | func rebalance () = (cC(aO(this, ae())) ++ cC(aO(this, af()))) | |
911 | 917 | ||
912 | 918 | ||
913 | 919 | ||
914 | - | @Callable( | |
915 | - | func calculateAmountOutForSwapREADONLY ( | |
916 | - | let | |
920 | + | @Callable(eV) | |
921 | + | func calculateAmountOutForSwapREADONLY (go,gp,gq) = { | |
922 | + | let gr = if ((gp == false)) | |
917 | 923 | then { | |
918 | - | let | |
919 | - | let | |
920 | - | $Tuple2( | |
924 | + | let gs = aO(this, af()) | |
925 | + | let gt = aO(this, ae()) | |
926 | + | $Tuple2(gs, gt) | |
921 | 927 | } | |
922 | 928 | else { | |
923 | - | let | |
924 | - | let | |
925 | - | $Tuple2( | |
929 | + | let gs = aO(this, ae()) | |
930 | + | let gt = aO(this, af()) | |
931 | + | $Tuple2(gs, gt) | |
926 | 932 | } | |
927 | - | let | |
928 | - | let | |
929 | - | let | |
930 | - | let | |
931 | - | let | |
932 | - | let | |
933 | - | let | |
934 | - | let | |
933 | + | let gs = gr._1 | |
934 | + | let gt = gr._2 | |
935 | + | let gu = bL(gt) | |
936 | + | let gv = bL(gs) | |
937 | + | let gw = fraction(gv, go, (gu + go)) | |
938 | + | let gx = (toBigInt(gu) * toBigInt(gv)) | |
939 | + | let gy = (((toBigInt(bL(gt)) + toBigInt(go)) + toBigInt(gq)) * (toBigInt(bL(gs)) - toBigInt(gw))) | |
940 | + | let gz = if ((gy >= gx)) | |
935 | 941 | then true | |
936 | 942 | else throw("new K is fewer error") | |
937 | - | if (( | |
938 | - | then $Tuple2(nil, | |
943 | + | if ((gz == gz)) | |
944 | + | then $Tuple2(nil, gw) | |
939 | 945 | else throw("Strict value is not equal to itself.") | |
940 | 946 | } | |
941 | 947 | ||
942 | 948 | ||
943 | 949 | ||
944 | - | @Callable( | |
945 | - | func calculateAmountOutForSwapAndSendTokens ( | |
946 | - | let | |
947 | - | let | |
948 | - | if ($isInstanceOf( | |
949 | - | then | |
950 | - | else throw(($getType( | |
950 | + | @Callable(eV) | |
951 | + | func calculateAmountOutForSwapAndSendTokens (go,gp,gA,gB,gq) = { | |
952 | + | let gC = { | |
953 | + | let aY = invoke(aV, "getSwapContractREADONLY", nil, nil) | |
954 | + | if ($isInstanceOf(aY, "String")) | |
955 | + | then aY | |
956 | + | else throw(($getType(aY) + " couldn't be cast to String")) | |
951 | 957 | } | |
952 | - | let | |
958 | + | let fP = [if ((value(eV.payments[0]).amount >= go)) | |
953 | 959 | then true | |
954 | - | else | |
960 | + | else aS("Wrong amount"), if ((eV.caller == addressFromStringValue(gC))) | |
955 | 961 | then true | |
956 | - | else | |
957 | - | if (( | |
962 | + | else aS("Permission denied")] | |
963 | + | if ((fP == fP)) | |
958 | 964 | then { | |
959 | - | let | |
960 | - | let | |
961 | - | let | |
962 | - | then | |
963 | - | else | |
964 | - | let | |
965 | - | let | |
966 | - | let | |
967 | - | let | |
968 | - | let | |
969 | - | let | |
965 | + | let eW = value(eV.payments[0]) | |
966 | + | let gt = bh(eW.assetId) | |
967 | + | let gs = if ((gp == false)) | |
968 | + | then aO(this, af()) | |
969 | + | else aO(this, ae()) | |
970 | + | let gu = (bL(gt) - value(eV.payments[0]).amount) | |
971 | + | let gv = bL(gs) | |
972 | + | let gw = fraction(gv, go, (gu + go)) | |
973 | + | let gx = (toBigInt(gu) * toBigInt(gv)) | |
974 | + | let gy = ((toBigInt(bL(gt)) + toBigInt(gq)) * (toBigInt(bL(gs)) - toBigInt(gw))) | |
975 | + | let gz = if ((gy >= gx)) | |
970 | 976 | then true | |
971 | 977 | else throw("new K is fewer error") | |
972 | - | if (( | |
978 | + | if ((gz == gz)) | |
973 | 979 | then { | |
974 | - | let | |
980 | + | let gD = if ((gw >= gA)) | |
975 | 981 | then true | |
976 | 982 | else throw("Exchange result is fewer coins than expected") | |
977 | - | if (( | |
983 | + | if ((gD == gD)) | |
978 | 984 | then { | |
979 | - | let | |
980 | - | if (( | |
985 | + | let gE = cC(gt) | |
986 | + | if ((gE == gE)) | |
981 | 987 | then { | |
982 | - | let | |
983 | - | if (( | |
984 | - | then $Tuple2((( | |
988 | + | let gF = cJ(gs, gw) | |
989 | + | if ((gF == gF)) | |
990 | + | then $Tuple2(((gF ++ gE) ++ [ScriptTransfer(addressFromStringValue(gB), gw, bf(gs))]), gw) | |
985 | 991 | else throw("Strict value is not equal to itself.") | |
986 | 992 | } | |
987 | 993 | else throw("Strict value is not equal to itself.") | |
988 | 994 | } | |
989 | 995 | else throw("Strict value is not equal to itself.") | |
990 | 996 | } | |
991 | 997 | else throw("Strict value is not equal to itself.") | |
992 | 998 | } | |
993 | 999 | else throw("Strict value is not equal to itself.") | |
994 | 1000 | } | |
995 | 1001 | ||
996 | 1002 | ||
997 | 1003 | ||
998 | - | @Callable( | |
999 | - | func setManager ( | |
1000 | - | let | |
1001 | - | if (( | |
1004 | + | @Callable(eV) | |
1005 | + | func setManager (gG) = { | |
1006 | + | let gH = gm(eV) | |
1007 | + | if ((gH == gH)) | |
1002 | 1008 | then { | |
1003 | - | let | |
1004 | - | if (( | |
1005 | - | then [StringEntry(V(), | |
1009 | + | let gI = fromBase58String(gG) | |
1010 | + | if ((gI == gI)) | |
1011 | + | then [StringEntry(V(), gG)] | |
1006 | 1012 | else throw("Strict value is not equal to itself.") | |
1007 | 1013 | } | |
1008 | 1014 | else throw("Strict value is not equal to itself.") | |
1009 | 1015 | } | |
1010 | 1016 | ||
1011 | 1017 | ||
1012 | 1018 | ||
1013 | - | @Callable( | |
1019 | + | @Callable(eV) | |
1014 | 1020 | func confirmManager () = { | |
1015 | - | let | |
1016 | - | let | |
1021 | + | let gJ = gj() | |
1022 | + | let gK = if (isDefined(gJ)) | |
1017 | 1023 | then true | |
1018 | 1024 | else throw("No pending manager") | |
1019 | - | if (( | |
1025 | + | if ((gK == gK)) | |
1020 | 1026 | then { | |
1021 | - | let | |
1027 | + | let gL = if ((eV.callerPublicKey == value(gJ))) | |
1022 | 1028 | then true | |
1023 | 1029 | else throw("You are not pending manager") | |
1024 | - | if (( | |
1025 | - | then [StringEntry(U(), toBase58String(value( | |
1030 | + | if ((gL == gL)) | |
1031 | + | then [StringEntry(U(), toBase58String(value(gJ))), DeleteEntry(V())] | |
1026 | 1032 | else throw("Strict value is not equal to itself.") | |
1027 | 1033 | } | |
1028 | 1034 | else throw("Strict value is not equal to itself.") | |
1029 | 1035 | } | |
1030 | 1036 | ||
1031 | 1037 | ||
1032 | 1038 | ||
1033 | - | @Callable( | |
1034 | - | func put ( | |
1039 | + | @Callable(eV) | |
1040 | + | func put (dI,gM) = if ((0 > dI)) | |
1035 | 1041 | then throw("Invalid slippageTolerance passed") | |
1036 | 1042 | else { | |
1037 | - | let | |
1038 | - | let | |
1039 | - | let | |
1040 | - | let | |
1041 | - | let | |
1042 | - | let | |
1043 | - | let | |
1044 | - | let | |
1045 | - | let | |
1046 | - | let | |
1047 | - | let | |
1048 | - | if (( | |
1043 | + | let fb = eY(eV, dI, true) | |
1044 | + | let ek = fb._2 | |
1045 | + | let dp = fb._7 | |
1046 | + | let dG = fb._9 | |
1047 | + | let el = fb._10 | |
1048 | + | let em = fb._11 | |
1049 | + | let gN = fb._12 | |
1050 | + | let gO = fb._13 | |
1051 | + | let eZ = toBigInt(value(eV.payments[0]).amount) | |
1052 | + | let fa = toBigInt(value(eV.payments[1]).amount) | |
1053 | + | let eB = eu(eZ, fa, toBigInt(0)) | |
1054 | + | if ((eB == eB)) | |
1049 | 1055 | then { | |
1050 | - | let | |
1051 | - | if (( | |
1056 | + | let fd = invoke(aV, "emit", [ek], nil) | |
1057 | + | if ((fd == fd)) | |
1052 | 1058 | then { | |
1053 | - | let | |
1054 | - | let | |
1055 | - | if ($isInstanceOf( | |
1059 | + | let fe = { | |
1060 | + | let bV = fd | |
1061 | + | if ($isInstanceOf(bV, "Address")) | |
1056 | 1062 | then { | |
1057 | - | let | |
1058 | - | invoke( | |
1063 | + | let ff = bV | |
1064 | + | invoke(ff, "emit", [ek], nil) | |
1059 | 1065 | } | |
1060 | 1066 | else unit | |
1061 | 1067 | } | |
1062 | - | if (( | |
1068 | + | if ((fe == fe)) | |
1063 | 1069 | then { | |
1064 | - | let | |
1065 | - | then invoke( | |
1070 | + | let gP = if ((el > 0)) | |
1071 | + | then invoke(bv, "put", nil, [AttachedPayment(gN, el)]) | |
1066 | 1072 | else nil | |
1067 | - | if (( | |
1073 | + | if ((gP == gP)) | |
1068 | 1074 | then { | |
1069 | - | let | |
1070 | - | then invoke( | |
1075 | + | let gQ = if ((em > 0)) | |
1076 | + | then invoke(bv, "put", nil, [AttachedPayment(gO, em)]) | |
1071 | 1077 | else nil | |
1072 | - | if (( | |
1078 | + | if ((gQ == gQ)) | |
1073 | 1079 | then { | |
1074 | - | let | |
1080 | + | let gR = if (gM) | |
1075 | 1081 | then { | |
1076 | - | let | |
1077 | - | if (( | |
1082 | + | let gS = invoke(bu, "stake", nil, [AttachedPayment(dp, ek)]) | |
1083 | + | if ((gS == gS)) | |
1078 | 1084 | then nil | |
1079 | 1085 | else throw("Strict value is not equal to itself.") | |
1080 | 1086 | } | |
1081 | - | else [ScriptTransfer( | |
1082 | - | let | |
1083 | - | if (( | |
1087 | + | else [ScriptTransfer(eV.caller, ek, dp)] | |
1088 | + | let gT = eC(0, 0, 0) | |
1089 | + | if ((gT == gT)) | |
1084 | 1090 | then { | |
1085 | - | let | |
1086 | - | let | |
1087 | - | let | |
1088 | - | if (( | |
1091 | + | let et = gT._2 | |
1092 | + | let gU = gT._1 | |
1093 | + | let gV = eH(eB, et) | |
1094 | + | if ((gV == gV)) | |
1089 | 1095 | then { | |
1090 | - | let | |
1091 | - | if (( | |
1092 | - | then (( | |
1096 | + | let gW = invoke(this, "rebalance", nil, nil) | |
1097 | + | if ((gW == gW)) | |
1098 | + | then ((dG ++ gR) ++ gU) | |
1093 | 1099 | else throw("Strict value is not equal to itself.") | |
1094 | 1100 | } | |
1095 | 1101 | else throw("Strict value is not equal to itself.") | |
1096 | 1102 | } | |
1097 | 1103 | else throw("Strict value is not equal to itself.") | |
1098 | 1104 | } | |
1099 | 1105 | else throw("Strict value is not equal to itself.") | |
1100 | 1106 | } | |
1101 | 1107 | else throw("Strict value is not equal to itself.") | |
1102 | 1108 | } | |
1103 | 1109 | else throw("Strict value is not equal to itself.") | |
1104 | 1110 | } | |
1105 | 1111 | else throw("Strict value is not equal to itself.") | |
1106 | 1112 | } | |
1107 | 1113 | else throw("Strict value is not equal to itself.") | |
1108 | 1114 | } | |
1109 | 1115 | ||
1110 | 1116 | ||
1111 | 1117 | ||
1112 | - | @Callable( | |
1113 | - | func putForFree ( | |
1118 | + | @Callable(eV) | |
1119 | + | func putForFree (gX) = if ((0 > gX)) | |
1114 | 1120 | then throw("Invalid value passed") | |
1115 | 1121 | else { | |
1116 | - | let | |
1117 | - | let | |
1118 | - | let | |
1119 | - | let | |
1120 | - | let | |
1121 | - | if (( | |
1122 | + | let fb = eY(eV, gX, false) | |
1123 | + | let dG = fb._9 | |
1124 | + | let eZ = toBigInt(value(eV.payments[0]).amount) | |
1125 | + | let fa = toBigInt(value(eV.payments[1]).amount) | |
1126 | + | let eB = eu(eZ, fa, toBigInt(0)) | |
1127 | + | if ((eB == eB)) | |
1122 | 1128 | then { | |
1123 | - | let | |
1124 | - | let | |
1125 | - | let | |
1126 | - | let | |
1127 | - | if (( | |
1128 | - | then ( | |
1129 | + | let gY = eC(0, 0, 0) | |
1130 | + | let gU = gY._1 | |
1131 | + | let et = gY._2 | |
1132 | + | let gV = eH(eB, et) | |
1133 | + | if ((gV == gV)) | |
1134 | + | then (dG ++ gU) | |
1129 | 1135 | else throw("Strict value is not equal to itself.") | |
1130 | 1136 | } | |
1131 | 1137 | else throw("Strict value is not equal to itself.") | |
1132 | 1138 | } | |
1133 | 1139 | ||
1134 | 1140 | ||
1135 | 1141 | ||
1136 | - | @Callable( | |
1137 | - | func putOneTkn ( | |
1138 | - | let | |
1139 | - | let | |
1140 | - | if ($isInstanceOf( | |
1141 | - | then | |
1142 | - | else throw(($getType( | |
1142 | + | @Callable(eV) | |
1143 | + | func putOneTkn (gZ,ha) = { | |
1144 | + | let hb = { | |
1145 | + | let aY = invoke(aV, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1146 | + | if ($isInstanceOf(aY, "Boolean")) | |
1147 | + | then aY | |
1148 | + | else throw(($getType(aY) + " couldn't be cast to Boolean")) | |
1143 | 1149 | } | |
1144 | - | let | |
1150 | + | let hc = if (if (if (ba()) | |
1145 | 1151 | then true | |
1146 | - | else ( | |
1152 | + | else (bn == l)) | |
1147 | 1153 | then true | |
1148 | - | else ( | |
1154 | + | else (bn == n)) | |
1149 | 1155 | then true | |
1150 | - | else | |
1151 | - | let | |
1156 | + | else hb | |
1157 | + | let fP = [if (if (!(hc)) | |
1152 | 1158 | then true | |
1153 | - | else | |
1159 | + | else gk(eV)) | |
1154 | 1160 | then true | |
1155 | - | else | |
1161 | + | else aS("put operation is blocked by admin"), if ((size(eV.payments) == 1)) | |
1156 | 1162 | then true | |
1157 | - | else | |
1158 | - | if (( | |
1163 | + | else aS("exactly 1 payment are expected")] | |
1164 | + | if ((fP == fP)) | |
1159 | 1165 | then { | |
1160 | - | let | |
1161 | - | let | |
1162 | - | let | |
1163 | - | let | |
1164 | - | then | |
1165 | - | else if (( | |
1166 | - | then | |
1167 | - | else | |
1168 | - | if (( | |
1166 | + | let hd = eV.payments[0] | |
1167 | + | let fk = hd.assetId | |
1168 | + | let fj = hd.amount | |
1169 | + | let eB = if ((fk == bp)) | |
1170 | + | then eu(toBigInt(fj), toBigInt(0), toBigInt(0)) | |
1171 | + | else if ((fk == bq)) | |
1172 | + | then eu(toBigInt(0), toBigInt(fj), toBigInt(0)) | |
1173 | + | else aS("payment asset is not supported") | |
1174 | + | if ((eB == eB)) | |
1169 | 1175 | then { | |
1170 | - | let ab = | |
1171 | - | let ac = | |
1172 | - | let | |
1173 | - | if (( | |
1176 | + | let ab = eV.caller | |
1177 | + | let ac = eV.transactionId | |
1178 | + | let he = fi(fj, fk, ab, ac) | |
1179 | + | if ((he == he)) | |
1174 | 1180 | then { | |
1175 | - | let | |
1176 | - | let | |
1177 | - | let | |
1178 | - | let | |
1179 | - | let | |
1180 | - | let | |
1181 | - | then ( | |
1181 | + | let fo = he._5 | |
1182 | + | let hf = he._4 | |
1183 | + | let fh = he._3 | |
1184 | + | let en = he._2 | |
1185 | + | let hg = he._1 | |
1186 | + | let hh = if (if ((gZ > 0)) | |
1187 | + | then (gZ > hg) | |
1182 | 1188 | else false) | |
1183 | - | then | |
1184 | - | else | |
1185 | - | let | |
1186 | - | if (( | |
1189 | + | then aS(makeString(["amount to receive is less than ", toString(gZ)], "")) | |
1190 | + | else hg | |
1191 | + | let fd = fc(hh) | |
1192 | + | if ((fd == fd)) | |
1187 | 1193 | then { | |
1188 | - | let | |
1194 | + | let gR = if (ha) | |
1189 | 1195 | then { | |
1190 | - | let | |
1191 | - | if (( | |
1196 | + | let hi = invoke(bu, "stake", nil, [AttachedPayment(bo, hh)]) | |
1197 | + | if ((hi == hi)) | |
1192 | 1198 | then nil | |
1193 | 1199 | else throw("Strict value is not equal to itself.") | |
1194 | 1200 | } | |
1195 | - | else [ScriptTransfer( | |
1196 | - | let | |
1197 | - | then [ScriptTransfer( | |
1201 | + | else [ScriptTransfer(eV.caller, hh, bo)] | |
1202 | + | let hj = if ((fh > 0)) | |
1203 | + | then [ScriptTransfer(aW, fh, fk)] | |
1198 | 1204 | else nil | |
1199 | - | let | |
1205 | + | let hk = if ((this == aW)) | |
1200 | 1206 | then $Tuple2(0, 0) | |
1201 | - | else if ( | |
1202 | - | then $Tuple2(-( | |
1203 | - | else $Tuple2(0, -( | |
1204 | - | let | |
1205 | - | let | |
1206 | - | let | |
1207 | - | let | |
1208 | - | let | |
1209 | - | let | |
1210 | - | let | |
1211 | - | if (( | |
1207 | + | else if (fo) | |
1208 | + | then $Tuple2(-(fh), 0) | |
1209 | + | else $Tuple2(0, -(fh)) | |
1210 | + | let eD = hk._1 | |
1211 | + | let eE = hk._2 | |
1212 | + | let hl = eC(eD, eE, 0) | |
1213 | + | let gU = hl._1 | |
1214 | + | let et = hl._2 | |
1215 | + | let eO = value(getString(aj)) | |
1216 | + | let gV = eH(eB, et) | |
1217 | + | if ((gV == gV)) | |
1212 | 1218 | then { | |
1213 | - | let | |
1214 | - | if (( | |
1215 | - | then $Tuple2(((( | |
1219 | + | let gW = invoke(this, "rebalance", nil, nil) | |
1220 | + | if ((gW == gW)) | |
1221 | + | then $Tuple2((((en ++ gR) ++ hj) ++ gU), hh) | |
1216 | 1222 | else throw("Strict value is not equal to itself.") | |
1217 | 1223 | } | |
1218 | 1224 | else throw("Strict value is not equal to itself.") | |
1219 | 1225 | } | |
1220 | 1226 | else throw("Strict value is not equal to itself.") | |
1221 | 1227 | } | |
1222 | 1228 | else throw("Strict value is not equal to itself.") | |
1223 | 1229 | } | |
1224 | 1230 | else throw("Strict value is not equal to itself.") | |
1225 | 1231 | } | |
1226 | 1232 | else throw("Strict value is not equal to itself.") | |
1227 | 1233 | } | |
1228 | 1234 | ||
1229 | 1235 | ||
1230 | 1236 | ||
1231 | - | @Callable( | |
1232 | - | func putOneTknREADONLY ( | |
1233 | - | let | |
1234 | - | let | |
1235 | - | let | |
1236 | - | let | |
1237 | - | let | |
1238 | - | let | |
1239 | - | $Tuple2(nil, $Tuple3( | |
1237 | + | @Callable(eV) | |
1238 | + | func putOneTknREADONLY (fk,fj) = { | |
1239 | + | let hm = fi(fj, bf(fk), unit, unit) | |
1240 | + | let hg = hm._1 | |
1241 | + | let en = hm._2 | |
1242 | + | let fh = hm._3 | |
1243 | + | let hf = hm._4 | |
1244 | + | let fo = hm._5 | |
1245 | + | $Tuple2(nil, $Tuple3(hg, fh, hf)) | |
1240 | 1246 | } | |
1241 | 1247 | ||
1242 | 1248 | ||
1243 | 1249 | ||
1244 | - | @Callable( | |
1245 | - | func getOneTkn ( | |
1246 | - | let | |
1247 | - | let | |
1248 | - | if ($isInstanceOf( | |
1249 | - | then | |
1250 | - | else throw(($getType( | |
1250 | + | @Callable(eV) | |
1251 | + | func getOneTkn (hn,gZ) = { | |
1252 | + | let hb = { | |
1253 | + | let aY = invoke(aV, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1254 | + | if ($isInstanceOf(aY, "Boolean")) | |
1255 | + | then aY | |
1256 | + | else throw(($getType(aY) + " couldn't be cast to Boolean")) | |
1251 | 1257 | } | |
1252 | - | let | |
1258 | + | let ho = if (if (ba()) | |
1253 | 1259 | then true | |
1254 | - | else ( | |
1260 | + | else (bn == n)) | |
1255 | 1261 | then true | |
1256 | - | else | |
1257 | - | let | |
1262 | + | else hb | |
1263 | + | let fP = [if (if (!(ho)) | |
1258 | 1264 | then true | |
1259 | - | else | |
1265 | + | else gk(eV)) | |
1260 | 1266 | then true | |
1261 | - | else | |
1267 | + | else aS("get operation is blocked by admin"), if ((size(eV.payments) == 1)) | |
1262 | 1268 | then true | |
1263 | - | else | |
1264 | - | if (( | |
1269 | + | else aS("exactly 1 payment are expected")] | |
1270 | + | if ((fP == fP)) | |
1265 | 1271 | then { | |
1266 | - | let | |
1267 | - | let | |
1268 | - | let | |
1269 | - | let | |
1270 | - | let | |
1271 | - | if (( | |
1272 | + | let fO = bf(hn) | |
1273 | + | let hd = eV.payments[0] | |
1274 | + | let fk = hd.assetId | |
1275 | + | let fw = hd.amount | |
1276 | + | let eB = eu(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1277 | + | if ((eB == eB)) | |
1272 | 1278 | then { | |
1273 | - | let ab = | |
1274 | - | let ac = | |
1275 | - | let | |
1276 | - | if (( | |
1279 | + | let ab = eV.caller | |
1280 | + | let ac = eV.transactionId | |
1281 | + | let hp = fN(fO, fw, fk, ab, ac) | |
1282 | + | if ((hp == hp)) | |
1277 | 1283 | then { | |
1278 | - | let | |
1279 | - | let | |
1280 | - | let | |
1281 | - | let | |
1282 | - | let | |
1283 | - | let | |
1284 | - | then ( | |
1284 | + | let fQ = hp._5 | |
1285 | + | let hf = hp._4 | |
1286 | + | let fh = hp._3 | |
1287 | + | let en = hp._2 | |
1288 | + | let hq = hp._1 | |
1289 | + | let bY = if (if ((gZ > 0)) | |
1290 | + | then (gZ > hq) | |
1285 | 1291 | else false) | |
1286 | - | then | |
1287 | - | else | |
1288 | - | let | |
1289 | - | if (( | |
1292 | + | then aS(makeString(["amount to receive is less than ", toString(gZ)], "")) | |
1293 | + | else hq | |
1294 | + | let hr = invoke(aV, "burn", [fw], [AttachedPayment(fk, fw)]) | |
1295 | + | if ((hr == hr)) | |
1290 | 1296 | then { | |
1291 | - | let | |
1292 | - | let | |
1293 | - | let | |
1294 | - | then [ScriptTransfer( | |
1297 | + | let gF = cJ(hn, (bY + max([0, fh]))) | |
1298 | + | let hs = [ScriptTransfer(ab, bY, fO)] | |
1299 | + | let hj = if ((fh > 0)) | |
1300 | + | then [ScriptTransfer(aW, fh, fO)] | |
1295 | 1301 | else nil | |
1296 | - | let | |
1297 | - | let | |
1302 | + | let ht = { | |
1303 | + | let hu = if ((this == aW)) | |
1298 | 1304 | then 0 | |
1299 | - | else | |
1300 | - | if ( | |
1301 | - | then $Tuple2(-(( | |
1302 | - | else $Tuple2(0, -(( | |
1305 | + | else fh | |
1306 | + | if (fQ) | |
1307 | + | then $Tuple2(-((bY + hu)), 0) | |
1308 | + | else $Tuple2(0, -((bY + hu))) | |
1303 | 1309 | } | |
1304 | - | let | |
1305 | - | let | |
1306 | - | let | |
1307 | - | let | |
1308 | - | let | |
1309 | - | let | |
1310 | - | if (( | |
1311 | - | then $Tuple2((((( | |
1310 | + | let eD = ht._1 | |
1311 | + | let eE = ht._2 | |
1312 | + | let hv = eC(eD, eE, 0) | |
1313 | + | let gU = hv._1 | |
1314 | + | let et = hv._2 | |
1315 | + | let gV = eH(eB, et) | |
1316 | + | if ((gV == gV)) | |
1317 | + | then $Tuple2(((((en ++ gF) ++ hs) ++ hj) ++ gU), bY) | |
1312 | 1318 | else throw("Strict value is not equal to itself.") | |
1313 | 1319 | } | |
1314 | 1320 | else throw("Strict value is not equal to itself.") | |
1315 | 1321 | } | |
1316 | 1322 | else throw("Strict value is not equal to itself.") | |
1317 | 1323 | } | |
1318 | 1324 | else throw("Strict value is not equal to itself.") | |
1319 | 1325 | } | |
1320 | 1326 | else throw("Strict value is not equal to itself.") | |
1321 | 1327 | } | |
1322 | 1328 | ||
1323 | 1329 | ||
1324 | 1330 | ||
1325 | - | @Callable( | |
1326 | - | func getOneTknREADONLY ( | |
1327 | - | let | |
1328 | - | let | |
1329 | - | let | |
1330 | - | let | |
1331 | - | let | |
1332 | - | let | |
1333 | - | $Tuple2(nil, $Tuple3( | |
1331 | + | @Callable(eV) | |
1332 | + | func getOneTknREADONLY (fO,fw) = { | |
1333 | + | let hw = fN(bf(fO), fw, bo, unit, unit) | |
1334 | + | let hq = hw._1 | |
1335 | + | let en = hw._2 | |
1336 | + | let fh = hw._3 | |
1337 | + | let hf = hw._4 | |
1338 | + | let fQ = hw._5 | |
1339 | + | $Tuple2(nil, $Tuple3(hq, fh, hf)) | |
1334 | 1340 | } | |
1335 | 1341 | ||
1336 | 1342 | ||
1337 | 1343 | ||
1338 | - | @Callable( | |
1339 | - | func unstakeAndGetOneTkn ( | |
1340 | - | let | |
1341 | - | let | |
1342 | - | if ($isInstanceOf( | |
1343 | - | then | |
1344 | - | else throw(($getType( | |
1344 | + | @Callable(eV) | |
1345 | + | func unstakeAndGetOneTkn (hx,hn,gZ) = { | |
1346 | + | let hb = { | |
1347 | + | let aY = invoke(aV, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1348 | + | if ($isInstanceOf(aY, "Boolean")) | |
1349 | + | then aY | |
1350 | + | else throw(($getType(aY) + " couldn't be cast to Boolean")) | |
1345 | 1351 | } | |
1346 | - | let | |
1352 | + | let ho = if (if (ba()) | |
1347 | 1353 | then true | |
1348 | - | else ( | |
1354 | + | else (bn == n)) | |
1349 | 1355 | then true | |
1350 | - | else | |
1351 | - | let | |
1356 | + | else hb | |
1357 | + | let fP = [if (if (!(ho)) | |
1352 | 1358 | then true | |
1353 | - | else | |
1359 | + | else gk(eV)) | |
1354 | 1360 | then true | |
1355 | - | else | |
1361 | + | else aS("get operation is blocked by admin"), if ((size(eV.payments) == 0)) | |
1356 | 1362 | then true | |
1357 | - | else | |
1358 | - | if (( | |
1363 | + | else aS("no payments are expected")] | |
1364 | + | if ((fP == fP)) | |
1359 | 1365 | then { | |
1360 | - | let | |
1361 | - | let ab = | |
1362 | - | let ac = | |
1363 | - | let | |
1364 | - | if (( | |
1366 | + | let fO = bf(hn) | |
1367 | + | let ab = eV.caller | |
1368 | + | let ac = eV.transactionId | |
1369 | + | let eB = eu(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1370 | + | if ((eB == eB)) | |
1365 | 1371 | then { | |
1366 | - | let | |
1367 | - | if (( | |
1372 | + | let hy = invoke(bu, "unstake", [toBase58String(bo), hx], nil) | |
1373 | + | if ((hy == hy)) | |
1368 | 1374 | then { | |
1369 | - | let | |
1370 | - | if (( | |
1375 | + | let hz = fN(fO, hx, bo, ab, ac) | |
1376 | + | if ((hz == hz)) | |
1371 | 1377 | then { | |
1372 | - | let | |
1373 | - | let | |
1374 | - | let | |
1375 | - | let | |
1376 | - | let | |
1377 | - | let | |
1378 | - | then ( | |
1378 | + | let fQ = hz._5 | |
1379 | + | let hf = hz._4 | |
1380 | + | let fh = hz._3 | |
1381 | + | let en = hz._2 | |
1382 | + | let hq = hz._1 | |
1383 | + | let bY = if (if ((gZ > 0)) | |
1384 | + | then (gZ > hq) | |
1379 | 1385 | else false) | |
1380 | - | then | |
1381 | - | else | |
1382 | - | let | |
1383 | - | if (( | |
1386 | + | then aS(makeString(["amount to receive is less than ", toString(gZ)], "")) | |
1387 | + | else hq | |
1388 | + | let hr = invoke(aV, "burn", [hx], [AttachedPayment(bo, hx)]) | |
1389 | + | if ((hr == hr)) | |
1384 | 1390 | then { | |
1385 | - | let | |
1386 | - | let | |
1387 | - | let | |
1388 | - | then [ScriptTransfer( | |
1391 | + | let gF = cJ(hn, (bY + max([0, fh]))) | |
1392 | + | let hs = [ScriptTransfer(eV.caller, bY, fO)] | |
1393 | + | let hj = if ((fh > 0)) | |
1394 | + | then [ScriptTransfer(aW, fh, fO)] | |
1389 | 1395 | else nil | |
1390 | - | let | |
1391 | - | let | |
1396 | + | let hA = { | |
1397 | + | let hu = if ((this == aW)) | |
1392 | 1398 | then 0 | |
1393 | - | else | |
1394 | - | if ( | |
1395 | - | then $Tuple2(-(( | |
1396 | - | else $Tuple2(0, -(( | |
1399 | + | else fh | |
1400 | + | if (fQ) | |
1401 | + | then $Tuple2(-((bY + hu)), 0) | |
1402 | + | else $Tuple2(0, -((bY + hu))) | |
1397 | 1403 | } | |
1398 | - | let | |
1399 | - | let | |
1400 | - | let | |
1401 | - | let | |
1402 | - | let | |
1403 | - | let | |
1404 | - | if (( | |
1405 | - | then $Tuple2((((( | |
1404 | + | let eD = hA._1 | |
1405 | + | let eE = hA._2 | |
1406 | + | let hB = eC(eD, eE, 0) | |
1407 | + | let gU = hB._1 | |
1408 | + | let et = hB._2 | |
1409 | + | let gV = eH(eB, et) | |
1410 | + | if ((gV == gV)) | |
1411 | + | then $Tuple2(((((en ++ gF) ++ hs) ++ hj) ++ gU), bY) | |
1406 | 1412 | else throw("Strict value is not equal to itself.") | |
1407 | 1413 | } | |
1408 | 1414 | else throw("Strict value is not equal to itself.") | |
1409 | 1415 | } | |
1410 | 1416 | else throw("Strict value is not equal to itself.") | |
1411 | 1417 | } | |
1412 | 1418 | else throw("Strict value is not equal to itself.") | |
1413 | 1419 | } | |
1414 | 1420 | else throw("Strict value is not equal to itself.") | |
1415 | 1421 | } | |
1416 | 1422 | else throw("Strict value is not equal to itself.") | |
1417 | 1423 | } | |
1418 | 1424 | ||
1419 | 1425 | ||
1420 | 1426 | ||
1421 | - | @Callable( | |
1427 | + | @Callable(eV) | |
1422 | 1428 | func get () = { | |
1423 | - | let | |
1424 | - | let | |
1425 | - | let | |
1426 | - | let | |
1427 | - | let | |
1428 | - | let | |
1429 | - | let | |
1430 | - | let | |
1431 | - | if (( | |
1429 | + | let dY = eU(eV) | |
1430 | + | let dE = dY._1 | |
1431 | + | let dF = dY._2 | |
1432 | + | let eX = dY._3 | |
1433 | + | let dn = dY._4 | |
1434 | + | let dG = dY._5 | |
1435 | + | let gF = cO(dE, dF) | |
1436 | + | let eB = eu(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1437 | + | if ((eB == eB)) | |
1432 | 1438 | then { | |
1433 | - | let | |
1434 | - | if (( | |
1439 | + | let hC = invoke(aV, "burn", [eX], [AttachedPayment(dn, eX)]) | |
1440 | + | if ((hC == hC)) | |
1435 | 1441 | then { | |
1436 | - | let | |
1437 | - | let | |
1438 | - | let | |
1439 | - | let | |
1440 | - | if (( | |
1441 | - | then (( | |
1442 | + | let hD = eC(-(dE), -(dF), 0) | |
1443 | + | let gU = hD._1 | |
1444 | + | let et = hD._2 | |
1445 | + | let gV = eH(eB, et) | |
1446 | + | if ((gV == gV)) | |
1447 | + | then ((gF ++ dG) ++ gU) | |
1442 | 1448 | else throw("Strict value is not equal to itself.") | |
1443 | 1449 | } | |
1444 | 1450 | else throw("Strict value is not equal to itself.") | |
1445 | 1451 | } | |
1446 | 1452 | else throw("Strict value is not equal to itself.") | |
1447 | 1453 | } | |
1448 | 1454 | ||
1449 | 1455 | ||
1450 | 1456 | ||
1451 | - | @Callable( | |
1452 | - | func getNoLess ( | |
1453 | - | let | |
1454 | - | let | |
1455 | - | let | |
1456 | - | let | |
1457 | - | let | |
1458 | - | let | |
1459 | - | if (( | |
1460 | - | then throw(((("noLessThenAmtAsset failed: " + toString( | |
1461 | - | else if (( | |
1462 | - | then throw(((("noLessThenPriceAsset failed: " + toString( | |
1457 | + | @Callable(eV) | |
1458 | + | func getNoLess (hE,hF) = { | |
1459 | + | let dY = eU(eV) | |
1460 | + | let dE = dY._1 | |
1461 | + | let dF = dY._2 | |
1462 | + | let eX = dY._3 | |
1463 | + | let dn = dY._4 | |
1464 | + | let dG = dY._5 | |
1465 | + | if ((hE > dE)) | |
1466 | + | then throw(((("noLessThenAmtAsset failed: " + toString(dE)) + " < ") + toString(hE))) | |
1467 | + | else if ((hF > dF)) | |
1468 | + | then throw(((("noLessThenPriceAsset failed: " + toString(dF)) + " < ") + toString(hF))) | |
1463 | 1469 | else { | |
1464 | - | let | |
1465 | - | let | |
1466 | - | if (( | |
1470 | + | let gF = cO(dE, dF) | |
1471 | + | let eB = eu(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1472 | + | if ((eB == eB)) | |
1467 | 1473 | then { | |
1468 | - | let | |
1469 | - | if (( | |
1474 | + | let hC = invoke(aV, "burn", [eX], [AttachedPayment(dn, eX)]) | |
1475 | + | if ((hC == hC)) | |
1470 | 1476 | then { | |
1471 | - | let | |
1472 | - | let | |
1473 | - | let | |
1474 | - | let | |
1475 | - | if (( | |
1476 | - | then (( | |
1477 | + | let hG = eC(-(dE), -(dF), 0) | |
1478 | + | let gU = hG._1 | |
1479 | + | let et = hG._2 | |
1480 | + | let gV = eH(eB, et) | |
1481 | + | if ((gV == gV)) | |
1482 | + | then ((gF ++ dG) ++ gU) | |
1477 | 1483 | else throw("Strict value is not equal to itself.") | |
1478 | 1484 | } | |
1479 | 1485 | else throw("Strict value is not equal to itself.") | |
1480 | 1486 | } | |
1481 | 1487 | else throw("Strict value is not equal to itself.") | |
1482 | 1488 | } | |
1483 | 1489 | } | |
1484 | 1490 | ||
1485 | 1491 | ||
1486 | 1492 | ||
1487 | - | @Callable( | |
1488 | - | func unstakeAndGet ( | |
1489 | - | let | |
1493 | + | @Callable(eV) | |
1494 | + | func unstakeAndGet (bY) = { | |
1495 | + | let hH = if ((size(eV.payments) != 0)) | |
1490 | 1496 | then throw("No payments are expected") | |
1491 | 1497 | else true | |
1492 | - | if (( | |
1498 | + | if ((hH == hH)) | |
1493 | 1499 | then { | |
1494 | - | let | |
1495 | - | let | |
1496 | - | let | |
1497 | - | if (( | |
1500 | + | let dc = bc() | |
1501 | + | let dp = fromBase58String(dc[q]) | |
1502 | + | let eB = eu(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1503 | + | if ((eB == eB)) | |
1498 | 1504 | then { | |
1499 | - | let | |
1500 | - | if (( | |
1505 | + | let hy = invoke(bu, "unstake", [toBase58String(dp), bY], nil) | |
1506 | + | if ((hy == hy)) | |
1501 | 1507 | then { | |
1502 | - | let | |
1503 | - | let | |
1504 | - | let | |
1505 | - | let | |
1506 | - | let | |
1507 | - | let | |
1508 | - | let | |
1508 | + | let dY = dl(toBase58String(eV.transactionId), toBase58String(dp), bY, eV.caller) | |
1509 | + | let dE = dY._1 | |
1510 | + | let dF = dY._2 | |
1511 | + | let ds = parseIntValue(dY._9) | |
1512 | + | let dG = dY._10 | |
1513 | + | let gF = cO(dE, dF) | |
1514 | + | let hI = if (if (ba()) | |
1509 | 1515 | then true | |
1510 | - | else ( | |
1511 | - | then throw(("Get operation is blocked by admin. Status = " + toString( | |
1516 | + | else (ds == n)) | |
1517 | + | then throw(("Get operation is blocked by admin. Status = " + toString(ds))) | |
1512 | 1518 | else true | |
1513 | - | if (( | |
1519 | + | if ((hI == hI)) | |
1514 | 1520 | then { | |
1515 | - | let | |
1516 | - | if (( | |
1521 | + | let hC = invoke(aV, "burn", [bY], [AttachedPayment(dp, bY)]) | |
1522 | + | if ((hC == hC)) | |
1517 | 1523 | then { | |
1518 | - | let | |
1519 | - | let | |
1520 | - | let | |
1521 | - | let | |
1522 | - | if (( | |
1523 | - | then (( | |
1524 | + | let hJ = eC(-(dE), -(dF), 0) | |
1525 | + | let gU = hJ._1 | |
1526 | + | let et = hJ._2 | |
1527 | + | let gV = eH(eB, et) | |
1528 | + | if ((gV == gV)) | |
1529 | + | then ((gF ++ dG) ++ gU) | |
1524 | 1530 | else throw("Strict value is not equal to itself.") | |
1525 | 1531 | } | |
1526 | 1532 | else throw("Strict value is not equal to itself.") | |
1527 | 1533 | } | |
1528 | 1534 | else throw("Strict value is not equal to itself.") | |
1529 | 1535 | } | |
1530 | 1536 | else throw("Strict value is not equal to itself.") | |
1531 | 1537 | } | |
1532 | 1538 | else throw("Strict value is not equal to itself.") | |
1533 | 1539 | } | |
1534 | 1540 | else throw("Strict value is not equal to itself.") | |
1535 | 1541 | } | |
1536 | 1542 | ||
1537 | 1543 | ||
1538 | 1544 | ||
1539 | - | @Callable( | |
1540 | - | func unstakeAndGetNoLess ( | |
1541 | - | let | |
1545 | + | @Callable(eV) | |
1546 | + | func unstakeAndGetNoLess (hx,hK,hF) = { | |
1547 | + | let ho = if (ba()) | |
1542 | 1548 | then true | |
1543 | - | else ( | |
1544 | - | let | |
1549 | + | else (bn == n) | |
1550 | + | let fP = [if (!(ho)) | |
1545 | 1551 | then true | |
1546 | - | else throw("get operation is blocked by admin"), if ((size( | |
1552 | + | else throw("get operation is blocked by admin"), if ((size(eV.payments) == 0)) | |
1547 | 1553 | then true | |
1548 | 1554 | else throw("no payments are expected")] | |
1549 | - | if (( | |
1555 | + | if ((fP == fP)) | |
1550 | 1556 | then { | |
1551 | - | let | |
1552 | - | if (( | |
1557 | + | let eB = eu(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1558 | + | if ((eB == eB)) | |
1553 | 1559 | then { | |
1554 | - | let | |
1555 | - | if (( | |
1560 | + | let hy = invoke(bu, "unstake", [toBase58String(bo), hx], nil) | |
1561 | + | if ((hy == hy)) | |
1556 | 1562 | then { | |
1557 | - | let | |
1558 | - | let | |
1559 | - | let | |
1560 | - | let | |
1561 | - | let | |
1562 | - | let | |
1563 | + | let dY = dl(toBase58String(eV.transactionId), toBase58String(bo), hx, eV.caller) | |
1564 | + | let dE = dY._1 | |
1565 | + | let dF = dY._2 | |
1566 | + | let dG = dY._10 | |
1567 | + | let gF = cO(dE, dF) | |
1568 | + | let hL = [if ((dE >= hK)) | |
1563 | 1569 | then true | |
1564 | - | else throw(makeString(["amount asset amount to receive is less than ", toString( | |
1570 | + | else throw(makeString(["amount asset amount to receive is less than ", toString(hK)], "")), if ((dF >= hF)) | |
1565 | 1571 | then true | |
1566 | - | else throw(makeString(["price asset amount to receive is less than ", toString( | |
1567 | - | if (( | |
1572 | + | else throw(makeString(["price asset amount to receive is less than ", toString(hF)], ""))] | |
1573 | + | if ((hL == hL)) | |
1568 | 1574 | then { | |
1569 | - | let | |
1570 | - | if (( | |
1575 | + | let hC = invoke(aV, "burn", [hx], [AttachedPayment(bo, hx)]) | |
1576 | + | if ((hC == hC)) | |
1571 | 1577 | then { | |
1572 | - | let | |
1573 | - | let | |
1574 | - | let | |
1575 | - | let | |
1576 | - | if (( | |
1577 | - | then (( | |
1578 | + | let hM = eC(-(dE), -(dF), 0) | |
1579 | + | let gU = hM._1 | |
1580 | + | let et = hM._2 | |
1581 | + | let gV = eH(eB, et) | |
1582 | + | if ((gV == gV)) | |
1583 | + | then ((gF ++ dG) ++ gU) | |
1578 | 1584 | else throw("Strict value is not equal to itself.") | |
1579 | 1585 | } | |
1580 | 1586 | else throw("Strict value is not equal to itself.") | |
1581 | 1587 | } | |
1582 | 1588 | else throw("Strict value is not equal to itself.") | |
1583 | 1589 | } | |
1584 | 1590 | else throw("Strict value is not equal to itself.") | |
1585 | 1591 | } | |
1586 | 1592 | else throw("Strict value is not equal to itself.") | |
1587 | 1593 | } | |
1588 | 1594 | else throw("Strict value is not equal to itself.") | |
1589 | 1595 | } | |
1590 | 1596 | ||
1591 | 1597 | ||
1592 | 1598 | ||
1593 | - | @Callable( | |
1594 | - | func activate ( | |
1599 | + | @Callable(eV) | |
1600 | + | func activate (hN,hO) = if ((toString(eV.caller) != toString(aV))) | |
1595 | 1601 | then throw("permissions denied") | |
1596 | - | else $Tuple2([StringEntry(ae(), | |
1602 | + | else $Tuple2([StringEntry(ae(), hN), StringEntry(af(), hO)], "success") | |
1597 | 1603 | ||
1598 | 1604 | ||
1599 | 1605 | ||
1600 | - | @Callable( | |
1606 | + | @Callable(eV) | |
1601 | 1607 | func refreshKLp () = { | |
1602 | - | let | |
1603 | - | let | |
1608 | + | let hP = valueOrElse(getInteger(ak), 0) | |
1609 | + | let hQ = if (((height - hP) >= an)) | |
1604 | 1610 | then unit | |
1605 | - | else | |
1606 | - | if (( | |
1611 | + | else aS(makeString([toString(an), " blocks have not passed since the previous call"], "")) | |
1612 | + | if ((hQ == hQ)) | |
1607 | 1613 | then { | |
1608 | - | let | |
1609 | - | let | |
1610 | - | let | |
1611 | - | let | |
1612 | - | let | |
1613 | - | then | |
1614 | - | else | |
1615 | - | $Tuple2( | |
1614 | + | let eO = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, aj), "0")), aU("invalid kLp")) | |
1615 | + | let hR = eC(0, 0, 0) | |
1616 | + | let hS = hR._1 | |
1617 | + | let et = hR._2 | |
1618 | + | let eF = if ((eO != et)) | |
1619 | + | then hS | |
1620 | + | else aS("nothing to refresh") | |
1621 | + | $Tuple2(eF, toString(et)) | |
1616 | 1622 | } | |
1617 | 1623 | else throw("Strict value is not equal to itself.") | |
1618 | 1624 | } | |
1619 | 1625 | ||
1620 | 1626 | ||
1621 | 1627 | ||
1622 | - | @Callable( | |
1623 | - | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, | |
1628 | + | @Callable(eV) | |
1629 | + | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, bc()) | |
1624 | 1630 | ||
1625 | 1631 | ||
1626 | 1632 | ||
1627 | - | @Callable( | |
1628 | - | func getAccBalanceWrapperREADONLY (ap) = $Tuple2(nil, | |
1633 | + | @Callable(eV) | |
1634 | + | func getAccBalanceWrapperREADONLY (ap) = $Tuple2(nil, bL(ap)) | |
1629 | 1635 | ||
1630 | 1636 | ||
1631 | 1637 | ||
1632 | - | @Callable( | |
1633 | - | func calcPricesWrapperREADONLY ( | |
1634 | - | let | |
1635 | - | $Tuple2(nil, [toString( | |
1638 | + | @Callable(eV) | |
1639 | + | func calcPricesWrapperREADONLY (cW,cX,db) = { | |
1640 | + | let dk = da(cW, cX, db) | |
1641 | + | $Tuple2(nil, [toString(dk[0]), toString(dk[1]), toString(dk[2])]) | |
1636 | 1642 | } | |
1637 | 1643 | ||
1638 | 1644 | ||
1639 | 1645 | ||
1640 | - | @Callable( | |
1646 | + | @Callable(eV) | |
1641 | 1647 | func toX18WrapperREADONLY (E,F) = $Tuple2(nil, toString(D(E, F))) | |
1642 | 1648 | ||
1643 | 1649 | ||
1644 | 1650 | ||
1645 | - | @Callable( | |
1651 | + | @Callable(eV) | |
1646 | 1652 | func fromX18WrapperREADONLY (I,J) = $Tuple2(nil, H(parseBigIntValue(I), J)) | |
1647 | 1653 | ||
1648 | 1654 | ||
1649 | 1655 | ||
1650 | - | @Callable( | |
1651 | - | func calcPriceBigIntWrapperREADONLY ( | |
1656 | + | @Callable(eV) | |
1657 | + | func calcPriceBigIntWrapperREADONLY (bP,bQ) = $Tuple2(nil, toString(bO(parseBigIntValue(bP), parseBigIntValue(bQ)))) | |
1652 | 1658 | ||
1653 | 1659 | ||
1654 | 1660 | ||
1655 | - | @Callable( | |
1656 | - | func estimatePutOperationWrapperREADONLY ( | |
1661 | + | @Callable(eV) | |
1662 | + | func estimatePutOperationWrapperREADONLY (dm,dI,dJ,dK,dL,dM,ab,dN,dO) = $Tuple2(nil, dH(dm, dI, dJ, dK, dL, dM, ab, dN, dO)) | |
1657 | 1663 | ||
1658 | 1664 | ||
1659 | 1665 | ||
1660 | - | @Callable( | |
1661 | - | func estimateGetOperationWrapperREADONLY ( | |
1662 | - | let | |
1663 | - | $Tuple2(nil, $Tuple10( | |
1666 | + | @Callable(eV) | |
1667 | + | func estimateGetOperationWrapperREADONLY (dm,dn,do,ab) = { | |
1668 | + | let dY = dl(dm, dn, do, addressFromStringValue(ab)) | |
1669 | + | $Tuple2(nil, $Tuple10(dY._1, dY._2, dY._3, dY._4, dY._5, dY._6, dY._7, toString(dY._8), dY._9, dY._10)) | |
1664 | 1670 | } | |
1665 | 1671 | ||
1666 | 1672 | ||
1667 | 1673 | ||
1668 | - | @Callable( | |
1674 | + | @Callable(eV) | |
1669 | 1675 | func statsREADONLY () = { | |
1670 | - | let | |
1671 | - | let | |
1672 | - | let | |
1673 | - | let | |
1674 | - | let | |
1675 | - | let | |
1676 | - | let | |
1677 | - | let | |
1678 | - | let | |
1679 | - | let | |
1680 | - | let | |
1681 | - | let | |
1676 | + | let dc = bc() | |
1677 | + | let dp = fromBase58String(dc[q]) | |
1678 | + | let hT = dc[r] | |
1679 | + | let hU = dc[s] | |
1680 | + | let dR = dc[v] | |
1681 | + | let dS = dc[w] | |
1682 | + | let dd = parseIntValue(dc[t]) | |
1683 | + | let de = parseIntValue(dc[u]) | |
1684 | + | let hV = valueOrErrorMessage(assetInfo(dp), (("Asset " + toBase58String(dp)) + " doesn't exist")).quantity | |
1685 | + | let hW = bL(hT) | |
1686 | + | let hX = bL(hU) | |
1687 | + | let hY = if ((hV == 0)) | |
1682 | 1688 | then [e, e, e] | |
1683 | - | else | |
1684 | - | let | |
1685 | - | let | |
1686 | - | let | |
1687 | - | let | |
1688 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString( | |
1689 | + | else da(hW, hX, hV) | |
1690 | + | let dz = 0 | |
1691 | + | let hZ = H(hY[1], b) | |
1692 | + | let ia = H(hY[2], b) | |
1693 | + | let ib = value(getInteger(aV, aD(toString(this)))) | |
1694 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(hW), toString(hX), toString(hV), toString(dz), toString(hZ), toString(ia), toString(ib)], j)) | |
1689 | 1695 | } | |
1690 | 1696 | ||
1691 | 1697 | ||
1692 | 1698 | ||
1693 | - | @Callable( | |
1694 | - | func evaluatePutByAmountAssetREADONLY ( | |
1695 | - | let | |
1696 | - | let | |
1697 | - | let | |
1698 | - | let | |
1699 | - | let | |
1700 | - | let | |
1701 | - | let | |
1702 | - | let | |
1703 | - | let | |
1704 | - | let | |
1705 | - | let | |
1706 | - | let | |
1707 | - | let | |
1708 | - | let | |
1709 | - | let | |
1699 | + | @Callable(eV) | |
1700 | + | func evaluatePutByAmountAssetREADONLY (dJ) = { | |
1701 | + | let dc = bc() | |
1702 | + | let dp = fromBase58String(dc[q]) | |
1703 | + | let dP = dc[r] | |
1704 | + | let dq = fromBase58String(dP) | |
1705 | + | let dQ = dc[s] | |
1706 | + | let dr = fromBase58String(dQ) | |
1707 | + | let dd = parseIntValue(dc[t]) | |
1708 | + | let de = parseIntValue(dc[u]) | |
1709 | + | let ds = dc[p] | |
1710 | + | let hV = valueOrErrorMessage(assetInfo(dp), (("Asset " + toBase58String(dp)) + " doesn't exist")).quantity | |
1711 | + | let hW = bL(dP) | |
1712 | + | let hX = bL(dQ) | |
1713 | + | let cY = D(hW, dd) | |
1714 | + | let cZ = D(hX, de) | |
1715 | + | let dy = if ((hV == 0)) | |
1710 | 1716 | then e | |
1711 | - | else | |
1712 | - | let | |
1713 | - | let | |
1714 | - | let | |
1715 | - | let | |
1716 | - | let | |
1717 | - | let | |
1718 | - | let | |
1719 | - | let | |
1720 | - | let | |
1721 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString( | |
1717 | + | else bO(cZ, cY) | |
1718 | + | let dV = D(dJ, dd) | |
1719 | + | let dW = fraction(dV, dy, d) | |
1720 | + | let dL = H(dW, de) | |
1721 | + | let fb = dH("", 500000, dJ, dq, dL, dr, "", true, false) | |
1722 | + | let eg = fb._1 | |
1723 | + | let ic = fb._3 | |
1724 | + | let du = fb._4 | |
1725 | + | let dw = fb._5 | |
1726 | + | let dt = fb._6 | |
1727 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(eg), toString(H(dy, b)), toString(du), toString(dw), toString(dt), ds, toString(dJ), toString(dL)], j)) | |
1722 | 1728 | } | |
1723 | 1729 | ||
1724 | 1730 | ||
1725 | 1731 | ||
1726 | - | @Callable( | |
1727 | - | func evaluatePutByPriceAssetREADONLY ( | |
1728 | - | let | |
1729 | - | let | |
1730 | - | let | |
1731 | - | let | |
1732 | - | let | |
1733 | - | let | |
1734 | - | let | |
1735 | - | let | |
1736 | - | let | |
1737 | - | let | |
1738 | - | let | |
1739 | - | let | |
1740 | - | let | |
1741 | - | let | |
1742 | - | let | |
1732 | + | @Callable(eV) | |
1733 | + | func evaluatePutByPriceAssetREADONLY (dL) = { | |
1734 | + | let dc = bc() | |
1735 | + | let dp = fromBase58String(dc[q]) | |
1736 | + | let dP = dc[r] | |
1737 | + | let dq = fromBase58String(dP) | |
1738 | + | let dQ = dc[s] | |
1739 | + | let dr = fromBase58String(dQ) | |
1740 | + | let dd = parseIntValue(dc[t]) | |
1741 | + | let de = parseIntValue(dc[u]) | |
1742 | + | let ds = dc[p] | |
1743 | + | let hV = valueOrErrorMessage(assetInfo(dp), (("Asset " + toBase58String(dp)) + " doesn't exist")).quantity | |
1744 | + | let id = bL(dP) | |
1745 | + | let ie = bL(dQ) | |
1746 | + | let if = D(id, dd) | |
1747 | + | let ig = D(ie, de) | |
1748 | + | let dy = if ((hV == 0)) | |
1743 | 1749 | then e | |
1744 | - | else | |
1745 | - | let | |
1746 | - | let | |
1747 | - | let | |
1748 | - | let | |
1749 | - | let | |
1750 | - | let | |
1751 | - | let | |
1752 | - | let | |
1753 | - | let | |
1754 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString( | |
1750 | + | else bO(ig, if) | |
1751 | + | let dW = D(dL, de) | |
1752 | + | let dV = fraction(dW, d, dy) | |
1753 | + | let dJ = H(dV, dd) | |
1754 | + | let fb = dH("", 500000, dJ, dq, dL, dr, "", true, false) | |
1755 | + | let eg = fb._1 | |
1756 | + | let ic = fb._3 | |
1757 | + | let du = fb._4 | |
1758 | + | let dw = fb._5 | |
1759 | + | let dt = fb._6 | |
1760 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(eg), toString(H(dy, b)), toString(du), toString(dw), toString(dt), ds, toString(dJ), toString(dL)], j)) | |
1755 | 1761 | } | |
1756 | 1762 | ||
1757 | 1763 | ||
1758 | 1764 | ||
1759 | - | @Callable( | |
1760 | - | func evaluateGetREADONLY ( | |
1761 | - | let | |
1762 | - | let | |
1763 | - | let | |
1764 | - | let | |
1765 | - | let | |
1766 | - | let | |
1767 | - | let | |
1768 | - | let | |
1769 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString( | |
1765 | + | @Callable(eV) | |
1766 | + | func evaluateGetREADONLY (ih,ii) = { | |
1767 | + | let dY = dl("", ih, ii, this) | |
1768 | + | let dE = dY._1 | |
1769 | + | let dF = dY._2 | |
1770 | + | let du = dY._5 | |
1771 | + | let dw = dY._6 | |
1772 | + | let dt = dY._7 | |
1773 | + | let dz = dY._8 | |
1774 | + | let ds = parseIntValue(dY._9) | |
1775 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(dE), toString(dF), toString(du), toString(dw), toString(dt), toString(dz), toString(ds)], j)) | |
1770 | 1776 | } | |
1771 | 1777 | ||
1772 | 1778 | ||
1773 | - | @Verifier( | |
1774 | - | func | |
1775 | - | let | |
1776 | - | let | |
1777 | - | if ($isInstanceOf( | |
1779 | + | @Verifier(ij) | |
1780 | + | func ik () = { | |
1781 | + | let il = { | |
1782 | + | let bV = gh() | |
1783 | + | if ($isInstanceOf(bV, "ByteVector")) | |
1778 | 1784 | then { | |
1779 | - | let | |
1780 | - | | |
1785 | + | let gl = bV | |
1786 | + | gl | |
1781 | 1787 | } | |
1782 | - | else if ($isInstanceOf( | |
1783 | - | then | |
1788 | + | else if ($isInstanceOf(bV, "Unit")) | |
1789 | + | then ij.senderPublicKey | |
1784 | 1790 | else throw("Match error") | |
1785 | 1791 | } | |
1786 | - | let | |
1787 | - | if ($isInstanceOf( | |
1792 | + | let bV = ij | |
1793 | + | if ($isInstanceOf(bV, "Order")) | |
1788 | 1794 | then { | |
1789 | - | let eH = bT | |
1790 | - | let ij = aZ() | |
1791 | - | let ik = eG(eH) | |
1792 | - | let aI = ik._1 | |
1793 | - | let aJ = ik._2 | |
1794 | - | let aK = sigVerify(eH.bodyBytes, eH.proofs[0], eH.senderPublicKey) | |
1795 | - | let aL = sigVerify(eH.bodyBytes, eH.proofs[1], ij) | |
1796 | - | if (if (if (aI) | |
1797 | - | then aK | |
1795 | + | let eK = bV | |
1796 | + | let im = bb() | |
1797 | + | let in = if (eG()) | |
1798 | + | then $Tuple2(true, "") | |
1799 | + | else eJ(eK) | |
1800 | + | let aK = in._1 | |
1801 | + | let aL = in._2 | |
1802 | + | let aM = sigVerify(eK.bodyBytes, eK.proofs[0], eK.senderPublicKey) | |
1803 | + | let aN = sigVerify(eK.bodyBytes, eK.proofs[1], im) | |
1804 | + | if (if (if (aK) | |
1805 | + | then aM | |
1798 | 1806 | else false) | |
1799 | - | then | |
1807 | + | then aN | |
1800 | 1808 | else false) | |
1801 | 1809 | then true | |
1802 | - | else | |
1810 | + | else aJ(aK, aL, aM, aN) | |
1803 | 1811 | } | |
1804 | - | else if ($isInstanceOf( | |
1812 | + | else if ($isInstanceOf(bV, "SetScriptTransaction")) | |
1805 | 1813 | then { | |
1806 | - | let | |
1807 | - | if (sigVerify( | |
1814 | + | let gi = bV | |
1815 | + | if (sigVerify(ij.bodyBytes, ij.proofs[0], il)) | |
1808 | 1816 | then true | |
1809 | 1817 | else { | |
1810 | - | let | |
1811 | - | let | |
1812 | - | let | |
1813 | - | if (( | |
1814 | - | then ( | |
1818 | + | let io = blake2b256(value(gi.script)) | |
1819 | + | let ip = fromBase64String(value(getString(aV, aF()))) | |
1820 | + | let iq = scriptHash(this) | |
1821 | + | if ((ip == io)) | |
1822 | + | then (iq != io) | |
1815 | 1823 | else false | |
1816 | 1824 | } | |
1817 | 1825 | } | |
1818 | - | else sigVerify( | |
1826 | + | else sigVerify(ij.bodyBytes, ij.proofs[0], il) | |
1819 | 1827 | } | |
1820 | 1828 |
github/deemru/w8io/026f985 660.54 ms ◑