tx · Hw4QL2c1zkv59epBuV2mLBsr3UZaVDk4CiSH7eDoqzDy

3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq:  -0.01000000 Waves

2023.09.19 00:13 [2761360] smart account 3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq > SELF 0.00000000 Waves

{ "type": 13, "id": "Hw4QL2c1zkv59epBuV2mLBsr3UZaVDk4CiSH7eDoqzDy", "fee": 1000000, "feeAssetId": null, "timestamp": 1695071606251, "version": 2, "chainId": 84, "sender": "3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq", "senderPublicKey": "ERewvWFUFQfR1eCnipNAv9n7SdQhof2ESP6PGVjTueLd", "proofs": [ "2iyZFuAbFnh9Hm4mdsKAXA6Kva7U3p9h2CAa3p8Zx6nZqgcQ8H8zwTAV3piux37Vq76HZkXvjgxkubCuYPVrpjpR" ], "script": "base64:BgINCAISABIAEgASAwoBAQcABnVzZG5JZAEgD/IcEqzkxDya7EYaqyWosOy6BytGzG2IcvC14pJJAbQADndhdmVzMkxUb2tlbklkASDkzSnqu8EXlTZRNkvkaX2ITlFTrbuGFIX8CY7Zd2/OsQAMcHV6emxlTGVuZFNDAiMzTjNEblZmZm5VeVp0ejJNUmJrNVU3Z2lOMTEyV2VtcE1OZAAQZmFrZVB1enpsZVN3YXBTQwIjM01zOGZxYlhNNFJobU02Q1BUcjQ0aFV3SGUyQ0NtVkNmVkEADnVzZG5BZGRyZXNzU3RyAiwyNUZFcUVqUmtxSzZ5Q2tpVDdMejZTQVl6N2dVRkN0eGZDQ2huclZGRDVBVAAPd2F2ZXMyTFRva2VuU3RyAixHUTlRTlZMR2ZZU2JOWjRkUzhOUnl2R0dFTFpMNHNXUEtpVmo4OENWMXJKTAENdHJ5R2V0SW50ZWdlcgEDa2V5BAckbWF0Y2gwCQCaCAIFBHRoaXMFA2tleQMJAAECBQckbWF0Y2gwAgNJbnQEAWIFByRtYXRjaDAFAWIAAAQBaQEJbWludExvbmcyAAMDCQECI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JvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXnuK7ti", "height": 2761360, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FgcvHAynJKxeBzDkdHCKhbPXYY3cDjUJLAPMHBwHRjub Next: 3U9MAr1SrfkDsYCkVapfdMonK1pvdtrebsivixk3fQky Diff:
OldNewDifferences
9292 let firstDepositedWavesAmount = invoke(addressFromStringValue(puzzleLendSC), "supply", nil, [AttachedPayment(unit, firstSwappedAmountValue)])
9393 if ((firstDepositedWavesAmount == firstDepositedWavesAmount))
9494 then {
95- let listPercentage = [70, 49, 34, 24, 17]
95+ let listPercentage = [70, 49]
9696 func repeatFunc (accum,next) = {
9797 let borrowedUsdn = invoke(addressFromStringValue(puzzleLendSC), "borrow", [usdnAddressStr, ((firstAmountIn * next) / 100)], nil)
9898 if ((borrowedUsdn == borrowedUsdn))
101101 if ((swappedAmount == swappedAmount))
102102 then match swappedAmount {
103103 case swappedAmountValue: Int =>
104- (accum + next)
104+ let depositedWaves = invoke(addressFromStringValue(puzzleLendSC), "supply", nil, [AttachedPayment(unit, swappedAmountValue)])
105+ if ((depositedWaves == depositedWaves))
106+ then (accum + next)
107+ else throw("Strict value is not equal to itself.")
105108 case _ =>
106109 throw("Incorrect invoke result")
107110 }
120123
121124 func $f0_2 ($a,$i) = if (($i >= $s))
122125 then $a
123- else throw("List size exceeds 5")
126+ else throw("List size exceeds 2")
124127
125- $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
128+ $f0_2($f0_1($f0_1($acc0, 0), 1), 2)
126129 }
127130 [IntegerEntry("firstSwappedAmountValue", firstSwappedAmountValue), ScriptTransfer(i.caller, ((firstSwappedAmountValue * res) / 100), waves2LTokenId), IntegerEntry("res", res)]
128131 }
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 = [70, 49, 34, 24, 17]
4040 func repeatFunc (accum,next) = {
4141 let swappedAmount = invoke(addressFromStringValue(fakePuzzleSwapSC), "swapToWaves", [toString(i.caller), ((firstSwappedAmountValue * accum) / 100)], nil)
4242 if ((swappedAmount == swappedAmount))
4343 then match swappedAmount {
4444 case swappedAmountValue: Int =>
4545 let depositedWaves = invoke(addressFromStringValue(puzzleLendSC), "supply", nil, [AttachedPayment(unit, swappedAmountValue)])
4646 if ((depositedWaves == depositedWaves))
4747 then (accum + next)
4848 else throw("Strict value is not equal to itself.")
4949 case _ =>
5050 throw("Incorrect invoke result")
5151 }
5252 else throw("Strict value is not equal to itself.")
5353 }
5454
5555 let res = {
5656 let $l = listPercentage
5757 let $s = size($l)
5858 let $acc0 = 0
5959 func $f0_1 ($a,$i) = if (($i >= $s))
6060 then $a
6161 else repeatFunc($a, $l[$i])
6262
6363 func $f0_2 ($a,$i) = if (($i >= $s))
6464 then $a
6565 else throw("List size exceeds 5")
6666
6767 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
6868 }
6969 [ScriptTransfer(i.caller, ((firstSwappedAmountValue * res) / 100), waves2LTokenId)]
7070 }
7171 else throw("Strict value is not equal to itself.")
7272 case _ =>
7373 throw("Incorrect invoke result")
7474 }
7575 else throw("Strict value is not equal to itself.")
7676 }
7777
7878
7979
8080 @Callable(i)
8181 func mintLong2_3 () = if (if ((size(i.payments) != 1))
8282 then true
8383 else (i.payments[0].amount == 0))
8484 then throw("1 payment has to be attached mint")
8585 else {
8686 let firstAmountIn = i.payments[0].amount
8787 let callerId = toString(i.caller)
8888 let firstSwappedWavesAmount = invoke(addressFromStringValue(fakePuzzleSwapSC), "swapToWaves", [toString(i.caller), firstAmountIn], nil)
8989 if ((firstSwappedWavesAmount == firstSwappedWavesAmount))
9090 then match firstSwappedWavesAmount {
9191 case firstSwappedAmountValue: Int =>
9292 let firstDepositedWavesAmount = invoke(addressFromStringValue(puzzleLendSC), "supply", nil, [AttachedPayment(unit, firstSwappedAmountValue)])
9393 if ((firstDepositedWavesAmount == firstDepositedWavesAmount))
9494 then {
95- let listPercentage = [70, 49, 34, 24, 17]
95+ let listPercentage = [70, 49]
9696 func repeatFunc (accum,next) = {
9797 let borrowedUsdn = invoke(addressFromStringValue(puzzleLendSC), "borrow", [usdnAddressStr, ((firstAmountIn * next) / 100)], nil)
9898 if ((borrowedUsdn == borrowedUsdn))
9999 then {
100100 let swappedAmount = invoke(addressFromStringValue(fakePuzzleSwapSC), "swapToWaves", [toString(i.caller), ((firstAmountIn * next) / 100)], nil)
101101 if ((swappedAmount == swappedAmount))
102102 then match swappedAmount {
103103 case swappedAmountValue: Int =>
104- (accum + next)
104+ let depositedWaves = invoke(addressFromStringValue(puzzleLendSC), "supply", nil, [AttachedPayment(unit, swappedAmountValue)])
105+ if ((depositedWaves == depositedWaves))
106+ then (accum + next)
107+ else throw("Strict value is not equal to itself.")
105108 case _ =>
106109 throw("Incorrect invoke result")
107110 }
108111 else throw("Strict value is not equal to itself.")
109112 }
110113 else throw("Strict value is not equal to itself.")
111114 }
112115
113116 let res = {
114117 let $l = listPercentage
115118 let $s = size($l)
116119 let $acc0 = 0
117120 func $f0_1 ($a,$i) = if (($i >= $s))
118121 then $a
119122 else repeatFunc($a, $l[$i])
120123
121124 func $f0_2 ($a,$i) = if (($i >= $s))
122125 then $a
123- else throw("List size exceeds 5")
126+ else throw("List size exceeds 2")
124127
125- $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
128+ $f0_2($f0_1($f0_1($acc0, 0), 1), 2)
126129 }
127130 [IntegerEntry("firstSwappedAmountValue", firstSwappedAmountValue), ScriptTransfer(i.caller, ((firstSwappedAmountValue * res) / 100), waves2LTokenId), IntegerEntry("res", res)]
128131 }
129132 else throw("Strict value is not equal to itself.")
130133 case _ =>
131134 throw("Incorrect invoke result")
132135 }
133136 else throw("Strict value is not equal to itself.")
134137 }
135138
136139
137140
138141 @Callable(i)
139142 func mintLong2_test () = if (if ((size(i.payments) != 1))
140143 then true
141144 else (i.payments[0].amount == 0))
142145 then throw("1 payment has to be attached mint")
143146 else {
144147 let firstAmountIn = i.payments[0].amount
145148 let callerId = toString(i.caller)
146149 let firstSwappedWavesAmount = invoke(addressFromStringValue(fakePuzzleSwapSC), "swapToWaves", [toString(i.caller), firstAmountIn], nil)
147150 if ((firstSwappedWavesAmount == firstSwappedWavesAmount))
148151 then match firstSwappedWavesAmount {
149152 case firstSwappedAmountValue: Int =>
150153 let firstDepositedWavesAmount = invoke(addressFromStringValue(puzzleLendSC), "supply", nil, [AttachedPayment(unit, firstSwappedAmountValue)])
151154 if ((firstDepositedWavesAmount == firstDepositedWavesAmount))
152155 then {
153156 let listPercentage = [70, 49, 34, 24, 17]
154157 func repeatFunc (accum,next) = (accum + next)
155158
156159 let res = {
157160 let $l = listPercentage
158161 let $s = size($l)
159162 let $acc0 = 0
160163 func $f0_1 ($a,$i) = if (($i >= $s))
161164 then $a
162165 else repeatFunc($a, $l[$i])
163166
164167 func $f0_2 ($a,$i) = if (($i >= $s))
165168 then $a
166169 else throw("List size exceeds 5")
167170
168171 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5)
169172 }
170173 [IntegerEntry("res", res), IntegerEntry("firstAmountIn", firstAmountIn), IntegerEntry("firstSwappedAmountValue", firstSwappedAmountValue), ScriptTransfer(i.caller, ((firstSwappedAmountValue * res) / 100), waves2LTokenId)]
171174 }
172175 else throw("Strict value is not equal to itself.")
173176 case _ =>
174177 throw("Incorrect invoke result")
175178 }
176179 else throw("Strict value is not equal to itself.")
177180 }
178181
179182
180183
181184 @Callable(i)
182185 func redeem (wavesAmount) = {
183186 let userAddress = toString(i.caller)
184187 let redeemedUSDNAmount = invoke(addressFromStringValue(fakePuzzleSwapSC), "swapToUSDN", [wavesAmount, userAddress], nil)
185188 if ((redeemedUSDNAmount == redeemedUSDNAmount))
186189 then match redeemedUSDNAmount {
187190 case redeemedAmountValue: Int =>
188191 [IntegerEntry((userAddress + "_redeemed"), redeemedAmountValue)]
189192 case _ =>
190193 throw("Incorrect invoke result")
191194 }
192195 else throw("Strict value is not equal to itself.")
193196 }
194197
195198
196199 @Verifier(tx)
197200 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
198201

github/deemru/w8io/169f3d6 
42.43 ms