tx · C2N5GK9WxVVXSfWq39KyMvsgsmdQ7LDKN1bHRUbgJfxd 3N6BhgoG1mZeN4UGVgSvba8ifuGQxdafTfo: -0.01400000 Waves 2021.07.07 19:43 [1603427] smart account 3N6BhgoG1mZeN4UGVgSvba8ifuGQxdafTfo > SELF 0.00000000 Waves
{ "type": 13, "id": "C2N5GK9WxVVXSfWq39KyMvsgsmdQ7LDKN1bHRUbgJfxd", "fee": 1400000, "feeAssetId": null, "timestamp": 1625676261424, "version": 2, "chainId": 84, "sender": "3N6BhgoG1mZeN4UGVgSvba8ifuGQxdafTfo", "senderPublicKey": "9j7mtJYK5LgQZ7R4oo8NQfXTfApDBhiKbmPo4ZjWRCCA", "proofs": [ "2Pb9bYBcmKjD7ht5MWBANDDYq9XW9habLuYZSga4Bq5unsQ3Vpq4dHF3wFDXiCBPYs4HWEQC3hFDQj8LB92AjHY6" ], "script": "base64:AAIEAAAAAAAAABkIAhIAEgMKAQESABIDCgEBEgASABIDCgEBAAAAOwAAAAAHdmVyc2lvbgIAAAAFMS4wLjAAAAAACmtleVZlcnNpb24CAAAAB3ZlcnNpb24AAAAACWtleUFjdGl2ZQIAAAAGYWN0aXZlAAAAAAtrZXlBc3NldElkQQIAAAAKQV9hc3NldF9pZAAAAAALa2V5QXNzZXRJZEICAAAACkJfYXNzZXRfaWQAAAAAC2tleUJhbGFuY2VBAgAAAA9BX2Fzc2V0X2JhbGFuY2UAAAAAC2tleUJhbGFuY2VCAgAAAA9CX2Fzc2V0X2JhbGFuY2UAAAAAD2tleVNoYXJlQXNzZXRJZAIAAAAOc2hhcmVfYXNzZXRfaWQAAAAAE2tleVNoYXJlQXNzZXRTdXBwbHkCAAAAEnNoYXJlX2Fzc2V0X3N1cHBseQAAAAANa2V5Q29tbWlzc2lvbgIAAAAKY29tbWlzc2lvbgAAAAAba2V5Q29tbWlzc2lvblNjYWxlRGVsaW1pdGVyAgAAABpjb21taXNzaW9uX3NjYWxlX2RlbGltaXRlcgAAAAAIa2V5Q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AAAAxhZG1pblB1YktleTMAAAAAAAAAAAEAAAAAAAAAAAAJAABnAAAAAgkAAGQAAAACCQAAZAAAAAIFAAAAEmFkbWluUHViS2V5MVNpZ25lZAUAAAASYWRtaW5QdWJLZXkyU2lnbmVkBQAAABJhZG1pblB1YktleTNTaWduZWQAAAAAAAAAAAIv6dkj", "height": 1603427, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HCYnn4FCaeak93DqJZSEwpvv61o6M35y8WyXcKFbkMqN Next: zx5MqzJCvXEPAmfvTjWFZed3NyCEUVrUzNSAoLL8n97 Diff:
Old | New | Differences | |
---|---|---|---|
35 | 35 | ||
36 | 36 | let q = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
37 | 37 | ||
38 | - | let r = Address(base58' | |
38 | + | let r = Address(base58'3NAGTtZz6WpupSN89NZD5rMZwwziZEg4Kx4') | |
39 | 39 | ||
40 | 40 | let s = Address(base58'3N6q7sCGSSLBUXDdjBdYGTJbZGZfhhh8cNg') | |
41 | 41 | ||
45 | 45 | ||
46 | 46 | let v = base58'2HAJrwa8q4SxBx9cHYaBTQdBjdk5wwqdof7ccpAx2uhZ' | |
47 | 47 | ||
48 | - | let w = Address(base58' | |
48 | + | let w = Address(base58'3N77kfPbQyjXWpDALX3xjKw3iEGMWEctV37') | |
49 | 49 | ||
50 | 50 | let x = Address(base58'3MzTHd4e3yukNUURApVLVzH5uxeEsXHD6yY') | |
51 | 51 | ||
52 | - | let y = | |
52 | + | let y = 270000 | |
53 | 53 | ||
54 | 54 | let z = getBooleanValue(this, c) | |
55 | 55 | ||
216 | 216 | func ax (ay,az) = throw((((((((((((((((("Insufficient DApp balance to pay " + toString(ay)) + " ") + E) + " and ") + toString(az)) + " ") + I) + " due to staking. Available: ") + toString(ae)) + " ") + E) + " and ") + toString(af)) + " ") + I) + ". Please contact support in Telegram: https://t.me/swopfisupport")) | |
217 | 217 | ||
218 | 218 | ||
219 | - | @Callable(aA) | |
219 | + | func aA () = am(((((((((((((((("Suspicious state. Actual balances: " + toString(ag)) + " ") + E) + ", ") + toString(ah)) + " ") + I) + ". State: ") + toString(J)) + " ") + E) + ", ") + toString(K)) + " ") + I)) | |
220 | + | ||
221 | + | ||
222 | + | @Callable(aB) | |
220 | 223 | func init () = { | |
221 | - | let | |
222 | - | let | |
223 | - | let | |
224 | - | let | |
225 | - | let | |
226 | - | let | |
227 | - | let | |
228 | - | let | |
229 | - | let | |
230 | - | let | |
231 | - | let | |
232 | - | let | |
233 | - | let | |
234 | - | let | |
224 | + | let aC = $Tuple2(aB.payments[0].amount, aB.payments[0].assetId) | |
225 | + | let aD = aC._1 | |
226 | + | let aE = aC._2 | |
227 | + | let aF = $Tuple2(aB.payments[1].amount, aB.payments[1].assetId) | |
228 | + | let aG = aF._1 | |
229 | + | let aH = aF._2 | |
230 | + | let aI = aj(aE) | |
231 | + | let aJ = aI._1 | |
232 | + | let aK = aI._2 | |
233 | + | let aL = aI._3 | |
234 | + | let aM = aj(aH) | |
235 | + | let aN = aM._1 | |
236 | + | let aO = aM._2 | |
237 | + | let aP = aM._3 | |
235 | 238 | if (isDefined(getBoolean(this, c))) | |
236 | 239 | then throw("DApp is already active") | |
237 | - | else if (( | |
240 | + | else if ((aE == aH)) | |
238 | 241 | then throw("Assets must be different") | |
239 | 242 | else { | |
240 | - | let | |
241 | - | let | |
242 | - | let | |
243 | - | let | |
244 | - | let | |
245 | - | let | |
246 | - | [StringEntry(b, a), BooleanEntry(c, true), StringEntry(d, | |
243 | + | let aQ = ((("s" + take(aK, 7)) + "_") + take(aO, 7)) | |
244 | + | let aR = ((((("ShareToken of SwopFi protocol for " + aK) + " and ") + aO) + " at address ") + toString(this)) | |
245 | + | let aS = ((aL + aP) / 2) | |
246 | + | let aT = fraction(pow(aD, aL, 5, 1, aL, HALFDOWN), pow(aG, aP, 5, 1, aP, HALFDOWN), pow(10, 0, aS, 0, 0, HALFDOWN)) | |
247 | + | let aU = Issue(aQ, aR, aT, aS, true) | |
248 | + | let aV = calculateAssetId(aU) | |
249 | + | [StringEntry(b, a), BooleanEntry(c, true), StringEntry(d, aJ), StringEntry(e, aN), IntegerEntry(f, aD), IntegerEntry(g, aG), IntegerEntry(j, N), IntegerEntry(k, P), aU, StringEntry(h, toBase58String(aV)), IntegerEntry(i, aT), ScriptTransfer(aB.caller, aT, aV)] | |
247 | 250 | } | |
248 | 251 | } | |
249 | 252 | ||
250 | 253 | ||
251 | 254 | ||
252 | - | @Callable( | |
253 | - | func replenishWithTwoTokens ( | |
254 | - | let | |
255 | - | let | |
256 | - | let | |
257 | - | let | |
258 | - | let | |
259 | - | let | |
260 | - | let | |
261 | - | let | |
255 | + | @Callable(aB) | |
256 | + | func replenishWithTwoTokens (aW) = { | |
257 | + | let aE = aB.payments[0].assetId | |
258 | + | let aH = aB.payments[1].assetId | |
259 | + | let aD = ar(aB.payments[0].amount, aE) | |
260 | + | let aG = ar(aB.payments[1].amount, aH) | |
261 | + | let aX = fraction(fraction(J, R, aD), Q, fraction(K, R, aG)) | |
262 | + | let aY = fraction(aD, R, J) | |
263 | + | let aZ = fraction(aG, R, K) | |
264 | + | let ba = fraction(min([aY, aZ]), M, R) | |
262 | 265 | if (!(z)) | |
263 | 266 | then throw("DApp is inactive at this moment") | |
264 | - | else if (if ((0 > | |
267 | + | else if (if ((0 > aW)) | |
265 | 268 | then true | |
266 | - | else ( | |
267 | - | then throw(((("Slippage tolerance must be between 0 and " + toString(S)) + " inclusively. Actual: ") + toString( | |
268 | - | else if ((size( | |
269 | + | else (aW > S)) | |
270 | + | then throw(((("Slippage tolerance must be between 0 and " + toString(S)) + " inclusively. Actual: ") + toString(aW))) | |
271 | + | else if ((size(aB.payments) != 2)) | |
269 | 272 | then throw("Two attached assets expected") | |
270 | - | else if (if (( | |
273 | + | else if (if ((aE != C)) | |
271 | 274 | then true | |
272 | - | else ( | |
275 | + | else (aH != D)) | |
273 | 276 | then throw(((("Incorrect assets attached. Expected: " + A) + " and ") + B)) | |
274 | - | else if (if ((((Q * (S - | |
277 | + | else if (if ((((Q * (S - aW)) / S) > aX)) | |
275 | 278 | then true | |
276 | - | else ( | |
279 | + | else (aX > ((Q * (S + aW)) / S))) | |
277 | 280 | then throw("Incorrect assets amount: amounts must have the contract ratio") | |
278 | - | else if (( | |
281 | + | else if ((ba == 0)) | |
279 | 282 | then throw("Too small amount to replenish") | |
280 | 283 | else if (!(ai)) | |
281 | - | then ([ScriptTransfer( | |
282 | - | else [IntegerEntry(f, (J + | |
284 | + | then ([ScriptTransfer(aB.caller, aD, aE), ScriptTransfer(aB.caller, aG, aH)] ++ aA()) | |
285 | + | else [IntegerEntry(f, (J + aD)), IntegerEntry(g, (K + aG)), IntegerEntry(i, (M + ba)), Reissue(L, ba, true), ScriptTransfer(aB.caller, ba, L)] | |
283 | 286 | } | |
284 | 287 | ||
285 | 288 | ||
286 | 289 | ||
287 | - | @Callable( | |
290 | + | @Callable(aB) | |
288 | 291 | func withdraw () = { | |
289 | - | let | |
290 | - | let | |
291 | - | let | |
292 | - | let | |
293 | - | let | |
292 | + | let bb = $Tuple2(aB.payments[0].amount, aB.payments[0].assetId) | |
293 | + | let bc = bb._1 | |
294 | + | let bd = bb._2 | |
295 | + | let be = ar(fraction(bc, J, M), C) | |
296 | + | let bf = ar(fraction(bc, K, M), D) | |
294 | 297 | if (!(z)) | |
295 | 298 | then throw("DApp is inactive at this moment") | |
296 | - | else if ((size( | |
299 | + | else if ((size(aB.payments) != 1)) | |
297 | 300 | then throw("One attached payment expected") | |
298 | - | else if (( | |
301 | + | else if ((bd != L)) | |
299 | 302 | then throw(("Incorrect asset attached. Expected: " + toBase58String(L))) | |
300 | 303 | else if (!(ai)) | |
301 | - | then ([ScriptTransfer( | |
302 | - | else if (if (( | |
304 | + | then ([ScriptTransfer(aB.caller, bc, bd)] ++ aA()) | |
305 | + | else if (if ((be > ae)) | |
303 | 306 | then true | |
304 | - | else ( | |
305 | - | then ax( | |
306 | - | else [IntegerEntry(f, (J - | |
307 | + | else (bf > af)) | |
308 | + | then ax(be, bf) | |
309 | + | else [IntegerEntry(f, (J - be)), IntegerEntry(g, (K - bf)), IntegerEntry(i, (M - bc)), Burn(L, bc), ScriptTransfer(aB.caller, be, C), ScriptTransfer(aB.caller, bf, D)] | |
307 | 310 | } | |
308 | 311 | ||
309 | 312 | ||
310 | 313 | ||
311 | - | @Callable( | |
312 | - | func exchange ( | |
313 | - | let | |
314 | - | let | |
315 | - | let | |
316 | - | func | |
317 | - | let | |
318 | - | let | |
319 | - | let | |
320 | - | if (( | |
321 | - | then throw(((("Calculated amount to receive " + toString( | |
322 | - | else $Tuple3( | |
314 | + | @Callable(aB) | |
315 | + | func exchange (bg) = { | |
316 | + | let bh = $Tuple2(aB.payments[0].amount, aB.payments[0].assetId) | |
317 | + | let bc = bh._1 | |
318 | + | let bd = bh._2 | |
319 | + | func bi (bj,bk) = { | |
320 | + | let bl = fraction(bk, bc, (bc + bj)) | |
321 | + | let bm = fraction(bl, (P - N), P) | |
322 | + | let bn = fraction(bl, O, P) | |
323 | + | if ((bg > bm)) | |
324 | + | then throw(((("Calculated amount to receive " + toString(bm)) + " is less than specified minimum ") + toString(bg))) | |
325 | + | else $Tuple3(bl, bm, bn) | |
323 | 326 | } | |
324 | 327 | ||
325 | 328 | if (!(z)) | |
326 | 329 | then throw("DApp is inactive at this moment") | |
327 | - | else if ((0 >= | |
328 | - | then throw(("Minimal amount to receive must be positive. Actual: " + toString( | |
329 | - | else if ((size( | |
330 | + | else if ((0 >= bg)) | |
331 | + | then throw(("Minimal amount to receive must be positive. Actual: " + toString(bg))) | |
332 | + | else if ((size(aB.payments) != 1)) | |
330 | 333 | then throw("One attached payment expected") | |
331 | 334 | else if (!(ai)) | |
332 | - | then ([ScriptTransfer( | |
333 | - | else if (( | |
335 | + | then ([ScriptTransfer(aB.caller, bc, bd)] ++ aA()) | |
336 | + | else if ((bd == C)) | |
334 | 337 | then { | |
335 | - | let | |
336 | - | let | |
337 | - | let | |
338 | - | let | |
339 | - | let | |
340 | - | let | |
341 | - | let | |
342 | - | if (if ((ac >= | |
338 | + | let bo = D | |
339 | + | let bp = bi(J, K) | |
340 | + | let bl = bp._1 | |
341 | + | let bm = bp._2 | |
342 | + | let bn = bp._3 | |
343 | + | let bq = (J + bc) | |
344 | + | let br = ((K - bm) - bn) | |
345 | + | if (if ((ac >= bq)) | |
343 | 346 | then true | |
344 | - | else (ad >= | |
345 | - | then au( | |
346 | - | else [IntegerEntry(f, | |
347 | + | else (ad >= br)) | |
348 | + | then au(bm, af, I) | |
349 | + | else [IntegerEntry(f, bq), IntegerEntry(g, br), ScriptTransfer(aB.caller, bm, bo), ScriptTransfer(r, bn, bo)] | |
347 | 350 | } | |
348 | - | else if (( | |
351 | + | else if ((bd == D)) | |
349 | 352 | then { | |
350 | - | let | |
351 | - | let | |
352 | - | let | |
353 | - | let | |
354 | - | let | |
355 | - | let | |
356 | - | let | |
357 | - | if (if ((ac >= | |
353 | + | let bo = C | |
354 | + | let bs = bi(K, J) | |
355 | + | let bl = bs._1 | |
356 | + | let bm = bs._2 | |
357 | + | let bn = bs._3 | |
358 | + | let bq = ((J - bm) - bn) | |
359 | + | let br = (K + bc) | |
360 | + | if (if ((ac >= bq)) | |
358 | 361 | then true | |
359 | - | else (ad >= | |
360 | - | then au( | |
361 | - | else [IntegerEntry(f, | |
362 | + | else (ad >= br)) | |
363 | + | then au(bm, ae, E) | |
364 | + | else [IntegerEntry(f, bq), IntegerEntry(g, br), ScriptTransfer(aB.caller, bm, bo), ScriptTransfer(r, bn, bo)] | |
362 | 365 | } | |
363 | 366 | else throw(((("Incorrect asset attached. Expected: " + A) + " or ") + B)) | |
364 | 367 | } | |
365 | 368 | ||
366 | 369 | ||
367 | 370 | ||
368 | - | @Callable( | |
371 | + | @Callable(aB) | |
369 | 372 | func shutdown () = if (!(z)) | |
370 | 373 | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, l), "the cause wasn't specified"))) | |
371 | - | else if (!(containsElement([m, n, o, p], | |
374 | + | else if (!(containsElement([m, n, o, p], aB.callerPublicKey))) | |
372 | 375 | then throw("Only admin can call this function") | |
373 | 376 | else am("Paused by admin") | |
374 | 377 | ||
375 | 378 | ||
376 | 379 | ||
377 | - | @Callable( | |
380 | + | @Callable(aB) | |
378 | 381 | func activate () = if (z) | |
379 | 382 | then throw("DApp is already active") | |
380 | - | else if (!(containsElement([m, n, o, p], | |
383 | + | else if (!(containsElement([m, n, o, p], aB.callerPublicKey))) | |
381 | 384 | then throw("Only admin can call this function") | |
382 | 385 | else [BooleanEntry(c, true), DeleteEntry(l)] | |
383 | 386 | ||
384 | 387 | ||
385 | 388 | ||
386 | - | @Callable( | |
387 | - | func takeIntoAccountExtraFunds ( | |
388 | - | let | |
389 | - | let | |
390 | - | let | |
391 | - | then | |
389 | + | @Callable(aB) | |
390 | + | func takeIntoAccountExtraFunds (bt) = { | |
391 | + | let bu = (ag - J) | |
392 | + | let bv = (ah - K) | |
393 | + | let bw = (bu - (if ((C == unit)) | |
394 | + | then bt | |
392 | 395 | else 0)) | |
393 | - | let | |
394 | - | then | |
396 | + | let bx = (bv - (if ((D == unit)) | |
397 | + | then bt | |
395 | 398 | else 0)) | |
396 | 399 | if (!(z)) | |
397 | 400 | then throw("DApp is inactive at this moment") | |
398 | - | else if (( | |
401 | + | else if ((aB.caller != this)) | |
399 | 402 | then throw("Only the DApp itself can call this function") | |
400 | - | else if ((0 > | |
401 | - | then throw(("Argument 'amountLeave' cannot be negative. Actual: " + toString( | |
402 | - | else if (if ((0 > | |
403 | + | else if ((0 > bt)) | |
404 | + | then throw(("Argument 'amountLeave' cannot be negative. Actual: " + toString(bt))) | |
405 | + | else if (if ((0 > bu)) | |
403 | 406 | then true | |
404 | - | else (0 > | |
407 | + | else (0 > bv)) | |
405 | 408 | then am("Enroll amount negative") | |
406 | - | else if (if ((0 > | |
409 | + | else if (if ((0 > bw)) | |
407 | 410 | then true | |
408 | - | else (0 > | |
411 | + | else (0 > bx)) | |
409 | 412 | then throw("Too large amountLeave") | |
410 | - | else [IntegerEntry(f, (J + | |
413 | + | else [IntegerEntry(f, (J + bw)), IntegerEntry(g, (K + bx)), IntegerEntry(("last_income_" + A), bw), IntegerEntry(("last_income_" + B), bx)] | |
411 | 414 | } | |
412 | 415 | ||
413 | 416 | ||
414 | - | @Verifier( | |
415 | - | func | |
416 | - | let F = | |
417 | + | @Verifier(by) | |
418 | + | func bz () = { | |
419 | + | let F = by | |
417 | 420 | if ($isInstanceOf(F, "InvokeScriptTransaction")) | |
418 | 421 | then { | |
419 | - | let | |
420 | - | if (if (if (sigVerify( | |
421 | - | then ( | |
422 | + | let bA = F | |
423 | + | if (if (if (sigVerify(bA.bodyBytes, bA.proofs[0], q)) | |
424 | + | then (bA.dApp == s) | |
422 | 425 | else false) | |
423 | 426 | then true | |
424 | - | else if (if (sigVerify( | |
425 | - | then ( | |
427 | + | else if (if (sigVerify(bA.bodyBytes, bA.proofs[0], q)) | |
428 | + | then (bA.function == "exchange") | |
426 | 429 | else false) | |
427 | 430 | then if (if (if (if ((C == u)) | |
428 | 431 | then (D == t) | |
429 | 432 | else false) | |
430 | - | then ( | |
433 | + | then (bA.dApp == w) | |
431 | 434 | else false) | |
432 | - | then (bz.payments[0].assetId == unit) | |
435 | + | then if ((bA.payments[0].assetId == unit)) | |
436 | + | then true | |
437 | + | else (bA.payments[0].assetId == t) | |
433 | 438 | else false) | |
434 | 439 | then true | |
435 | - | else if (if ( | |
440 | + | else if (if ((C == u)) | |
436 | 441 | then (D == v) | |
437 | 442 | else false) | |
438 | - | then (bz.dApp == x) | |
439 | - | else false) | |
440 | - | then (bz.payments[0].assetId == t) | |
443 | + | then if (if ((bA.dApp == x)) | |
444 | + | then (bA.payments[0].assetId == t) | |
445 | + | else false) | |
446 | + | then true | |
447 | + | else if ((bA.dApp == w)) | |
448 | + | then if ((bA.payments[0].assetId == unit)) | |
449 | + | then true | |
450 | + | else (bA.payments[0].assetId == t) | |
451 | + | else false | |
441 | 452 | else false | |
442 | 453 | else false) | |
443 | 454 | then true | |
444 | - | else if (if (sigVerify( | |
445 | - | then ( | |
455 | + | else if (if (sigVerify(bA.bodyBytes, bA.proofs[0], q)) | |
456 | + | then (bA.dApp == this) | |
446 | 457 | else false) | |
447 | - | then ( | |
458 | + | then (bA.function == "takeIntoAccountExtraFunds") | |
448 | 459 | else false | |
449 | 460 | } | |
450 | - | else sigVerify(bx.bodyBytes, bx.proofs[0], bx.senderPublicKey) | |
461 | + | else { | |
462 | + | let bB = if (sigVerify(by.bodyBytes, by.proofs[0], m)) | |
463 | + | then 1 | |
464 | + | else 0 | |
465 | + | let bC = if (sigVerify(by.bodyBytes, by.proofs[1], n)) | |
466 | + | then 1 | |
467 | + | else 0 | |
468 | + | let bD = if (sigVerify(by.bodyBytes, by.proofs[2], o)) | |
469 | + | then 1 | |
470 | + | else 0 | |
471 | + | (((bB + bC) + bD) >= 2) | |
472 | + | } | |
451 | 473 | } | |
452 | 474 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "1.0.0" | |
5 | 5 | ||
6 | 6 | let b = "version" | |
7 | 7 | ||
8 | 8 | let c = "active" | |
9 | 9 | ||
10 | 10 | let d = "A_asset_id" | |
11 | 11 | ||
12 | 12 | let e = "B_asset_id" | |
13 | 13 | ||
14 | 14 | let f = "A_asset_balance" | |
15 | 15 | ||
16 | 16 | let g = "B_asset_balance" | |
17 | 17 | ||
18 | 18 | let h = "share_asset_id" | |
19 | 19 | ||
20 | 20 | let i = "share_asset_supply" | |
21 | 21 | ||
22 | 22 | let j = "commission" | |
23 | 23 | ||
24 | 24 | let k = "commission_scale_delimiter" | |
25 | 25 | ||
26 | 26 | let l = "shutdown_cause" | |
27 | 27 | ||
28 | 28 | let m = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
29 | 29 | ||
30 | 30 | let n = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
31 | 31 | ||
32 | 32 | let o = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
33 | 33 | ||
34 | 34 | let p = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
35 | 35 | ||
36 | 36 | let q = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
37 | 37 | ||
38 | - | let r = Address(base58' | |
38 | + | let r = Address(base58'3NAGTtZz6WpupSN89NZD5rMZwwziZEg4Kx4') | |
39 | 39 | ||
40 | 40 | let s = Address(base58'3N6q7sCGSSLBUXDdjBdYGTJbZGZfhhh8cNg') | |
41 | 41 | ||
42 | 42 | let t = base58'8UrfDVd5GreeUwm7uPk7eYz1eMv376kzR52C6sANPkwS' | |
43 | 43 | ||
44 | 44 | let u = base58'36mg8NZTaFRDygiVwb8uBnLR51hetJruUCZcxhaVcHj9' | |
45 | 45 | ||
46 | 46 | let v = base58'2HAJrwa8q4SxBx9cHYaBTQdBjdk5wwqdof7ccpAx2uhZ' | |
47 | 47 | ||
48 | - | let w = Address(base58' | |
48 | + | let w = Address(base58'3N77kfPbQyjXWpDALX3xjKw3iEGMWEctV37') | |
49 | 49 | ||
50 | 50 | let x = Address(base58'3MzTHd4e3yukNUURApVLVzH5uxeEsXHD6yY') | |
51 | 51 | ||
52 | - | let y = | |
52 | + | let y = 270000 | |
53 | 53 | ||
54 | 54 | let z = getBooleanValue(this, c) | |
55 | 55 | ||
56 | 56 | let A = getStringValue(this, d) | |
57 | 57 | ||
58 | 58 | let B = getStringValue(this, e) | |
59 | 59 | ||
60 | 60 | let C = if ((A == "WAVES")) | |
61 | 61 | then unit | |
62 | 62 | else fromBase58String(A) | |
63 | 63 | ||
64 | 64 | let D = if ((B == "WAVES")) | |
65 | 65 | then unit | |
66 | 66 | else fromBase58String(B) | |
67 | 67 | ||
68 | 68 | let E = { | |
69 | 69 | let F = C | |
70 | 70 | if ($isInstanceOf(F, "ByteVector")) | |
71 | 71 | then { | |
72 | 72 | let G = F | |
73 | 73 | value(assetInfo(G)).name | |
74 | 74 | } | |
75 | 75 | else if ($isInstanceOf(F, "Unit")) | |
76 | 76 | then { | |
77 | 77 | let H = F | |
78 | 78 | "WAVES" | |
79 | 79 | } | |
80 | 80 | else throw("Match error") | |
81 | 81 | } | |
82 | 82 | ||
83 | 83 | let I = { | |
84 | 84 | let F = D | |
85 | 85 | if ($isInstanceOf(F, "ByteVector")) | |
86 | 86 | then { | |
87 | 87 | let G = F | |
88 | 88 | value(assetInfo(G)).name | |
89 | 89 | } | |
90 | 90 | else if ($isInstanceOf(F, "Unit")) | |
91 | 91 | then { | |
92 | 92 | let H = F | |
93 | 93 | "WAVES" | |
94 | 94 | } | |
95 | 95 | else throw("Match error") | |
96 | 96 | } | |
97 | 97 | ||
98 | 98 | let J = getIntegerValue(this, f) | |
99 | 99 | ||
100 | 100 | let K = getIntegerValue(this, g) | |
101 | 101 | ||
102 | 102 | let L = fromBase58String(getStringValue(this, h)) | |
103 | 103 | ||
104 | 104 | let M = getIntegerValue(this, i) | |
105 | 105 | ||
106 | 106 | let N = 3000 | |
107 | 107 | ||
108 | 108 | let O = 1200 | |
109 | 109 | ||
110 | 110 | let P = 1000000 | |
111 | 111 | ||
112 | 112 | let Q = 1000 | |
113 | 113 | ||
114 | 114 | let R = 100000000 | |
115 | 115 | ||
116 | 116 | let S = 1000 | |
117 | 117 | ||
118 | 118 | let T = 8 | |
119 | 119 | ||
120 | 120 | func U (V) = { | |
121 | 121 | let F = V | |
122 | 122 | if ($isInstanceOf(F, "ByteVector")) | |
123 | 123 | then { | |
124 | 124 | let G = F | |
125 | 125 | assetBalance(this, G) | |
126 | 126 | } | |
127 | 127 | else if ($isInstanceOf(F, "Unit")) | |
128 | 128 | then { | |
129 | 129 | let H = F | |
130 | 130 | wavesBalance(this).available | |
131 | 131 | } | |
132 | 132 | else throw("Match error") | |
133 | 133 | } | |
134 | 134 | ||
135 | 135 | ||
136 | 136 | func W (X,Y) = { | |
137 | 137 | let Z = { | |
138 | 138 | let F = getInteger(X, ((("rpd_balance_" + Y) + "_") + toString(this))) | |
139 | 139 | if ($isInstanceOf(F, "Int")) | |
140 | 140 | then { | |
141 | 141 | let aa = F | |
142 | 142 | aa | |
143 | 143 | } | |
144 | 144 | else if ($isInstanceOf(F, "Unit")) | |
145 | 145 | then { | |
146 | 146 | let ab = F | |
147 | 147 | 0 | |
148 | 148 | } | |
149 | 149 | else throw("Match error") | |
150 | 150 | } | |
151 | 151 | Z | |
152 | 152 | } | |
153 | 153 | ||
154 | 154 | ||
155 | 155 | let ac = W(s, A) | |
156 | 156 | ||
157 | 157 | let ad = W(s, B) | |
158 | 158 | ||
159 | 159 | let ae = (J - ac) | |
160 | 160 | ||
161 | 161 | let af = (K - ad) | |
162 | 162 | ||
163 | 163 | let ag = (U(C) + ac) | |
164 | 164 | ||
165 | 165 | let ah = (U(D) + ad) | |
166 | 166 | ||
167 | 167 | let ai = if ((ag >= J)) | |
168 | 168 | then (ah >= K) | |
169 | 169 | else false | |
170 | 170 | ||
171 | 171 | func aj (V) = { | |
172 | 172 | let F = V | |
173 | 173 | if ($isInstanceOf(F, "ByteVector")) | |
174 | 174 | then { | |
175 | 175 | let G = F | |
176 | 176 | let ak = toBase58String(G) | |
177 | 177 | let al = valueOrErrorMessage(assetInfo(G), (("Asset " + ak) + " doesn't exist")) | |
178 | 178 | $Tuple3(ak, al.name, al.decimals) | |
179 | 179 | } | |
180 | 180 | else if ($isInstanceOf(F, "Unit")) | |
181 | 181 | then { | |
182 | 182 | let H = F | |
183 | 183 | $Tuple3("WAVES", "WAVES", 8) | |
184 | 184 | } | |
185 | 185 | else throw("Match error") | |
186 | 186 | } | |
187 | 187 | ||
188 | 188 | ||
189 | 189 | func am (an) = [BooleanEntry(c, false), StringEntry(l, an)] | |
190 | 190 | ||
191 | 191 | ||
192 | 192 | func ao () = { | |
193 | 193 | let ap = if ((ac > 0)) | |
194 | 194 | then 1 | |
195 | 195 | else 0 | |
196 | 196 | let aq = if ((ad > 0)) | |
197 | 197 | then 1 | |
198 | 198 | else 0 | |
199 | 199 | (ap + aq) | |
200 | 200 | } | |
201 | 201 | ||
202 | 202 | ||
203 | 203 | func ar (as,V) = if ((V == t)) | |
204 | 204 | then { | |
205 | 205 | let at = (as - (ao() * y)) | |
206 | 206 | if ((0 >= at)) | |
207 | 207 | then throw((((("Insufficient amount " + toString(as)) + " to deduct staking fee ") + toString(y)) + " USD-N")) | |
208 | 208 | else at | |
209 | 209 | } | |
210 | 210 | else as | |
211 | 211 | ||
212 | 212 | ||
213 | 213 | func au (as,av,aw) = throw((((((((("Insufficient DApp balance to pay " + toString(as)) + " ") + aw) + " due to staking. Available: ") + toString(av)) + " ") + aw) + ". Please contact support in Telegram: https://t.me/swopfisupport")) | |
214 | 214 | ||
215 | 215 | ||
216 | 216 | func ax (ay,az) = throw((((((((((((((((("Insufficient DApp balance to pay " + toString(ay)) + " ") + E) + " and ") + toString(az)) + " ") + I) + " due to staking. Available: ") + toString(ae)) + " ") + E) + " and ") + toString(af)) + " ") + I) + ". Please contact support in Telegram: https://t.me/swopfisupport")) | |
217 | 217 | ||
218 | 218 | ||
219 | - | @Callable(aA) | |
219 | + | func aA () = am(((((((((((((((("Suspicious state. Actual balances: " + toString(ag)) + " ") + E) + ", ") + toString(ah)) + " ") + I) + ". State: ") + toString(J)) + " ") + E) + ", ") + toString(K)) + " ") + I)) | |
220 | + | ||
221 | + | ||
222 | + | @Callable(aB) | |
220 | 223 | func init () = { | |
221 | - | let | |
222 | - | let | |
223 | - | let | |
224 | - | let | |
225 | - | let | |
226 | - | let | |
227 | - | let | |
228 | - | let | |
229 | - | let | |
230 | - | let | |
231 | - | let | |
232 | - | let | |
233 | - | let | |
234 | - | let | |
224 | + | let aC = $Tuple2(aB.payments[0].amount, aB.payments[0].assetId) | |
225 | + | let aD = aC._1 | |
226 | + | let aE = aC._2 | |
227 | + | let aF = $Tuple2(aB.payments[1].amount, aB.payments[1].assetId) | |
228 | + | let aG = aF._1 | |
229 | + | let aH = aF._2 | |
230 | + | let aI = aj(aE) | |
231 | + | let aJ = aI._1 | |
232 | + | let aK = aI._2 | |
233 | + | let aL = aI._3 | |
234 | + | let aM = aj(aH) | |
235 | + | let aN = aM._1 | |
236 | + | let aO = aM._2 | |
237 | + | let aP = aM._3 | |
235 | 238 | if (isDefined(getBoolean(this, c))) | |
236 | 239 | then throw("DApp is already active") | |
237 | - | else if (( | |
240 | + | else if ((aE == aH)) | |
238 | 241 | then throw("Assets must be different") | |
239 | 242 | else { | |
240 | - | let | |
241 | - | let | |
242 | - | let | |
243 | - | let | |
244 | - | let | |
245 | - | let | |
246 | - | [StringEntry(b, a), BooleanEntry(c, true), StringEntry(d, | |
243 | + | let aQ = ((("s" + take(aK, 7)) + "_") + take(aO, 7)) | |
244 | + | let aR = ((((("ShareToken of SwopFi protocol for " + aK) + " and ") + aO) + " at address ") + toString(this)) | |
245 | + | let aS = ((aL + aP) / 2) | |
246 | + | let aT = fraction(pow(aD, aL, 5, 1, aL, HALFDOWN), pow(aG, aP, 5, 1, aP, HALFDOWN), pow(10, 0, aS, 0, 0, HALFDOWN)) | |
247 | + | let aU = Issue(aQ, aR, aT, aS, true) | |
248 | + | let aV = calculateAssetId(aU) | |
249 | + | [StringEntry(b, a), BooleanEntry(c, true), StringEntry(d, aJ), StringEntry(e, aN), IntegerEntry(f, aD), IntegerEntry(g, aG), IntegerEntry(j, N), IntegerEntry(k, P), aU, StringEntry(h, toBase58String(aV)), IntegerEntry(i, aT), ScriptTransfer(aB.caller, aT, aV)] | |
247 | 250 | } | |
248 | 251 | } | |
249 | 252 | ||
250 | 253 | ||
251 | 254 | ||
252 | - | @Callable( | |
253 | - | func replenishWithTwoTokens ( | |
254 | - | let | |
255 | - | let | |
256 | - | let | |
257 | - | let | |
258 | - | let | |
259 | - | let | |
260 | - | let | |
261 | - | let | |
255 | + | @Callable(aB) | |
256 | + | func replenishWithTwoTokens (aW) = { | |
257 | + | let aE = aB.payments[0].assetId | |
258 | + | let aH = aB.payments[1].assetId | |
259 | + | let aD = ar(aB.payments[0].amount, aE) | |
260 | + | let aG = ar(aB.payments[1].amount, aH) | |
261 | + | let aX = fraction(fraction(J, R, aD), Q, fraction(K, R, aG)) | |
262 | + | let aY = fraction(aD, R, J) | |
263 | + | let aZ = fraction(aG, R, K) | |
264 | + | let ba = fraction(min([aY, aZ]), M, R) | |
262 | 265 | if (!(z)) | |
263 | 266 | then throw("DApp is inactive at this moment") | |
264 | - | else if (if ((0 > | |
267 | + | else if (if ((0 > aW)) | |
265 | 268 | then true | |
266 | - | else ( | |
267 | - | then throw(((("Slippage tolerance must be between 0 and " + toString(S)) + " inclusively. Actual: ") + toString( | |
268 | - | else if ((size( | |
269 | + | else (aW > S)) | |
270 | + | then throw(((("Slippage tolerance must be between 0 and " + toString(S)) + " inclusively. Actual: ") + toString(aW))) | |
271 | + | else if ((size(aB.payments) != 2)) | |
269 | 272 | then throw("Two attached assets expected") | |
270 | - | else if (if (( | |
273 | + | else if (if ((aE != C)) | |
271 | 274 | then true | |
272 | - | else ( | |
275 | + | else (aH != D)) | |
273 | 276 | then throw(((("Incorrect assets attached. Expected: " + A) + " and ") + B)) | |
274 | - | else if (if ((((Q * (S - | |
277 | + | else if (if ((((Q * (S - aW)) / S) > aX)) | |
275 | 278 | then true | |
276 | - | else ( | |
279 | + | else (aX > ((Q * (S + aW)) / S))) | |
277 | 280 | then throw("Incorrect assets amount: amounts must have the contract ratio") | |
278 | - | else if (( | |
281 | + | else if ((ba == 0)) | |
279 | 282 | then throw("Too small amount to replenish") | |
280 | 283 | else if (!(ai)) | |
281 | - | then ([ScriptTransfer( | |
282 | - | else [IntegerEntry(f, (J + | |
284 | + | then ([ScriptTransfer(aB.caller, aD, aE), ScriptTransfer(aB.caller, aG, aH)] ++ aA()) | |
285 | + | else [IntegerEntry(f, (J + aD)), IntegerEntry(g, (K + aG)), IntegerEntry(i, (M + ba)), Reissue(L, ba, true), ScriptTransfer(aB.caller, ba, L)] | |
283 | 286 | } | |
284 | 287 | ||
285 | 288 | ||
286 | 289 | ||
287 | - | @Callable( | |
290 | + | @Callable(aB) | |
288 | 291 | func withdraw () = { | |
289 | - | let | |
290 | - | let | |
291 | - | let | |
292 | - | let | |
293 | - | let | |
292 | + | let bb = $Tuple2(aB.payments[0].amount, aB.payments[0].assetId) | |
293 | + | let bc = bb._1 | |
294 | + | let bd = bb._2 | |
295 | + | let be = ar(fraction(bc, J, M), C) | |
296 | + | let bf = ar(fraction(bc, K, M), D) | |
294 | 297 | if (!(z)) | |
295 | 298 | then throw("DApp is inactive at this moment") | |
296 | - | else if ((size( | |
299 | + | else if ((size(aB.payments) != 1)) | |
297 | 300 | then throw("One attached payment expected") | |
298 | - | else if (( | |
301 | + | else if ((bd != L)) | |
299 | 302 | then throw(("Incorrect asset attached. Expected: " + toBase58String(L))) | |
300 | 303 | else if (!(ai)) | |
301 | - | then ([ScriptTransfer( | |
302 | - | else if (if (( | |
304 | + | then ([ScriptTransfer(aB.caller, bc, bd)] ++ aA()) | |
305 | + | else if (if ((be > ae)) | |
303 | 306 | then true | |
304 | - | else ( | |
305 | - | then ax( | |
306 | - | else [IntegerEntry(f, (J - | |
307 | + | else (bf > af)) | |
308 | + | then ax(be, bf) | |
309 | + | else [IntegerEntry(f, (J - be)), IntegerEntry(g, (K - bf)), IntegerEntry(i, (M - bc)), Burn(L, bc), ScriptTransfer(aB.caller, be, C), ScriptTransfer(aB.caller, bf, D)] | |
307 | 310 | } | |
308 | 311 | ||
309 | 312 | ||
310 | 313 | ||
311 | - | @Callable( | |
312 | - | func exchange ( | |
313 | - | let | |
314 | - | let | |
315 | - | let | |
316 | - | func | |
317 | - | let | |
318 | - | let | |
319 | - | let | |
320 | - | if (( | |
321 | - | then throw(((("Calculated amount to receive " + toString( | |
322 | - | else $Tuple3( | |
314 | + | @Callable(aB) | |
315 | + | func exchange (bg) = { | |
316 | + | let bh = $Tuple2(aB.payments[0].amount, aB.payments[0].assetId) | |
317 | + | let bc = bh._1 | |
318 | + | let bd = bh._2 | |
319 | + | func bi (bj,bk) = { | |
320 | + | let bl = fraction(bk, bc, (bc + bj)) | |
321 | + | let bm = fraction(bl, (P - N), P) | |
322 | + | let bn = fraction(bl, O, P) | |
323 | + | if ((bg > bm)) | |
324 | + | then throw(((("Calculated amount to receive " + toString(bm)) + " is less than specified minimum ") + toString(bg))) | |
325 | + | else $Tuple3(bl, bm, bn) | |
323 | 326 | } | |
324 | 327 | ||
325 | 328 | if (!(z)) | |
326 | 329 | then throw("DApp is inactive at this moment") | |
327 | - | else if ((0 >= | |
328 | - | then throw(("Minimal amount to receive must be positive. Actual: " + toString( | |
329 | - | else if ((size( | |
330 | + | else if ((0 >= bg)) | |
331 | + | then throw(("Minimal amount to receive must be positive. Actual: " + toString(bg))) | |
332 | + | else if ((size(aB.payments) != 1)) | |
330 | 333 | then throw("One attached payment expected") | |
331 | 334 | else if (!(ai)) | |
332 | - | then ([ScriptTransfer( | |
333 | - | else if (( | |
335 | + | then ([ScriptTransfer(aB.caller, bc, bd)] ++ aA()) | |
336 | + | else if ((bd == C)) | |
334 | 337 | then { | |
335 | - | let | |
336 | - | let | |
337 | - | let | |
338 | - | let | |
339 | - | let | |
340 | - | let | |
341 | - | let | |
342 | - | if (if ((ac >= | |
338 | + | let bo = D | |
339 | + | let bp = bi(J, K) | |
340 | + | let bl = bp._1 | |
341 | + | let bm = bp._2 | |
342 | + | let bn = bp._3 | |
343 | + | let bq = (J + bc) | |
344 | + | let br = ((K - bm) - bn) | |
345 | + | if (if ((ac >= bq)) | |
343 | 346 | then true | |
344 | - | else (ad >= | |
345 | - | then au( | |
346 | - | else [IntegerEntry(f, | |
347 | + | else (ad >= br)) | |
348 | + | then au(bm, af, I) | |
349 | + | else [IntegerEntry(f, bq), IntegerEntry(g, br), ScriptTransfer(aB.caller, bm, bo), ScriptTransfer(r, bn, bo)] | |
347 | 350 | } | |
348 | - | else if (( | |
351 | + | else if ((bd == D)) | |
349 | 352 | then { | |
350 | - | let | |
351 | - | let | |
352 | - | let | |
353 | - | let | |
354 | - | let | |
355 | - | let | |
356 | - | let | |
357 | - | if (if ((ac >= | |
353 | + | let bo = C | |
354 | + | let bs = bi(K, J) | |
355 | + | let bl = bs._1 | |
356 | + | let bm = bs._2 | |
357 | + | let bn = bs._3 | |
358 | + | let bq = ((J - bm) - bn) | |
359 | + | let br = (K + bc) | |
360 | + | if (if ((ac >= bq)) | |
358 | 361 | then true | |
359 | - | else (ad >= | |
360 | - | then au( | |
361 | - | else [IntegerEntry(f, | |
362 | + | else (ad >= br)) | |
363 | + | then au(bm, ae, E) | |
364 | + | else [IntegerEntry(f, bq), IntegerEntry(g, br), ScriptTransfer(aB.caller, bm, bo), ScriptTransfer(r, bn, bo)] | |
362 | 365 | } | |
363 | 366 | else throw(((("Incorrect asset attached. Expected: " + A) + " or ") + B)) | |
364 | 367 | } | |
365 | 368 | ||
366 | 369 | ||
367 | 370 | ||
368 | - | @Callable( | |
371 | + | @Callable(aB) | |
369 | 372 | func shutdown () = if (!(z)) | |
370 | 373 | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, l), "the cause wasn't specified"))) | |
371 | - | else if (!(containsElement([m, n, o, p], | |
374 | + | else if (!(containsElement([m, n, o, p], aB.callerPublicKey))) | |
372 | 375 | then throw("Only admin can call this function") | |
373 | 376 | else am("Paused by admin") | |
374 | 377 | ||
375 | 378 | ||
376 | 379 | ||
377 | - | @Callable( | |
380 | + | @Callable(aB) | |
378 | 381 | func activate () = if (z) | |
379 | 382 | then throw("DApp is already active") | |
380 | - | else if (!(containsElement([m, n, o, p], | |
383 | + | else if (!(containsElement([m, n, o, p], aB.callerPublicKey))) | |
381 | 384 | then throw("Only admin can call this function") | |
382 | 385 | else [BooleanEntry(c, true), DeleteEntry(l)] | |
383 | 386 | ||
384 | 387 | ||
385 | 388 | ||
386 | - | @Callable( | |
387 | - | func takeIntoAccountExtraFunds ( | |
388 | - | let | |
389 | - | let | |
390 | - | let | |
391 | - | then | |
389 | + | @Callable(aB) | |
390 | + | func takeIntoAccountExtraFunds (bt) = { | |
391 | + | let bu = (ag - J) | |
392 | + | let bv = (ah - K) | |
393 | + | let bw = (bu - (if ((C == unit)) | |
394 | + | then bt | |
392 | 395 | else 0)) | |
393 | - | let | |
394 | - | then | |
396 | + | let bx = (bv - (if ((D == unit)) | |
397 | + | then bt | |
395 | 398 | else 0)) | |
396 | 399 | if (!(z)) | |
397 | 400 | then throw("DApp is inactive at this moment") | |
398 | - | else if (( | |
401 | + | else if ((aB.caller != this)) | |
399 | 402 | then throw("Only the DApp itself can call this function") | |
400 | - | else if ((0 > | |
401 | - | then throw(("Argument 'amountLeave' cannot be negative. Actual: " + toString( | |
402 | - | else if (if ((0 > | |
403 | + | else if ((0 > bt)) | |
404 | + | then throw(("Argument 'amountLeave' cannot be negative. Actual: " + toString(bt))) | |
405 | + | else if (if ((0 > bu)) | |
403 | 406 | then true | |
404 | - | else (0 > | |
407 | + | else (0 > bv)) | |
405 | 408 | then am("Enroll amount negative") | |
406 | - | else if (if ((0 > | |
409 | + | else if (if ((0 > bw)) | |
407 | 410 | then true | |
408 | - | else (0 > | |
411 | + | else (0 > bx)) | |
409 | 412 | then throw("Too large amountLeave") | |
410 | - | else [IntegerEntry(f, (J + | |
413 | + | else [IntegerEntry(f, (J + bw)), IntegerEntry(g, (K + bx)), IntegerEntry(("last_income_" + A), bw), IntegerEntry(("last_income_" + B), bx)] | |
411 | 414 | } | |
412 | 415 | ||
413 | 416 | ||
414 | - | @Verifier( | |
415 | - | func | |
416 | - | let F = | |
417 | + | @Verifier(by) | |
418 | + | func bz () = { | |
419 | + | let F = by | |
417 | 420 | if ($isInstanceOf(F, "InvokeScriptTransaction")) | |
418 | 421 | then { | |
419 | - | let | |
420 | - | if (if (if (sigVerify( | |
421 | - | then ( | |
422 | + | let bA = F | |
423 | + | if (if (if (sigVerify(bA.bodyBytes, bA.proofs[0], q)) | |
424 | + | then (bA.dApp == s) | |
422 | 425 | else false) | |
423 | 426 | then true | |
424 | - | else if (if (sigVerify( | |
425 | - | then ( | |
427 | + | else if (if (sigVerify(bA.bodyBytes, bA.proofs[0], q)) | |
428 | + | then (bA.function == "exchange") | |
426 | 429 | else false) | |
427 | 430 | then if (if (if (if ((C == u)) | |
428 | 431 | then (D == t) | |
429 | 432 | else false) | |
430 | - | then ( | |
433 | + | then (bA.dApp == w) | |
431 | 434 | else false) | |
432 | - | then (bz.payments[0].assetId == unit) | |
435 | + | then if ((bA.payments[0].assetId == unit)) | |
436 | + | then true | |
437 | + | else (bA.payments[0].assetId == t) | |
433 | 438 | else false) | |
434 | 439 | then true | |
435 | - | else if (if ( | |
440 | + | else if (if ((C == u)) | |
436 | 441 | then (D == v) | |
437 | 442 | else false) | |
438 | - | then (bz.dApp == x) | |
439 | - | else false) | |
440 | - | then (bz.payments[0].assetId == t) | |
443 | + | then if (if ((bA.dApp == x)) | |
444 | + | then (bA.payments[0].assetId == t) | |
445 | + | else false) | |
446 | + | then true | |
447 | + | else if ((bA.dApp == w)) | |
448 | + | then if ((bA.payments[0].assetId == unit)) | |
449 | + | then true | |
450 | + | else (bA.payments[0].assetId == t) | |
451 | + | else false | |
441 | 452 | else false | |
442 | 453 | else false) | |
443 | 454 | then true | |
444 | - | else if (if (sigVerify( | |
445 | - | then ( | |
455 | + | else if (if (sigVerify(bA.bodyBytes, bA.proofs[0], q)) | |
456 | + | then (bA.dApp == this) | |
446 | 457 | else false) | |
447 | - | then ( | |
458 | + | then (bA.function == "takeIntoAccountExtraFunds") | |
448 | 459 | else false | |
449 | 460 | } | |
450 | - | else sigVerify(bx.bodyBytes, bx.proofs[0], bx.senderPublicKey) | |
461 | + | else { | |
462 | + | let bB = if (sigVerify(by.bodyBytes, by.proofs[0], m)) | |
463 | + | then 1 | |
464 | + | else 0 | |
465 | + | let bC = if (sigVerify(by.bodyBytes, by.proofs[1], n)) | |
466 | + | then 1 | |
467 | + | else 0 | |
468 | + | let bD = if (sigVerify(by.bodyBytes, by.proofs[2], o)) | |
469 | + | then 1 | |
470 | + | else 0 | |
471 | + | (((bB + bC) + bD) >= 2) | |
472 | + | } | |
451 | 473 | } | |
452 | 474 |
github/deemru/w8io/026f985 115.78 ms ◑