tx · GM6zs4yQ3R94R51nRnNL1XaELEUze28v2SWFU9Tbg2fr

3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq:  -0.01000000 Waves

2023.09.10 00:25 [2748390] smart account 3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq > SELF 0.00000000 Waves

{ "type": 13, "id": "GM6zs4yQ3R94R51nRnNL1XaELEUze28v2SWFU9Tbg2fr", "fee": 1000000, "feeAssetId": null, "timestamp": 1694294736856, "version": 2, "chainId": 84, "sender": "3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq", "senderPublicKey": "ERewvWFUFQfR1eCnipNAv9n7SdQhof2ESP6PGVjTueLd", "proofs": [ "ak1xhtsUNhnJnR8ggVSgtW4NxsJhsoTrXDJ98XThbVCa3h9YUekuMjkPWqWiQu6qJSgAdyzVruFJTwVaX1vGNqK" ], "script": "base64:BgILCAISABIAEgMKAQEHAAZ1c2RuSWQBIA/yHBKs5MQ8muxGGqslqLDsugcrRsxtiHLwteKSSQG0AA53YXZlczJMVG9rZW5JZAEg5M0p6rvBF5U2UTZL5Gl9iE5RU627hhSF/AmO2XdvzrEADHB1enpsZUxlbmRTQwIjM04zRG5WZmZuVXladHoyTVJiazVVN2dpTjExMldlbXBNTmQAEGZha2VQdXp6bGVTd2FwU0MCIzNNczhmcWJYTTRSaG1NNkNQVHI0NGhVd0hlMkNDbVZDZlZBAA51c2RuQWRkcmVzc1N0cgIsMjVGRXFFalJrcUs2eUNraVQ3THo2U0FZejdnVUZDdHhmQ0NobnJWRkQ1QVQAD3dhdmVzMkxUb2tlblN0cgIsR1E5UU5WTEdmWVNiTlo0ZFM4TlJ5dkdHRUxaTDRzV1BLaVZqODhDVjFySkwBDXRyeUdldEludGVnZXIBA2tleQQHJG1hdGNoMAkAmggCBQR0aGlzBQNrZXkDCQABAgUHJG1hdGNoMAIDSW50BAFiBQckbWF0Y2gwBQFiAAADAWkBCW1pbnRMb25nMgADAwkBAiE9AgkAkAMBCAUBaQhwY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hbHVlBQNuaWwJAAIBAhdJbmNvcnJlY3QgaW52b2tlIHJlc3VsdAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgECdHgBBnZlcmlmeQAJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXn+jg/h", "height": 2748390, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6e6SLaUfrz44gvVP7Fv7sn4ft4Km9RcU9fW2kTzDoqTN Next: 14qMY7j2XJtnZ41TaspvfECxQJi8Rn5dhhSmoQgtQMXb Diff:
OldNewDifferences
102102 let borrowedUsdn = invoke(addressFromStringValue(puzzleLendSC), "borrow", [usdnAddressStr, ((firstAmountIn * accum) / 100000)], nil)
103103 if ((borrowedUsdn == borrowedUsdn))
104104 then {
105- let swappedAmount = invoke(addressFromStringValue(fakePuzzleSwapSC), "swapToWaves", [toString(i.caller), ((firstSwappedAmountValue * accum) / 100000)], nil)
105+ let swappedAmount = invoke(addressFromStringValue(fakePuzzleSwapSC), "swapToWaves", [toString(i.caller), ((firstSwappedAmountValue * next) / 100000)], nil)
106106 if ((swappedAmount == swappedAmount))
107107 then (((firstSwappedAmountValue * accum) / 100000) + ((firstSwappedAmountValue * next) / 100000))
108108 else throw("Strict value is not equal to itself.")
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)
3232 let firstSwappedWavesAmount = invoke(addressFromStringValue(fakePuzzleSwapSC), "swapToWaves", [toString(i.caller), firstAmountIn], 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), ((firstSwappedAmountValue * accum) / 100000)], nil)
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 mintLong2_test () = if (if ((size(i.payments) != 1))
8787 then true
8888 else (i.payments[0].amount == 0))
8989 then throw("1 payment has to be attached mint")
9090 else {
9191 let firstAmountIn = i.payments[0].amount
9292 let callerId = toString(i.caller)
9393 let firstSwappedWavesAmount = invoke(addressFromStringValue(fakePuzzleSwapSC), "swapToWaves", [toString(i.caller), firstAmountIn], nil)
9494 if ((firstSwappedWavesAmount == firstSwappedWavesAmount))
9595 then match firstSwappedWavesAmount {
9696 case firstSwappedAmountValue: Int =>
9797 let firstDepositedWavesAmount = invoke(addressFromStringValue(puzzleLendSC), "supply", nil, [AttachedPayment(unit, firstSwappedAmountValue)])
9898 if ((firstDepositedWavesAmount == firstDepositedWavesAmount))
9999 then {
100100 let listPercentage = [70000, 49000]
101101 func repeatFunc (accum,next) = {
102102 let borrowedUsdn = invoke(addressFromStringValue(puzzleLendSC), "borrow", [usdnAddressStr, ((firstAmountIn * accum) / 100000)], nil)
103103 if ((borrowedUsdn == borrowedUsdn))
104104 then {
105- let swappedAmount = invoke(addressFromStringValue(fakePuzzleSwapSC), "swapToWaves", [toString(i.caller), ((firstSwappedAmountValue * accum) / 100000)], nil)
105+ let swappedAmount = invoke(addressFromStringValue(fakePuzzleSwapSC), "swapToWaves", [toString(i.caller), ((firstSwappedAmountValue * next) / 100000)], nil)
106106 if ((swappedAmount == swappedAmount))
107107 then (((firstSwappedAmountValue * accum) / 100000) + ((firstSwappedAmountValue * next) / 100000))
108108 else throw("Strict value is not equal to itself.")
109109 }
110110 else throw("Strict value is not equal to itself.")
111111 }
112112
113113 let res = {
114114 let $l = listPercentage
115115 let $s = size($l)
116116 let $acc0 = 0
117117 func $f0_1 ($a,$i) = if (($i >= $s))
118118 then $a
119119 else repeatFunc($a, $l[$i])
120120
121121 func $f0_2 ($a,$i) = if (($i >= $s))
122122 then $a
123123 else throw("List size exceeds 2")
124124
125125 $f0_2($f0_1($f0_1($acc0, 0), 1), 2)
126126 }
127127 [ScriptTransfer(i.caller, res, waves2LTokenId)]
128128 }
129129 else throw("Strict value is not equal to itself.")
130130 case _ =>
131131 throw("Incorrect invoke result")
132132 }
133133 else throw("Strict value is not equal to itself.")
134134 }
135135
136136
137137
138138 @Callable(i)
139139 func redeem (wavesAmount) = {
140140 let userAddress = toString(i.caller)
141141 let redeemedUSDNAmount = invoke(addressFromStringValue(fakePuzzleSwapSC), "swapToUSDN", [wavesAmount, userAddress], nil)
142142 if ((redeemedUSDNAmount == redeemedUSDNAmount))
143143 then match redeemedUSDNAmount {
144144 case redeemedAmountValue: Int =>
145145 [IntegerEntry((userAddress + "_redeemed"), redeemedAmountValue)]
146146 case _ =>
147147 throw("Incorrect invoke result")
148148 }
149149 else throw("Strict value is not equal to itself.")
150150 }
151151
152152
153153 @Verifier(tx)
154154 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
155155

github/deemru/w8io/026f985 
49.11 ms