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