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