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