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