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