tx · FyPhDQjYN3azXKN9GPniFdnDBEvAu3gvYknzq8wpvB2R

3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq:  -0.01000000 Waves

2023.09.09 23:56 [2748360] smart account 3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq > SELF 0.00000000 Waves

{ "type": 13, "id": "FyPhDQjYN3azXKN9GPniFdnDBEvAu3gvYknzq8wpvB2R", "fee": 1000000, "feeAssetId": null, "timestamp": 1694293060046, "version": 2, "chainId": 84, "sender": "3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq", "senderPublicKey": "ERewvWFUFQfR1eCnipNAv9n7SdQhof2ESP6PGVjTueLd", "proofs": [ "5DBV7otMJsgt5jK6P1GXQT5rCRQ83uBBp2n26nXMeYugjS8UaxGRixkzAzoKB9HzqGyxPEfbFnmZM8Hhk8g3QSMc" ], "script": "base64:BgIJCAISABIDCgEBBwAGdXNkbklkASAP8hwSrOTEPJrsRhqrJaiw7LoHK0bMbYhy8LXikkkBtAAOd2F2ZXMyTFRva2VuSWQBIOTNKeq7wReVNlE2S+RpfYhOUVOtu4YUhfwJjtl3b86xAAxwdXp6bGVMZW5kU0MCIzNOM0RuVmZmblV5WnR6Mk1SYms1VTdnaU4xMTJXZW1wTU5kABBmYWtlUHV6emxlU3dhcFNDAiMzTXM4ZnFiWE00UmhtTTZDUFRyNDRoVXdIZTJDQ21WQ2ZWQQAOdXNkbkFkZHJlc3NTdHICLDI1RkVxRWpSa3FLNnlDa2lUN0x6NlNBWXo3Z1VGQ3R4ZkNDaG5yVkZENUFUAA93YXZlczJMVG9rZW5TdHICLEdROVFOVkxHZllTYk5aNGRTOE5SeXZHR0VMWkw0c1dQS2lWajg4Q1YxckpMAQ10cnlHZXRJbnRlZ2VyAQNrZXkEByRtYXRjaDAJAJoIAgUEdGhpcwUDa2V5AwkAAQIFByRtYXRjaDACA0ludAQBYgUHJG1hdGNoMAUBYgAAAgFpAQltaW50TG9uZzIAAwMJAQIhPQIJAJ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b2tlIHJlc3VsdAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgECdHgBBnZlcmlmeQAJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXng/kU/", "height": 2748360, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Dra7GYaUbgMR2uGiNVW16typtL9prFbxorBsHLg7tWJU Next: 57FT27pwmXNnkEzRBNuV8kw68LL8ezzaJ6sig7vHGYo2 Diff:
OldNewDifferences
2929 else {
3030 let firstAmountIn = i.payments[0].amount
3131 let callerId = toString(i.caller)
32- let firstSwappedWavesAmount = invoke(addressFromStringValue(fakePuzzleSwapSC), "swapToWaves", [toString(i.caller), i.payments[0].amount], nil)
32+ let firstSwappedWavesAmount = invoke(addressFromStringValue(fakePuzzleSwapSC), "swapToWaves", [toString(i.caller), 2000000], nil)
3333 if ((firstSwappedWavesAmount == firstSwappedWavesAmount))
3434 then match firstSwappedWavesAmount {
3535 case firstSwappedAmountValue: Int =>
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let usdnId = base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT'
55
66 let waves2LTokenId = base58'GQ9QNVLGfYSbNZ4dS8NRyvGGELZL4sWPKiVj88CV1rJL'
77
88 let puzzleLendSC = "3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"
99
1010 let fakePuzzleSwapSC = "3Ms8fqbXM4RhmM6CPTr44hUwHe2CCmVCfVA"
1111
1212 let usdnAddressStr = "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT"
1313
1414 let waves2LTokenStr = "GQ9QNVLGfYSbNZ4dS8NRyvGGELZL4sWPKiVj88CV1rJL"
1515
1616 func tryGetInteger (key) = match getInteger(this, key) {
1717 case b: Int =>
1818 b
1919 case _ =>
2020 0
2121 }
2222
2323
2424 @Callable(i)
2525 func mintLong2 () = if (if ((size(i.payments) != 1))
2626 then true
2727 else (i.payments[0].amount == 0))
2828 then throw("1 payment has to be attached mint")
2929 else {
3030 let firstAmountIn = i.payments[0].amount
3131 let callerId = toString(i.caller)
32- let firstSwappedWavesAmount = invoke(addressFromStringValue(fakePuzzleSwapSC), "swapToWaves", [toString(i.caller), i.payments[0].amount], nil)
32+ let firstSwappedWavesAmount = invoke(addressFromStringValue(fakePuzzleSwapSC), "swapToWaves", [toString(i.caller), 2000000], nil)
3333 if ((firstSwappedWavesAmount == firstSwappedWavesAmount))
3434 then match firstSwappedWavesAmount {
3535 case firstSwappedAmountValue: Int =>
3636 let firstDepositedWavesAmount = invoke(addressFromStringValue(puzzleLendSC), "supply", nil, [AttachedPayment(unit, firstSwappedAmountValue)])
3737 if ((firstDepositedWavesAmount == firstDepositedWavesAmount))
3838 then {
3939 let listPercentage = [70000, 49000, 34300, 24010, 16807]
4040 func repeatFunc (accum,next) = {
4141 let borrowedUsdn = invoke(addressFromStringValue(puzzleLendSC), "borrow", [usdnAddressStr, ((firstAmountIn * accum) / 100000)], nil)
4242 if ((borrowedUsdn == borrowedUsdn))
4343 then {
4444 let swappedAmount = invoke(addressFromStringValue(fakePuzzleSwapSC), "swapToWaves", [toString(i.caller)], [AttachedPayment(usdnId, ((firstSwappedAmountValue * accum) / 100000))])
4545 if ((swappedAmount == swappedAmount))
4646 then match swappedAmount {
4747 case swappedAmountValue: Int =>
4848 let depositedWaves = invoke(addressFromStringValue(puzzleLendSC), "supply", nil, [AttachedPayment(unit, swappedAmountValue)])
4949 if ((depositedWaves == depositedWaves))
5050 then (((firstSwappedAmountValue * accum) / 100000) + ((firstSwappedAmountValue * next) / 100000))
5151 else throw("Strict value is not equal to itself.")
5252 case _ =>
5353 throw("Incorrect invoke result")
5454 }
5555 else throw("Strict value is not equal to itself.")
5656 }
5757 else throw("Strict value is not equal to itself.")
5858 }
5959
6060 let res = {
6161 let $l = listPercentage
6262 let $s = size($l)
6363 let $acc0 = 0
6464 func $f0_1 ($a,$i) = if (($i >= $s))
6565 then $a
6666 else repeatFunc($a, $l[$i])
6767
6868 func $f0_2 ($a,$i) = if (($i >= $s))
6969 then $a
7070 else throw("List size exceeds 5")
7171
7272 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
7373 }
7474 [ScriptTransfer(i.caller, res, waves2LTokenId)]
7575 }
7676 else throw("Strict value is not equal to itself.")
7777 case _ =>
7878 throw("Incorrect invoke result")
7979 }
8080 else throw("Strict value is not equal to itself.")
8181 }
8282
8383
8484
8585 @Callable(i)
8686 func redeem (wavesAmount) = {
8787 let userAddress = toString(i.caller)
8888 let redeemedUSDNAmount = invoke(addressFromStringValue(fakePuzzleSwapSC), "swapToUSDN", [wavesAmount, userAddress], nil)
8989 if ((redeemedUSDNAmount == redeemedUSDNAmount))
9090 then match redeemedUSDNAmount {
9191 case redeemedAmountValue: Int =>
9292 [IntegerEntry((userAddress + "_redeemed"), redeemedAmountValue)]
9393 case _ =>
9494 throw("Incorrect invoke result")
9595 }
9696 else throw("Strict value is not equal to itself.")
9797 }
9898
9999
100100 @Verifier(tx)
101101 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
102102

github/deemru/w8io/169f3d6 
30.70 ms