tx · 6LnsMiJGzQMS92K8ckUpBuZBYiD6REy8bcg2hK2yjzFu 3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq: -0.01100000 Waves 2023.09.03 01:18 [2738334] smart account 3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq > SELF 0.00000000 Waves
{ "type": 13, "id": "6LnsMiJGzQMS92K8ckUpBuZBYiD6REy8bcg2hK2yjzFu", "fee": 1100000, "feeAssetId": null, "timestamp": 1693693092880, "version": 2, "chainId": 84, "sender": "3NBbFNBed9tcU5AmsJAuExWvgJyNmJxqjWq", "senderPublicKey": "ERewvWFUFQfR1eCnipNAv9n7SdQhof2ESP6PGVjTueLd", "proofs": [ "5L6DRWCQkTdMqpff6vfKegGanKZMyvQx8vWEXQvUDQCwYurpXsVWama2rx8qdhwJHxGtb1PBq36rLCWi5CULYR7g" ], "script": "base64:BgIQCAISABIAEgASABIAEgASAA8ACXdhdmVzMUxJZAkBB0FkZHJlc3MBASCx9eRWoz/T7on2QCucPEyACTagmHhap+TFH25bD+lGhQAJd2F2ZXMzTElkCQEHQWRkcmVzcwEBIHdXDDXqNpTfTtMV3HoBAJm7TRBH1wyKq1fh63GL4LhkAAl3YXZlczVMSWQJAQdBZGRyZXNzAQEgG0ZokmU5WBTQbm1EIuXU3iDl1u675ol+F8RLM/XoZqQABnVzZG5JZAEgD/IcEqzkxDya7EYaqyWosOy6BytGzG2IcvC14pJJAbQAA2FycgkAzAgCAAEJAMwIAgACCQDMCAIAAwkAzAgCAAQJAMwIAgAFBQNuaWwABGFycjIJAMwIAgABCQDMCAIAAgUDbmlsAARhcnIzCQDMCAIAAQkAzAgCAAIJAMwIAgADBQNuaWwBA3N1bQIBYQFiCQD8BwQJARFAZXh0ck5hdGl2ZSgxMDYyKQECIzNOM0RuVmZmblV5WnR6Mk1SYms1VTdnaU4xMTJXZW1wTU5kAgZib3Jyb3cJAMwIAgIsMjVGRXFFalJrcUs2eUNraVQ3THo2U0FZejdnVUZDdHhmQ0N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WxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECF0luY29ycmVjdCBpbnZva2UgcmVzdWx0CQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQACAQIXSW5jb3JyZWN0IGludm9rZSByZXN1bHQJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4BAnR4AQZ2ZXJpZnkACQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5jw3R9w==", "height": 2738334, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Dzot2hjvLN8uPwr3wiCkjEZZqm7AwVpJ6kB7732SEKsd Next: 2axgvjparvkHKf2zfrHS1MSim3fuasvTBpzk1gSz5LWd Diff:
Old | New | Differences | |
---|---|---|---|
295 | 295 | if ((thirdSwappedAmount == thirdSwappedAmount)) | |
296 | 296 | then match thirdSwappedAmount { | |
297 | 297 | case thirdSwap: Int => | |
298 | - | [ | |
298 | + | [IntegerEntry("Returned_Second_SwappedAmount", secondSwap), IntegerEntry("Second_Borrow", ((((firstAmountIn * 70) / 100) * 70) / 100)), IntegerEntry("Returned_Third_SwappedAmount", thirdSwap)] | |
299 | 299 | case _ => | |
300 | 300 | throw("Incorrect invoke result") | |
301 | 301 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let waves1LId = Address(base58'CygdaJKZfxRrHyYMwkNdz9ZgSD5FpJLtk5s5B4q1DKV6') | |
5 | 5 | ||
6 | 6 | let waves3LId = Address(base58'92rW5ucGkH84YeXLnLs8dMN1P7RAFocmR8zfBqUy4gPM') | |
7 | 7 | ||
8 | 8 | let waves5LId = Address(base58'2qUH6Nh6cgC8dxj8fwH3bTJi261PNr5nMQKRbBXBuwmM') | |
9 | 9 | ||
10 | 10 | let usdnId = base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT' | |
11 | 11 | ||
12 | 12 | let arr = [1, 2, 3, 4, 5] | |
13 | 13 | ||
14 | 14 | let arr2 = [1, 2] | |
15 | 15 | ||
16 | 16 | let arr3 = [1, 2, 3] | |
17 | 17 | ||
18 | 18 | func sum (a,b) = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "borrow", ["25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT", 1000000], nil) | |
19 | 19 | ||
20 | 20 | ||
21 | 21 | func getBalance (assetIdStr,address) = if ((assetIdStr == "WAVES")) | |
22 | 22 | then wavesBalance(address).available | |
23 | 23 | else assetBalance(address, fromBase58String(assetIdStr)) | |
24 | 24 | ||
25 | 25 | ||
26 | 26 | func getCurrentPrice (assetIdStr) = if ((assetIdStr == "WAVES")) | |
27 | 27 | then 2 | |
28 | 28 | else throw("Error") | |
29 | 29 | ||
30 | 30 | ||
31 | 31 | func getWavesCurrentPrice () = 2000000 | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | func getWavesNewPrice () = 3000000 | |
35 | 35 | ||
36 | 36 | ||
37 | 37 | func getWaves3LCurrentPrice () = 1200000 | |
38 | 38 | ||
39 | 39 | ||
40 | 40 | func getWaves3LNewPrice () = 2000000 | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | func tryGetInteger (key) = match getInteger(this, key) { | |
44 | 44 | case b: Int => | |
45 | 45 | b | |
46 | 46 | case _ => | |
47 | 47 | 0 | |
48 | 48 | } | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | @Callable(i) | |
52 | 52 | func mintWaves3L_v1 () = if (if ((size(i.payments) != 1)) | |
53 | 53 | then true | |
54 | 54 | else (i.payments[0].amount == 0)) | |
55 | 55 | then throw("1 payment has to be attached") | |
56 | 56 | else { | |
57 | 57 | let address = toString(i.caller) | |
58 | 58 | let stableCoinAmount = i.payments[0].amount | |
59 | 59 | let convertedWavesAmount = ((stableCoinAmount / getWavesCurrentPrice()) * 100000000) | |
60 | 60 | let userWavesAmount = getBalance("WAVES", i.caller) | |
61 | 61 | if ((userWavesAmount > convertedWavesAmount)) | |
62 | 62 | then { | |
63 | 63 | let depositResult = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "supply", nil, [AttachedPayment(unit, convertedWavesAmount)]) | |
64 | 64 | if ((depositResult == depositResult)) | |
65 | 65 | then { | |
66 | 66 | func repeatFunc (accum,next) = { | |
67 | 67 | let borrowResult = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "borrow", ["25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT", stableCoinAmount], nil) | |
68 | 68 | if ((borrowResult == borrowResult)) | |
69 | 69 | then (accum + next) | |
70 | 70 | else throw("Strict value is not equal to itself.") | |
71 | 71 | } | |
72 | 72 | ||
73 | 73 | let array = [stableCoinAmount, stableCoinAmount, stableCoinAmount] | |
74 | 74 | let res = { | |
75 | 75 | let $l = array | |
76 | 76 | let $s = size($l) | |
77 | 77 | let $acc0 = 0 | |
78 | 78 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
79 | 79 | then $a | |
80 | 80 | else repeatFunc($a, $l[$i]) | |
81 | 81 | ||
82 | 82 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
83 | 83 | then $a | |
84 | 84 | else throw("List size exceeds 3") | |
85 | 85 | ||
86 | 86 | $f0_2($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3) | |
87 | 87 | } | |
88 | 88 | let returnedTokenAmount = ((res / getWaves3LCurrentPrice()) * 1000000) | |
89 | 89 | [IntegerEntry((address + "_gave_USDN"), stableCoinAmount), IntegerEntry((address + "_deposited_WAVES"), convertedWavesAmount), IntegerEntry(((address + "_borrowed_") + "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT"), res), IntegerEntry((address + "_received_WAVES3L"), returnedTokenAmount), ScriptTransfer(i.caller, returnedTokenAmount, base58'92rW5ucGkH84YeXLnLs8dMN1P7RAFocmR8zfBqUy4gPM')] | |
90 | 90 | } | |
91 | 91 | else throw("Strict value is not equal to itself.") | |
92 | 92 | } | |
93 | 93 | else throw("Not enough WAVES to deposit!") | |
94 | 94 | } | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | ||
98 | 98 | @Callable(i) | |
99 | 99 | func redeemWaves3L_v1 () = if (if ((size(i.payments) != 1)) | |
100 | 100 | then true | |
101 | 101 | else (i.payments[0].amount == 0)) | |
102 | 102 | then throw("1 payment has to be attached") | |
103 | 103 | else { | |
104 | 104 | let address = toString(i.caller) | |
105 | 105 | let tokenAmount = i.payments[0].amount | |
106 | 106 | let returnedUSDNAmount = (tokenAmount * (getWaves3LNewPrice() / 1000000)) | |
107 | 107 | [IntegerEntry((address + "_redeemed_WAVES3L"), tokenAmount), IntegerEntry((address + "_received_USDN"), returnedUSDNAmount), ScriptTransfer(i.caller, returnedUSDNAmount, base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT')] | |
108 | 108 | } | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | ||
112 | 112 | @Callable(i) | |
113 | 113 | func mintWaves3L_v2 () = if (if ((size(i.payments) != 1)) | |
114 | 114 | then true | |
115 | 115 | else (i.payments[0].amount == 0)) | |
116 | 116 | then throw("1 payment has to be attached") | |
117 | 117 | else { | |
118 | 118 | let address = toString(i.caller) | |
119 | 119 | let stableCoinAmount = i.payments[0].amount | |
120 | 120 | let convertedWavesAmount = ((stableCoinAmount / 2000000) * 100000000) | |
121 | 121 | let userWavesAmount = getBalance("WAVES", i.caller) | |
122 | 122 | let bedingung = ((3 - 1) * getWavesCurrentPrice()) | |
123 | 123 | if ((stableCoinAmount >= bedingung)) | |
124 | 124 | then { | |
125 | 125 | let depositResult = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "supply", nil, [AttachedPayment(unit, convertedWavesAmount)]) | |
126 | 126 | if ((depositResult == depositResult)) | |
127 | 127 | then { | |
128 | 128 | func repeatFunc (accum,next) = { | |
129 | 129 | let borrowResult = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "borrow", ["25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT", stableCoinAmount], nil) | |
130 | 130 | if ((borrowResult == borrowResult)) | |
131 | 131 | then (accum + next) | |
132 | 132 | else throw("Strict value is not equal to itself.") | |
133 | 133 | } | |
134 | 134 | ||
135 | 135 | let array = [stableCoinAmount, stableCoinAmount, stableCoinAmount] | |
136 | 136 | let res = { | |
137 | 137 | let $l = array | |
138 | 138 | let $s = size($l) | |
139 | 139 | let $acc0 = 0 | |
140 | 140 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
141 | 141 | then $a | |
142 | 142 | else repeatFunc($a, $l[$i]) | |
143 | 143 | ||
144 | 144 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
145 | 145 | then $a | |
146 | 146 | else throw("List size exceeds 3") | |
147 | 147 | ||
148 | 148 | $f0_2($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3) | |
149 | 149 | } | |
150 | 150 | let byWavesKaufen = ((res / getWavesCurrentPrice()) * 100000000) | |
151 | 151 | [IntegerEntry((address + "_gave_USDN"), stableCoinAmount), IntegerEntry((address + "_deposited_WAVES"), convertedWavesAmount), IntegerEntry(((address + "_borrowed_") + "25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT"), res), IntegerEntry((address + "_received_WAVES3L"), 1000000), ScriptTransfer(i.caller, 1000000, base58'92rW5ucGkH84YeXLnLs8dMN1P7RAFocmR8zfBqUy4gPM')] | |
152 | 152 | } | |
153 | 153 | else throw("Strict value is not equal to itself.") | |
154 | 154 | } | |
155 | 155 | else throw("Not enough WAVES to deposit!") | |
156 | 156 | } | |
157 | 157 | ||
158 | 158 | ||
159 | 159 | ||
160 | 160 | @Callable(i) | |
161 | 161 | func redeemWaves3L_v2 () = if (if ((size(i.payments) != 1)) | |
162 | 162 | then true | |
163 | 163 | else (i.payments[0].amount == 0)) | |
164 | 164 | then throw("1 payment has to be attached") | |
165 | 165 | else { | |
166 | 166 | let address = toString(i.caller) | |
167 | 167 | let tokenAmount = 6 | |
168 | 168 | let returnedUSDNAmount = (((tokenAmount * (getWavesNewPrice() / 1000000)) - 4) * 1000000) | |
169 | 169 | [IntegerEntry((address + "_redeemed_WAVES3L"), tokenAmount), IntegerEntry((address + "_received_USDN"), returnedUSDNAmount), ScriptTransfer(i.caller, returnedUSDNAmount, base58'25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT')] | |
170 | 170 | } | |
171 | 171 | ||
172 | 172 | ||
173 | 173 | ||
174 | 174 | @Callable(i) | |
175 | 175 | func long2 () = if (if ((size(i.payments) != 1)) | |
176 | 176 | then true | |
177 | 177 | else (i.payments[0].amount == 0)) | |
178 | 178 | then throw("1 payment has to be attached") | |
179 | 179 | else { | |
180 | 180 | let firstAmountIn = i.payments[0].amount | |
181 | 181 | let firstSwappedAmount = invoke(addressFromStringValue("3Ms8fqbXM4RhmM6CPTr44hUwHe2CCmVCfVA"), "swapToWaves", nil, [AttachedPayment(usdnId, firstAmountIn)]) | |
182 | 182 | if ((firstSwappedAmount == firstSwappedAmount)) | |
183 | 183 | then match firstSwappedAmount { | |
184 | 184 | case r: Int => | |
185 | 185 | let fistDepositResult = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "supply", nil, [AttachedPayment(unit, r)]) | |
186 | 186 | if ((fistDepositResult == fistDepositResult)) | |
187 | 187 | then { | |
188 | 188 | let firstBorrowResult = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "borrow", ["25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT", ((firstAmountIn * 75) / 100)], nil) | |
189 | 189 | if ((firstBorrowResult == firstBorrowResult)) | |
190 | 190 | then { | |
191 | 191 | func repeatFunc (accum,next) = (accum + next) | |
192 | 192 | ||
193 | 193 | let array = [1, 1, 1, 1] | |
194 | 194 | let res = { | |
195 | 195 | let $l = array | |
196 | 196 | let $s = size($l) | |
197 | 197 | let $acc0 = 0 | |
198 | 198 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
199 | 199 | then $a | |
200 | 200 | else repeatFunc($a, $l[$i]) | |
201 | 201 | ||
202 | 202 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
203 | 203 | then $a | |
204 | 204 | else throw("List size exceeds 5") | |
205 | 205 | ||
206 | 206 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5) | |
207 | 207 | } | |
208 | 208 | nil | |
209 | 209 | } | |
210 | 210 | else throw("Strict value is not equal to itself.") | |
211 | 211 | } | |
212 | 212 | else throw("Strict value is not equal to itself.") | |
213 | 213 | case _ => | |
214 | 214 | throw("Incorrect invoke result") | |
215 | 215 | } | |
216 | 216 | else throw("Strict value is not equal to itself.") | |
217 | 217 | } | |
218 | 218 | ||
219 | 219 | ||
220 | 220 | ||
221 | 221 | @Callable(i) | |
222 | 222 | func long2test () = if (if ((size(i.payments) != 1)) | |
223 | 223 | then true | |
224 | 224 | else (i.payments[0].amount == 0)) | |
225 | 225 | then throw("1 payment has to be attached") | |
226 | 226 | else { | |
227 | 227 | let firstAmountIn = i.payments[0].amount | |
228 | 228 | let callerId = toString(i.caller) | |
229 | 229 | let firstSwappedAmount = invoke(addressFromStringValue("3Ms8fqbXM4RhmM6CPTr44hUwHe2CCmVCfVA"), "swapToWaves", [toString(i.caller)], [AttachedPayment(usdnId, firstAmountIn)]) | |
230 | 230 | if ((firstSwappedAmount == firstSwappedAmount)) | |
231 | 231 | then match firstSwappedAmount { | |
232 | 232 | case r: Int => | |
233 | 233 | let initList = [r, 2000000, 2000000, 2000000] | |
234 | 234 | func filterEven (accum,next) = if ((next != 2000000)) | |
235 | 235 | then (accum :+ next) | |
236 | 236 | else { | |
237 | 237 | let swappedAmount = invoke(addressFromStringValue("3Ms8fqbXM4RhmM6CPTr44hUwHe2CCmVCfVA"), "swapToWaves", [toString(i.caller)], [AttachedPayment(usdnId, next)]) | |
238 | 238 | if ((swappedAmount == swappedAmount)) | |
239 | 239 | then (accum :+ swappedAmount) | |
240 | 240 | else throw("Strict value is not equal to itself.") | |
241 | 241 | } | |
242 | 242 | ||
243 | 243 | let result = { | |
244 | 244 | let $l = initList | |
245 | 245 | let $s = size($l) | |
246 | 246 | let $acc0 = nil | |
247 | 247 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
248 | 248 | then $a | |
249 | 249 | else filterEven($a, $l[$i]) | |
250 | 250 | ||
251 | 251 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
252 | 252 | then $a | |
253 | 253 | else throw("List size exceeds 4") | |
254 | 254 | ||
255 | 255 | $f0_2($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4) | |
256 | 256 | } | |
257 | 257 | [IntegerEntry("Returned_SwappedAmount", r), IntegerEntry("First_Borrow", ((firstAmountIn * 70) / 100)), StringEntry(toBase58String(i.caller.bytes), ((((((toString(result[0]) + "_") + toString(result[1])) + "_") + toString(result[2])) + "_") + toString(result[3])))] | |
258 | 258 | case _ => | |
259 | 259 | throw("Incorrect invoke result") | |
260 | 260 | } | |
261 | 261 | else throw("Strict value is not equal to itself.") | |
262 | 262 | } | |
263 | 263 | ||
264 | 264 | ||
265 | 265 | ||
266 | 266 | @Callable(i) | |
267 | 267 | func long2test_v1 () = if (if ((size(i.payments) != 1)) | |
268 | 268 | then true | |
269 | 269 | else (i.payments[0].amount == 0)) | |
270 | 270 | then throw("1 payment has to be attached") | |
271 | 271 | else { | |
272 | 272 | let firstAmountIn = i.payments[0].amount | |
273 | 273 | let callerId = toString(i.caller) | |
274 | 274 | let firstSwappedAmount = invoke(addressFromStringValue("3Ms8fqbXM4RhmM6CPTr44hUwHe2CCmVCfVA"), "swapToWaves", [toString(i.caller)], [AttachedPayment(usdnId, firstAmountIn)]) | |
275 | 275 | if ((firstSwappedAmount == firstSwappedAmount)) | |
276 | 276 | then match firstSwappedAmount { | |
277 | 277 | case r: Int => | |
278 | 278 | let firstDepositedWaves = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "supply", nil, [AttachedPayment(unit, r)]) | |
279 | 279 | if ((firstDepositedWaves == firstDepositedWaves)) | |
280 | 280 | then { | |
281 | 281 | let firstBorrowedUSDN = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "borrow", ["25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT", ((firstAmountIn * 70) / 100)], nil) | |
282 | 282 | if ((firstBorrowedUSDN == firstBorrowedUSDN)) | |
283 | 283 | then { | |
284 | 284 | let secondSwappedAmount = invoke(addressFromStringValue("3Ms8fqbXM4RhmM6CPTr44hUwHe2CCmVCfVA"), "swapToWaves", [toString(i.caller)], [AttachedPayment(usdnId, ((firstAmountIn * 70) / 100))]) | |
285 | 285 | if ((secondSwappedAmount == secondSwappedAmount)) | |
286 | 286 | then match secondSwappedAmount { | |
287 | 287 | case secondSwap: Int => | |
288 | 288 | let secondDepositedWaves = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "supply", nil, [AttachedPayment(unit, secondSwap)]) | |
289 | 289 | if ((secondDepositedWaves == secondDepositedWaves)) | |
290 | 290 | then { | |
291 | 291 | let secondBorrowedUSDN = invoke(addressFromStringValue("3N3DnVffnUyZtz2MRbk5U7giN112WempMNd"), "borrow", ["25FEqEjRkqK6yCkiT7Lz6SAYz7gUFCtxfCChnrVFD5AT", ((((firstAmountIn * 70) / 100) * 70) / 100)], nil) | |
292 | 292 | if ((secondBorrowedUSDN == secondBorrowedUSDN)) | |
293 | 293 | then { | |
294 | 294 | let thirdSwappedAmount = invoke(addressFromStringValue("3Ms8fqbXM4RhmM6CPTr44hUwHe2CCmVCfVA"), "swapToWaves", [toString(i.caller)], [AttachedPayment(usdnId, ((((firstAmountIn * 70) / 100) * 70) / 100))]) | |
295 | 295 | if ((thirdSwappedAmount == thirdSwappedAmount)) | |
296 | 296 | then match thirdSwappedAmount { | |
297 | 297 | case thirdSwap: Int => | |
298 | - | [ | |
298 | + | [IntegerEntry("Returned_Second_SwappedAmount", secondSwap), IntegerEntry("Second_Borrow", ((((firstAmountIn * 70) / 100) * 70) / 100)), IntegerEntry("Returned_Third_SwappedAmount", thirdSwap)] | |
299 | 299 | case _ => | |
300 | 300 | throw("Incorrect invoke result") | |
301 | 301 | } | |
302 | 302 | else throw("Strict value is not equal to itself.") | |
303 | 303 | } | |
304 | 304 | else throw("Strict value is not equal to itself.") | |
305 | 305 | } | |
306 | 306 | else throw("Strict value is not equal to itself.") | |
307 | 307 | case _ => | |
308 | 308 | throw("Incorrect invoke result") | |
309 | 309 | } | |
310 | 310 | else throw("Strict value is not equal to itself.") | |
311 | 311 | } | |
312 | 312 | else throw("Strict value is not equal to itself.") | |
313 | 313 | } | |
314 | 314 | else throw("Strict value is not equal to itself.") | |
315 | 315 | case _ => | |
316 | 316 | throw("Incorrect invoke result") | |
317 | 317 | } | |
318 | 318 | else throw("Strict value is not equal to itself.") | |
319 | 319 | } | |
320 | 320 | ||
321 | 321 | ||
322 | 322 | @Verifier(tx) | |
323 | 323 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
324 | 324 |
github/deemru/w8io/026f985 44.13 ms ◑