tx · 5LHovVi414aq8j53UKtMQErKds6ZrsTRqZMAKTVbhgVC 3MsdLkCCcsf1niGwjyQCMi8aC4CkNbm2Wy9: -0.04200000 Waves 2023.04.05 12:19 [2521052] smart account 3MsdLkCCcsf1niGwjyQCMi8aC4CkNbm2Wy9 > SELF 0.00000000 Waves
{ "type": 13, "id": "5LHovVi414aq8j53UKtMQErKds6ZrsTRqZMAKTVbhgVC", "fee": 4200000, "feeAssetId": null, "timestamp": 1680686357613, "version": 2, "chainId": 84, "sender": "3MsdLkCCcsf1niGwjyQCMi8aC4CkNbm2Wy9", "senderPublicKey": "B4L9D9LnFwCPW8fFVc65SHyFNYjb1KJv6MUQXPGMPSTy", "proofs": [ "rTSVdH9dbjGAEA99r2dfXDtfhrSQcXqadhThsXBVVXoiSGJXyXBFBAc3NVzfUaFNqenVCo2yy7NASEypMZzVEfa" ], "script": "base64:BgL8NggCEgASBQoDAQQBEgcKBQEEAQgBEgMKAQgSABIECgIBBBIDCgEBEgQKAgEEEgQKAggBEgQKAggBEgQKAggBEgUKAwEIARIAEgQKAgEBEgMKAQESBQoDAQEBEgQKAggIEgASABIDCgEIEgUKAwEBARIECgIBARIECgIIARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCBIAEgMKAQESAwoBARIECgIIASIKbFBkZWNpbWFscyIGc2NhbGU4IgxzY2FsZThCaWdJbnQiB3NjYWxlMTgiCnplcm9CaWdJbnQiBGJpZzAiBGJpZzEiBGJpZzIiC3dhdmVzU3RyaW5nIgNTRVAiClBvb2xBY3RpdmUiD1Bvb2xQdXREaXNhYmxlZCITUG9vbE1hdGNoZXJEaXNhYmxlZCIMUG9vbFNodXRkb3duIg5pZHhQb29sQWRkcmVzcyINaWR4UG9vbFN0YXR1cyIQaWR4UG9vbExQQXNzZXRJZCINaWR4QW10QXNzZXRJZCIPaWR4UHJpY2VBc3NldElkIg5pZHhBbXRBc3NldERjbSIQaWR4UHJpY2VBc3NldERjbSIOaWR4SUFtdEFzc2V0SWQiEG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lQDCQD0AwMIBQJpZwlib2R5Qnl0ZXMJAJEDAggFAmlnBnByb29mcwAABQJpaQYEAmlsCQD2AwEJAQV2YWx1ZQEIBQJnZgZzY3JpcHQEAmltCQDbBAEJAQV2YWx1ZQEJAJ0IAgUCYVQJAQJhRgAEAmluCQDxBwEFBHRoaXMDCQAAAgUCaW0FAmlsCQECIT0CBQJpbgUCaWwHCQD0AwMIBQJpZwlib2R5Qnl0ZXMJAJEDAggFAmlnBnByb29mcwAABQJpaSaPx1A=", "height": 2521052, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CkpjTGjm98L1e3GmUofCgmC8XqtKD2En7YfCku2fWJhx Next: 6ZExvFgAc2DkbFcHXb2cWz6aXnHNRkTquWWN32yNtVJW Diff:
Old | New | Differences | |
---|---|---|---|
130 | 130 | ||
131 | 131 | let an = valueOrElse(getInteger(this, al), am) | |
132 | 132 | ||
133 | - | func ao () = "%s | |
133 | + | func ao (ap) = makeString(["%s%s", "stakedBalance", ap], j) | |
134 | 134 | ||
135 | 135 | ||
136 | - | func | |
136 | + | func aq (ap) = makeString(["%s%s", "shareAssetBalance", ap], j) | |
137 | 137 | ||
138 | 138 | ||
139 | - | func | |
139 | + | func ar (ap) = valueOrElse(getInteger(this, ao(ap)), 0) | |
140 | 140 | ||
141 | 141 | ||
142 | - | func as ( | |
142 | + | func as (ap) = valueOrElse(getInteger(this, aq(ap)), 0) | |
143 | 143 | ||
144 | 144 | ||
145 | - | func at ( | |
145 | + | func at () = "%s__factoryConfig" | |
146 | 146 | ||
147 | 147 | ||
148 | - | func au ( | |
148 | + | func au () = "%s%s__matcher__publicKey" | |
149 | 149 | ||
150 | 150 | ||
151 | - | func av () = "%s__ | |
151 | + | func av (aw) = (("%s%s%s__" + aw) + "__mappings__poolContract2LpAsset") | |
152 | 152 | ||
153 | 153 | ||
154 | - | func | |
154 | + | func ax (ay,az) = (((("%d%d%s__" + ay) + "__") + az) + "__config") | |
155 | 155 | ||
156 | 156 | ||
157 | - | func | |
157 | + | func aA (aB) = ("%s%s%s__mappings__baseAsset2internalId__" + aB) | |
158 | 158 | ||
159 | 159 | ||
160 | - | func | |
160 | + | func aC () = "%s__shutdown" | |
161 | 161 | ||
162 | 162 | ||
163 | - | func | |
163 | + | func aD (aE) = ("%s%s__poolWeight__" + aE) | |
164 | 164 | ||
165 | 165 | ||
166 | - | func | |
166 | + | func aF () = "%s__allowedLpScriptHash" | |
167 | 167 | ||
168 | 168 | ||
169 | - | func aF (aG) = ("%s%s__poolWeight__" + aG) | |
169 | + | let aG = "%s__feeCollectorAddress" | |
170 | + | ||
171 | + | func aH (aI,aJ,aK,aL) = throw((((((((("order validation failed: orderValid=" + toString(aI)) + " (") + aJ) + ")") + " senderValid=") + toString(aK)) + " matcherValid=") + toString(aL))) | |
170 | 172 | ||
171 | 173 | ||
172 | - | func | |
174 | + | func aM (aN,aO) = valueOrErrorMessage(getString(aN, aO), makeString(["mandatory ", toString(aN), ".", aO, " is not defined"], "")) | |
173 | 175 | ||
174 | 176 | ||
175 | - | let aI = "%s__feeCollectorAddress" | |
176 | - | ||
177 | - | func aJ (aK,aL,aM,aN) = throw((((((((("order validation failed: orderValid=" + toString(aK)) + " (") + aL) + ")") + " senderValid=") + toString(aM)) + " matcherValid=") + toString(aN))) | |
177 | + | func aP (aN,aO) = valueOrErrorMessage(getInteger(aN, aO), makeString(["mandatory ", toString(aN), ".", aO, " is not defined"], "")) | |
178 | 178 | ||
179 | 179 | ||
180 | - | func | |
180 | + | func aQ (aR) = throw(makeString(["lp.ride:", aR], " ")) | |
181 | 181 | ||
182 | 182 | ||
183 | - | func | |
183 | + | func aS (aR) = makeString(["lp.ride:", aR], " ") | |
184 | 184 | ||
185 | 185 | ||
186 | - | func aS (aT) = throw(makeString(["lp.ride:", aT], " ")) | |
186 | + | let aT = addressFromStringValue(aM(this, T())) | |
187 | + | ||
188 | + | let aU = addressFromStringValue(aM(aT, aG)) | |
189 | + | ||
190 | + | let aV = { | |
191 | + | let aW = invoke(aT, "getInFeeREADONLY", [toString(this)], nil) | |
192 | + | if ($isInstanceOf(aW, "Int")) | |
193 | + | then aW | |
194 | + | else throw(($getType(aW) + " couldn't be cast to Int")) | |
195 | + | } | |
196 | + | ||
197 | + | let aX = { | |
198 | + | let aW = invoke(aT, "getOutFeeREADONLY", [toString(this)], nil) | |
199 | + | if ($isInstanceOf(aW, "Int")) | |
200 | + | then aW | |
201 | + | else throw(($getType(aW) + " couldn't be cast to Int")) | |
202 | + | } | |
203 | + | ||
204 | + | func aY () = valueOrElse(getBoolean(aT, aC()), false) | |
187 | 205 | ||
188 | 206 | ||
189 | - | func | |
207 | + | func aZ () = fromBase58String(aM(aT, au())) | |
190 | 208 | ||
191 | 209 | ||
192 | - | let aV = addressFromStringValue(aO(this, T())) | |
193 | - | ||
194 | - | let aW = addressFromStringValue(aO(aV, aI)) | |
195 | - | ||
196 | - | let aX = { | |
197 | - | let aY = invoke(aV, "getInFeeREADONLY", [toString(this)], nil) | |
198 | - | if ($isInstanceOf(aY, "Int")) | |
199 | - | then aY | |
200 | - | else throw(($getType(aY) + " couldn't be cast to Int")) | |
201 | - | } | |
202 | - | ||
203 | - | let aZ = { | |
204 | - | let aY = invoke(aV, "getOutFeeREADONLY", [toString(this)], nil) | |
205 | - | if ($isInstanceOf(aY, "Int")) | |
206 | - | then aY | |
207 | - | else throw(($getType(aY) + " couldn't be cast to Int")) | |
208 | - | } | |
209 | - | ||
210 | - | func ba () = aO(aV, ao()) | |
211 | - | ||
212 | - | ||
213 | - | func bb () = aO(aV, ap()) | |
214 | - | ||
215 | - | ||
216 | - | func bc () = valueOrElse(getBoolean(aV, aE()), false) | |
217 | - | ||
218 | - | ||
219 | - | func bd () = fromBase58String(aO(aV, aw())) | |
220 | - | ||
221 | - | ||
222 | - | func be () = { | |
223 | - | let bf = aO(this, ae()) | |
224 | - | let bg = aO(this, af()) | |
225 | - | let aB = aR(aV, aC(bg)) | |
226 | - | let aA = aR(aV, aC(bf)) | |
227 | - | split(aO(aV, az(toString(aA), toString(aB))), j) | |
210 | + | func ba () = { | |
211 | + | let bb = aM(this, ae()) | |
212 | + | let bc = aM(this, af()) | |
213 | + | let az = aP(aT, aA(bc)) | |
214 | + | let ay = aP(aT, aA(bb)) | |
215 | + | split(aM(aT, ax(toString(ay), toString(az))), j) | |
228 | 216 | } | |
229 | 217 | ||
230 | 218 | ||
231 | - | func | |
219 | + | func bd (be) = if ((be == i)) | |
232 | 220 | then unit | |
233 | - | else fromBase58String( | |
221 | + | else fromBase58String(be) | |
234 | 222 | ||
235 | 223 | ||
236 | - | func | |
224 | + | func bf (be) = if ((be == unit)) | |
237 | 225 | then i | |
238 | - | else toBase58String(value( | |
226 | + | else toBase58String(value(be)) | |
239 | 227 | ||
240 | 228 | ||
241 | - | func | |
229 | + | func bg (bh) = $Tuple7(addressFromStringValue(bh[o]), parseIntValue(bh[p]), fromBase58String(bh[q]), bd(bh[r]), bd(bh[s]), parseIntValue(bh[t]), parseIntValue(bh[u])) | |
242 | 230 | ||
243 | 231 | ||
244 | - | let | |
232 | + | let bi = bg(ba()) | |
245 | 233 | ||
246 | - | let | |
234 | + | let bj = bi | |
247 | 235 | ||
248 | - | let | |
236 | + | let bk = bj._1 | |
249 | 237 | ||
250 | - | let | |
238 | + | let bl = bj._2 | |
251 | 239 | ||
252 | - | let | |
240 | + | let bm = bj._3 | |
253 | 241 | ||
254 | - | let | |
242 | + | let bn = bj._4 | |
255 | 243 | ||
256 | - | let | |
244 | + | let bo = bj._5 | |
257 | 245 | ||
258 | - | let | |
246 | + | let bp = bj._6 | |
259 | 247 | ||
260 | - | let | |
248 | + | let bq = bj._7 | |
261 | 249 | ||
262 | - | func | |
250 | + | func br () = split(aM(aT, at()), j) | |
263 | 251 | ||
264 | 252 | ||
265 | - | let | |
253 | + | let bs = valueOrErrorMessage(addressFromString(br()[B]), "incorrect staking address") | |
266 | 254 | ||
267 | - | let | |
255 | + | let bt = valueOrErrorMessage(addressFromString(br()[C]), "incorrect staking address") | |
268 | 256 | ||
269 | - | func | |
257 | + | func bu (bv,bw,bx,by,bz,bA,bB,bC,bD,bE) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bv), toString(bw), toString(bx), toString(by), toString(bz), toString(bA), toString(bB), toString(bC), toString(bD), toString(bE)], j) | |
270 | 258 | ||
271 | 259 | ||
272 | - | func | |
260 | + | func bF (bG,bH,bI,by,bB,bC) = makeString(["%d%d%d%d%d%d", toString(bG), toString(bH), toString(bI), toString(by), toString(bB), toString(bC)], j) | |
273 | 261 | ||
274 | 262 | ||
275 | - | func | |
276 | - | let | |
263 | + | func bJ (ap) = { | |
264 | + | let bK = if ((ap == "WAVES")) | |
277 | 265 | then wavesBalance(this).available | |
278 | - | else assetBalance(this, fromBase58String( | |
279 | - | let | |
280 | - | max([0, | |
266 | + | else assetBalance(this, fromBase58String(ap)) | |
267 | + | let bL = ((bK + ar(ap)) - as(ap)) | |
268 | + | max([0, bL]) | |
281 | 269 | } | |
282 | 270 | ||
283 | 271 | ||
284 | - | func | |
272 | + | func bM (bN,bO) = fraction(bN, d, bO) | |
285 | 273 | ||
286 | 274 | ||
287 | - | func | |
275 | + | func bP (bN,bO,L) = fraction(bN, d, bO, L) | |
288 | 276 | ||
289 | 277 | ||
290 | - | func | |
291 | - | let | |
292 | - | if (( | |
278 | + | func bQ (bR) = { | |
279 | + | let bS = invoke(bR, "getRate", nil, nil) | |
280 | + | if ((bS == bS)) | |
293 | 281 | then { | |
294 | - | let | |
295 | - | if ($isInstanceOf( | |
282 | + | let bT = bS | |
283 | + | if ($isInstanceOf(bT, "Int")) | |
296 | 284 | then { | |
297 | - | let | |
298 | - | | |
285 | + | let bU = bT | |
286 | + | bU | |
299 | 287 | } | |
300 | - | else | |
288 | + | else aQ("proxy.getRate() unexpected value") | |
301 | 289 | } | |
302 | 290 | else throw("Strict value is not equal to itself.") | |
303 | 291 | } | |
304 | 292 | ||
305 | 293 | ||
306 | - | func | |
307 | - | let | |
308 | - | if (( | |
294 | + | func bV (ap,bW,bX,bR) = { | |
295 | + | let bY = ar(ap) | |
296 | + | if ((bY == bY)) | |
309 | 297 | then { | |
310 | - | let | |
311 | - | if (( | |
298 | + | let bZ = as(bX) | |
299 | + | if ((bZ == bZ)) | |
312 | 300 | then { | |
313 | - | let | |
314 | - | if (( | |
301 | + | let ca = bd(ap) | |
302 | + | if ((bW > 0)) | |
315 | 303 | then { | |
316 | - | let | |
317 | - | if (( | |
304 | + | let cb = invoke(bR, "deposit", nil, [AttachedPayment(ca, bW)]) | |
305 | + | if ((cb == cb)) | |
318 | 306 | then { | |
319 | - | let | |
320 | - | if ($isInstanceOf( | |
307 | + | let bT = cb | |
308 | + | if ($isInstanceOf(bT, "Int")) | |
321 | 309 | then { | |
322 | - | let | |
323 | - | let | |
324 | - | let | |
325 | - | [IntegerEntry( | |
310 | + | let cc = bT | |
311 | + | let cd = (bY + bW) | |
312 | + | let ce = (bZ + cc) | |
313 | + | [IntegerEntry(ao(ap), cd), IntegerEntry(aq(bX), ce)] | |
326 | 314 | } | |
327 | 315 | else nil | |
328 | 316 | } | |
336 | 324 | } | |
337 | 325 | ||
338 | 326 | ||
339 | - | func | |
340 | - | let | |
341 | - | if (( | |
327 | + | func cf (ap,bW,bX,bR,cg,ch) = { | |
328 | + | let bY = ar(ap) | |
329 | + | if ((bY == bY)) | |
342 | 330 | then { | |
343 | - | let | |
344 | - | if (( | |
331 | + | let bZ = as(bX) | |
332 | + | if ((bZ == bZ)) | |
345 | 333 | then { | |
346 | - | let | |
347 | - | if (( | |
334 | + | let ci = bQ(bR) | |
335 | + | if ((ci == ci)) | |
348 | 336 | then { | |
349 | - | let | |
350 | - | let | |
351 | - | let | |
352 | - | let | |
353 | - | let | |
354 | - | if (( | |
337 | + | let cj = fraction(cg, bY, bZ) | |
338 | + | let ck = bd(bX) | |
339 | + | let cl = fraction(cg, bW, cj) | |
340 | + | let cm = fraction(cg, bW, ci) | |
341 | + | let cn = max([0, (cl - cm)]) | |
342 | + | if ((cm > 0)) | |
355 | 343 | then { | |
356 | - | let | |
357 | - | if (( | |
344 | + | let co = invoke(bR, "withdraw", nil, [AttachedPayment(ck, cm)]) | |
345 | + | if ((co == co)) | |
358 | 346 | then { | |
359 | - | let | |
360 | - | if ($isInstanceOf( | |
347 | + | let bT = co | |
348 | + | if ($isInstanceOf(bT, "Int")) | |
361 | 349 | then { | |
362 | - | let | |
363 | - | let | |
364 | - | let | |
365 | - | [IntegerEntry( | |
350 | + | let cp = bT | |
351 | + | let cd = (bY - cp) | |
352 | + | let ce = ((bZ - cm) - cn) | |
353 | + | [IntegerEntry(ao(ap), cd), IntegerEntry(aq(bX), ce), ScriptTransfer(ch, cn, bd(bX))] | |
366 | 354 | } | |
367 | 355 | else nil | |
368 | 356 | } | |
378 | 366 | } | |
379 | 367 | ||
380 | 368 | ||
381 | - | func | |
369 | + | func cq (ap) = invoke(aT, "getPoolLeaseConfigREADONLY", [toString(this), ap], nil) | |
382 | 370 | ||
383 | 371 | ||
384 | - | func | |
385 | - | let | |
386 | - | if (( | |
372 | + | func cr (cs,ap,bX,ct,bR,cg,ch) = { | |
373 | + | let bY = ar(ap) | |
374 | + | if ((bY == bY)) | |
387 | 375 | then { | |
388 | - | let | |
389 | - | if (( | |
376 | + | let bZ = as(bX) | |
377 | + | if ((bZ == bZ)) | |
390 | 378 | then { | |
391 | - | let | |
392 | - | let | |
393 | - | if ($isInstanceOf( | |
379 | + | let cu = { | |
380 | + | let bT = bd(ap) | |
381 | + | if ($isInstanceOf(bT, "ByteVector")) | |
394 | 382 | then { | |
395 | - | let | |
396 | - | assetBalance(this, | |
383 | + | let cv = bT | |
384 | + | assetBalance(this, cv) | |
397 | 385 | } | |
398 | - | else if ($isInstanceOf( | |
386 | + | else if ($isInstanceOf(bT, "Unit")) | |
399 | 387 | then { | |
400 | - | let | |
388 | + | let cw = bT | |
401 | 389 | wavesBalance(this).available | |
402 | 390 | } | |
403 | 391 | else throw("Match error") | |
404 | 392 | } | |
405 | - | if (( | |
393 | + | if ((cu == cu)) | |
406 | 394 | then { | |
407 | - | let | |
408 | - | let | |
409 | - | let | |
410 | - | if (( | |
395 | + | let cx = max([0, ((cu + bY) - ct)]) | |
396 | + | let cy = fraction(cs, cx, 100) | |
397 | + | let cz = (bY - cy) | |
398 | + | if ((cz == 0)) | |
411 | 399 | then nil | |
412 | - | else if ((0 > | |
400 | + | else if ((0 > cz)) | |
413 | 401 | then { | |
414 | - | let | |
415 | - | | |
402 | + | let cA = -(cz) | |
403 | + | bV(ap, cA, bX, bR) | |
416 | 404 | } | |
417 | 405 | else { | |
418 | - | let | |
419 | - | | |
406 | + | let cB = cz | |
407 | + | cf(ap, cB, bX, bR, cg, ch) | |
420 | 408 | } | |
421 | 409 | } | |
422 | 410 | else throw("Strict value is not equal to itself.") | |
427 | 415 | } | |
428 | 416 | ||
429 | 417 | ||
430 | - | func | |
431 | - | let | |
432 | - | if ($isInstanceOf( | |
418 | + | func cC (ap) = { | |
419 | + | let bT = cq(ap) | |
420 | + | if ($isInstanceOf(bT, "(Boolean, Int, Int, String, String, Int, String)")) | |
433 | 421 | then { | |
434 | - | let | |
435 | - | let | |
436 | - | let | |
437 | - | let | |
438 | - | let | |
439 | - | let | |
440 | - | let | |
441 | - | let | |
442 | - | let | |
443 | - | if ( | |
444 | - | then | |
422 | + | let cD = bT | |
423 | + | let cE = cD | |
424 | + | let cF = cE._1 | |
425 | + | let cG = cE._2 | |
426 | + | let ct = cE._3 | |
427 | + | let cH = cE._4 | |
428 | + | let cI = cE._5 | |
429 | + | let cg = cE._6 | |
430 | + | let cJ = cE._7 | |
431 | + | if (cF) | |
432 | + | then cr(cG, ap, cI, ct, addressFromStringValue(cH), cg, addressFromStringValue(cJ)) | |
445 | 433 | else nil | |
446 | 434 | } | |
447 | - | else | |
435 | + | else aQ((("[" + ap) + "] Rebalance error")) | |
448 | 436 | } | |
449 | 437 | ||
450 | 438 | ||
451 | - | func | |
452 | - | let | |
453 | - | if ($isInstanceOf( | |
439 | + | func cK (ap,cL) = { | |
440 | + | let bT = cq(ap) | |
441 | + | if ($isInstanceOf(bT, "(Boolean, Int, Int, String, String, Int, String)")) | |
454 | 442 | then { | |
455 | - | let | |
456 | - | let | |
457 | - | let | |
458 | - | let | |
459 | - | let | |
460 | - | let | |
461 | - | let | |
462 | - | let | |
463 | - | let | |
464 | - | if ( | |
443 | + | let cD = bT | |
444 | + | let cM = cD | |
445 | + | let cF = cM._1 | |
446 | + | let cG = cM._2 | |
447 | + | let ct = cM._3 | |
448 | + | let cH = cM._4 | |
449 | + | let cI = cM._5 | |
450 | + | let cg = cM._6 | |
451 | + | let cJ = cM._7 | |
452 | + | if (cF) | |
465 | 453 | then { | |
466 | - | let | |
467 | - | if (( | |
454 | + | let cN = max([0, ((bJ(ap) - cL) - ct)]) | |
455 | + | if ((cN == cN)) | |
468 | 456 | then { | |
469 | - | let | |
470 | - | if (( | |
457 | + | let cd = fraction(cG, cN, 100) | |
458 | + | if ((cd == cd)) | |
471 | 459 | then { | |
472 | - | let | |
473 | - | if (( | |
474 | - | then | |
460 | + | let cO = max([0, (ar(ap) - cd)]) | |
461 | + | if ((cO == cO)) | |
462 | + | then cf(ap, cO, cI, addressFromStringValue(cH), cg, addressFromStringValue(cJ)) | |
475 | 463 | else throw("Strict value is not equal to itself.") | |
476 | 464 | } | |
477 | 465 | else throw("Strict value is not equal to itself.") | |
480 | 468 | } | |
481 | 469 | else nil | |
482 | 470 | } | |
483 | - | else | |
471 | + | else aQ((("[" + ap) + "] getWithdrawAssetState() error")) | |
484 | 472 | } | |
485 | 473 | ||
486 | 474 | ||
487 | - | func | |
488 | - | let | |
489 | - | let | |
490 | - | | |
475 | + | func cP (cQ,cR,cS,cT) = { | |
476 | + | let cU = D(cS, cQ) | |
477 | + | let cV = D(cT, cR) | |
478 | + | bM(cV, cU) | |
491 | 479 | } | |
492 | 480 | ||
493 | 481 | ||
494 | - | func | |
495 | - | let | |
496 | - | let | |
497 | - | let | |
498 | - | let | |
499 | - | let | |
500 | - | let | |
501 | - | let | |
502 | - | let | |
503 | - | let | |
504 | - | [ | |
482 | + | func cW (cS,cT,cX) = { | |
483 | + | let cY = ba() | |
484 | + | let cZ = parseIntValue(cY[t]) | |
485 | + | let da = parseIntValue(cY[u]) | |
486 | + | let db = cP(cZ, da, cS, cT) | |
487 | + | let bO = D(cS, cZ) | |
488 | + | let bN = D(cT, da) | |
489 | + | let dc = D(cX, b) | |
490 | + | let dd = bM(bO, dc) | |
491 | + | let de = bM(bN, dc) | |
492 | + | [db, dd, de] | |
505 | 493 | } | |
506 | 494 | ||
507 | 495 | ||
508 | - | func | |
509 | - | let | |
510 | - | [H( | |
496 | + | func df (cS,cT,cX) = { | |
497 | + | let dg = cW(cS, cT, cX) | |
498 | + | [H(dg[0], b), H(dg[1], b), H(dg[2], b)] | |
511 | 499 | } | |
512 | 500 | ||
513 | 501 | ||
514 | - | func | |
515 | - | let | |
516 | - | let | |
517 | - | let | |
518 | - | let | |
519 | - | let | |
520 | - | let | |
521 | - | let | |
522 | - | let | |
523 | - | if (( | |
502 | + | func dh (di,dj,dk,ab) = { | |
503 | + | let cY = ba() | |
504 | + | let dl = cY[q] | |
505 | + | let dm = cY[r] | |
506 | + | let dn = cY[s] | |
507 | + | let cQ = parseIntValue(cY[t]) | |
508 | + | let cR = parseIntValue(cY[u]) | |
509 | + | let do = cY[p] | |
510 | + | let dp = valueOrErrorMessage(assetInfo(fromBase58String(dl)), (("Asset " + dl) + " doesn't exist")).quantity | |
511 | + | if ((dl != dj)) | |
524 | 512 | then throw("Invalid asset passed.") | |
525 | 513 | else { | |
526 | - | let | |
527 | - | let | |
528 | - | let | |
529 | - | let | |
530 | - | let | |
531 | - | let | |
532 | - | let | |
533 | - | let | |
534 | - | let | |
535 | - | let | |
536 | - | let | |
537 | - | let | |
538 | - | let | |
539 | - | if (( | |
514 | + | let dq = bJ(dm) | |
515 | + | let dr = D(dq, cQ) | |
516 | + | let ds = bJ(dn) | |
517 | + | let dt = D(ds, cR) | |
518 | + | let du = bM(dt, dr) | |
519 | + | let dv = H(du, b) | |
520 | + | let dw = D(dk, b) | |
521 | + | let dx = D(dp, b) | |
522 | + | let dy = fraction(dr, dw, dx) | |
523 | + | let dz = fraction(dt, dw, dx) | |
524 | + | let dA = K(dy, cQ, FLOOR) | |
525 | + | let dB = K(dz, cR, FLOOR) | |
526 | + | let dC = cK(dm, dA) | |
527 | + | if ((dC == dC)) | |
540 | 528 | then { | |
541 | - | let | |
542 | - | if (( | |
529 | + | let dD = cK(dn, dB) | |
530 | + | if ((dD == dD)) | |
543 | 531 | then { | |
544 | - | let | |
532 | + | let dE = if ((di == "")) | |
545 | 533 | then nil | |
546 | - | else (( | |
534 | + | else ((dC ++ dD) ++ [ScriptTransfer(ab, dA, if ((dm == "WAVES")) | |
547 | 535 | then unit | |
548 | - | else fromBase58String( | |
536 | + | else fromBase58String(dm)), ScriptTransfer(ab, dB, if ((dn == "WAVES")) | |
549 | 537 | then unit | |
550 | - | else fromBase58String( | |
551 | - | $Tuple10( | |
538 | + | else fromBase58String(dn)), StringEntry(ad(toString(ab), di), bF(dA, dB, dk, dv, height, lastBlock.timestamp)), IntegerEntry(W(), dv), IntegerEntry(X(height, lastBlock.timestamp), dv)]) | |
539 | + | $Tuple10(dA, dB, dm, dn, dq, ds, dp, du, do, dE) | |
552 | 540 | } | |
553 | 541 | else throw("Strict value is not equal to itself.") | |
554 | 542 | } | |
557 | 545 | } | |
558 | 546 | ||
559 | 547 | ||
560 | - | func | |
561 | - | let | |
562 | - | let | |
563 | - | let | |
564 | - | let | |
565 | - | let | |
566 | - | let | |
567 | - | let | |
568 | - | let | |
569 | - | let | |
570 | - | let | |
571 | - | let | |
572 | - | let | |
573 | - | if (if (( | |
548 | + | func dF (di,dG,dH,dI,dJ,dK,ab,dL,dM) = { | |
549 | + | let cY = ba() | |
550 | + | let dl = fromBase58String(cY[q]) | |
551 | + | let dN = cY[r] | |
552 | + | let dO = cY[s] | |
553 | + | let dP = cY[v] | |
554 | + | let dQ = cY[w] | |
555 | + | let cZ = parseIntValue(cY[t]) | |
556 | + | let da = parseIntValue(cY[u]) | |
557 | + | let do = cY[p] | |
558 | + | let dp = valueOrErrorMessage(assetInfo(dl), (("Asset " + toBase58String(dl)) + " doesn't exist")).quantity | |
559 | + | let dR = toBase58String(valueOrElse(dI, fromBase58String("WAVES"))) | |
560 | + | let dS = toBase58String(valueOrElse(dK, fromBase58String("WAVES"))) | |
561 | + | if (if ((dN != dR)) | |
574 | 562 | then true | |
575 | - | else ( | |
563 | + | else (dO != dS)) | |
576 | 564 | then throw("Invalid amt or price asset passed.") | |
577 | 565 | else { | |
578 | - | let | |
579 | - | then | |
580 | - | else ( | |
581 | - | let | |
582 | - | then | |
583 | - | else ( | |
584 | - | let | |
585 | - | let | |
586 | - | let | |
587 | - | let | |
588 | - | let | |
589 | - | let | |
566 | + | let dq = if (dL) | |
567 | + | then bJ(dN) | |
568 | + | else (bJ(dN) - dH) | |
569 | + | let ds = if (dL) | |
570 | + | then bJ(dO) | |
571 | + | else (bJ(dO) - dJ) | |
572 | + | let dT = D(dH, cZ) | |
573 | + | let dU = D(dJ, da) | |
574 | + | let dV = bM(dU, dT) | |
575 | + | let dr = D(dq, cZ) | |
576 | + | let dt = D(ds, da) | |
577 | + | let dW = if ((dp == 0)) | |
590 | 578 | then { | |
591 | - | let | |
592 | - | let | |
593 | - | let | |
594 | - | $Tuple5(H( | |
579 | + | let du = e | |
580 | + | let dX = e | |
581 | + | let dc = pow((dT * dU), 0, toBigInt(5), 1, 0, DOWN) | |
582 | + | $Tuple5(H(dc, b), H(dT, cZ), H(dU, da), bM((dt + dU), (dr + dT)), dX) | |
595 | 583 | } | |
596 | 584 | else { | |
597 | - | let | |
598 | - | let | |
599 | - | let | |
600 | - | if (if (( | |
601 | - | then ( | |
585 | + | let du = bM(dt, dr) | |
586 | + | let dX = fraction(R((du - dV)), d, du) | |
587 | + | let dY = D(dG, b) | |
588 | + | if (if ((du != e)) | |
589 | + | then (dX > dY) | |
602 | 590 | else false) | |
603 | - | then throw(((("Price slippage " + toString( | |
591 | + | then throw(((("Price slippage " + toString(dX)) + " exceeded the passed limit of ") + toString(dY))) | |
604 | 592 | else { | |
605 | - | let | |
606 | - | let | |
607 | - | let | |
608 | - | let | |
609 | - | then $Tuple2( | |
610 | - | else $Tuple2( | |
611 | - | let | |
612 | - | let | |
613 | - | let | |
614 | - | $Tuple5(K( | |
593 | + | let dx = D(dp, b) | |
594 | + | let dZ = fraction(dT, bP(dt, dr, CEILING), d, CEILING) | |
595 | + | let ea = fraction(dU, d, bP(dt, dr, FLOOR), CEILING) | |
596 | + | let eb = if ((dZ > dU)) | |
597 | + | then $Tuple2(ea, dU) | |
598 | + | else $Tuple2(dT, dZ) | |
599 | + | let ec = eb._1 | |
600 | + | let ed = eb._2 | |
601 | + | let dc = fraction(dx, ed, dt, FLOOR) | |
602 | + | $Tuple5(K(dc, b, FLOOR), K(ec, cZ, CEILING), K(ed, da, CEILING), du, dX) | |
615 | 603 | } | |
616 | 604 | } | |
617 | - | let | |
618 | - | let | |
619 | - | let | |
620 | - | let | |
621 | - | let | |
622 | - | if ((0 >= | |
605 | + | let ee = dW._1 | |
606 | + | let ef = dW._2 | |
607 | + | let eg = dW._3 | |
608 | + | let dv = H(dW._4, b) | |
609 | + | let eh = H(dW._5, b) | |
610 | + | if ((0 >= ee)) | |
623 | 611 | then throw("Invalid calculations. LP calculated is less than zero.") | |
624 | 612 | else { | |
625 | - | let | |
613 | + | let ei = if (!(dM)) | |
626 | 614 | then 0 | |
627 | - | else | |
628 | - | let | |
629 | - | let | |
630 | - | let | |
631 | - | $Tuple13(ei, | |
615 | + | else ee | |
616 | + | let ej = (dH - ef) | |
617 | + | let ek = (dJ - eg) | |
618 | + | let el = [IntegerEntry(W(), dv), IntegerEntry(X(height, lastBlock.timestamp), dv), StringEntry(aa(ab, di), bu(ef, eg, ei, dv, dG, eh, height, lastBlock.timestamp, ej, ek))] | |
619 | + | $Tuple13(ee, ei, dv, dq, ds, dp, dl, do, el, ej, ek, dI, dK) | |
632 | 620 | } | |
633 | 621 | } | |
634 | 622 | } | |
635 | 623 | ||
636 | 624 | ||
637 | - | func | |
638 | - | let | |
639 | - | let | |
640 | - | let | |
641 | - | if (( | |
625 | + | func em (en,eo,dp) = { | |
626 | + | let ep = G(en, toBigInt(bp)) | |
627 | + | let eq = G(eo, toBigInt(bq)) | |
628 | + | let er = fraction(pow((ep * eq), 0, toBigInt(5), 1, 18, DOWN), g, dp) | |
629 | + | if ((dp == f)) | |
642 | 630 | then f | |
643 | - | else | |
631 | + | else er | |
644 | 632 | } | |
645 | 633 | ||
646 | 634 | ||
647 | - | func | |
648 | - | let | |
649 | - | let | |
650 | - | let | |
651 | - | let | |
652 | - | | |
635 | + | func es (et,eu,ev) = { | |
636 | + | let ew = (toBigInt(bJ(bf(bn))) - et) | |
637 | + | let ex = (toBigInt(bJ(bf(bo))) - eu) | |
638 | + | let ey = (toBigInt(value(assetInfo(bm)).quantity) - ev) | |
639 | + | let ez = em(ew, ex, ey) | |
640 | + | ez | |
653 | 641 | } | |
654 | 642 | ||
655 | 643 | ||
656 | - | func | |
657 | - | let | |
658 | - | let | |
659 | - | let | |
660 | - | let | |
661 | - | let | |
662 | - | $Tuple2( | |
644 | + | func eA (eB,eC,ev) = { | |
645 | + | let ew = (bJ(bf(bn)) + eB) | |
646 | + | let ex = (bJ(bf(bo)) + eC) | |
647 | + | let ey = (value(assetInfo(bm)).quantity + ev) | |
648 | + | let er = em(toBigInt(ew), toBigInt(ex), toBigInt(ey)) | |
649 | + | let eD = [IntegerEntry(ak, height), StringEntry(aj, toString(er))] | |
650 | + | $Tuple2(eD, er) | |
663 | 651 | } | |
664 | 652 | ||
665 | 653 | ||
666 | - | func | |
654 | + | func eE (eF,er) = if ((er >= eF)) | |
667 | 655 | then true | |
668 | - | else | |
656 | + | else aQ(makeString(["updated KLp lower than current KLp", toString(eF), toString(er)], " ")) | |
669 | 657 | ||
670 | 658 | ||
671 | - | func | |
672 | - | let | |
673 | - | let | |
674 | - | let | |
675 | - | let | |
676 | - | let | |
677 | - | then $Tuple2( | |
678 | - | else $Tuple2(-( | |
679 | - | let | |
680 | - | let | |
681 | - | if (if (if ( | |
659 | + | func eG (eH) = { | |
660 | + | let ew = bJ(bf(bn)) | |
661 | + | let ex = bJ(bf(bo)) | |
662 | + | let eI = eH.amount | |
663 | + | let eJ = fraction(eH.amount, eH.price, b, FLOOR) | |
664 | + | let eK = if ((eH.orderType == Buy)) | |
665 | + | then $Tuple2(eI, -(eJ)) | |
666 | + | else $Tuple2(-(eI), eJ) | |
667 | + | let eB = eK._1 | |
668 | + | let eC = eK._2 | |
669 | + | if (if (if (aY()) | |
682 | 670 | then true | |
683 | - | else ( | |
671 | + | else (bl == m)) | |
684 | 672 | then true | |
685 | - | else ( | |
673 | + | else (bl == n)) | |
686 | 674 | then throw("Exchange operations disabled") | |
687 | - | else if (if (( | |
675 | + | else if (if ((eH.assetPair.amountAsset != bn)) | |
688 | 676 | then true | |
689 | - | else ( | |
677 | + | else (eH.assetPair.priceAsset != bo)) | |
690 | 678 | then throw("Wrong order assets.") | |
691 | 679 | else { | |
692 | - | let | |
693 | - | let | |
694 | - | let | |
695 | - | let | |
696 | - | let | |
697 | - | let | |
698 | - | $Tuple2( | |
680 | + | let eL = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, aj), "0")), aS("invalid kLp")) | |
681 | + | let eM = eA(eB, eC, 0) | |
682 | + | let eN = eM._1 | |
683 | + | let eO = eM._2 | |
684 | + | let eP = (eO >= eL) | |
685 | + | let eQ = makeString(["kLp=", toString(eL), " kLpNew=", toString(eO), " amountAssetBalance=", toString(ew), " priceAssetBalance=", toString(ex), " amountAssetBalanceDelta=", toString(eB), " priceAssetBalanceDelta=", toString(eC), " height=", toString(height)], "") | |
686 | + | $Tuple2(eP, eQ) | |
699 | 687 | } | |
700 | 688 | } | |
701 | 689 | ||
702 | 690 | ||
703 | - | func | |
691 | + | func eR (eS) = if ((size(eS.payments) != 1)) | |
704 | 692 | then throw("exactly 1 payment is expected") | |
705 | 693 | else { | |
706 | - | let | |
707 | - | let | |
708 | - | let | |
709 | - | let | |
710 | - | let | |
711 | - | let | |
712 | - | let | |
713 | - | let | |
714 | - | if (if ( | |
694 | + | let eT = value(eS.payments[0]) | |
695 | + | let dj = value(eT.assetId) | |
696 | + | let eU = eT.amount | |
697 | + | let dW = dh(toBase58String(eS.transactionId), toBase58String(dj), eU, eS.caller) | |
698 | + | let dA = dW._1 | |
699 | + | let dB = dW._2 | |
700 | + | let do = parseIntValue(dW._9) | |
701 | + | let dE = dW._10 | |
702 | + | if (if (aY()) | |
715 | 703 | then true | |
716 | - | else ( | |
717 | - | then throw(("Get operation is blocked by admin. Status = " + toString( | |
718 | - | else $Tuple5( | |
704 | + | else (do == n)) | |
705 | + | then throw(("Get operation is blocked by admin. Status = " + toString(do))) | |
706 | + | else $Tuple5(dA, dB, eU, dj, dE) | |
719 | 707 | } | |
720 | 708 | ||
721 | 709 | ||
722 | - | func | |
710 | + | func eV (eS,dG,dM) = if ((size(eS.payments) != 2)) | |
723 | 711 | then throw("exactly 2 payments are expected") | |
724 | 712 | else { | |
725 | - | let | |
726 | - | let | |
727 | - | let | |
728 | - | let | |
729 | - | if (if (if ( | |
713 | + | let eW = value(eS.payments[0]) | |
714 | + | let eX = value(eS.payments[1]) | |
715 | + | let eY = dF(toBase58String(eS.transactionId), dG, eW.amount, eW.assetId, eX.amount, eX.assetId, toString(eS.caller), false, dM) | |
716 | + | let do = parseIntValue(eY._8) | |
717 | + | if (if (if (aY()) | |
730 | 718 | then true | |
731 | - | else ( | |
719 | + | else (do == l)) | |
732 | 720 | then true | |
733 | - | else ( | |
734 | - | then throw(("Put operation is blocked by admin. Status = " + toString( | |
735 | - | else | |
721 | + | else (do == n)) | |
722 | + | then throw(("Put operation is blocked by admin. Status = " + toString(do))) | |
723 | + | else eY | |
736 | 724 | } | |
737 | 725 | ||
738 | 726 | ||
739 | - | func | |
740 | - | let | |
741 | - | if (( | |
727 | + | func eZ (bW) = { | |
728 | + | let fa = invoke(aT, "emit", [bW], nil) | |
729 | + | if ((fa == fa)) | |
742 | 730 | then { | |
743 | - | let | |
744 | - | let | |
745 | - | if ($isInstanceOf( | |
731 | + | let fb = { | |
732 | + | let bT = fa | |
733 | + | if ($isInstanceOf(bT, "Address")) | |
746 | 734 | then { | |
747 | - | let | |
748 | - | invoke( | |
735 | + | let fc = bT | |
736 | + | invoke(fc, "emit", [bW], nil) | |
749 | 737 | } | |
750 | 738 | else unit | |
751 | 739 | } | |
752 | - | if (( | |
753 | - | then | |
740 | + | if ((fb == fb)) | |
741 | + | then bW | |
754 | 742 | else throw("Strict value is not equal to itself.") | |
755 | 743 | } | |
756 | 744 | else throw("Strict value is not equal to itself.") | |
757 | 745 | } | |
758 | 746 | ||
759 | 747 | ||
760 | - | func | |
761 | - | let | |
748 | + | func fd (bW,ai) = { | |
749 | + | let fe = if ((ai == 0)) | |
762 | 750 | then 0 | |
763 | - | else fraction( | |
764 | - | $Tuple2(( | |
751 | + | else fraction(bW, ai, b) | |
752 | + | $Tuple2((bW - fe), fe) | |
765 | 753 | } | |
766 | 754 | ||
767 | 755 | ||
768 | - | func | |
769 | - | let | |
770 | - | let | |
771 | - | let | |
772 | - | let | |
756 | + | func ff (fg,fh,ab,ac) = { | |
757 | + | let fi = (ac == unit) | |
758 | + | let fj = bJ(bf(bn)) | |
759 | + | let fk = bJ(bf(bo)) | |
760 | + | let fl = if ((fh == bn)) | |
773 | 761 | then true | |
774 | - | else if (( | |
762 | + | else if ((fh == bo)) | |
775 | 763 | then false | |
776 | - | else | |
777 | - | let | |
778 | - | then $Tuple2( | |
779 | - | else if ( | |
780 | - | then $Tuple2(( | |
781 | - | else $Tuple2( | |
782 | - | let | |
783 | - | let | |
784 | - | let | |
785 | - | then $Tuple2( | |
786 | - | else $Tuple2(0, | |
787 | - | let | |
788 | - | let | |
789 | - | let | |
790 | - | let | |
791 | - | let | |
792 | - | let | |
793 | - | let | |
794 | - | let | |
795 | - | let | |
796 | - | let | |
797 | - | let | |
798 | - | let | |
799 | - | then | |
800 | - | else | |
801 | - | let | |
802 | - | let | |
803 | - | let | |
764 | + | else aQ("invalid asset") | |
765 | + | let fm = if (fi) | |
766 | + | then $Tuple2(fj, fk) | |
767 | + | else if (fl) | |
768 | + | then $Tuple2((fj - fg), fk) | |
769 | + | else $Tuple2(fj, (fk - fg)) | |
770 | + | let fn = fm._1 | |
771 | + | let fo = fm._2 | |
772 | + | let fp = if (fl) | |
773 | + | then $Tuple2(fg, 0) | |
774 | + | else $Tuple2(0, fg) | |
775 | + | let fq = fp._1 | |
776 | + | let fr = fp._2 | |
777 | + | let eI = fd(fq, aV)._1 | |
778 | + | let eJ = fd(fr, aV)._1 | |
779 | + | let fs = fd(fg, aV) | |
780 | + | let ft = fs._1 | |
781 | + | let fe = fs._2 | |
782 | + | let fu = (fn + eI) | |
783 | + | let fv = (fo + eJ) | |
784 | + | let fw = bM(D(fv, bq), D(fu, bp)) | |
785 | + | let fx = H(fw, b) | |
786 | + | let fy = if (fl) | |
787 | + | then fn | |
788 | + | else fo | |
789 | + | let fz = toBigInt(fy) | |
790 | + | let fA = toBigInt(valueOrErrorMessage(assetInfo(bm), (("asset " + toBase58String(bm)) + " doesn't exist")).quantity) | |
791 | + | let fB = if ((fA > f)) | |
804 | 792 | then true | |
805 | - | else | |
806 | - | if (( | |
793 | + | else aQ("initial deposit requires all coins") | |
794 | + | if ((fB == fB)) | |
807 | 795 | then { | |
808 | - | let | |
809 | - | let | |
810 | - | let | |
796 | + | let fC = toBigInt(ft) | |
797 | + | let fD = max([0, toInt(((fA * (sqrtBigInt((d + ((fC * d) / fz)), 18, 18, DOWN) - d)) / d))]) | |
798 | + | let el = if (fi) | |
811 | 799 | then nil | |
812 | - | else [IntegerEntry(W(), | |
813 | - | let | |
814 | - | let | |
815 | - | let | |
816 | - | let | |
817 | - | then $Tuple2( | |
818 | - | else $Tuple2( | |
819 | - | let | |
820 | - | let | |
821 | - | let | |
822 | - | fraction(( | |
800 | + | else [IntegerEntry(W(), fx), IntegerEntry(X(height, lastBlock.timestamp), fx), StringEntry(aa(toString(value(ab)), toBase58String(value(ac))), bu(fq, fr, fD, fx, 0, 0, height, lastBlock.timestamp, 0, 0))] | |
801 | + | let fE = bM(D(fo, bq), D(fn, bp)) | |
802 | + | let fF = H(fE, b) | |
803 | + | let fG = { | |
804 | + | let fH = if (fl) | |
805 | + | then $Tuple2(fq, fn) | |
806 | + | else $Tuple2(fr, fo) | |
807 | + | let bW = fH._1 | |
808 | + | let fI = fH._2 | |
809 | + | let fJ = toInt(fraction(fA, toBigInt((bW / 2)), toBigInt(fI))) | |
810 | + | fraction((fD - fJ), b, fJ) | |
823 | 811 | } | |
824 | - | $Tuple5( | |
812 | + | $Tuple5(fD, el, fe, fG, fl) | |
825 | 813 | } | |
826 | 814 | else throw("Strict value is not equal to itself.") | |
827 | 815 | } | |
828 | 816 | ||
829 | 817 | ||
830 | - | func | |
831 | - | let | |
832 | - | let | |
833 | - | let | |
834 | - | let | |
835 | - | let | |
818 | + | func fK (fL,ft,fh,ab,ac) = { | |
819 | + | let fi = (ac == unit) | |
820 | + | let cY = ba() | |
821 | + | let cZ = parseIntValue(cY[t]) | |
822 | + | let da = parseIntValue(cY[u]) | |
823 | + | let fM = [if ((fh == bm)) | |
836 | 824 | then true | |
837 | - | else | |
838 | - | if (( | |
825 | + | else aQ("invalid lp asset")] | |
826 | + | if ((fM == fM)) | |
839 | 827 | then { | |
840 | - | let | |
828 | + | let fN = if ((fL == bn)) | |
841 | 829 | then true | |
842 | - | else if (( | |
830 | + | else if ((fL == bo)) | |
843 | 831 | then false | |
844 | - | else | |
845 | - | let | |
846 | - | then toBigInt( | |
847 | - | else toBigInt( | |
848 | - | let | |
849 | - | then | |
850 | - | else | |
851 | - | let | |
852 | - | let | |
853 | - | let | |
854 | - | then | |
855 | - | else | |
856 | - | let | |
857 | - | let | |
858 | - | let | |
859 | - | let | |
860 | - | let | |
861 | - | let | |
862 | - | let | |
863 | - | let | |
864 | - | then $Tuple4( | |
865 | - | else $Tuple4(0, | |
866 | - | let | |
867 | - | let | |
868 | - | let | |
869 | - | let | |
870 | - | let | |
871 | - | let | |
872 | - | let | |
832 | + | else aQ("invalid asset") | |
833 | + | let fO = if (fN) | |
834 | + | then toBigInt(bJ(bf(bn))) | |
835 | + | else toBigInt(bJ(bf(bo))) | |
836 | + | let fP = if (fN) | |
837 | + | then cZ | |
838 | + | else da | |
839 | + | let fQ = bJ(bf(bn)) | |
840 | + | let fR = bJ(bf(bo)) | |
841 | + | let fS = if (fN) | |
842 | + | then fQ | |
843 | + | else fR | |
844 | + | let fT = toBigInt(fS) | |
845 | + | let fA = toBigInt(valueOrErrorMessage(assetInfo(bm), (("asset " + toBase58String(bm)) + " doesn't exist")).quantity) | |
846 | + | let fU = toBigInt(ft) | |
847 | + | let fV = max([0, toInt(((fO * (d - pow((d - ((fU * d) / fA)), 18, h, 0, 18, DOWN))) / d))]) | |
848 | + | let fW = fd(fV, aX) | |
849 | + | let fX = fW._1 | |
850 | + | let fe = fW._2 | |
851 | + | let fY = if (fN) | |
852 | + | then $Tuple4(fX, 0, (fQ - fV), fR) | |
853 | + | else $Tuple4(0, fX, fQ, (fR - fV)) | |
854 | + | let fZ = fY._1 | |
855 | + | let ga = fY._2 | |
856 | + | let gb = fY._3 | |
857 | + | let gc = fY._4 | |
858 | + | let fw = bM(D(gc, bq), D(gb, bp)) | |
859 | + | let fx = H(fw, b) | |
860 | + | let el = if (fi) | |
873 | 861 | then nil | |
874 | - | else [StringEntry(ad(toString(value(ab)), toBase58String(value(ac))), | |
875 | - | let | |
876 | - | let | |
877 | - | let | |
878 | - | let | |
879 | - | fraction(( | |
862 | + | else [StringEntry(ad(toString(value(ab)), toBase58String(value(ac))), bF(fZ, ga, ft, fx, height, lastBlock.timestamp)), IntegerEntry(W(), fx), IntegerEntry(X(height, lastBlock.timestamp), fx)] | |
863 | + | let fE = bM(D(fR, bq), D(fQ, bp)) | |
864 | + | let fF = H(fE, b) | |
865 | + | let fG = { | |
866 | + | let gd = (toInt(fraction(fO, fU, fA)) * 2) | |
867 | + | fraction((fX - gd), b, gd) | |
880 | 868 | } | |
881 | - | $Tuple5( | |
869 | + | $Tuple5(fX, el, fe, fG, fN) | |
882 | 870 | } | |
883 | 871 | else throw("Strict value is not equal to itself.") | |
884 | 872 | } | |
885 | 873 | ||
886 | 874 | ||
887 | - | func | |
888 | - | let | |
889 | - | if ($isInstanceOf( | |
875 | + | func ge () = { | |
876 | + | let bT = getString(U()) | |
877 | + | if ($isInstanceOf(bT, "String")) | |
890 | 878 | then { | |
891 | - | let | |
892 | - | fromBase58String( | |
879 | + | let gf = bT | |
880 | + | fromBase58String(gf) | |
893 | 881 | } | |
894 | - | else if ($isInstanceOf( | |
882 | + | else if ($isInstanceOf(bT, "Unit")) | |
895 | 883 | then unit | |
896 | 884 | else throw("Match error") | |
897 | 885 | } | |
898 | 886 | ||
899 | 887 | ||
900 | - | func | |
901 | - | let | |
902 | - | if ($isInstanceOf( | |
888 | + | func gg () = { | |
889 | + | let bT = getString(V()) | |
890 | + | if ($isInstanceOf(bT, "String")) | |
903 | 891 | then { | |
904 | - | let | |
905 | - | fromBase58String( | |
892 | + | let gf = bT | |
893 | + | fromBase58String(gf) | |
906 | 894 | } | |
907 | - | else if ($isInstanceOf( | |
895 | + | else if ($isInstanceOf(bT, "Unit")) | |
908 | 896 | then unit | |
909 | 897 | else throw("Match error") | |
910 | 898 | } | |
911 | 899 | ||
912 | 900 | ||
913 | - | func | |
914 | - | let | |
915 | - | if ($isInstanceOf( | |
901 | + | func gh (eS) = { | |
902 | + | let bT = ge() | |
903 | + | if ($isInstanceOf(bT, "ByteVector")) | |
916 | 904 | then { | |
917 | - | let | |
918 | - | ( | |
905 | + | let gi = bT | |
906 | + | (eS.callerPublicKey == gi) | |
919 | 907 | } | |
920 | - | else if ($isInstanceOf( | |
921 | - | then ( | |
908 | + | else if ($isInstanceOf(bT, "Unit")) | |
909 | + | then (eS.caller == this) | |
922 | 910 | else throw("Match error") | |
923 | 911 | } | |
924 | 912 | ||
925 | 913 | ||
926 | - | func | |
927 | - | let | |
928 | - | let | |
929 | - | if ($isInstanceOf( | |
914 | + | func gj (eS) = { | |
915 | + | let gk = throw("Permission denied") | |
916 | + | let bT = ge() | |
917 | + | if ($isInstanceOf(bT, "ByteVector")) | |
930 | 918 | then { | |
931 | - | let | |
932 | - | if (( | |
919 | + | let gi = bT | |
920 | + | if ((eS.callerPublicKey == gi)) | |
933 | 921 | then true | |
934 | - | else | |
922 | + | else gk | |
935 | 923 | } | |
936 | - | else if ($isInstanceOf( | |
937 | - | then if (( | |
924 | + | else if ($isInstanceOf(bT, "Unit")) | |
925 | + | then if ((eS.caller == this)) | |
938 | 926 | then true | |
939 | - | else | |
927 | + | else gk | |
940 | 928 | else throw("Match error") | |
941 | 929 | } | |
942 | 930 | ||
943 | 931 | ||
944 | - | @Callable( | |
945 | - | func rebalance () = ( | |
932 | + | @Callable(eS) | |
933 | + | func rebalance () = (cC(aM(this, ae())) ++ cC(aM(this, af()))) | |
946 | 934 | ||
947 | 935 | ||
948 | 936 | ||
949 | - | @Callable( | |
950 | - | func calculateAmountOutForSwapREADONLY ( | |
951 | - | let | |
937 | + | @Callable(eS) | |
938 | + | func calculateAmountOutForSwapREADONLY (gl,gm,gn) = { | |
939 | + | let go = if ((gm == false)) | |
952 | 940 | then { | |
953 | - | let | |
954 | - | let | |
955 | - | $Tuple2( | |
941 | + | let gp = aM(this, af()) | |
942 | + | let gq = aM(this, ae()) | |
943 | + | $Tuple2(gp, gq) | |
956 | 944 | } | |
957 | 945 | else { | |
958 | - | let | |
959 | - | let | |
960 | - | $Tuple2( | |
946 | + | let gp = aM(this, ae()) | |
947 | + | let gq = aM(this, af()) | |
948 | + | $Tuple2(gp, gq) | |
961 | 949 | } | |
962 | - | let | |
963 | - | let | |
964 | - | let | |
965 | - | let | |
966 | - | let | |
967 | - | let | |
968 | - | let | |
969 | - | let | |
950 | + | let gp = go._1 | |
951 | + | let gq = go._2 | |
952 | + | let gr = bJ(gq) | |
953 | + | let gs = bJ(gp) | |
954 | + | let gt = fraction(gs, gl, (gr + gl)) | |
955 | + | let gu = (toBigInt(gr) * toBigInt(gs)) | |
956 | + | let gv = (((toBigInt(bJ(gq)) + toBigInt(gl)) + toBigInt(gn)) * (toBigInt(bJ(gp)) - toBigInt(gt))) | |
957 | + | let gw = if ((gv >= gu)) | |
970 | 958 | then true | |
971 | 959 | else throw("new K is fewer error") | |
972 | - | if (( | |
973 | - | then $Tuple2(nil, | |
960 | + | if ((gw == gw)) | |
961 | + | then $Tuple2(nil, gt) | |
974 | 962 | else throw("Strict value is not equal to itself.") | |
975 | 963 | } | |
976 | 964 | ||
977 | 965 | ||
978 | 966 | ||
979 | - | @Callable( | |
980 | - | func calculateAmountOutForSwapAndSendTokens ( | |
981 | - | let | |
982 | - | let | |
983 | - | if ($isInstanceOf( | |
984 | - | then | |
985 | - | else throw(($getType( | |
967 | + | @Callable(eS) | |
968 | + | func calculateAmountOutForSwapAndSendTokens (gl,gm,gx,gy,gn) = { | |
969 | + | let gz = { | |
970 | + | let aW = invoke(aT, "getSwapContractREADONLY", nil, nil) | |
971 | + | if ($isInstanceOf(aW, "String")) | |
972 | + | then aW | |
973 | + | else throw(($getType(aW) + " couldn't be cast to String")) | |
986 | 974 | } | |
987 | - | let | |
975 | + | let fM = [if ((value(eS.payments[0]).amount >= gl)) | |
988 | 976 | then true | |
989 | - | else | |
977 | + | else aQ("Wrong amount"), if ((eS.caller == addressFromStringValue(gz))) | |
990 | 978 | then true | |
991 | - | else | |
992 | - | if (( | |
979 | + | else aQ("Permission denied")] | |
980 | + | if ((fM == fM)) | |
993 | 981 | then { | |
994 | - | let | |
995 | - | let | |
996 | - | let | |
997 | - | then | |
998 | - | else | |
999 | - | let | |
1000 | - | let | |
1001 | - | let | |
1002 | - | let | |
1003 | - | let | |
1004 | - | let | |
982 | + | let eT = value(eS.payments[0]) | |
983 | + | let gq = bf(eT.assetId) | |
984 | + | let gp = if ((gm == false)) | |
985 | + | then aM(this, af()) | |
986 | + | else aM(this, ae()) | |
987 | + | let gr = (bJ(gq) - value(eS.payments[0]).amount) | |
988 | + | let gs = bJ(gp) | |
989 | + | let gt = fraction(gs, gl, (gr + gl)) | |
990 | + | let gu = (toBigInt(gr) * toBigInt(gs)) | |
991 | + | let gv = ((toBigInt(bJ(gq)) + toBigInt(gn)) * (toBigInt(bJ(gp)) - toBigInt(gt))) | |
992 | + | let gw = if ((gv >= gu)) | |
1005 | 993 | then true | |
1006 | 994 | else throw("new K is fewer error") | |
1007 | - | if (( | |
995 | + | if ((gw == gw)) | |
1008 | 996 | then { | |
1009 | - | let | |
997 | + | let gA = if ((gt >= gx)) | |
1010 | 998 | then true | |
1011 | 999 | else throw("Exchange result is fewer coins than expected") | |
1012 | - | if (( | |
1000 | + | if ((gA == gA)) | |
1013 | 1001 | then { | |
1014 | - | let | |
1015 | - | if (( | |
1016 | - | then $Tuple2(( | |
1002 | + | let gB = cK(gp, gt) | |
1003 | + | if ((gB == gB)) | |
1004 | + | then $Tuple2((gB ++ [ScriptTransfer(addressFromStringValue(gy), gt, bd(gp))]), gt) | |
1017 | 1005 | else throw("Strict value is not equal to itself.") | |
1018 | 1006 | } | |
1019 | 1007 | else throw("Strict value is not equal to itself.") | |
1025 | 1013 | ||
1026 | 1014 | ||
1027 | 1015 | ||
1028 | - | @Callable( | |
1029 | - | func setManager ( | |
1030 | - | let | |
1031 | - | if (( | |
1016 | + | @Callable(eS) | |
1017 | + | func setManager (gC) = { | |
1018 | + | let gD = gj(eS) | |
1019 | + | if ((gD == gD)) | |
1032 | 1020 | then { | |
1033 | - | let | |
1034 | - | if (( | |
1035 | - | then [StringEntry(V(), | |
1021 | + | let gE = fromBase58String(gC) | |
1022 | + | if ((gE == gE)) | |
1023 | + | then [StringEntry(V(), gC)] | |
1036 | 1024 | else throw("Strict value is not equal to itself.") | |
1037 | 1025 | } | |
1038 | 1026 | else throw("Strict value is not equal to itself.") | |
1040 | 1028 | ||
1041 | 1029 | ||
1042 | 1030 | ||
1043 | - | @Callable( | |
1031 | + | @Callable(eS) | |
1044 | 1032 | func confirmManager () = { | |
1045 | - | let | |
1046 | - | let | |
1033 | + | let gF = gg() | |
1034 | + | let gG = if (isDefined(gF)) | |
1047 | 1035 | then true | |
1048 | 1036 | else throw("No pending manager") | |
1049 | - | if (( | |
1037 | + | if ((gG == gG)) | |
1050 | 1038 | then { | |
1051 | - | let | |
1039 | + | let gH = if ((eS.callerPublicKey == value(gF))) | |
1052 | 1040 | then true | |
1053 | 1041 | else throw("You are not pending manager") | |
1054 | - | if (( | |
1055 | - | then [StringEntry(U(), toBase58String(value( | |
1042 | + | if ((gH == gH)) | |
1043 | + | then [StringEntry(U(), toBase58String(value(gF))), DeleteEntry(V())] | |
1056 | 1044 | else throw("Strict value is not equal to itself.") | |
1057 | 1045 | } | |
1058 | 1046 | else throw("Strict value is not equal to itself.") | |
1060 | 1048 | ||
1061 | 1049 | ||
1062 | 1050 | ||
1063 | - | @Callable( | |
1064 | - | func put ( | |
1051 | + | @Callable(eS) | |
1052 | + | func put (dG,gI) = if ((0 > dG)) | |
1065 | 1053 | then throw("Invalid slippageTolerance passed") | |
1066 | 1054 | else { | |
1067 | - | let | |
1068 | - | let | |
1069 | - | let | |
1070 | - | let | |
1071 | - | let | |
1072 | - | let | |
1073 | - | let | |
1074 | - | let | |
1075 | - | let | |
1076 | - | let | |
1077 | - | let | |
1078 | - | if (( | |
1055 | + | let eY = eV(eS, dG, true) | |
1056 | + | let ei = eY._2 | |
1057 | + | let dl = eY._7 | |
1058 | + | let dE = eY._9 | |
1059 | + | let ej = eY._10 | |
1060 | + | let ek = eY._11 | |
1061 | + | let gJ = eY._12 | |
1062 | + | let gK = eY._13 | |
1063 | + | let eW = toBigInt(value(eS.payments[0]).amount) | |
1064 | + | let eX = toBigInt(value(eS.payments[1]).amount) | |
1065 | + | let ez = es(eW, eX, toBigInt(0)) | |
1066 | + | if ((ez == ez)) | |
1079 | 1067 | then { | |
1080 | - | let | |
1081 | - | if (( | |
1068 | + | let fa = invoke(aT, "emit", [ei], nil) | |
1069 | + | if ((fa == fa)) | |
1082 | 1070 | then { | |
1083 | - | let | |
1084 | - | let | |
1085 | - | if ($isInstanceOf( | |
1071 | + | let fb = { | |
1072 | + | let bT = fa | |
1073 | + | if ($isInstanceOf(bT, "Address")) | |
1086 | 1074 | then { | |
1087 | - | let | |
1088 | - | invoke( | |
1075 | + | let fc = bT | |
1076 | + | invoke(fc, "emit", [ei], nil) | |
1089 | 1077 | } | |
1090 | 1078 | else unit | |
1091 | 1079 | } | |
1092 | - | if (( | |
1080 | + | if ((fb == fb)) | |
1093 | 1081 | then { | |
1094 | - | let | |
1095 | - | then invoke( | |
1082 | + | let gL = if ((ej > 0)) | |
1083 | + | then invoke(bt, "put", nil, [AttachedPayment(gJ, ej)]) | |
1096 | 1084 | else nil | |
1097 | - | if (( | |
1085 | + | if ((gL == gL)) | |
1098 | 1086 | then { | |
1099 | - | let | |
1100 | - | then invoke( | |
1087 | + | let gM = if ((ek > 0)) | |
1088 | + | then invoke(bt, "put", nil, [AttachedPayment(gK, ek)]) | |
1101 | 1089 | else nil | |
1102 | - | if (( | |
1090 | + | if ((gM == gM)) | |
1103 | 1091 | then { | |
1104 | - | let | |
1092 | + | let gN = if (gI) | |
1105 | 1093 | then { | |
1106 | - | let | |
1107 | - | if (( | |
1094 | + | let gO = invoke(bs, "stake", nil, [AttachedPayment(dl, ei)]) | |
1095 | + | if ((gO == gO)) | |
1108 | 1096 | then nil | |
1109 | 1097 | else throw("Strict value is not equal to itself.") | |
1110 | 1098 | } | |
1111 | - | else [ScriptTransfer( | |
1112 | - | let | |
1113 | - | if (( | |
1099 | + | else [ScriptTransfer(eS.caller, ei, dl)] | |
1100 | + | let gP = eA(0, 0, 0) | |
1101 | + | if ((gP == gP)) | |
1114 | 1102 | then { | |
1115 | - | let | |
1116 | - | let | |
1117 | - | let | |
1118 | - | if (( | |
1103 | + | let er = gP._2 | |
1104 | + | let gQ = gP._1 | |
1105 | + | let gR = eE(ez, er) | |
1106 | + | if ((gR == gR)) | |
1119 | 1107 | then { | |
1120 | - | let | |
1121 | - | if (( | |
1122 | - | then (( | |
1108 | + | let gS = invoke(this, "rebalance", nil, nil) | |
1109 | + | if ((gS == gS)) | |
1110 | + | then ((dE ++ gN) ++ gQ) | |
1123 | 1111 | else throw("Strict value is not equal to itself.") | |
1124 | 1112 | } | |
1125 | 1113 | else throw("Strict value is not equal to itself.") | |
1139 | 1127 | ||
1140 | 1128 | ||
1141 | 1129 | ||
1142 | - | @Callable( | |
1143 | - | func putForFree ( | |
1130 | + | @Callable(eS) | |
1131 | + | func putForFree (gT) = if ((0 > gT)) | |
1144 | 1132 | then throw("Invalid value passed") | |
1145 | 1133 | else { | |
1146 | - | let | |
1147 | - | let | |
1148 | - | let | |
1149 | - | let | |
1150 | - | let | |
1151 | - | if (( | |
1134 | + | let eY = eV(eS, gT, false) | |
1135 | + | let dE = eY._9 | |
1136 | + | let eW = toBigInt(value(eS.payments[0]).amount) | |
1137 | + | let eX = toBigInt(value(eS.payments[1]).amount) | |
1138 | + | let ez = es(eW, eX, toBigInt(0)) | |
1139 | + | if ((ez == ez)) | |
1152 | 1140 | then { | |
1153 | - | let | |
1154 | - | let | |
1155 | - | let | |
1156 | - | let | |
1157 | - | if (( | |
1158 | - | then ( | |
1141 | + | let gU = eA(0, 0, 0) | |
1142 | + | let gQ = gU._1 | |
1143 | + | let er = gU._2 | |
1144 | + | let gR = eE(ez, er) | |
1145 | + | if ((gR == gR)) | |
1146 | + | then (dE ++ gQ) | |
1159 | 1147 | else throw("Strict value is not equal to itself.") | |
1160 | 1148 | } | |
1161 | 1149 | else throw("Strict value is not equal to itself.") | |
1163 | 1151 | ||
1164 | 1152 | ||
1165 | 1153 | ||
1166 | - | @Callable( | |
1167 | - | func putOneTkn ( | |
1168 | - | let | |
1169 | - | let | |
1170 | - | if ($isInstanceOf( | |
1171 | - | then | |
1172 | - | else throw(($getType( | |
1154 | + | @Callable(eS) | |
1155 | + | func putOneTkn (gV,gW) = { | |
1156 | + | let gX = { | |
1157 | + | let aW = invoke(aT, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1158 | + | if ($isInstanceOf(aW, "Boolean")) | |
1159 | + | then aW | |
1160 | + | else throw(($getType(aW) + " couldn't be cast to Boolean")) | |
1173 | 1161 | } | |
1174 | - | let | |
1162 | + | let gY = if (if (if (aY()) | |
1175 | 1163 | then true | |
1176 | - | else ( | |
1164 | + | else (bl == l)) | |
1177 | 1165 | then true | |
1178 | - | else ( | |
1166 | + | else (bl == n)) | |
1179 | 1167 | then true | |
1180 | - | else | |
1181 | - | let | |
1168 | + | else gX | |
1169 | + | let fM = [if (if (!(gY)) | |
1182 | 1170 | then true | |
1183 | - | else | |
1171 | + | else gh(eS)) | |
1184 | 1172 | then true | |
1185 | - | else | |
1173 | + | else aQ("put operation is blocked by admin"), if ((size(eS.payments) == 1)) | |
1186 | 1174 | then true | |
1187 | - | else | |
1188 | - | if (( | |
1175 | + | else aQ("exactly 1 payment are expected")] | |
1176 | + | if ((fM == fM)) | |
1189 | 1177 | then { | |
1190 | - | let | |
1191 | - | let | |
1192 | - | let | |
1193 | - | let | |
1194 | - | then | |
1195 | - | else if (( | |
1196 | - | then | |
1197 | - | else | |
1198 | - | if (( | |
1178 | + | let gZ = eS.payments[0] | |
1179 | + | let fh = gZ.assetId | |
1180 | + | let fg = gZ.amount | |
1181 | + | let ez = if ((fh == bn)) | |
1182 | + | then es(toBigInt(fg), toBigInt(0), toBigInt(0)) | |
1183 | + | else if ((fh == bo)) | |
1184 | + | then es(toBigInt(0), toBigInt(fg), toBigInt(0)) | |
1185 | + | else aQ("payment asset is not supported") | |
1186 | + | if ((ez == ez)) | |
1199 | 1187 | then { | |
1200 | - | let ab = | |
1201 | - | let ac = | |
1202 | - | let | |
1203 | - | if (( | |
1188 | + | let ab = eS.caller | |
1189 | + | let ac = eS.transactionId | |
1190 | + | let ha = ff(fg, fh, ab, ac) | |
1191 | + | if ((ha == ha)) | |
1204 | 1192 | then { | |
1205 | - | let | |
1206 | - | let | |
1207 | - | let | |
1208 | - | let | |
1209 | - | let | |
1210 | - | let | |
1211 | - | then ( | |
1193 | + | let fl = ha._5 | |
1194 | + | let hb = ha._4 | |
1195 | + | let fe = ha._3 | |
1196 | + | let el = ha._2 | |
1197 | + | let hc = ha._1 | |
1198 | + | let hd = if (if ((gV > 0)) | |
1199 | + | then (gV > hc) | |
1212 | 1200 | else false) | |
1213 | - | then | |
1214 | - | else | |
1215 | - | let | |
1216 | - | if (( | |
1201 | + | then aQ(makeString(["amount to receive is less than ", toString(gV)], "")) | |
1202 | + | else hc | |
1203 | + | let fa = eZ(hd) | |
1204 | + | if ((fa == fa)) | |
1217 | 1205 | then { | |
1218 | - | let | |
1206 | + | let gN = if (gW) | |
1219 | 1207 | then { | |
1220 | - | let | |
1221 | - | if (( | |
1208 | + | let he = invoke(bs, "stake", nil, [AttachedPayment(bm, hd)]) | |
1209 | + | if ((he == he)) | |
1222 | 1210 | then nil | |
1223 | 1211 | else throw("Strict value is not equal to itself.") | |
1224 | 1212 | } | |
1225 | - | else [ScriptTransfer( | |
1226 | - | let | |
1227 | - | then [ScriptTransfer( | |
1213 | + | else [ScriptTransfer(eS.caller, hd, bm)] | |
1214 | + | let hf = if ((fe > 0)) | |
1215 | + | then [ScriptTransfer(aU, fe, fh)] | |
1228 | 1216 | else nil | |
1229 | - | let | |
1217 | + | let hg = if ((this == aU)) | |
1230 | 1218 | then $Tuple2(0, 0) | |
1231 | - | else if ( | |
1232 | - | then $Tuple2(-( | |
1233 | - | else $Tuple2(0, -( | |
1234 | - | let | |
1235 | - | let | |
1236 | - | let | |
1237 | - | let | |
1238 | - | let | |
1239 | - | let | |
1240 | - | let | |
1241 | - | if (( | |
1219 | + | else if (fl) | |
1220 | + | then $Tuple2(-(fe), 0) | |
1221 | + | else $Tuple2(0, -(fe)) | |
1222 | + | let eB = hg._1 | |
1223 | + | let eC = hg._2 | |
1224 | + | let hh = eA(eB, eC, 0) | |
1225 | + | let gQ = hh._1 | |
1226 | + | let er = hh._2 | |
1227 | + | let eL = value(getString(aj)) | |
1228 | + | let gR = eE(ez, er) | |
1229 | + | if ((gR == gR)) | |
1242 | 1230 | then { | |
1243 | - | let | |
1244 | - | if (( | |
1245 | - | then $Tuple2(((( | |
1231 | + | let gS = invoke(this, "rebalance", nil, nil) | |
1232 | + | if ((gS == gS)) | |
1233 | + | then $Tuple2((((el ++ gN) ++ hf) ++ gQ), hd) | |
1246 | 1234 | else throw("Strict value is not equal to itself.") | |
1247 | 1235 | } | |
1248 | 1236 | else throw("Strict value is not equal to itself.") | |
1258 | 1246 | ||
1259 | 1247 | ||
1260 | 1248 | ||
1261 | - | @Callable( | |
1262 | - | func putOneTknREADONLY ( | |
1263 | - | let | |
1264 | - | let | |
1265 | - | let | |
1266 | - | let | |
1267 | - | let | |
1268 | - | let | |
1269 | - | $Tuple2(nil, $Tuple3( | |
1249 | + | @Callable(eS) | |
1250 | + | func putOneTknREADONLY (fh,fg) = { | |
1251 | + | let hi = ff(fg, bd(fh), unit, unit) | |
1252 | + | let hc = hi._1 | |
1253 | + | let el = hi._2 | |
1254 | + | let fe = hi._3 | |
1255 | + | let hb = hi._4 | |
1256 | + | let fl = hi._5 | |
1257 | + | $Tuple2(nil, $Tuple3(hc, fe, hb)) | |
1270 | 1258 | } | |
1271 | 1259 | ||
1272 | 1260 | ||
1273 | 1261 | ||
1274 | - | @Callable( | |
1275 | - | func getOneTkn ( | |
1276 | - | let | |
1277 | - | let | |
1278 | - | if ($isInstanceOf( | |
1279 | - | then | |
1280 | - | else throw(($getType( | |
1262 | + | @Callable(eS) | |
1263 | + | func getOneTkn (hj,gV) = { | |
1264 | + | let gX = { | |
1265 | + | let aW = invoke(aT, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1266 | + | if ($isInstanceOf(aW, "Boolean")) | |
1267 | + | then aW | |
1268 | + | else throw(($getType(aW) + " couldn't be cast to Boolean")) | |
1281 | 1269 | } | |
1282 | - | let | |
1270 | + | let hk = if (if (aY()) | |
1283 | 1271 | then true | |
1284 | - | else ( | |
1272 | + | else (bl == n)) | |
1285 | 1273 | then true | |
1286 | - | else | |
1287 | - | let | |
1274 | + | else gX | |
1275 | + | let fM = [if (if (!(hk)) | |
1288 | 1276 | then true | |
1289 | - | else | |
1277 | + | else gh(eS)) | |
1290 | 1278 | then true | |
1291 | - | else | |
1279 | + | else aQ("get operation is blocked by admin"), if ((size(eS.payments) == 1)) | |
1292 | 1280 | then true | |
1293 | - | else | |
1294 | - | if (( | |
1281 | + | else aQ("exactly 1 payment are expected")] | |
1282 | + | if ((fM == fM)) | |
1295 | 1283 | then { | |
1296 | - | let | |
1297 | - | let | |
1298 | - | let | |
1299 | - | let | |
1300 | - | let | |
1301 | - | if (( | |
1284 | + | let fL = bd(hj) | |
1285 | + | let gZ = eS.payments[0] | |
1286 | + | let fh = gZ.assetId | |
1287 | + | let ft = gZ.amount | |
1288 | + | let ez = es(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1289 | + | if ((ez == ez)) | |
1302 | 1290 | then { | |
1303 | - | let ab = | |
1304 | - | let ac = | |
1305 | - | let | |
1306 | - | if (( | |
1291 | + | let ab = eS.caller | |
1292 | + | let ac = eS.transactionId | |
1293 | + | let hl = fK(fL, ft, fh, ab, ac) | |
1294 | + | if ((hl == hl)) | |
1307 | 1295 | then { | |
1308 | - | let | |
1309 | - | let | |
1310 | - | let | |
1311 | - | let | |
1312 | - | let | |
1313 | - | let | |
1314 | - | then ( | |
1296 | + | let fN = hl._5 | |
1297 | + | let hb = hl._4 | |
1298 | + | let fe = hl._3 | |
1299 | + | let el = hl._2 | |
1300 | + | let hm = hl._1 | |
1301 | + | let bW = if (if ((gV > 0)) | |
1302 | + | then (gV > hm) | |
1315 | 1303 | else false) | |
1316 | - | then | |
1317 | - | else | |
1318 | - | let | |
1319 | - | if (( | |
1304 | + | then aQ(makeString(["amount to receive is less than ", toString(gV)], "")) | |
1305 | + | else hm | |
1306 | + | let hn = invoke(aT, "burn", [ft], [AttachedPayment(fh, ft)]) | |
1307 | + | if ((hn == hn)) | |
1320 | 1308 | then { | |
1321 | - | let | |
1322 | - | if (( | |
1309 | + | let gB = cK(hj, bW) | |
1310 | + | if ((gB == gB)) | |
1323 | 1311 | then { | |
1324 | - | let | |
1325 | - | let | |
1326 | - | then [ScriptTransfer( | |
1312 | + | let ho = [ScriptTransfer(ab, bW, fL)] | |
1313 | + | let hf = if ((fe > 0)) | |
1314 | + | then [ScriptTransfer(aU, fe, fL)] | |
1327 | 1315 | else nil | |
1328 | - | let | |
1329 | - | let | |
1316 | + | let hp = { | |
1317 | + | let hq = if ((this == aU)) | |
1330 | 1318 | then 0 | |
1331 | - | else | |
1332 | - | if ( | |
1333 | - | then $Tuple2(-(( | |
1334 | - | else $Tuple2(0, -(( | |
1319 | + | else fe | |
1320 | + | if (fN) | |
1321 | + | then $Tuple2(-((bW + hq)), 0) | |
1322 | + | else $Tuple2(0, -((bW + hq))) | |
1335 | 1323 | } | |
1336 | - | let | |
1337 | - | let | |
1338 | - | let | |
1339 | - | let | |
1340 | - | let | |
1341 | - | let | |
1342 | - | if (( | |
1343 | - | then $Tuple2((((( | |
1324 | + | let eB = hp._1 | |
1325 | + | let eC = hp._2 | |
1326 | + | let hr = eA(eB, eC, 0) | |
1327 | + | let gQ = hr._1 | |
1328 | + | let er = hr._2 | |
1329 | + | let gR = eE(ez, er) | |
1330 | + | if ((gR == gR)) | |
1331 | + | then $Tuple2(((((el ++ gB) ++ ho) ++ hf) ++ gQ), bW) | |
1344 | 1332 | else throw("Strict value is not equal to itself.") | |
1345 | 1333 | } | |
1346 | 1334 | else throw("Strict value is not equal to itself.") | |
1356 | 1344 | ||
1357 | 1345 | ||
1358 | 1346 | ||
1359 | - | @Callable( | |
1360 | - | func getOneTknREADONLY ( | |
1361 | - | let | |
1362 | - | let | |
1363 | - | let | |
1364 | - | let | |
1365 | - | let | |
1366 | - | let | |
1367 | - | $Tuple2(nil, $Tuple3( | |
1347 | + | @Callable(eS) | |
1348 | + | func getOneTknREADONLY (fL,ft) = { | |
1349 | + | let hs = fK(bd(fL), ft, bm, unit, unit) | |
1350 | + | let hm = hs._1 | |
1351 | + | let el = hs._2 | |
1352 | + | let fe = hs._3 | |
1353 | + | let hb = hs._4 | |
1354 | + | let fN = hs._5 | |
1355 | + | $Tuple2(nil, $Tuple3(hm, fe, hb)) | |
1368 | 1356 | } | |
1369 | 1357 | ||
1370 | 1358 | ||
1371 | 1359 | ||
1372 | - | @Callable( | |
1373 | - | func unstakeAndGetOneTkn ( | |
1374 | - | let | |
1375 | - | let | |
1376 | - | if ($isInstanceOf( | |
1377 | - | then | |
1378 | - | else throw(($getType( | |
1360 | + | @Callable(eS) | |
1361 | + | func unstakeAndGetOneTkn (ht,hj,gV) = { | |
1362 | + | let gX = { | |
1363 | + | let aW = invoke(aT, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1364 | + | if ($isInstanceOf(aW, "Boolean")) | |
1365 | + | then aW | |
1366 | + | else throw(($getType(aW) + " couldn't be cast to Boolean")) | |
1379 | 1367 | } | |
1380 | - | let | |
1368 | + | let hk = if (if (aY()) | |
1381 | 1369 | then true | |
1382 | - | else ( | |
1370 | + | else (bl == n)) | |
1383 | 1371 | then true | |
1384 | - | else | |
1385 | - | let | |
1372 | + | else gX | |
1373 | + | let fM = [if (if (!(hk)) | |
1386 | 1374 | then true | |
1387 | - | else | |
1375 | + | else gh(eS)) | |
1388 | 1376 | then true | |
1389 | - | else | |
1377 | + | else aQ("get operation is blocked by admin"), if ((size(eS.payments) == 0)) | |
1390 | 1378 | then true | |
1391 | - | else | |
1392 | - | if (( | |
1379 | + | else aQ("no payments are expected")] | |
1380 | + | if ((fM == fM)) | |
1393 | 1381 | then { | |
1394 | - | let | |
1395 | - | let ab = | |
1396 | - | let ac = | |
1397 | - | let | |
1398 | - | if (( | |
1382 | + | let fL = bd(hj) | |
1383 | + | let ab = eS.caller | |
1384 | + | let ac = eS.transactionId | |
1385 | + | let ez = es(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1386 | + | if ((ez == ez)) | |
1399 | 1387 | then { | |
1400 | - | let | |
1401 | - | if (( | |
1388 | + | let hu = invoke(bs, "unstake", [toBase58String(bm), ht], nil) | |
1389 | + | if ((hu == hu)) | |
1402 | 1390 | then { | |
1403 | - | let | |
1404 | - | if (( | |
1391 | + | let hv = fK(fL, ht, bm, ab, ac) | |
1392 | + | if ((hv == hv)) | |
1405 | 1393 | then { | |
1406 | - | let | |
1407 | - | let | |
1408 | - | let | |
1409 | - | let | |
1410 | - | let | |
1411 | - | let | |
1412 | - | then ( | |
1394 | + | let fN = hv._5 | |
1395 | + | let hb = hv._4 | |
1396 | + | let fe = hv._3 | |
1397 | + | let el = hv._2 | |
1398 | + | let hm = hv._1 | |
1399 | + | let bW = if (if ((gV > 0)) | |
1400 | + | then (gV > hm) | |
1413 | 1401 | else false) | |
1414 | - | then | |
1415 | - | else | |
1416 | - | let | |
1417 | - | if (( | |
1402 | + | then aQ(makeString(["amount to receive is less than ", toString(gV)], "")) | |
1403 | + | else hm | |
1404 | + | let hn = invoke(aT, "burn", [ht], [AttachedPayment(bm, ht)]) | |
1405 | + | if ((hn == hn)) | |
1418 | 1406 | then { | |
1419 | - | let | |
1420 | - | if (( | |
1407 | + | let gB = cK(hj, bW) | |
1408 | + | if ((gB == gB)) | |
1421 | 1409 | then { | |
1422 | - | let | |
1423 | - | let | |
1424 | - | then [ScriptTransfer( | |
1410 | + | let ho = [ScriptTransfer(eS.caller, bW, fL)] | |
1411 | + | let hf = if ((fe > 0)) | |
1412 | + | then [ScriptTransfer(aU, fe, fL)] | |
1425 | 1413 | else nil | |
1426 | - | let | |
1427 | - | let | |
1414 | + | let hw = { | |
1415 | + | let hq = if ((this == aU)) | |
1428 | 1416 | then 0 | |
1429 | - | else | |
1430 | - | if ( | |
1431 | - | then $Tuple2(-(( | |
1432 | - | else $Tuple2(0, -(( | |
1417 | + | else fe | |
1418 | + | if (fN) | |
1419 | + | then $Tuple2(-((bW + hq)), 0) | |
1420 | + | else $Tuple2(0, -((bW + hq))) | |
1433 | 1421 | } | |
1434 | - | let | |
1435 | - | let | |
1436 | - | let | |
1437 | - | let | |
1438 | - | let | |
1439 | - | let | |
1440 | - | if (( | |
1441 | - | then $Tuple2((((( | |
1422 | + | let eB = hw._1 | |
1423 | + | let eC = hw._2 | |
1424 | + | let hx = eA(eB, eC, 0) | |
1425 | + | let gQ = hx._1 | |
1426 | + | let er = hx._2 | |
1427 | + | let gR = eE(ez, er) | |
1428 | + | if ((gR == gR)) | |
1429 | + | then $Tuple2(((((el ++ gB) ++ ho) ++ hf) ++ gQ), bW) | |
1442 | 1430 | else throw("Strict value is not equal to itself.") | |
1443 | 1431 | } | |
1444 | 1432 | else throw("Strict value is not equal to itself.") | |
1456 | 1444 | ||
1457 | 1445 | ||
1458 | 1446 | ||
1459 | - | @Callable( | |
1447 | + | @Callable(eS) | |
1460 | 1448 | func get () = { | |
1461 | - | let | |
1462 | - | let | |
1463 | - | let | |
1464 | - | let | |
1465 | - | let | |
1466 | - | let | |
1467 | - | let | |
1468 | - | if (( | |
1449 | + | let dW = eR(eS) | |
1450 | + | let hy = dW._1 | |
1451 | + | let dB = dW._2 | |
1452 | + | let eU = dW._3 | |
1453 | + | let dj = dW._4 | |
1454 | + | let dE = dW._5 | |
1455 | + | let ez = es(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1456 | + | if ((ez == ez)) | |
1469 | 1457 | then { | |
1470 | - | let | |
1471 | - | if (( | |
1458 | + | let hz = invoke(aT, "burn", [eU], [AttachedPayment(dj, eU)]) | |
1459 | + | if ((hz == hz)) | |
1472 | 1460 | then { | |
1473 | - | let | |
1474 | - | let | |
1475 | - | let | |
1476 | - | let | |
1477 | - | if (( | |
1478 | - | then ( | |
1461 | + | let hA = eA(-(hy), -(dB), 0) | |
1462 | + | let gQ = hA._1 | |
1463 | + | let er = hA._2 | |
1464 | + | let gR = eE(ez, er) | |
1465 | + | if ((gR == gR)) | |
1466 | + | then (dE ++ gQ) | |
1479 | 1467 | else throw("Strict value is not equal to itself.") | |
1480 | 1468 | } | |
1481 | 1469 | else throw("Strict value is not equal to itself.") | |
1485 | 1473 | ||
1486 | 1474 | ||
1487 | 1475 | ||
1488 | - | @Callable( | |
1489 | - | func getNoLess ( | |
1490 | - | let | |
1491 | - | let | |
1492 | - | let | |
1493 | - | let | |
1494 | - | let | |
1495 | - | let | |
1496 | - | if (( | |
1497 | - | then throw(((("noLessThenAmtAsset failed: " + toString( | |
1498 | - | else if (( | |
1499 | - | then throw(((("noLessThenPriceAsset failed: " + toString( | |
1476 | + | @Callable(eS) | |
1477 | + | func getNoLess (hB,hC) = { | |
1478 | + | let dW = eR(eS) | |
1479 | + | let dA = dW._1 | |
1480 | + | let dB = dW._2 | |
1481 | + | let eU = dW._3 | |
1482 | + | let dj = dW._4 | |
1483 | + | let dE = dW._5 | |
1484 | + | if ((hB > dA)) | |
1485 | + | then throw(((("noLessThenAmtAsset failed: " + toString(dA)) + " < ") + toString(hB))) | |
1486 | + | else if ((hC > dB)) | |
1487 | + | then throw(((("noLessThenPriceAsset failed: " + toString(dB)) + " < ") + toString(hC))) | |
1500 | 1488 | else { | |
1501 | - | let | |
1502 | - | if (( | |
1489 | + | let ez = es(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1490 | + | if ((ez == ez)) | |
1503 | 1491 | then { | |
1504 | - | let | |
1505 | - | if (( | |
1492 | + | let hz = invoke(aT, "burn", [eU], [AttachedPayment(dj, eU)]) | |
1493 | + | if ((hz == hz)) | |
1506 | 1494 | then { | |
1507 | - | let | |
1508 | - | let | |
1509 | - | let | |
1510 | - | let | |
1511 | - | if (( | |
1512 | - | then ( | |
1495 | + | let hD = eA(-(dA), -(dB), 0) | |
1496 | + | let gQ = hD._1 | |
1497 | + | let er = hD._2 | |
1498 | + | let gR = eE(ez, er) | |
1499 | + | if ((gR == gR)) | |
1500 | + | then (dE ++ gQ) | |
1513 | 1501 | else throw("Strict value is not equal to itself.") | |
1514 | 1502 | } | |
1515 | 1503 | else throw("Strict value is not equal to itself.") | |
1520 | 1508 | ||
1521 | 1509 | ||
1522 | 1510 | ||
1523 | - | @Callable( | |
1524 | - | func unstakeAndGet ( | |
1525 | - | let | |
1511 | + | @Callable(eS) | |
1512 | + | func unstakeAndGet (bW) = { | |
1513 | + | let hE = if ((size(eS.payments) != 0)) | |
1526 | 1514 | then throw("No payments are expected") | |
1527 | 1515 | else true | |
1528 | - | if (( | |
1516 | + | if ((hE == hE)) | |
1529 | 1517 | then { | |
1530 | - | let | |
1531 | - | let | |
1532 | - | let | |
1533 | - | if (( | |
1518 | + | let cY = ba() | |
1519 | + | let dl = fromBase58String(cY[q]) | |
1520 | + | let ez = es(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1521 | + | if ((ez == ez)) | |
1534 | 1522 | then { | |
1535 | - | let | |
1536 | - | if (( | |
1523 | + | let hu = invoke(bs, "unstake", [toBase58String(dl), bW], nil) | |
1524 | + | if ((hu == hu)) | |
1537 | 1525 | then { | |
1538 | - | let | |
1539 | - | let | |
1540 | - | let | |
1541 | - | let | |
1542 | - | let | |
1543 | - | let | |
1526 | + | let dW = dh(toBase58String(eS.transactionId), toBase58String(dl), bW, eS.caller) | |
1527 | + | let dA = dW._1 | |
1528 | + | let dB = dW._2 | |
1529 | + | let do = parseIntValue(dW._9) | |
1530 | + | let dE = dW._10 | |
1531 | + | let hF = if (if (aY()) | |
1544 | 1532 | then true | |
1545 | - | else ( | |
1546 | - | then throw(("Get operation is blocked by admin. Status = " + toString( | |
1533 | + | else (do == n)) | |
1534 | + | then throw(("Get operation is blocked by admin. Status = " + toString(do))) | |
1547 | 1535 | else true | |
1548 | - | if (( | |
1536 | + | if ((hF == hF)) | |
1549 | 1537 | then { | |
1550 | - | let | |
1551 | - | if (( | |
1538 | + | let hz = invoke(aT, "burn", [bW], [AttachedPayment(dl, bW)]) | |
1539 | + | if ((hz == hz)) | |
1552 | 1540 | then { | |
1553 | - | let | |
1554 | - | let | |
1555 | - | let | |
1556 | - | let | |
1557 | - | if (( | |
1558 | - | then ( | |
1541 | + | let hG = eA(-(dA), -(dB), 0) | |
1542 | + | let gQ = hG._1 | |
1543 | + | let er = hG._2 | |
1544 | + | let gR = eE(ez, er) | |
1545 | + | if ((gR == gR)) | |
1546 | + | then (dE ++ gQ) | |
1559 | 1547 | else throw("Strict value is not equal to itself.") | |
1560 | 1548 | } | |
1561 | 1549 | else throw("Strict value is not equal to itself.") | |
1571 | 1559 | ||
1572 | 1560 | ||
1573 | 1561 | ||
1574 | - | @Callable( | |
1575 | - | func unstakeAndGetNoLess ( | |
1576 | - | let | |
1562 | + | @Callable(eS) | |
1563 | + | func unstakeAndGetNoLess (ht,hH,hC) = { | |
1564 | + | let hk = if (aY()) | |
1577 | 1565 | then true | |
1578 | - | else ( | |
1579 | - | let | |
1566 | + | else (bl == n) | |
1567 | + | let fM = [if (!(hk)) | |
1580 | 1568 | then true | |
1581 | - | else throw("get operation is blocked by admin"), if ((size( | |
1569 | + | else throw("get operation is blocked by admin"), if ((size(eS.payments) == 0)) | |
1582 | 1570 | then true | |
1583 | 1571 | else throw("no payments are expected")] | |
1584 | - | if (( | |
1572 | + | if ((fM == fM)) | |
1585 | 1573 | then { | |
1586 | - | let | |
1587 | - | if (( | |
1574 | + | let ez = es(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1575 | + | if ((ez == ez)) | |
1588 | 1576 | then { | |
1589 | - | let | |
1590 | - | if (( | |
1577 | + | let hu = invoke(bs, "unstake", [toBase58String(bm), ht], nil) | |
1578 | + | if ((hu == hu)) | |
1591 | 1579 | then { | |
1592 | - | let | |
1593 | - | let | |
1594 | - | let | |
1595 | - | let | |
1596 | - | let | |
1580 | + | let dW = dh(toBase58String(eS.transactionId), toBase58String(bm), ht, eS.caller) | |
1581 | + | let dA = dW._1 | |
1582 | + | let dB = dW._2 | |
1583 | + | let dE = dW._10 | |
1584 | + | let hI = [if ((dA >= hH)) | |
1597 | 1585 | then true | |
1598 | - | else throw(makeString(["amount asset amount to receive is less than ", toString( | |
1586 | + | else throw(makeString(["amount asset amount to receive is less than ", toString(hH)], "")), if ((dB >= hC)) | |
1599 | 1587 | then true | |
1600 | - | else throw(makeString(["price asset amount to receive is less than ", toString( | |
1601 | - | if (( | |
1588 | + | else throw(makeString(["price asset amount to receive is less than ", toString(hC)], ""))] | |
1589 | + | if ((hI == hI)) | |
1602 | 1590 | then { | |
1603 | - | let | |
1604 | - | if (( | |
1591 | + | let hz = invoke(aT, "burn", [ht], [AttachedPayment(bm, ht)]) | |
1592 | + | if ((hz == hz)) | |
1605 | 1593 | then { | |
1606 | - | let | |
1607 | - | let | |
1608 | - | let | |
1609 | - | let | |
1610 | - | if (( | |
1611 | - | then ( | |
1594 | + | let hJ = eA(-(dA), -(dB), 0) | |
1595 | + | let gQ = hJ._1 | |
1596 | + | let er = hJ._2 | |
1597 | + | let gR = eE(ez, er) | |
1598 | + | if ((gR == gR)) | |
1599 | + | then (dE ++ gQ) | |
1612 | 1600 | else throw("Strict value is not equal to itself.") | |
1613 | 1601 | } | |
1614 | 1602 | else throw("Strict value is not equal to itself.") | |
1624 | 1612 | ||
1625 | 1613 | ||
1626 | 1614 | ||
1627 | - | @Callable( | |
1628 | - | func activate ( | |
1615 | + | @Callable(eS) | |
1616 | + | func activate (hK,hL) = if ((toString(eS.caller) != toString(aT))) | |
1629 | 1617 | then throw("permissions denied") | |
1630 | - | else $Tuple2([StringEntry(ae(), | |
1618 | + | else $Tuple2([StringEntry(ae(), hK), StringEntry(af(), hL)], "success") | |
1631 | 1619 | ||
1632 | 1620 | ||
1633 | 1621 | ||
1634 | - | @Callable( | |
1622 | + | @Callable(eS) | |
1635 | 1623 | func refreshKLp () = { | |
1636 | - | let | |
1637 | - | let | |
1624 | + | let hM = valueOrElse(getInteger(ak), 0) | |
1625 | + | let hN = if (((height - hM) >= an)) | |
1638 | 1626 | then unit | |
1639 | - | else | |
1640 | - | if (( | |
1627 | + | else aQ(makeString([toString(an), " blocks have not passed since the previous call"], "")) | |
1628 | + | if ((hN == hN)) | |
1641 | 1629 | then { | |
1642 | - | let | |
1643 | - | let | |
1644 | - | let | |
1645 | - | let | |
1646 | - | let | |
1647 | - | then | |
1648 | - | else | |
1649 | - | $Tuple2( | |
1630 | + | let eL = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, aj), "0")), aS("invalid kLp")) | |
1631 | + | let hO = eA(0, 0, 0) | |
1632 | + | let hP = hO._1 | |
1633 | + | let er = hO._2 | |
1634 | + | let eD = if ((eL != er)) | |
1635 | + | then hP | |
1636 | + | else aQ("nothing to refresh") | |
1637 | + | $Tuple2(eD, toString(er)) | |
1650 | 1638 | } | |
1651 | 1639 | else throw("Strict value is not equal to itself.") | |
1652 | 1640 | } | |
1653 | 1641 | ||
1654 | 1642 | ||
1655 | 1643 | ||
1656 | - | @Callable( | |
1657 | - | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, | |
1644 | + | @Callable(eS) | |
1645 | + | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, ba()) | |
1658 | 1646 | ||
1659 | 1647 | ||
1660 | 1648 | ||
1661 | - | @Callable( | |
1662 | - | func getAccBalanceWrapperREADONLY ( | |
1649 | + | @Callable(eS) | |
1650 | + | func getAccBalanceWrapperREADONLY (ap) = $Tuple2(nil, bJ(ap)) | |
1663 | 1651 | ||
1664 | 1652 | ||
1665 | 1653 | ||
1666 | - | @Callable( | |
1667 | - | func calcPricesWrapperREADONLY ( | |
1668 | - | let | |
1669 | - | $Tuple2(nil, [toString( | |
1654 | + | @Callable(eS) | |
1655 | + | func calcPricesWrapperREADONLY (cS,cT,cX) = { | |
1656 | + | let dg = cW(cS, cT, cX) | |
1657 | + | $Tuple2(nil, [toString(dg[0]), toString(dg[1]), toString(dg[2])]) | |
1670 | 1658 | } | |
1671 | 1659 | ||
1672 | 1660 | ||
1673 | 1661 | ||
1674 | - | @Callable( | |
1662 | + | @Callable(eS) | |
1675 | 1663 | func toX18WrapperREADONLY (E,F) = $Tuple2(nil, toString(D(E, F))) | |
1676 | 1664 | ||
1677 | 1665 | ||
1678 | 1666 | ||
1679 | - | @Callable( | |
1667 | + | @Callable(eS) | |
1680 | 1668 | func fromX18WrapperREADONLY (I,J) = $Tuple2(nil, H(parseBigIntValue(I), J)) | |
1681 | 1669 | ||
1682 | 1670 | ||
1683 | 1671 | ||
1684 | - | @Callable( | |
1685 | - | func calcPriceBigIntWrapperREADONLY ( | |
1672 | + | @Callable(eS) | |
1673 | + | func calcPriceBigIntWrapperREADONLY (bN,bO) = $Tuple2(nil, toString(bM(parseBigIntValue(bN), parseBigIntValue(bO)))) | |
1686 | 1674 | ||
1687 | 1675 | ||
1688 | 1676 | ||
1689 | - | @Callable( | |
1690 | - | func estimatePutOperationWrapperREADONLY ( | |
1677 | + | @Callable(eS) | |
1678 | + | func estimatePutOperationWrapperREADONLY (di,dG,dH,dI,dJ,dK,ab,dL,dM) = $Tuple2(nil, dF(di, dG, dH, dI, dJ, dK, ab, dL, dM)) | |
1691 | 1679 | ||
1692 | 1680 | ||
1693 | 1681 | ||
1694 | - | @Callable( | |
1695 | - | func estimateGetOperationWrapperREADONLY ( | |
1696 | - | let | |
1697 | - | $Tuple2(nil, $Tuple10( | |
1682 | + | @Callable(eS) | |
1683 | + | func estimateGetOperationWrapperREADONLY (di,dj,dk,ab) = { | |
1684 | + | let dW = dh(di, dj, dk, addressFromStringValue(ab)) | |
1685 | + | $Tuple2(nil, $Tuple10(dW._1, dW._2, dW._3, dW._4, dW._5, dW._6, dW._7, toString(dW._8), dW._9, dW._10)) | |
1698 | 1686 | } | |
1699 | 1687 | ||
1700 | 1688 | ||
1701 | 1689 | ||
1702 | - | @Callable( | |
1690 | + | @Callable(eS) | |
1703 | 1691 | func statsREADONLY () = { | |
1704 | - | let | |
1705 | - | let | |
1706 | - | let | |
1707 | - | let | |
1708 | - | let | |
1709 | - | let | |
1710 | - | let | |
1711 | - | let | |
1712 | - | let | |
1713 | - | let | |
1714 | - | let | |
1715 | - | let | |
1692 | + | let cY = ba() | |
1693 | + | let dl = fromBase58String(cY[q]) | |
1694 | + | let hQ = cY[r] | |
1695 | + | let hR = cY[s] | |
1696 | + | let dP = cY[v] | |
1697 | + | let dQ = cY[w] | |
1698 | + | let cZ = parseIntValue(cY[t]) | |
1699 | + | let da = parseIntValue(cY[u]) | |
1700 | + | let hS = valueOrErrorMessage(assetInfo(dl), (("Asset " + toBase58String(dl)) + " doesn't exist")).quantity | |
1701 | + | let hT = bJ(hQ) | |
1702 | + | let hU = bJ(hR) | |
1703 | + | let hV = if ((hS == 0)) | |
1716 | 1704 | then [e, e, e] | |
1717 | - | else | |
1718 | - | let | |
1719 | - | let | |
1720 | - | let | |
1721 | - | let | |
1722 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString( | |
1705 | + | else cW(hT, hU, hS) | |
1706 | + | let dv = 0 | |
1707 | + | let hW = H(hV[1], b) | |
1708 | + | let hX = H(hV[2], b) | |
1709 | + | let hY = value(getInteger(aT, aD(toString(this)))) | |
1710 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(hT), toString(hU), toString(hS), toString(dv), toString(hW), toString(hX), toString(hY)], j)) | |
1723 | 1711 | } | |
1724 | 1712 | ||
1725 | 1713 | ||
1726 | 1714 | ||
1727 | - | @Callable( | |
1728 | - | func evaluatePutByAmountAssetREADONLY ( | |
1729 | - | let | |
1730 | - | let | |
1731 | - | let | |
1732 | - | let | |
1733 | - | let | |
1734 | - | let | |
1735 | - | let | |
1736 | - | let | |
1737 | - | let | |
1738 | - | let | |
1739 | - | let | |
1740 | - | let | |
1741 | - | let | |
1742 | - | let | |
1743 | - | let | |
1715 | + | @Callable(eS) | |
1716 | + | func evaluatePutByAmountAssetREADONLY (dH) = { | |
1717 | + | let cY = ba() | |
1718 | + | let dl = fromBase58String(cY[q]) | |
1719 | + | let dN = cY[r] | |
1720 | + | let dm = fromBase58String(dN) | |
1721 | + | let dO = cY[s] | |
1722 | + | let dn = fromBase58String(dO) | |
1723 | + | let cZ = parseIntValue(cY[t]) | |
1724 | + | let da = parseIntValue(cY[u]) | |
1725 | + | let do = cY[p] | |
1726 | + | let hS = valueOrErrorMessage(assetInfo(dl), (("Asset " + toBase58String(dl)) + " doesn't exist")).quantity | |
1727 | + | let hT = bJ(dN) | |
1728 | + | let hU = bJ(dO) | |
1729 | + | let cU = D(hT, cZ) | |
1730 | + | let cV = D(hU, da) | |
1731 | + | let du = if ((hS == 0)) | |
1744 | 1732 | then e | |
1745 | - | else | |
1746 | - | let | |
1747 | - | let | |
1748 | - | let | |
1749 | - | let | |
1750 | - | let | |
1751 | - | let | |
1752 | - | let | |
1753 | - | let | |
1754 | - | let | |
1755 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString( | |
1733 | + | else bM(cV, cU) | |
1734 | + | let dT = D(dH, cZ) | |
1735 | + | let dU = fraction(dT, du, d) | |
1736 | + | let dJ = H(dU, da) | |
1737 | + | let eY = dF("", 500000, dH, dm, dJ, dn, "", true, false) | |
1738 | + | let ee = eY._1 | |
1739 | + | let hZ = eY._3 | |
1740 | + | let dq = eY._4 | |
1741 | + | let ds = eY._5 | |
1742 | + | let dp = eY._6 | |
1743 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(ee), toString(H(du, b)), toString(dq), toString(ds), toString(dp), do, toString(dH), toString(dJ)], j)) | |
1756 | 1744 | } | |
1757 | 1745 | ||
1758 | 1746 | ||
1759 | 1747 | ||
1760 | - | @Callable( | |
1761 | - | func evaluatePutByPriceAssetREADONLY ( | |
1762 | - | let | |
1763 | - | let | |
1764 | - | let | |
1765 | - | let | |
1766 | - | let | |
1767 | - | let | |
1768 | - | let | |
1769 | - | let | |
1770 | - | let | |
1771 | - | let | |
1772 | - | let | |
1773 | - | let | |
1774 | - | let | |
1775 | - | let | |
1776 | - | let | |
1748 | + | @Callable(eS) | |
1749 | + | func evaluatePutByPriceAssetREADONLY (dJ) = { | |
1750 | + | let cY = ba() | |
1751 | + | let dl = fromBase58String(cY[q]) | |
1752 | + | let dN = cY[r] | |
1753 | + | let dm = fromBase58String(dN) | |
1754 | + | let dO = cY[s] | |
1755 | + | let dn = fromBase58String(dO) | |
1756 | + | let cZ = parseIntValue(cY[t]) | |
1757 | + | let da = parseIntValue(cY[u]) | |
1758 | + | let do = cY[p] | |
1759 | + | let hS = valueOrErrorMessage(assetInfo(dl), (("Asset " + toBase58String(dl)) + " doesn't exist")).quantity | |
1760 | + | let ia = bJ(dN) | |
1761 | + | let ib = bJ(dO) | |
1762 | + | let ic = D(ia, cZ) | |
1763 | + | let id = D(ib, da) | |
1764 | + | let du = if ((hS == 0)) | |
1777 | 1765 | then e | |
1778 | - | else | |
1779 | - | let | |
1780 | - | let | |
1781 | - | let | |
1782 | - | let | |
1783 | - | let | |
1784 | - | let | |
1785 | - | let | |
1786 | - | let | |
1787 | - | let | |
1788 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString( | |
1766 | + | else bM(id, ic) | |
1767 | + | let dU = D(dJ, da) | |
1768 | + | let dT = fraction(dU, d, du) | |
1769 | + | let dH = H(dT, cZ) | |
1770 | + | let eY = dF("", 500000, dH, dm, dJ, dn, "", true, false) | |
1771 | + | let ee = eY._1 | |
1772 | + | let hZ = eY._3 | |
1773 | + | let dq = eY._4 | |
1774 | + | let ds = eY._5 | |
1775 | + | let dp = eY._6 | |
1776 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(ee), toString(H(du, b)), toString(dq), toString(ds), toString(dp), do, toString(dH), toString(dJ)], j)) | |
1789 | 1777 | } | |
1790 | 1778 | ||
1791 | 1779 | ||
1792 | 1780 | ||
1793 | - | @Callable( | |
1794 | - | func evaluateGetREADONLY ( | |
1795 | - | let | |
1796 | - | let | |
1797 | - | let | |
1798 | - | let | |
1799 | - | let | |
1800 | - | let | |
1801 | - | let | |
1802 | - | let | |
1803 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString( | |
1781 | + | @Callable(eS) | |
1782 | + | func evaluateGetREADONLY (ie,if) = { | |
1783 | + | let dW = dh("", ie, if, this) | |
1784 | + | let dA = dW._1 | |
1785 | + | let dB = dW._2 | |
1786 | + | let dq = dW._5 | |
1787 | + | let ds = dW._6 | |
1788 | + | let dp = dW._7 | |
1789 | + | let dv = dW._8 | |
1790 | + | let do = parseIntValue(dW._9) | |
1791 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(dA), toString(dB), toString(dq), toString(ds), toString(dp), toString(dv), toString(do)], j)) | |
1804 | 1792 | } | |
1805 | 1793 | ||
1806 | 1794 | ||
1807 | - | @Verifier( | |
1808 | - | func | |
1809 | - | let | |
1810 | - | let | |
1811 | - | if ($isInstanceOf( | |
1795 | + | @Verifier(ig) | |
1796 | + | func ih () = { | |
1797 | + | let ii = { | |
1798 | + | let bT = ge() | |
1799 | + | if ($isInstanceOf(bT, "ByteVector")) | |
1812 | 1800 | then { | |
1813 | - | let | |
1814 | - | | |
1801 | + | let gi = bT | |
1802 | + | gi | |
1815 | 1803 | } | |
1816 | - | else if ($isInstanceOf( | |
1817 | - | then | |
1804 | + | else if ($isInstanceOf(bT, "Unit")) | |
1805 | + | then ig.senderPublicKey | |
1818 | 1806 | else throw("Match error") | |
1819 | 1807 | } | |
1820 | - | let | |
1821 | - | if ($isInstanceOf( | |
1808 | + | let bT = ig | |
1809 | + | if ($isInstanceOf(bT, "Order")) | |
1822 | 1810 | then { | |
1823 | - | let | |
1824 | - | let | |
1825 | - | let | |
1826 | - | let | |
1827 | - | let | |
1828 | - | let | |
1829 | - | let | |
1830 | - | if (if (if ( | |
1831 | - | then | |
1811 | + | let eH = bT | |
1812 | + | let ij = aZ() | |
1813 | + | let ik = eG(eH) | |
1814 | + | let aI = ik._1 | |
1815 | + | let aJ = ik._2 | |
1816 | + | let aK = sigVerify(eH.bodyBytes, eH.proofs[0], eH.senderPublicKey) | |
1817 | + | let aL = sigVerify(eH.bodyBytes, eH.proofs[1], ij) | |
1818 | + | if (if (if (aI) | |
1819 | + | then aK | |
1832 | 1820 | else false) | |
1833 | - | then | |
1821 | + | then aL | |
1834 | 1822 | else false) | |
1835 | 1823 | then true | |
1836 | - | else aJ | |
1824 | + | else aH(aI, aJ, aK, aL) | |
1837 | 1825 | } | |
1838 | - | else if ($isInstanceOf( | |
1826 | + | else if ($isInstanceOf(bT, "SetScriptTransaction")) | |
1839 | 1827 | then { | |
1840 | - | let | |
1841 | - | if (sigVerify( | |
1828 | + | let gf = bT | |
1829 | + | if (sigVerify(ig.bodyBytes, ig.proofs[0], ii)) | |
1842 | 1830 | then true | |
1843 | 1831 | else { | |
1844 | - | let | |
1845 | - | let | |
1846 | - | let | |
1847 | - | if (( | |
1848 | - | then ( | |
1832 | + | let il = blake2b256(value(gf.script)) | |
1833 | + | let im = fromBase64String(value(getString(aT, aF()))) | |
1834 | + | let in = scriptHash(this) | |
1835 | + | if ((im == il)) | |
1836 | + | then (in != il) | |
1849 | 1837 | else false | |
1850 | 1838 | } | |
1851 | 1839 | } | |
1852 | - | else sigVerify( | |
1840 | + | else sigVerify(ig.bodyBytes, ig.proofs[0], ii) | |
1853 | 1841 | } | |
1854 | 1842 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = 8 | |
5 | 5 | ||
6 | 6 | let b = 100000000 | |
7 | 7 | ||
8 | 8 | let c = toBigInt(100000000) | |
9 | 9 | ||
10 | 10 | let d = toBigInt(1000000000000000000) | |
11 | 11 | ||
12 | 12 | let e = toBigInt(0) | |
13 | 13 | ||
14 | 14 | let f = toBigInt(0) | |
15 | 15 | ||
16 | 16 | let g = toBigInt(1) | |
17 | 17 | ||
18 | 18 | let h = toBigInt(2) | |
19 | 19 | ||
20 | 20 | let i = "WAVES" | |
21 | 21 | ||
22 | 22 | let j = "__" | |
23 | 23 | ||
24 | 24 | let k = 1 | |
25 | 25 | ||
26 | 26 | let l = 2 | |
27 | 27 | ||
28 | 28 | let m = 3 | |
29 | 29 | ||
30 | 30 | let n = 4 | |
31 | 31 | ||
32 | 32 | let o = 1 | |
33 | 33 | ||
34 | 34 | let p = 2 | |
35 | 35 | ||
36 | 36 | let q = 3 | |
37 | 37 | ||
38 | 38 | let r = 4 | |
39 | 39 | ||
40 | 40 | let s = 5 | |
41 | 41 | ||
42 | 42 | let t = 6 | |
43 | 43 | ||
44 | 44 | let u = 7 | |
45 | 45 | ||
46 | 46 | let v = 8 | |
47 | 47 | ||
48 | 48 | let w = 9 | |
49 | 49 | ||
50 | 50 | let x = 10 | |
51 | 51 | ||
52 | 52 | let y = 1 | |
53 | 53 | ||
54 | 54 | let z = 2 | |
55 | 55 | ||
56 | 56 | let A = 3 | |
57 | 57 | ||
58 | 58 | let B = 1 | |
59 | 59 | ||
60 | 60 | let C = 7 | |
61 | 61 | ||
62 | 62 | func D (E,F) = fraction(toBigInt(E), d, toBigInt(F)) | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | func G (E,F) = fraction(E, d, F) | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | func H (I,J) = toInt(fraction(I, toBigInt(J), d)) | |
69 | 69 | ||
70 | 70 | ||
71 | 71 | func K (I,J,L) = toInt(fraction(I, toBigInt(J), d, L)) | |
72 | 72 | ||
73 | 73 | ||
74 | 74 | func M (N,O,P) = fraction(N, O, P) | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | func Q (I) = if ((0 > I)) | |
78 | 78 | then -(I) | |
79 | 79 | else I | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | func R (I) = if ((e > I)) | |
83 | 83 | then -(I) | |
84 | 84 | else I | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func S () = "%s__swapContract" | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func T () = "%s__factoryContract" | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | func U () = "%s__managerPublicKey" | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | func V () = "%s__pendingManagerPublicKey" | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | func W () = "%s%s__price__last" | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func X (Y,Z) = makeString(["%s%s%d%d__price__history", toString(Y), toString(Z)], j) | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func aa (ab,ac) = ((("%s%s%s__P__" + ab) + "__") + ac) | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | func ad (ab,ac) = ((("%s%s%s__G__" + ab) + "__") + ac) | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | func ae () = "%s__amountAsset" | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | func af () = "%s__priceAsset" | |
115 | 115 | ||
116 | 116 | ||
117 | 117 | let ag = "%s__fee" | |
118 | 118 | ||
119 | 119 | let ah = fraction(10, b, 10000) | |
120 | 120 | ||
121 | 121 | let ai = valueOrElse(getInteger(this, ag), ah) | |
122 | 122 | ||
123 | 123 | let aj = makeString(["%s", "kLp"], j) | |
124 | 124 | ||
125 | 125 | let ak = makeString(["%s", "kLpRefreshedHeight"], j) | |
126 | 126 | ||
127 | 127 | let al = makeString(["%s", "refreshKLpDelay"], j) | |
128 | 128 | ||
129 | 129 | let am = 30 | |
130 | 130 | ||
131 | 131 | let an = valueOrElse(getInteger(this, al), am) | |
132 | 132 | ||
133 | - | func ao () = "%s | |
133 | + | func ao (ap) = makeString(["%s%s", "stakedBalance", ap], j) | |
134 | 134 | ||
135 | 135 | ||
136 | - | func | |
136 | + | func aq (ap) = makeString(["%s%s", "shareAssetBalance", ap], j) | |
137 | 137 | ||
138 | 138 | ||
139 | - | func | |
139 | + | func ar (ap) = valueOrElse(getInteger(this, ao(ap)), 0) | |
140 | 140 | ||
141 | 141 | ||
142 | - | func as ( | |
142 | + | func as (ap) = valueOrElse(getInteger(this, aq(ap)), 0) | |
143 | 143 | ||
144 | 144 | ||
145 | - | func at ( | |
145 | + | func at () = "%s__factoryConfig" | |
146 | 146 | ||
147 | 147 | ||
148 | - | func au ( | |
148 | + | func au () = "%s%s__matcher__publicKey" | |
149 | 149 | ||
150 | 150 | ||
151 | - | func av () = "%s__ | |
151 | + | func av (aw) = (("%s%s%s__" + aw) + "__mappings__poolContract2LpAsset") | |
152 | 152 | ||
153 | 153 | ||
154 | - | func | |
154 | + | func ax (ay,az) = (((("%d%d%s__" + ay) + "__") + az) + "__config") | |
155 | 155 | ||
156 | 156 | ||
157 | - | func | |
157 | + | func aA (aB) = ("%s%s%s__mappings__baseAsset2internalId__" + aB) | |
158 | 158 | ||
159 | 159 | ||
160 | - | func | |
160 | + | func aC () = "%s__shutdown" | |
161 | 161 | ||
162 | 162 | ||
163 | - | func | |
163 | + | func aD (aE) = ("%s%s__poolWeight__" + aE) | |
164 | 164 | ||
165 | 165 | ||
166 | - | func | |
166 | + | func aF () = "%s__allowedLpScriptHash" | |
167 | 167 | ||
168 | 168 | ||
169 | - | func aF (aG) = ("%s%s__poolWeight__" + aG) | |
169 | + | let aG = "%s__feeCollectorAddress" | |
170 | + | ||
171 | + | func aH (aI,aJ,aK,aL) = throw((((((((("order validation failed: orderValid=" + toString(aI)) + " (") + aJ) + ")") + " senderValid=") + toString(aK)) + " matcherValid=") + toString(aL))) | |
170 | 172 | ||
171 | 173 | ||
172 | - | func | |
174 | + | func aM (aN,aO) = valueOrErrorMessage(getString(aN, aO), makeString(["mandatory ", toString(aN), ".", aO, " is not defined"], "")) | |
173 | 175 | ||
174 | 176 | ||
175 | - | let aI = "%s__feeCollectorAddress" | |
176 | - | ||
177 | - | func aJ (aK,aL,aM,aN) = throw((((((((("order validation failed: orderValid=" + toString(aK)) + " (") + aL) + ")") + " senderValid=") + toString(aM)) + " matcherValid=") + toString(aN))) | |
177 | + | func aP (aN,aO) = valueOrErrorMessage(getInteger(aN, aO), makeString(["mandatory ", toString(aN), ".", aO, " is not defined"], "")) | |
178 | 178 | ||
179 | 179 | ||
180 | - | func | |
180 | + | func aQ (aR) = throw(makeString(["lp.ride:", aR], " ")) | |
181 | 181 | ||
182 | 182 | ||
183 | - | func | |
183 | + | func aS (aR) = makeString(["lp.ride:", aR], " ") | |
184 | 184 | ||
185 | 185 | ||
186 | - | func aS (aT) = throw(makeString(["lp.ride:", aT], " ")) | |
186 | + | let aT = addressFromStringValue(aM(this, T())) | |
187 | + | ||
188 | + | let aU = addressFromStringValue(aM(aT, aG)) | |
189 | + | ||
190 | + | let aV = { | |
191 | + | let aW = invoke(aT, "getInFeeREADONLY", [toString(this)], nil) | |
192 | + | if ($isInstanceOf(aW, "Int")) | |
193 | + | then aW | |
194 | + | else throw(($getType(aW) + " couldn't be cast to Int")) | |
195 | + | } | |
196 | + | ||
197 | + | let aX = { | |
198 | + | let aW = invoke(aT, "getOutFeeREADONLY", [toString(this)], nil) | |
199 | + | if ($isInstanceOf(aW, "Int")) | |
200 | + | then aW | |
201 | + | else throw(($getType(aW) + " couldn't be cast to Int")) | |
202 | + | } | |
203 | + | ||
204 | + | func aY () = valueOrElse(getBoolean(aT, aC()), false) | |
187 | 205 | ||
188 | 206 | ||
189 | - | func | |
207 | + | func aZ () = fromBase58String(aM(aT, au())) | |
190 | 208 | ||
191 | 209 | ||
192 | - | let aV = addressFromStringValue(aO(this, T())) | |
193 | - | ||
194 | - | let aW = addressFromStringValue(aO(aV, aI)) | |
195 | - | ||
196 | - | let aX = { | |
197 | - | let aY = invoke(aV, "getInFeeREADONLY", [toString(this)], nil) | |
198 | - | if ($isInstanceOf(aY, "Int")) | |
199 | - | then aY | |
200 | - | else throw(($getType(aY) + " couldn't be cast to Int")) | |
201 | - | } | |
202 | - | ||
203 | - | let aZ = { | |
204 | - | let aY = invoke(aV, "getOutFeeREADONLY", [toString(this)], nil) | |
205 | - | if ($isInstanceOf(aY, "Int")) | |
206 | - | then aY | |
207 | - | else throw(($getType(aY) + " couldn't be cast to Int")) | |
208 | - | } | |
209 | - | ||
210 | - | func ba () = aO(aV, ao()) | |
211 | - | ||
212 | - | ||
213 | - | func bb () = aO(aV, ap()) | |
214 | - | ||
215 | - | ||
216 | - | func bc () = valueOrElse(getBoolean(aV, aE()), false) | |
217 | - | ||
218 | - | ||
219 | - | func bd () = fromBase58String(aO(aV, aw())) | |
220 | - | ||
221 | - | ||
222 | - | func be () = { | |
223 | - | let bf = aO(this, ae()) | |
224 | - | let bg = aO(this, af()) | |
225 | - | let aB = aR(aV, aC(bg)) | |
226 | - | let aA = aR(aV, aC(bf)) | |
227 | - | split(aO(aV, az(toString(aA), toString(aB))), j) | |
210 | + | func ba () = { | |
211 | + | let bb = aM(this, ae()) | |
212 | + | let bc = aM(this, af()) | |
213 | + | let az = aP(aT, aA(bc)) | |
214 | + | let ay = aP(aT, aA(bb)) | |
215 | + | split(aM(aT, ax(toString(ay), toString(az))), j) | |
228 | 216 | } | |
229 | 217 | ||
230 | 218 | ||
231 | - | func | |
219 | + | func bd (be) = if ((be == i)) | |
232 | 220 | then unit | |
233 | - | else fromBase58String( | |
221 | + | else fromBase58String(be) | |
234 | 222 | ||
235 | 223 | ||
236 | - | func | |
224 | + | func bf (be) = if ((be == unit)) | |
237 | 225 | then i | |
238 | - | else toBase58String(value( | |
226 | + | else toBase58String(value(be)) | |
239 | 227 | ||
240 | 228 | ||
241 | - | func | |
229 | + | func bg (bh) = $Tuple7(addressFromStringValue(bh[o]), parseIntValue(bh[p]), fromBase58String(bh[q]), bd(bh[r]), bd(bh[s]), parseIntValue(bh[t]), parseIntValue(bh[u])) | |
242 | 230 | ||
243 | 231 | ||
244 | - | let | |
232 | + | let bi = bg(ba()) | |
245 | 233 | ||
246 | - | let | |
234 | + | let bj = bi | |
247 | 235 | ||
248 | - | let | |
236 | + | let bk = bj._1 | |
249 | 237 | ||
250 | - | let | |
238 | + | let bl = bj._2 | |
251 | 239 | ||
252 | - | let | |
240 | + | let bm = bj._3 | |
253 | 241 | ||
254 | - | let | |
242 | + | let bn = bj._4 | |
255 | 243 | ||
256 | - | let | |
244 | + | let bo = bj._5 | |
257 | 245 | ||
258 | - | let | |
246 | + | let bp = bj._6 | |
259 | 247 | ||
260 | - | let | |
248 | + | let bq = bj._7 | |
261 | 249 | ||
262 | - | func | |
250 | + | func br () = split(aM(aT, at()), j) | |
263 | 251 | ||
264 | 252 | ||
265 | - | let | |
253 | + | let bs = valueOrErrorMessage(addressFromString(br()[B]), "incorrect staking address") | |
266 | 254 | ||
267 | - | let | |
255 | + | let bt = valueOrErrorMessage(addressFromString(br()[C]), "incorrect staking address") | |
268 | 256 | ||
269 | - | func | |
257 | + | func bu (bv,bw,bx,by,bz,bA,bB,bC,bD,bE) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bv), toString(bw), toString(bx), toString(by), toString(bz), toString(bA), toString(bB), toString(bC), toString(bD), toString(bE)], j) | |
270 | 258 | ||
271 | 259 | ||
272 | - | func | |
260 | + | func bF (bG,bH,bI,by,bB,bC) = makeString(["%d%d%d%d%d%d", toString(bG), toString(bH), toString(bI), toString(by), toString(bB), toString(bC)], j) | |
273 | 261 | ||
274 | 262 | ||
275 | - | func | |
276 | - | let | |
263 | + | func bJ (ap) = { | |
264 | + | let bK = if ((ap == "WAVES")) | |
277 | 265 | then wavesBalance(this).available | |
278 | - | else assetBalance(this, fromBase58String( | |
279 | - | let | |
280 | - | max([0, | |
266 | + | else assetBalance(this, fromBase58String(ap)) | |
267 | + | let bL = ((bK + ar(ap)) - as(ap)) | |
268 | + | max([0, bL]) | |
281 | 269 | } | |
282 | 270 | ||
283 | 271 | ||
284 | - | func | |
272 | + | func bM (bN,bO) = fraction(bN, d, bO) | |
285 | 273 | ||
286 | 274 | ||
287 | - | func | |
275 | + | func bP (bN,bO,L) = fraction(bN, d, bO, L) | |
288 | 276 | ||
289 | 277 | ||
290 | - | func | |
291 | - | let | |
292 | - | if (( | |
278 | + | func bQ (bR) = { | |
279 | + | let bS = invoke(bR, "getRate", nil, nil) | |
280 | + | if ((bS == bS)) | |
293 | 281 | then { | |
294 | - | let | |
295 | - | if ($isInstanceOf( | |
282 | + | let bT = bS | |
283 | + | if ($isInstanceOf(bT, "Int")) | |
296 | 284 | then { | |
297 | - | let | |
298 | - | | |
285 | + | let bU = bT | |
286 | + | bU | |
299 | 287 | } | |
300 | - | else | |
288 | + | else aQ("proxy.getRate() unexpected value") | |
301 | 289 | } | |
302 | 290 | else throw("Strict value is not equal to itself.") | |
303 | 291 | } | |
304 | 292 | ||
305 | 293 | ||
306 | - | func | |
307 | - | let | |
308 | - | if (( | |
294 | + | func bV (ap,bW,bX,bR) = { | |
295 | + | let bY = ar(ap) | |
296 | + | if ((bY == bY)) | |
309 | 297 | then { | |
310 | - | let | |
311 | - | if (( | |
298 | + | let bZ = as(bX) | |
299 | + | if ((bZ == bZ)) | |
312 | 300 | then { | |
313 | - | let | |
314 | - | if (( | |
301 | + | let ca = bd(ap) | |
302 | + | if ((bW > 0)) | |
315 | 303 | then { | |
316 | - | let | |
317 | - | if (( | |
304 | + | let cb = invoke(bR, "deposit", nil, [AttachedPayment(ca, bW)]) | |
305 | + | if ((cb == cb)) | |
318 | 306 | then { | |
319 | - | let | |
320 | - | if ($isInstanceOf( | |
307 | + | let bT = cb | |
308 | + | if ($isInstanceOf(bT, "Int")) | |
321 | 309 | then { | |
322 | - | let | |
323 | - | let | |
324 | - | let | |
325 | - | [IntegerEntry( | |
310 | + | let cc = bT | |
311 | + | let cd = (bY + bW) | |
312 | + | let ce = (bZ + cc) | |
313 | + | [IntegerEntry(ao(ap), cd), IntegerEntry(aq(bX), ce)] | |
326 | 314 | } | |
327 | 315 | else nil | |
328 | 316 | } | |
329 | 317 | else throw("Strict value is not equal to itself.") | |
330 | 318 | } | |
331 | 319 | else nil | |
332 | 320 | } | |
333 | 321 | else throw("Strict value is not equal to itself.") | |
334 | 322 | } | |
335 | 323 | else throw("Strict value is not equal to itself.") | |
336 | 324 | } | |
337 | 325 | ||
338 | 326 | ||
339 | - | func | |
340 | - | let | |
341 | - | if (( | |
327 | + | func cf (ap,bW,bX,bR,cg,ch) = { | |
328 | + | let bY = ar(ap) | |
329 | + | if ((bY == bY)) | |
342 | 330 | then { | |
343 | - | let | |
344 | - | if (( | |
331 | + | let bZ = as(bX) | |
332 | + | if ((bZ == bZ)) | |
345 | 333 | then { | |
346 | - | let | |
347 | - | if (( | |
334 | + | let ci = bQ(bR) | |
335 | + | if ((ci == ci)) | |
348 | 336 | then { | |
349 | - | let | |
350 | - | let | |
351 | - | let | |
352 | - | let | |
353 | - | let | |
354 | - | if (( | |
337 | + | let cj = fraction(cg, bY, bZ) | |
338 | + | let ck = bd(bX) | |
339 | + | let cl = fraction(cg, bW, cj) | |
340 | + | let cm = fraction(cg, bW, ci) | |
341 | + | let cn = max([0, (cl - cm)]) | |
342 | + | if ((cm > 0)) | |
355 | 343 | then { | |
356 | - | let | |
357 | - | if (( | |
344 | + | let co = invoke(bR, "withdraw", nil, [AttachedPayment(ck, cm)]) | |
345 | + | if ((co == co)) | |
358 | 346 | then { | |
359 | - | let | |
360 | - | if ($isInstanceOf( | |
347 | + | let bT = co | |
348 | + | if ($isInstanceOf(bT, "Int")) | |
361 | 349 | then { | |
362 | - | let | |
363 | - | let | |
364 | - | let | |
365 | - | [IntegerEntry( | |
350 | + | let cp = bT | |
351 | + | let cd = (bY - cp) | |
352 | + | let ce = ((bZ - cm) - cn) | |
353 | + | [IntegerEntry(ao(ap), cd), IntegerEntry(aq(bX), ce), ScriptTransfer(ch, cn, bd(bX))] | |
366 | 354 | } | |
367 | 355 | else nil | |
368 | 356 | } | |
369 | 357 | else throw("Strict value is not equal to itself.") | |
370 | 358 | } | |
371 | 359 | else nil | |
372 | 360 | } | |
373 | 361 | else throw("Strict value is not equal to itself.") | |
374 | 362 | } | |
375 | 363 | else throw("Strict value is not equal to itself.") | |
376 | 364 | } | |
377 | 365 | else throw("Strict value is not equal to itself.") | |
378 | 366 | } | |
379 | 367 | ||
380 | 368 | ||
381 | - | func | |
369 | + | func cq (ap) = invoke(aT, "getPoolLeaseConfigREADONLY", [toString(this), ap], nil) | |
382 | 370 | ||
383 | 371 | ||
384 | - | func | |
385 | - | let | |
386 | - | if (( | |
372 | + | func cr (cs,ap,bX,ct,bR,cg,ch) = { | |
373 | + | let bY = ar(ap) | |
374 | + | if ((bY == bY)) | |
387 | 375 | then { | |
388 | - | let | |
389 | - | if (( | |
376 | + | let bZ = as(bX) | |
377 | + | if ((bZ == bZ)) | |
390 | 378 | then { | |
391 | - | let | |
392 | - | let | |
393 | - | if ($isInstanceOf( | |
379 | + | let cu = { | |
380 | + | let bT = bd(ap) | |
381 | + | if ($isInstanceOf(bT, "ByteVector")) | |
394 | 382 | then { | |
395 | - | let | |
396 | - | assetBalance(this, | |
383 | + | let cv = bT | |
384 | + | assetBalance(this, cv) | |
397 | 385 | } | |
398 | - | else if ($isInstanceOf( | |
386 | + | else if ($isInstanceOf(bT, "Unit")) | |
399 | 387 | then { | |
400 | - | let | |
388 | + | let cw = bT | |
401 | 389 | wavesBalance(this).available | |
402 | 390 | } | |
403 | 391 | else throw("Match error") | |
404 | 392 | } | |
405 | - | if (( | |
393 | + | if ((cu == cu)) | |
406 | 394 | then { | |
407 | - | let | |
408 | - | let | |
409 | - | let | |
410 | - | if (( | |
395 | + | let cx = max([0, ((cu + bY) - ct)]) | |
396 | + | let cy = fraction(cs, cx, 100) | |
397 | + | let cz = (bY - cy) | |
398 | + | if ((cz == 0)) | |
411 | 399 | then nil | |
412 | - | else if ((0 > | |
400 | + | else if ((0 > cz)) | |
413 | 401 | then { | |
414 | - | let | |
415 | - | | |
402 | + | let cA = -(cz) | |
403 | + | bV(ap, cA, bX, bR) | |
416 | 404 | } | |
417 | 405 | else { | |
418 | - | let | |
419 | - | | |
406 | + | let cB = cz | |
407 | + | cf(ap, cB, bX, bR, cg, ch) | |
420 | 408 | } | |
421 | 409 | } | |
422 | 410 | else throw("Strict value is not equal to itself.") | |
423 | 411 | } | |
424 | 412 | else throw("Strict value is not equal to itself.") | |
425 | 413 | } | |
426 | 414 | else throw("Strict value is not equal to itself.") | |
427 | 415 | } | |
428 | 416 | ||
429 | 417 | ||
430 | - | func | |
431 | - | let | |
432 | - | if ($isInstanceOf( | |
418 | + | func cC (ap) = { | |
419 | + | let bT = cq(ap) | |
420 | + | if ($isInstanceOf(bT, "(Boolean, Int, Int, String, String, Int, String)")) | |
433 | 421 | then { | |
434 | - | let | |
435 | - | let | |
436 | - | let | |
437 | - | let | |
438 | - | let | |
439 | - | let | |
440 | - | let | |
441 | - | let | |
442 | - | let | |
443 | - | if ( | |
444 | - | then | |
422 | + | let cD = bT | |
423 | + | let cE = cD | |
424 | + | let cF = cE._1 | |
425 | + | let cG = cE._2 | |
426 | + | let ct = cE._3 | |
427 | + | let cH = cE._4 | |
428 | + | let cI = cE._5 | |
429 | + | let cg = cE._6 | |
430 | + | let cJ = cE._7 | |
431 | + | if (cF) | |
432 | + | then cr(cG, ap, cI, ct, addressFromStringValue(cH), cg, addressFromStringValue(cJ)) | |
445 | 433 | else nil | |
446 | 434 | } | |
447 | - | else | |
435 | + | else aQ((("[" + ap) + "] Rebalance error")) | |
448 | 436 | } | |
449 | 437 | ||
450 | 438 | ||
451 | - | func | |
452 | - | let | |
453 | - | if ($isInstanceOf( | |
439 | + | func cK (ap,cL) = { | |
440 | + | let bT = cq(ap) | |
441 | + | if ($isInstanceOf(bT, "(Boolean, Int, Int, String, String, Int, String)")) | |
454 | 442 | then { | |
455 | - | let | |
456 | - | let | |
457 | - | let | |
458 | - | let | |
459 | - | let | |
460 | - | let | |
461 | - | let | |
462 | - | let | |
463 | - | let | |
464 | - | if ( | |
443 | + | let cD = bT | |
444 | + | let cM = cD | |
445 | + | let cF = cM._1 | |
446 | + | let cG = cM._2 | |
447 | + | let ct = cM._3 | |
448 | + | let cH = cM._4 | |
449 | + | let cI = cM._5 | |
450 | + | let cg = cM._6 | |
451 | + | let cJ = cM._7 | |
452 | + | if (cF) | |
465 | 453 | then { | |
466 | - | let | |
467 | - | if (( | |
454 | + | let cN = max([0, ((bJ(ap) - cL) - ct)]) | |
455 | + | if ((cN == cN)) | |
468 | 456 | then { | |
469 | - | let | |
470 | - | if (( | |
457 | + | let cd = fraction(cG, cN, 100) | |
458 | + | if ((cd == cd)) | |
471 | 459 | then { | |
472 | - | let | |
473 | - | if (( | |
474 | - | then | |
460 | + | let cO = max([0, (ar(ap) - cd)]) | |
461 | + | if ((cO == cO)) | |
462 | + | then cf(ap, cO, cI, addressFromStringValue(cH), cg, addressFromStringValue(cJ)) | |
475 | 463 | else throw("Strict value is not equal to itself.") | |
476 | 464 | } | |
477 | 465 | else throw("Strict value is not equal to itself.") | |
478 | 466 | } | |
479 | 467 | else throw("Strict value is not equal to itself.") | |
480 | 468 | } | |
481 | 469 | else nil | |
482 | 470 | } | |
483 | - | else | |
471 | + | else aQ((("[" + ap) + "] getWithdrawAssetState() error")) | |
484 | 472 | } | |
485 | 473 | ||
486 | 474 | ||
487 | - | func | |
488 | - | let | |
489 | - | let | |
490 | - | | |
475 | + | func cP (cQ,cR,cS,cT) = { | |
476 | + | let cU = D(cS, cQ) | |
477 | + | let cV = D(cT, cR) | |
478 | + | bM(cV, cU) | |
491 | 479 | } | |
492 | 480 | ||
493 | 481 | ||
494 | - | func | |
495 | - | let | |
496 | - | let | |
497 | - | let | |
498 | - | let | |
499 | - | let | |
500 | - | let | |
501 | - | let | |
502 | - | let | |
503 | - | let | |
504 | - | [ | |
482 | + | func cW (cS,cT,cX) = { | |
483 | + | let cY = ba() | |
484 | + | let cZ = parseIntValue(cY[t]) | |
485 | + | let da = parseIntValue(cY[u]) | |
486 | + | let db = cP(cZ, da, cS, cT) | |
487 | + | let bO = D(cS, cZ) | |
488 | + | let bN = D(cT, da) | |
489 | + | let dc = D(cX, b) | |
490 | + | let dd = bM(bO, dc) | |
491 | + | let de = bM(bN, dc) | |
492 | + | [db, dd, de] | |
505 | 493 | } | |
506 | 494 | ||
507 | 495 | ||
508 | - | func | |
509 | - | let | |
510 | - | [H( | |
496 | + | func df (cS,cT,cX) = { | |
497 | + | let dg = cW(cS, cT, cX) | |
498 | + | [H(dg[0], b), H(dg[1], b), H(dg[2], b)] | |
511 | 499 | } | |
512 | 500 | ||
513 | 501 | ||
514 | - | func | |
515 | - | let | |
516 | - | let | |
517 | - | let | |
518 | - | let | |
519 | - | let | |
520 | - | let | |
521 | - | let | |
522 | - | let | |
523 | - | if (( | |
502 | + | func dh (di,dj,dk,ab) = { | |
503 | + | let cY = ba() | |
504 | + | let dl = cY[q] | |
505 | + | let dm = cY[r] | |
506 | + | let dn = cY[s] | |
507 | + | let cQ = parseIntValue(cY[t]) | |
508 | + | let cR = parseIntValue(cY[u]) | |
509 | + | let do = cY[p] | |
510 | + | let dp = valueOrErrorMessage(assetInfo(fromBase58String(dl)), (("Asset " + dl) + " doesn't exist")).quantity | |
511 | + | if ((dl != dj)) | |
524 | 512 | then throw("Invalid asset passed.") | |
525 | 513 | else { | |
526 | - | let | |
527 | - | let | |
528 | - | let | |
529 | - | let | |
530 | - | let | |
531 | - | let | |
532 | - | let | |
533 | - | let | |
534 | - | let | |
535 | - | let | |
536 | - | let | |
537 | - | let | |
538 | - | let | |
539 | - | if (( | |
514 | + | let dq = bJ(dm) | |
515 | + | let dr = D(dq, cQ) | |
516 | + | let ds = bJ(dn) | |
517 | + | let dt = D(ds, cR) | |
518 | + | let du = bM(dt, dr) | |
519 | + | let dv = H(du, b) | |
520 | + | let dw = D(dk, b) | |
521 | + | let dx = D(dp, b) | |
522 | + | let dy = fraction(dr, dw, dx) | |
523 | + | let dz = fraction(dt, dw, dx) | |
524 | + | let dA = K(dy, cQ, FLOOR) | |
525 | + | let dB = K(dz, cR, FLOOR) | |
526 | + | let dC = cK(dm, dA) | |
527 | + | if ((dC == dC)) | |
540 | 528 | then { | |
541 | - | let | |
542 | - | if (( | |
529 | + | let dD = cK(dn, dB) | |
530 | + | if ((dD == dD)) | |
543 | 531 | then { | |
544 | - | let | |
532 | + | let dE = if ((di == "")) | |
545 | 533 | then nil | |
546 | - | else (( | |
534 | + | else ((dC ++ dD) ++ [ScriptTransfer(ab, dA, if ((dm == "WAVES")) | |
547 | 535 | then unit | |
548 | - | else fromBase58String( | |
536 | + | else fromBase58String(dm)), ScriptTransfer(ab, dB, if ((dn == "WAVES")) | |
549 | 537 | then unit | |
550 | - | else fromBase58String( | |
551 | - | $Tuple10( | |
538 | + | else fromBase58String(dn)), StringEntry(ad(toString(ab), di), bF(dA, dB, dk, dv, height, lastBlock.timestamp)), IntegerEntry(W(), dv), IntegerEntry(X(height, lastBlock.timestamp), dv)]) | |
539 | + | $Tuple10(dA, dB, dm, dn, dq, ds, dp, du, do, dE) | |
552 | 540 | } | |
553 | 541 | else throw("Strict value is not equal to itself.") | |
554 | 542 | } | |
555 | 543 | else throw("Strict value is not equal to itself.") | |
556 | 544 | } | |
557 | 545 | } | |
558 | 546 | ||
559 | 547 | ||
560 | - | func | |
561 | - | let | |
562 | - | let | |
563 | - | let | |
564 | - | let | |
565 | - | let | |
566 | - | let | |
567 | - | let | |
568 | - | let | |
569 | - | let | |
570 | - | let | |
571 | - | let | |
572 | - | let | |
573 | - | if (if (( | |
548 | + | func dF (di,dG,dH,dI,dJ,dK,ab,dL,dM) = { | |
549 | + | let cY = ba() | |
550 | + | let dl = fromBase58String(cY[q]) | |
551 | + | let dN = cY[r] | |
552 | + | let dO = cY[s] | |
553 | + | let dP = cY[v] | |
554 | + | let dQ = cY[w] | |
555 | + | let cZ = parseIntValue(cY[t]) | |
556 | + | let da = parseIntValue(cY[u]) | |
557 | + | let do = cY[p] | |
558 | + | let dp = valueOrErrorMessage(assetInfo(dl), (("Asset " + toBase58String(dl)) + " doesn't exist")).quantity | |
559 | + | let dR = toBase58String(valueOrElse(dI, fromBase58String("WAVES"))) | |
560 | + | let dS = toBase58String(valueOrElse(dK, fromBase58String("WAVES"))) | |
561 | + | if (if ((dN != dR)) | |
574 | 562 | then true | |
575 | - | else ( | |
563 | + | else (dO != dS)) | |
576 | 564 | then throw("Invalid amt or price asset passed.") | |
577 | 565 | else { | |
578 | - | let | |
579 | - | then | |
580 | - | else ( | |
581 | - | let | |
582 | - | then | |
583 | - | else ( | |
584 | - | let | |
585 | - | let | |
586 | - | let | |
587 | - | let | |
588 | - | let | |
589 | - | let | |
566 | + | let dq = if (dL) | |
567 | + | then bJ(dN) | |
568 | + | else (bJ(dN) - dH) | |
569 | + | let ds = if (dL) | |
570 | + | then bJ(dO) | |
571 | + | else (bJ(dO) - dJ) | |
572 | + | let dT = D(dH, cZ) | |
573 | + | let dU = D(dJ, da) | |
574 | + | let dV = bM(dU, dT) | |
575 | + | let dr = D(dq, cZ) | |
576 | + | let dt = D(ds, da) | |
577 | + | let dW = if ((dp == 0)) | |
590 | 578 | then { | |
591 | - | let | |
592 | - | let | |
593 | - | let | |
594 | - | $Tuple5(H( | |
579 | + | let du = e | |
580 | + | let dX = e | |
581 | + | let dc = pow((dT * dU), 0, toBigInt(5), 1, 0, DOWN) | |
582 | + | $Tuple5(H(dc, b), H(dT, cZ), H(dU, da), bM((dt + dU), (dr + dT)), dX) | |
595 | 583 | } | |
596 | 584 | else { | |
597 | - | let | |
598 | - | let | |
599 | - | let | |
600 | - | if (if (( | |
601 | - | then ( | |
585 | + | let du = bM(dt, dr) | |
586 | + | let dX = fraction(R((du - dV)), d, du) | |
587 | + | let dY = D(dG, b) | |
588 | + | if (if ((du != e)) | |
589 | + | then (dX > dY) | |
602 | 590 | else false) | |
603 | - | then throw(((("Price slippage " + toString( | |
591 | + | then throw(((("Price slippage " + toString(dX)) + " exceeded the passed limit of ") + toString(dY))) | |
604 | 592 | else { | |
605 | - | let | |
606 | - | let | |
607 | - | let | |
608 | - | let | |
609 | - | then $Tuple2( | |
610 | - | else $Tuple2( | |
611 | - | let | |
612 | - | let | |
613 | - | let | |
614 | - | $Tuple5(K( | |
593 | + | let dx = D(dp, b) | |
594 | + | let dZ = fraction(dT, bP(dt, dr, CEILING), d, CEILING) | |
595 | + | let ea = fraction(dU, d, bP(dt, dr, FLOOR), CEILING) | |
596 | + | let eb = if ((dZ > dU)) | |
597 | + | then $Tuple2(ea, dU) | |
598 | + | else $Tuple2(dT, dZ) | |
599 | + | let ec = eb._1 | |
600 | + | let ed = eb._2 | |
601 | + | let dc = fraction(dx, ed, dt, FLOOR) | |
602 | + | $Tuple5(K(dc, b, FLOOR), K(ec, cZ, CEILING), K(ed, da, CEILING), du, dX) | |
615 | 603 | } | |
616 | 604 | } | |
617 | - | let | |
618 | - | let | |
619 | - | let | |
620 | - | let | |
621 | - | let | |
622 | - | if ((0 >= | |
605 | + | let ee = dW._1 | |
606 | + | let ef = dW._2 | |
607 | + | let eg = dW._3 | |
608 | + | let dv = H(dW._4, b) | |
609 | + | let eh = H(dW._5, b) | |
610 | + | if ((0 >= ee)) | |
623 | 611 | then throw("Invalid calculations. LP calculated is less than zero.") | |
624 | 612 | else { | |
625 | - | let | |
613 | + | let ei = if (!(dM)) | |
626 | 614 | then 0 | |
627 | - | else | |
628 | - | let | |
629 | - | let | |
630 | - | let | |
631 | - | $Tuple13(ei, | |
615 | + | else ee | |
616 | + | let ej = (dH - ef) | |
617 | + | let ek = (dJ - eg) | |
618 | + | let el = [IntegerEntry(W(), dv), IntegerEntry(X(height, lastBlock.timestamp), dv), StringEntry(aa(ab, di), bu(ef, eg, ei, dv, dG, eh, height, lastBlock.timestamp, ej, ek))] | |
619 | + | $Tuple13(ee, ei, dv, dq, ds, dp, dl, do, el, ej, ek, dI, dK) | |
632 | 620 | } | |
633 | 621 | } | |
634 | 622 | } | |
635 | 623 | ||
636 | 624 | ||
637 | - | func | |
638 | - | let | |
639 | - | let | |
640 | - | let | |
641 | - | if (( | |
625 | + | func em (en,eo,dp) = { | |
626 | + | let ep = G(en, toBigInt(bp)) | |
627 | + | let eq = G(eo, toBigInt(bq)) | |
628 | + | let er = fraction(pow((ep * eq), 0, toBigInt(5), 1, 18, DOWN), g, dp) | |
629 | + | if ((dp == f)) | |
642 | 630 | then f | |
643 | - | else | |
631 | + | else er | |
644 | 632 | } | |
645 | 633 | ||
646 | 634 | ||
647 | - | func | |
648 | - | let | |
649 | - | let | |
650 | - | let | |
651 | - | let | |
652 | - | | |
635 | + | func es (et,eu,ev) = { | |
636 | + | let ew = (toBigInt(bJ(bf(bn))) - et) | |
637 | + | let ex = (toBigInt(bJ(bf(bo))) - eu) | |
638 | + | let ey = (toBigInt(value(assetInfo(bm)).quantity) - ev) | |
639 | + | let ez = em(ew, ex, ey) | |
640 | + | ez | |
653 | 641 | } | |
654 | 642 | ||
655 | 643 | ||
656 | - | func | |
657 | - | let | |
658 | - | let | |
659 | - | let | |
660 | - | let | |
661 | - | let | |
662 | - | $Tuple2( | |
644 | + | func eA (eB,eC,ev) = { | |
645 | + | let ew = (bJ(bf(bn)) + eB) | |
646 | + | let ex = (bJ(bf(bo)) + eC) | |
647 | + | let ey = (value(assetInfo(bm)).quantity + ev) | |
648 | + | let er = em(toBigInt(ew), toBigInt(ex), toBigInt(ey)) | |
649 | + | let eD = [IntegerEntry(ak, height), StringEntry(aj, toString(er))] | |
650 | + | $Tuple2(eD, er) | |
663 | 651 | } | |
664 | 652 | ||
665 | 653 | ||
666 | - | func | |
654 | + | func eE (eF,er) = if ((er >= eF)) | |
667 | 655 | then true | |
668 | - | else | |
656 | + | else aQ(makeString(["updated KLp lower than current KLp", toString(eF), toString(er)], " ")) | |
669 | 657 | ||
670 | 658 | ||
671 | - | func | |
672 | - | let | |
673 | - | let | |
674 | - | let | |
675 | - | let | |
676 | - | let | |
677 | - | then $Tuple2( | |
678 | - | else $Tuple2(-( | |
679 | - | let | |
680 | - | let | |
681 | - | if (if (if ( | |
659 | + | func eG (eH) = { | |
660 | + | let ew = bJ(bf(bn)) | |
661 | + | let ex = bJ(bf(bo)) | |
662 | + | let eI = eH.amount | |
663 | + | let eJ = fraction(eH.amount, eH.price, b, FLOOR) | |
664 | + | let eK = if ((eH.orderType == Buy)) | |
665 | + | then $Tuple2(eI, -(eJ)) | |
666 | + | else $Tuple2(-(eI), eJ) | |
667 | + | let eB = eK._1 | |
668 | + | let eC = eK._2 | |
669 | + | if (if (if (aY()) | |
682 | 670 | then true | |
683 | - | else ( | |
671 | + | else (bl == m)) | |
684 | 672 | then true | |
685 | - | else ( | |
673 | + | else (bl == n)) | |
686 | 674 | then throw("Exchange operations disabled") | |
687 | - | else if (if (( | |
675 | + | else if (if ((eH.assetPair.amountAsset != bn)) | |
688 | 676 | then true | |
689 | - | else ( | |
677 | + | else (eH.assetPair.priceAsset != bo)) | |
690 | 678 | then throw("Wrong order assets.") | |
691 | 679 | else { | |
692 | - | let | |
693 | - | let | |
694 | - | let | |
695 | - | let | |
696 | - | let | |
697 | - | let | |
698 | - | $Tuple2( | |
680 | + | let eL = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, aj), "0")), aS("invalid kLp")) | |
681 | + | let eM = eA(eB, eC, 0) | |
682 | + | let eN = eM._1 | |
683 | + | let eO = eM._2 | |
684 | + | let eP = (eO >= eL) | |
685 | + | let eQ = makeString(["kLp=", toString(eL), " kLpNew=", toString(eO), " amountAssetBalance=", toString(ew), " priceAssetBalance=", toString(ex), " amountAssetBalanceDelta=", toString(eB), " priceAssetBalanceDelta=", toString(eC), " height=", toString(height)], "") | |
686 | + | $Tuple2(eP, eQ) | |
699 | 687 | } | |
700 | 688 | } | |
701 | 689 | ||
702 | 690 | ||
703 | - | func | |
691 | + | func eR (eS) = if ((size(eS.payments) != 1)) | |
704 | 692 | then throw("exactly 1 payment is expected") | |
705 | 693 | else { | |
706 | - | let | |
707 | - | let | |
708 | - | let | |
709 | - | let | |
710 | - | let | |
711 | - | let | |
712 | - | let | |
713 | - | let | |
714 | - | if (if ( | |
694 | + | let eT = value(eS.payments[0]) | |
695 | + | let dj = value(eT.assetId) | |
696 | + | let eU = eT.amount | |
697 | + | let dW = dh(toBase58String(eS.transactionId), toBase58String(dj), eU, eS.caller) | |
698 | + | let dA = dW._1 | |
699 | + | let dB = dW._2 | |
700 | + | let do = parseIntValue(dW._9) | |
701 | + | let dE = dW._10 | |
702 | + | if (if (aY()) | |
715 | 703 | then true | |
716 | - | else ( | |
717 | - | then throw(("Get operation is blocked by admin. Status = " + toString( | |
718 | - | else $Tuple5( | |
704 | + | else (do == n)) | |
705 | + | then throw(("Get operation is blocked by admin. Status = " + toString(do))) | |
706 | + | else $Tuple5(dA, dB, eU, dj, dE) | |
719 | 707 | } | |
720 | 708 | ||
721 | 709 | ||
722 | - | func | |
710 | + | func eV (eS,dG,dM) = if ((size(eS.payments) != 2)) | |
723 | 711 | then throw("exactly 2 payments are expected") | |
724 | 712 | else { | |
725 | - | let | |
726 | - | let | |
727 | - | let | |
728 | - | let | |
729 | - | if (if (if ( | |
713 | + | let eW = value(eS.payments[0]) | |
714 | + | let eX = value(eS.payments[1]) | |
715 | + | let eY = dF(toBase58String(eS.transactionId), dG, eW.amount, eW.assetId, eX.amount, eX.assetId, toString(eS.caller), false, dM) | |
716 | + | let do = parseIntValue(eY._8) | |
717 | + | if (if (if (aY()) | |
730 | 718 | then true | |
731 | - | else ( | |
719 | + | else (do == l)) | |
732 | 720 | then true | |
733 | - | else ( | |
734 | - | then throw(("Put operation is blocked by admin. Status = " + toString( | |
735 | - | else | |
721 | + | else (do == n)) | |
722 | + | then throw(("Put operation is blocked by admin. Status = " + toString(do))) | |
723 | + | else eY | |
736 | 724 | } | |
737 | 725 | ||
738 | 726 | ||
739 | - | func | |
740 | - | let | |
741 | - | if (( | |
727 | + | func eZ (bW) = { | |
728 | + | let fa = invoke(aT, "emit", [bW], nil) | |
729 | + | if ((fa == fa)) | |
742 | 730 | then { | |
743 | - | let | |
744 | - | let | |
745 | - | if ($isInstanceOf( | |
731 | + | let fb = { | |
732 | + | let bT = fa | |
733 | + | if ($isInstanceOf(bT, "Address")) | |
746 | 734 | then { | |
747 | - | let | |
748 | - | invoke( | |
735 | + | let fc = bT | |
736 | + | invoke(fc, "emit", [bW], nil) | |
749 | 737 | } | |
750 | 738 | else unit | |
751 | 739 | } | |
752 | - | if (( | |
753 | - | then | |
740 | + | if ((fb == fb)) | |
741 | + | then bW | |
754 | 742 | else throw("Strict value is not equal to itself.") | |
755 | 743 | } | |
756 | 744 | else throw("Strict value is not equal to itself.") | |
757 | 745 | } | |
758 | 746 | ||
759 | 747 | ||
760 | - | func | |
761 | - | let | |
748 | + | func fd (bW,ai) = { | |
749 | + | let fe = if ((ai == 0)) | |
762 | 750 | then 0 | |
763 | - | else fraction( | |
764 | - | $Tuple2(( | |
751 | + | else fraction(bW, ai, b) | |
752 | + | $Tuple2((bW - fe), fe) | |
765 | 753 | } | |
766 | 754 | ||
767 | 755 | ||
768 | - | func | |
769 | - | let | |
770 | - | let | |
771 | - | let | |
772 | - | let | |
756 | + | func ff (fg,fh,ab,ac) = { | |
757 | + | let fi = (ac == unit) | |
758 | + | let fj = bJ(bf(bn)) | |
759 | + | let fk = bJ(bf(bo)) | |
760 | + | let fl = if ((fh == bn)) | |
773 | 761 | then true | |
774 | - | else if (( | |
762 | + | else if ((fh == bo)) | |
775 | 763 | then false | |
776 | - | else | |
777 | - | let | |
778 | - | then $Tuple2( | |
779 | - | else if ( | |
780 | - | then $Tuple2(( | |
781 | - | else $Tuple2( | |
782 | - | let | |
783 | - | let | |
784 | - | let | |
785 | - | then $Tuple2( | |
786 | - | else $Tuple2(0, | |
787 | - | let | |
788 | - | let | |
789 | - | let | |
790 | - | let | |
791 | - | let | |
792 | - | let | |
793 | - | let | |
794 | - | let | |
795 | - | let | |
796 | - | let | |
797 | - | let | |
798 | - | let | |
799 | - | then | |
800 | - | else | |
801 | - | let | |
802 | - | let | |
803 | - | let | |
764 | + | else aQ("invalid asset") | |
765 | + | let fm = if (fi) | |
766 | + | then $Tuple2(fj, fk) | |
767 | + | else if (fl) | |
768 | + | then $Tuple2((fj - fg), fk) | |
769 | + | else $Tuple2(fj, (fk - fg)) | |
770 | + | let fn = fm._1 | |
771 | + | let fo = fm._2 | |
772 | + | let fp = if (fl) | |
773 | + | then $Tuple2(fg, 0) | |
774 | + | else $Tuple2(0, fg) | |
775 | + | let fq = fp._1 | |
776 | + | let fr = fp._2 | |
777 | + | let eI = fd(fq, aV)._1 | |
778 | + | let eJ = fd(fr, aV)._1 | |
779 | + | let fs = fd(fg, aV) | |
780 | + | let ft = fs._1 | |
781 | + | let fe = fs._2 | |
782 | + | let fu = (fn + eI) | |
783 | + | let fv = (fo + eJ) | |
784 | + | let fw = bM(D(fv, bq), D(fu, bp)) | |
785 | + | let fx = H(fw, b) | |
786 | + | let fy = if (fl) | |
787 | + | then fn | |
788 | + | else fo | |
789 | + | let fz = toBigInt(fy) | |
790 | + | let fA = toBigInt(valueOrErrorMessage(assetInfo(bm), (("asset " + toBase58String(bm)) + " doesn't exist")).quantity) | |
791 | + | let fB = if ((fA > f)) | |
804 | 792 | then true | |
805 | - | else | |
806 | - | if (( | |
793 | + | else aQ("initial deposit requires all coins") | |
794 | + | if ((fB == fB)) | |
807 | 795 | then { | |
808 | - | let | |
809 | - | let | |
810 | - | let | |
796 | + | let fC = toBigInt(ft) | |
797 | + | let fD = max([0, toInt(((fA * (sqrtBigInt((d + ((fC * d) / fz)), 18, 18, DOWN) - d)) / d))]) | |
798 | + | let el = if (fi) | |
811 | 799 | then nil | |
812 | - | else [IntegerEntry(W(), | |
813 | - | let | |
814 | - | let | |
815 | - | let | |
816 | - | let | |
817 | - | then $Tuple2( | |
818 | - | else $Tuple2( | |
819 | - | let | |
820 | - | let | |
821 | - | let | |
822 | - | fraction(( | |
800 | + | else [IntegerEntry(W(), fx), IntegerEntry(X(height, lastBlock.timestamp), fx), StringEntry(aa(toString(value(ab)), toBase58String(value(ac))), bu(fq, fr, fD, fx, 0, 0, height, lastBlock.timestamp, 0, 0))] | |
801 | + | let fE = bM(D(fo, bq), D(fn, bp)) | |
802 | + | let fF = H(fE, b) | |
803 | + | let fG = { | |
804 | + | let fH = if (fl) | |
805 | + | then $Tuple2(fq, fn) | |
806 | + | else $Tuple2(fr, fo) | |
807 | + | let bW = fH._1 | |
808 | + | let fI = fH._2 | |
809 | + | let fJ = toInt(fraction(fA, toBigInt((bW / 2)), toBigInt(fI))) | |
810 | + | fraction((fD - fJ), b, fJ) | |
823 | 811 | } | |
824 | - | $Tuple5( | |
812 | + | $Tuple5(fD, el, fe, fG, fl) | |
825 | 813 | } | |
826 | 814 | else throw("Strict value is not equal to itself.") | |
827 | 815 | } | |
828 | 816 | ||
829 | 817 | ||
830 | - | func | |
831 | - | let | |
832 | - | let | |
833 | - | let | |
834 | - | let | |
835 | - | let | |
818 | + | func fK (fL,ft,fh,ab,ac) = { | |
819 | + | let fi = (ac == unit) | |
820 | + | let cY = ba() | |
821 | + | let cZ = parseIntValue(cY[t]) | |
822 | + | let da = parseIntValue(cY[u]) | |
823 | + | let fM = [if ((fh == bm)) | |
836 | 824 | then true | |
837 | - | else | |
838 | - | if (( | |
825 | + | else aQ("invalid lp asset")] | |
826 | + | if ((fM == fM)) | |
839 | 827 | then { | |
840 | - | let | |
828 | + | let fN = if ((fL == bn)) | |
841 | 829 | then true | |
842 | - | else if (( | |
830 | + | else if ((fL == bo)) | |
843 | 831 | then false | |
844 | - | else | |
845 | - | let | |
846 | - | then toBigInt( | |
847 | - | else toBigInt( | |
848 | - | let | |
849 | - | then | |
850 | - | else | |
851 | - | let | |
852 | - | let | |
853 | - | let | |
854 | - | then | |
855 | - | else | |
856 | - | let | |
857 | - | let | |
858 | - | let | |
859 | - | let | |
860 | - | let | |
861 | - | let | |
862 | - | let | |
863 | - | let | |
864 | - | then $Tuple4( | |
865 | - | else $Tuple4(0, | |
866 | - | let | |
867 | - | let | |
868 | - | let | |
869 | - | let | |
870 | - | let | |
871 | - | let | |
872 | - | let | |
832 | + | else aQ("invalid asset") | |
833 | + | let fO = if (fN) | |
834 | + | then toBigInt(bJ(bf(bn))) | |
835 | + | else toBigInt(bJ(bf(bo))) | |
836 | + | let fP = if (fN) | |
837 | + | then cZ | |
838 | + | else da | |
839 | + | let fQ = bJ(bf(bn)) | |
840 | + | let fR = bJ(bf(bo)) | |
841 | + | let fS = if (fN) | |
842 | + | then fQ | |
843 | + | else fR | |
844 | + | let fT = toBigInt(fS) | |
845 | + | let fA = toBigInt(valueOrErrorMessage(assetInfo(bm), (("asset " + toBase58String(bm)) + " doesn't exist")).quantity) | |
846 | + | let fU = toBigInt(ft) | |
847 | + | let fV = max([0, toInt(((fO * (d - pow((d - ((fU * d) / fA)), 18, h, 0, 18, DOWN))) / d))]) | |
848 | + | let fW = fd(fV, aX) | |
849 | + | let fX = fW._1 | |
850 | + | let fe = fW._2 | |
851 | + | let fY = if (fN) | |
852 | + | then $Tuple4(fX, 0, (fQ - fV), fR) | |
853 | + | else $Tuple4(0, fX, fQ, (fR - fV)) | |
854 | + | let fZ = fY._1 | |
855 | + | let ga = fY._2 | |
856 | + | let gb = fY._3 | |
857 | + | let gc = fY._4 | |
858 | + | let fw = bM(D(gc, bq), D(gb, bp)) | |
859 | + | let fx = H(fw, b) | |
860 | + | let el = if (fi) | |
873 | 861 | then nil | |
874 | - | else [StringEntry(ad(toString(value(ab)), toBase58String(value(ac))), | |
875 | - | let | |
876 | - | let | |
877 | - | let | |
878 | - | let | |
879 | - | fraction(( | |
862 | + | else [StringEntry(ad(toString(value(ab)), toBase58String(value(ac))), bF(fZ, ga, ft, fx, height, lastBlock.timestamp)), IntegerEntry(W(), fx), IntegerEntry(X(height, lastBlock.timestamp), fx)] | |
863 | + | let fE = bM(D(fR, bq), D(fQ, bp)) | |
864 | + | let fF = H(fE, b) | |
865 | + | let fG = { | |
866 | + | let gd = (toInt(fraction(fO, fU, fA)) * 2) | |
867 | + | fraction((fX - gd), b, gd) | |
880 | 868 | } | |
881 | - | $Tuple5( | |
869 | + | $Tuple5(fX, el, fe, fG, fN) | |
882 | 870 | } | |
883 | 871 | else throw("Strict value is not equal to itself.") | |
884 | 872 | } | |
885 | 873 | ||
886 | 874 | ||
887 | - | func | |
888 | - | let | |
889 | - | if ($isInstanceOf( | |
875 | + | func ge () = { | |
876 | + | let bT = getString(U()) | |
877 | + | if ($isInstanceOf(bT, "String")) | |
890 | 878 | then { | |
891 | - | let | |
892 | - | fromBase58String( | |
879 | + | let gf = bT | |
880 | + | fromBase58String(gf) | |
893 | 881 | } | |
894 | - | else if ($isInstanceOf( | |
882 | + | else if ($isInstanceOf(bT, "Unit")) | |
895 | 883 | then unit | |
896 | 884 | else throw("Match error") | |
897 | 885 | } | |
898 | 886 | ||
899 | 887 | ||
900 | - | func | |
901 | - | let | |
902 | - | if ($isInstanceOf( | |
888 | + | func gg () = { | |
889 | + | let bT = getString(V()) | |
890 | + | if ($isInstanceOf(bT, "String")) | |
903 | 891 | then { | |
904 | - | let | |
905 | - | fromBase58String( | |
892 | + | let gf = bT | |
893 | + | fromBase58String(gf) | |
906 | 894 | } | |
907 | - | else if ($isInstanceOf( | |
895 | + | else if ($isInstanceOf(bT, "Unit")) | |
908 | 896 | then unit | |
909 | 897 | else throw("Match error") | |
910 | 898 | } | |
911 | 899 | ||
912 | 900 | ||
913 | - | func | |
914 | - | let | |
915 | - | if ($isInstanceOf( | |
901 | + | func gh (eS) = { | |
902 | + | let bT = ge() | |
903 | + | if ($isInstanceOf(bT, "ByteVector")) | |
916 | 904 | then { | |
917 | - | let | |
918 | - | ( | |
905 | + | let gi = bT | |
906 | + | (eS.callerPublicKey == gi) | |
919 | 907 | } | |
920 | - | else if ($isInstanceOf( | |
921 | - | then ( | |
908 | + | else if ($isInstanceOf(bT, "Unit")) | |
909 | + | then (eS.caller == this) | |
922 | 910 | else throw("Match error") | |
923 | 911 | } | |
924 | 912 | ||
925 | 913 | ||
926 | - | func | |
927 | - | let | |
928 | - | let | |
929 | - | if ($isInstanceOf( | |
914 | + | func gj (eS) = { | |
915 | + | let gk = throw("Permission denied") | |
916 | + | let bT = ge() | |
917 | + | if ($isInstanceOf(bT, "ByteVector")) | |
930 | 918 | then { | |
931 | - | let | |
932 | - | if (( | |
919 | + | let gi = bT | |
920 | + | if ((eS.callerPublicKey == gi)) | |
933 | 921 | then true | |
934 | - | else | |
922 | + | else gk | |
935 | 923 | } | |
936 | - | else if ($isInstanceOf( | |
937 | - | then if (( | |
924 | + | else if ($isInstanceOf(bT, "Unit")) | |
925 | + | then if ((eS.caller == this)) | |
938 | 926 | then true | |
939 | - | else | |
927 | + | else gk | |
940 | 928 | else throw("Match error") | |
941 | 929 | } | |
942 | 930 | ||
943 | 931 | ||
944 | - | @Callable( | |
945 | - | func rebalance () = ( | |
932 | + | @Callable(eS) | |
933 | + | func rebalance () = (cC(aM(this, ae())) ++ cC(aM(this, af()))) | |
946 | 934 | ||
947 | 935 | ||
948 | 936 | ||
949 | - | @Callable( | |
950 | - | func calculateAmountOutForSwapREADONLY ( | |
951 | - | let | |
937 | + | @Callable(eS) | |
938 | + | func calculateAmountOutForSwapREADONLY (gl,gm,gn) = { | |
939 | + | let go = if ((gm == false)) | |
952 | 940 | then { | |
953 | - | let | |
954 | - | let | |
955 | - | $Tuple2( | |
941 | + | let gp = aM(this, af()) | |
942 | + | let gq = aM(this, ae()) | |
943 | + | $Tuple2(gp, gq) | |
956 | 944 | } | |
957 | 945 | else { | |
958 | - | let | |
959 | - | let | |
960 | - | $Tuple2( | |
946 | + | let gp = aM(this, ae()) | |
947 | + | let gq = aM(this, af()) | |
948 | + | $Tuple2(gp, gq) | |
961 | 949 | } | |
962 | - | let | |
963 | - | let | |
964 | - | let | |
965 | - | let | |
966 | - | let | |
967 | - | let | |
968 | - | let | |
969 | - | let | |
950 | + | let gp = go._1 | |
951 | + | let gq = go._2 | |
952 | + | let gr = bJ(gq) | |
953 | + | let gs = bJ(gp) | |
954 | + | let gt = fraction(gs, gl, (gr + gl)) | |
955 | + | let gu = (toBigInt(gr) * toBigInt(gs)) | |
956 | + | let gv = (((toBigInt(bJ(gq)) + toBigInt(gl)) + toBigInt(gn)) * (toBigInt(bJ(gp)) - toBigInt(gt))) | |
957 | + | let gw = if ((gv >= gu)) | |
970 | 958 | then true | |
971 | 959 | else throw("new K is fewer error") | |
972 | - | if (( | |
973 | - | then $Tuple2(nil, | |
960 | + | if ((gw == gw)) | |
961 | + | then $Tuple2(nil, gt) | |
974 | 962 | else throw("Strict value is not equal to itself.") | |
975 | 963 | } | |
976 | 964 | ||
977 | 965 | ||
978 | 966 | ||
979 | - | @Callable( | |
980 | - | func calculateAmountOutForSwapAndSendTokens ( | |
981 | - | let | |
982 | - | let | |
983 | - | if ($isInstanceOf( | |
984 | - | then | |
985 | - | else throw(($getType( | |
967 | + | @Callable(eS) | |
968 | + | func calculateAmountOutForSwapAndSendTokens (gl,gm,gx,gy,gn) = { | |
969 | + | let gz = { | |
970 | + | let aW = invoke(aT, "getSwapContractREADONLY", nil, nil) | |
971 | + | if ($isInstanceOf(aW, "String")) | |
972 | + | then aW | |
973 | + | else throw(($getType(aW) + " couldn't be cast to String")) | |
986 | 974 | } | |
987 | - | let | |
975 | + | let fM = [if ((value(eS.payments[0]).amount >= gl)) | |
988 | 976 | then true | |
989 | - | else | |
977 | + | else aQ("Wrong amount"), if ((eS.caller == addressFromStringValue(gz))) | |
990 | 978 | then true | |
991 | - | else | |
992 | - | if (( | |
979 | + | else aQ("Permission denied")] | |
980 | + | if ((fM == fM)) | |
993 | 981 | then { | |
994 | - | let | |
995 | - | let | |
996 | - | let | |
997 | - | then | |
998 | - | else | |
999 | - | let | |
1000 | - | let | |
1001 | - | let | |
1002 | - | let | |
1003 | - | let | |
1004 | - | let | |
982 | + | let eT = value(eS.payments[0]) | |
983 | + | let gq = bf(eT.assetId) | |
984 | + | let gp = if ((gm == false)) | |
985 | + | then aM(this, af()) | |
986 | + | else aM(this, ae()) | |
987 | + | let gr = (bJ(gq) - value(eS.payments[0]).amount) | |
988 | + | let gs = bJ(gp) | |
989 | + | let gt = fraction(gs, gl, (gr + gl)) | |
990 | + | let gu = (toBigInt(gr) * toBigInt(gs)) | |
991 | + | let gv = ((toBigInt(bJ(gq)) + toBigInt(gn)) * (toBigInt(bJ(gp)) - toBigInt(gt))) | |
992 | + | let gw = if ((gv >= gu)) | |
1005 | 993 | then true | |
1006 | 994 | else throw("new K is fewer error") | |
1007 | - | if (( | |
995 | + | if ((gw == gw)) | |
1008 | 996 | then { | |
1009 | - | let | |
997 | + | let gA = if ((gt >= gx)) | |
1010 | 998 | then true | |
1011 | 999 | else throw("Exchange result is fewer coins than expected") | |
1012 | - | if (( | |
1000 | + | if ((gA == gA)) | |
1013 | 1001 | then { | |
1014 | - | let | |
1015 | - | if (( | |
1016 | - | then $Tuple2(( | |
1002 | + | let gB = cK(gp, gt) | |
1003 | + | if ((gB == gB)) | |
1004 | + | then $Tuple2((gB ++ [ScriptTransfer(addressFromStringValue(gy), gt, bd(gp))]), gt) | |
1017 | 1005 | else throw("Strict value is not equal to itself.") | |
1018 | 1006 | } | |
1019 | 1007 | else throw("Strict value is not equal to itself.") | |
1020 | 1008 | } | |
1021 | 1009 | else throw("Strict value is not equal to itself.") | |
1022 | 1010 | } | |
1023 | 1011 | else throw("Strict value is not equal to itself.") | |
1024 | 1012 | } | |
1025 | 1013 | ||
1026 | 1014 | ||
1027 | 1015 | ||
1028 | - | @Callable( | |
1029 | - | func setManager ( | |
1030 | - | let | |
1031 | - | if (( | |
1016 | + | @Callable(eS) | |
1017 | + | func setManager (gC) = { | |
1018 | + | let gD = gj(eS) | |
1019 | + | if ((gD == gD)) | |
1032 | 1020 | then { | |
1033 | - | let | |
1034 | - | if (( | |
1035 | - | then [StringEntry(V(), | |
1021 | + | let gE = fromBase58String(gC) | |
1022 | + | if ((gE == gE)) | |
1023 | + | then [StringEntry(V(), gC)] | |
1036 | 1024 | else throw("Strict value is not equal to itself.") | |
1037 | 1025 | } | |
1038 | 1026 | else throw("Strict value is not equal to itself.") | |
1039 | 1027 | } | |
1040 | 1028 | ||
1041 | 1029 | ||
1042 | 1030 | ||
1043 | - | @Callable( | |
1031 | + | @Callable(eS) | |
1044 | 1032 | func confirmManager () = { | |
1045 | - | let | |
1046 | - | let | |
1033 | + | let gF = gg() | |
1034 | + | let gG = if (isDefined(gF)) | |
1047 | 1035 | then true | |
1048 | 1036 | else throw("No pending manager") | |
1049 | - | if (( | |
1037 | + | if ((gG == gG)) | |
1050 | 1038 | then { | |
1051 | - | let | |
1039 | + | let gH = if ((eS.callerPublicKey == value(gF))) | |
1052 | 1040 | then true | |
1053 | 1041 | else throw("You are not pending manager") | |
1054 | - | if (( | |
1055 | - | then [StringEntry(U(), toBase58String(value( | |
1042 | + | if ((gH == gH)) | |
1043 | + | then [StringEntry(U(), toBase58String(value(gF))), DeleteEntry(V())] | |
1056 | 1044 | else throw("Strict value is not equal to itself.") | |
1057 | 1045 | } | |
1058 | 1046 | else throw("Strict value is not equal to itself.") | |
1059 | 1047 | } | |
1060 | 1048 | ||
1061 | 1049 | ||
1062 | 1050 | ||
1063 | - | @Callable( | |
1064 | - | func put ( | |
1051 | + | @Callable(eS) | |
1052 | + | func put (dG,gI) = if ((0 > dG)) | |
1065 | 1053 | then throw("Invalid slippageTolerance passed") | |
1066 | 1054 | else { | |
1067 | - | let | |
1068 | - | let | |
1069 | - | let | |
1070 | - | let | |
1071 | - | let | |
1072 | - | let | |
1073 | - | let | |
1074 | - | let | |
1075 | - | let | |
1076 | - | let | |
1077 | - | let | |
1078 | - | if (( | |
1055 | + | let eY = eV(eS, dG, true) | |
1056 | + | let ei = eY._2 | |
1057 | + | let dl = eY._7 | |
1058 | + | let dE = eY._9 | |
1059 | + | let ej = eY._10 | |
1060 | + | let ek = eY._11 | |
1061 | + | let gJ = eY._12 | |
1062 | + | let gK = eY._13 | |
1063 | + | let eW = toBigInt(value(eS.payments[0]).amount) | |
1064 | + | let eX = toBigInt(value(eS.payments[1]).amount) | |
1065 | + | let ez = es(eW, eX, toBigInt(0)) | |
1066 | + | if ((ez == ez)) | |
1079 | 1067 | then { | |
1080 | - | let | |
1081 | - | if (( | |
1068 | + | let fa = invoke(aT, "emit", [ei], nil) | |
1069 | + | if ((fa == fa)) | |
1082 | 1070 | then { | |
1083 | - | let | |
1084 | - | let | |
1085 | - | if ($isInstanceOf( | |
1071 | + | let fb = { | |
1072 | + | let bT = fa | |
1073 | + | if ($isInstanceOf(bT, "Address")) | |
1086 | 1074 | then { | |
1087 | - | let | |
1088 | - | invoke( | |
1075 | + | let fc = bT | |
1076 | + | invoke(fc, "emit", [ei], nil) | |
1089 | 1077 | } | |
1090 | 1078 | else unit | |
1091 | 1079 | } | |
1092 | - | if (( | |
1080 | + | if ((fb == fb)) | |
1093 | 1081 | then { | |
1094 | - | let | |
1095 | - | then invoke( | |
1082 | + | let gL = if ((ej > 0)) | |
1083 | + | then invoke(bt, "put", nil, [AttachedPayment(gJ, ej)]) | |
1096 | 1084 | else nil | |
1097 | - | if (( | |
1085 | + | if ((gL == gL)) | |
1098 | 1086 | then { | |
1099 | - | let | |
1100 | - | then invoke( | |
1087 | + | let gM = if ((ek > 0)) | |
1088 | + | then invoke(bt, "put", nil, [AttachedPayment(gK, ek)]) | |
1101 | 1089 | else nil | |
1102 | - | if (( | |
1090 | + | if ((gM == gM)) | |
1103 | 1091 | then { | |
1104 | - | let | |
1092 | + | let gN = if (gI) | |
1105 | 1093 | then { | |
1106 | - | let | |
1107 | - | if (( | |
1094 | + | let gO = invoke(bs, "stake", nil, [AttachedPayment(dl, ei)]) | |
1095 | + | if ((gO == gO)) | |
1108 | 1096 | then nil | |
1109 | 1097 | else throw("Strict value is not equal to itself.") | |
1110 | 1098 | } | |
1111 | - | else [ScriptTransfer( | |
1112 | - | let | |
1113 | - | if (( | |
1099 | + | else [ScriptTransfer(eS.caller, ei, dl)] | |
1100 | + | let gP = eA(0, 0, 0) | |
1101 | + | if ((gP == gP)) | |
1114 | 1102 | then { | |
1115 | - | let | |
1116 | - | let | |
1117 | - | let | |
1118 | - | if (( | |
1103 | + | let er = gP._2 | |
1104 | + | let gQ = gP._1 | |
1105 | + | let gR = eE(ez, er) | |
1106 | + | if ((gR == gR)) | |
1119 | 1107 | then { | |
1120 | - | let | |
1121 | - | if (( | |
1122 | - | then (( | |
1108 | + | let gS = invoke(this, "rebalance", nil, nil) | |
1109 | + | if ((gS == gS)) | |
1110 | + | then ((dE ++ gN) ++ gQ) | |
1123 | 1111 | else throw("Strict value is not equal to itself.") | |
1124 | 1112 | } | |
1125 | 1113 | else throw("Strict value is not equal to itself.") | |
1126 | 1114 | } | |
1127 | 1115 | else throw("Strict value is not equal to itself.") | |
1128 | 1116 | } | |
1129 | 1117 | else throw("Strict value is not equal to itself.") | |
1130 | 1118 | } | |
1131 | 1119 | else throw("Strict value is not equal to itself.") | |
1132 | 1120 | } | |
1133 | 1121 | else throw("Strict value is not equal to itself.") | |
1134 | 1122 | } | |
1135 | 1123 | else throw("Strict value is not equal to itself.") | |
1136 | 1124 | } | |
1137 | 1125 | else throw("Strict value is not equal to itself.") | |
1138 | 1126 | } | |
1139 | 1127 | ||
1140 | 1128 | ||
1141 | 1129 | ||
1142 | - | @Callable( | |
1143 | - | func putForFree ( | |
1130 | + | @Callable(eS) | |
1131 | + | func putForFree (gT) = if ((0 > gT)) | |
1144 | 1132 | then throw("Invalid value passed") | |
1145 | 1133 | else { | |
1146 | - | let | |
1147 | - | let | |
1148 | - | let | |
1149 | - | let | |
1150 | - | let | |
1151 | - | if (( | |
1134 | + | let eY = eV(eS, gT, false) | |
1135 | + | let dE = eY._9 | |
1136 | + | let eW = toBigInt(value(eS.payments[0]).amount) | |
1137 | + | let eX = toBigInt(value(eS.payments[1]).amount) | |
1138 | + | let ez = es(eW, eX, toBigInt(0)) | |
1139 | + | if ((ez == ez)) | |
1152 | 1140 | then { | |
1153 | - | let | |
1154 | - | let | |
1155 | - | let | |
1156 | - | let | |
1157 | - | if (( | |
1158 | - | then ( | |
1141 | + | let gU = eA(0, 0, 0) | |
1142 | + | let gQ = gU._1 | |
1143 | + | let er = gU._2 | |
1144 | + | let gR = eE(ez, er) | |
1145 | + | if ((gR == gR)) | |
1146 | + | then (dE ++ gQ) | |
1159 | 1147 | else throw("Strict value is not equal to itself.") | |
1160 | 1148 | } | |
1161 | 1149 | else throw("Strict value is not equal to itself.") | |
1162 | 1150 | } | |
1163 | 1151 | ||
1164 | 1152 | ||
1165 | 1153 | ||
1166 | - | @Callable( | |
1167 | - | func putOneTkn ( | |
1168 | - | let | |
1169 | - | let | |
1170 | - | if ($isInstanceOf( | |
1171 | - | then | |
1172 | - | else throw(($getType( | |
1154 | + | @Callable(eS) | |
1155 | + | func putOneTkn (gV,gW) = { | |
1156 | + | let gX = { | |
1157 | + | let aW = invoke(aT, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1158 | + | if ($isInstanceOf(aW, "Boolean")) | |
1159 | + | then aW | |
1160 | + | else throw(($getType(aW) + " couldn't be cast to Boolean")) | |
1173 | 1161 | } | |
1174 | - | let | |
1162 | + | let gY = if (if (if (aY()) | |
1175 | 1163 | then true | |
1176 | - | else ( | |
1164 | + | else (bl == l)) | |
1177 | 1165 | then true | |
1178 | - | else ( | |
1166 | + | else (bl == n)) | |
1179 | 1167 | then true | |
1180 | - | else | |
1181 | - | let | |
1168 | + | else gX | |
1169 | + | let fM = [if (if (!(gY)) | |
1182 | 1170 | then true | |
1183 | - | else | |
1171 | + | else gh(eS)) | |
1184 | 1172 | then true | |
1185 | - | else | |
1173 | + | else aQ("put operation is blocked by admin"), if ((size(eS.payments) == 1)) | |
1186 | 1174 | then true | |
1187 | - | else | |
1188 | - | if (( | |
1175 | + | else aQ("exactly 1 payment are expected")] | |
1176 | + | if ((fM == fM)) | |
1189 | 1177 | then { | |
1190 | - | let | |
1191 | - | let | |
1192 | - | let | |
1193 | - | let | |
1194 | - | then | |
1195 | - | else if (( | |
1196 | - | then | |
1197 | - | else | |
1198 | - | if (( | |
1178 | + | let gZ = eS.payments[0] | |
1179 | + | let fh = gZ.assetId | |
1180 | + | let fg = gZ.amount | |
1181 | + | let ez = if ((fh == bn)) | |
1182 | + | then es(toBigInt(fg), toBigInt(0), toBigInt(0)) | |
1183 | + | else if ((fh == bo)) | |
1184 | + | then es(toBigInt(0), toBigInt(fg), toBigInt(0)) | |
1185 | + | else aQ("payment asset is not supported") | |
1186 | + | if ((ez == ez)) | |
1199 | 1187 | then { | |
1200 | - | let ab = | |
1201 | - | let ac = | |
1202 | - | let | |
1203 | - | if (( | |
1188 | + | let ab = eS.caller | |
1189 | + | let ac = eS.transactionId | |
1190 | + | let ha = ff(fg, fh, ab, ac) | |
1191 | + | if ((ha == ha)) | |
1204 | 1192 | then { | |
1205 | - | let | |
1206 | - | let | |
1207 | - | let | |
1208 | - | let | |
1209 | - | let | |
1210 | - | let | |
1211 | - | then ( | |
1193 | + | let fl = ha._5 | |
1194 | + | let hb = ha._4 | |
1195 | + | let fe = ha._3 | |
1196 | + | let el = ha._2 | |
1197 | + | let hc = ha._1 | |
1198 | + | let hd = if (if ((gV > 0)) | |
1199 | + | then (gV > hc) | |
1212 | 1200 | else false) | |
1213 | - | then | |
1214 | - | else | |
1215 | - | let | |
1216 | - | if (( | |
1201 | + | then aQ(makeString(["amount to receive is less than ", toString(gV)], "")) | |
1202 | + | else hc | |
1203 | + | let fa = eZ(hd) | |
1204 | + | if ((fa == fa)) | |
1217 | 1205 | then { | |
1218 | - | let | |
1206 | + | let gN = if (gW) | |
1219 | 1207 | then { | |
1220 | - | let | |
1221 | - | if (( | |
1208 | + | let he = invoke(bs, "stake", nil, [AttachedPayment(bm, hd)]) | |
1209 | + | if ((he == he)) | |
1222 | 1210 | then nil | |
1223 | 1211 | else throw("Strict value is not equal to itself.") | |
1224 | 1212 | } | |
1225 | - | else [ScriptTransfer( | |
1226 | - | let | |
1227 | - | then [ScriptTransfer( | |
1213 | + | else [ScriptTransfer(eS.caller, hd, bm)] | |
1214 | + | let hf = if ((fe > 0)) | |
1215 | + | then [ScriptTransfer(aU, fe, fh)] | |
1228 | 1216 | else nil | |
1229 | - | let | |
1217 | + | let hg = if ((this == aU)) | |
1230 | 1218 | then $Tuple2(0, 0) | |
1231 | - | else if ( | |
1232 | - | then $Tuple2(-( | |
1233 | - | else $Tuple2(0, -( | |
1234 | - | let | |
1235 | - | let | |
1236 | - | let | |
1237 | - | let | |
1238 | - | let | |
1239 | - | let | |
1240 | - | let | |
1241 | - | if (( | |
1219 | + | else if (fl) | |
1220 | + | then $Tuple2(-(fe), 0) | |
1221 | + | else $Tuple2(0, -(fe)) | |
1222 | + | let eB = hg._1 | |
1223 | + | let eC = hg._2 | |
1224 | + | let hh = eA(eB, eC, 0) | |
1225 | + | let gQ = hh._1 | |
1226 | + | let er = hh._2 | |
1227 | + | let eL = value(getString(aj)) | |
1228 | + | let gR = eE(ez, er) | |
1229 | + | if ((gR == gR)) | |
1242 | 1230 | then { | |
1243 | - | let | |
1244 | - | if (( | |
1245 | - | then $Tuple2(((( | |
1231 | + | let gS = invoke(this, "rebalance", nil, nil) | |
1232 | + | if ((gS == gS)) | |
1233 | + | then $Tuple2((((el ++ gN) ++ hf) ++ gQ), hd) | |
1246 | 1234 | else throw("Strict value is not equal to itself.") | |
1247 | 1235 | } | |
1248 | 1236 | else throw("Strict value is not equal to itself.") | |
1249 | 1237 | } | |
1250 | 1238 | else throw("Strict value is not equal to itself.") | |
1251 | 1239 | } | |
1252 | 1240 | else throw("Strict value is not equal to itself.") | |
1253 | 1241 | } | |
1254 | 1242 | else throw("Strict value is not equal to itself.") | |
1255 | 1243 | } | |
1256 | 1244 | else throw("Strict value is not equal to itself.") | |
1257 | 1245 | } | |
1258 | 1246 | ||
1259 | 1247 | ||
1260 | 1248 | ||
1261 | - | @Callable( | |
1262 | - | func putOneTknREADONLY ( | |
1263 | - | let | |
1264 | - | let | |
1265 | - | let | |
1266 | - | let | |
1267 | - | let | |
1268 | - | let | |
1269 | - | $Tuple2(nil, $Tuple3( | |
1249 | + | @Callable(eS) | |
1250 | + | func putOneTknREADONLY (fh,fg) = { | |
1251 | + | let hi = ff(fg, bd(fh), unit, unit) | |
1252 | + | let hc = hi._1 | |
1253 | + | let el = hi._2 | |
1254 | + | let fe = hi._3 | |
1255 | + | let hb = hi._4 | |
1256 | + | let fl = hi._5 | |
1257 | + | $Tuple2(nil, $Tuple3(hc, fe, hb)) | |
1270 | 1258 | } | |
1271 | 1259 | ||
1272 | 1260 | ||
1273 | 1261 | ||
1274 | - | @Callable( | |
1275 | - | func getOneTkn ( | |
1276 | - | let | |
1277 | - | let | |
1278 | - | if ($isInstanceOf( | |
1279 | - | then | |
1280 | - | else throw(($getType( | |
1262 | + | @Callable(eS) | |
1263 | + | func getOneTkn (hj,gV) = { | |
1264 | + | let gX = { | |
1265 | + | let aW = invoke(aT, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1266 | + | if ($isInstanceOf(aW, "Boolean")) | |
1267 | + | then aW | |
1268 | + | else throw(($getType(aW) + " couldn't be cast to Boolean")) | |
1281 | 1269 | } | |
1282 | - | let | |
1270 | + | let hk = if (if (aY()) | |
1283 | 1271 | then true | |
1284 | - | else ( | |
1272 | + | else (bl == n)) | |
1285 | 1273 | then true | |
1286 | - | else | |
1287 | - | let | |
1274 | + | else gX | |
1275 | + | let fM = [if (if (!(hk)) | |
1288 | 1276 | then true | |
1289 | - | else | |
1277 | + | else gh(eS)) | |
1290 | 1278 | then true | |
1291 | - | else | |
1279 | + | else aQ("get operation is blocked by admin"), if ((size(eS.payments) == 1)) | |
1292 | 1280 | then true | |
1293 | - | else | |
1294 | - | if (( | |
1281 | + | else aQ("exactly 1 payment are expected")] | |
1282 | + | if ((fM == fM)) | |
1295 | 1283 | then { | |
1296 | - | let | |
1297 | - | let | |
1298 | - | let | |
1299 | - | let | |
1300 | - | let | |
1301 | - | if (( | |
1284 | + | let fL = bd(hj) | |
1285 | + | let gZ = eS.payments[0] | |
1286 | + | let fh = gZ.assetId | |
1287 | + | let ft = gZ.amount | |
1288 | + | let ez = es(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1289 | + | if ((ez == ez)) | |
1302 | 1290 | then { | |
1303 | - | let ab = | |
1304 | - | let ac = | |
1305 | - | let | |
1306 | - | if (( | |
1291 | + | let ab = eS.caller | |
1292 | + | let ac = eS.transactionId | |
1293 | + | let hl = fK(fL, ft, fh, ab, ac) | |
1294 | + | if ((hl == hl)) | |
1307 | 1295 | then { | |
1308 | - | let | |
1309 | - | let | |
1310 | - | let | |
1311 | - | let | |
1312 | - | let | |
1313 | - | let | |
1314 | - | then ( | |
1296 | + | let fN = hl._5 | |
1297 | + | let hb = hl._4 | |
1298 | + | let fe = hl._3 | |
1299 | + | let el = hl._2 | |
1300 | + | let hm = hl._1 | |
1301 | + | let bW = if (if ((gV > 0)) | |
1302 | + | then (gV > hm) | |
1315 | 1303 | else false) | |
1316 | - | then | |
1317 | - | else | |
1318 | - | let | |
1319 | - | if (( | |
1304 | + | then aQ(makeString(["amount to receive is less than ", toString(gV)], "")) | |
1305 | + | else hm | |
1306 | + | let hn = invoke(aT, "burn", [ft], [AttachedPayment(fh, ft)]) | |
1307 | + | if ((hn == hn)) | |
1320 | 1308 | then { | |
1321 | - | let | |
1322 | - | if (( | |
1309 | + | let gB = cK(hj, bW) | |
1310 | + | if ((gB == gB)) | |
1323 | 1311 | then { | |
1324 | - | let | |
1325 | - | let | |
1326 | - | then [ScriptTransfer( | |
1312 | + | let ho = [ScriptTransfer(ab, bW, fL)] | |
1313 | + | let hf = if ((fe > 0)) | |
1314 | + | then [ScriptTransfer(aU, fe, fL)] | |
1327 | 1315 | else nil | |
1328 | - | let | |
1329 | - | let | |
1316 | + | let hp = { | |
1317 | + | let hq = if ((this == aU)) | |
1330 | 1318 | then 0 | |
1331 | - | else | |
1332 | - | if ( | |
1333 | - | then $Tuple2(-(( | |
1334 | - | else $Tuple2(0, -(( | |
1319 | + | else fe | |
1320 | + | if (fN) | |
1321 | + | then $Tuple2(-((bW + hq)), 0) | |
1322 | + | else $Tuple2(0, -((bW + hq))) | |
1335 | 1323 | } | |
1336 | - | let | |
1337 | - | let | |
1338 | - | let | |
1339 | - | let | |
1340 | - | let | |
1341 | - | let | |
1342 | - | if (( | |
1343 | - | then $Tuple2((((( | |
1324 | + | let eB = hp._1 | |
1325 | + | let eC = hp._2 | |
1326 | + | let hr = eA(eB, eC, 0) | |
1327 | + | let gQ = hr._1 | |
1328 | + | let er = hr._2 | |
1329 | + | let gR = eE(ez, er) | |
1330 | + | if ((gR == gR)) | |
1331 | + | then $Tuple2(((((el ++ gB) ++ ho) ++ hf) ++ gQ), bW) | |
1344 | 1332 | else throw("Strict value is not equal to itself.") | |
1345 | 1333 | } | |
1346 | 1334 | else throw("Strict value is not equal to itself.") | |
1347 | 1335 | } | |
1348 | 1336 | else throw("Strict value is not equal to itself.") | |
1349 | 1337 | } | |
1350 | 1338 | else throw("Strict value is not equal to itself.") | |
1351 | 1339 | } | |
1352 | 1340 | else throw("Strict value is not equal to itself.") | |
1353 | 1341 | } | |
1354 | 1342 | else throw("Strict value is not equal to itself.") | |
1355 | 1343 | } | |
1356 | 1344 | ||
1357 | 1345 | ||
1358 | 1346 | ||
1359 | - | @Callable( | |
1360 | - | func getOneTknREADONLY ( | |
1361 | - | let | |
1362 | - | let | |
1363 | - | let | |
1364 | - | let | |
1365 | - | let | |
1366 | - | let | |
1367 | - | $Tuple2(nil, $Tuple3( | |
1347 | + | @Callable(eS) | |
1348 | + | func getOneTknREADONLY (fL,ft) = { | |
1349 | + | let hs = fK(bd(fL), ft, bm, unit, unit) | |
1350 | + | let hm = hs._1 | |
1351 | + | let el = hs._2 | |
1352 | + | let fe = hs._3 | |
1353 | + | let hb = hs._4 | |
1354 | + | let fN = hs._5 | |
1355 | + | $Tuple2(nil, $Tuple3(hm, fe, hb)) | |
1368 | 1356 | } | |
1369 | 1357 | ||
1370 | 1358 | ||
1371 | 1359 | ||
1372 | - | @Callable( | |
1373 | - | func unstakeAndGetOneTkn ( | |
1374 | - | let | |
1375 | - | let | |
1376 | - | if ($isInstanceOf( | |
1377 | - | then | |
1378 | - | else throw(($getType( | |
1360 | + | @Callable(eS) | |
1361 | + | func unstakeAndGetOneTkn (ht,hj,gV) = { | |
1362 | + | let gX = { | |
1363 | + | let aW = invoke(aT, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1364 | + | if ($isInstanceOf(aW, "Boolean")) | |
1365 | + | then aW | |
1366 | + | else throw(($getType(aW) + " couldn't be cast to Boolean")) | |
1379 | 1367 | } | |
1380 | - | let | |
1368 | + | let hk = if (if (aY()) | |
1381 | 1369 | then true | |
1382 | - | else ( | |
1370 | + | else (bl == n)) | |
1383 | 1371 | then true | |
1384 | - | else | |
1385 | - | let | |
1372 | + | else gX | |
1373 | + | let fM = [if (if (!(hk)) | |
1386 | 1374 | then true | |
1387 | - | else | |
1375 | + | else gh(eS)) | |
1388 | 1376 | then true | |
1389 | - | else | |
1377 | + | else aQ("get operation is blocked by admin"), if ((size(eS.payments) == 0)) | |
1390 | 1378 | then true | |
1391 | - | else | |
1392 | - | if (( | |
1379 | + | else aQ("no payments are expected")] | |
1380 | + | if ((fM == fM)) | |
1393 | 1381 | then { | |
1394 | - | let | |
1395 | - | let ab = | |
1396 | - | let ac = | |
1397 | - | let | |
1398 | - | if (( | |
1382 | + | let fL = bd(hj) | |
1383 | + | let ab = eS.caller | |
1384 | + | let ac = eS.transactionId | |
1385 | + | let ez = es(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1386 | + | if ((ez == ez)) | |
1399 | 1387 | then { | |
1400 | - | let | |
1401 | - | if (( | |
1388 | + | let hu = invoke(bs, "unstake", [toBase58String(bm), ht], nil) | |
1389 | + | if ((hu == hu)) | |
1402 | 1390 | then { | |
1403 | - | let | |
1404 | - | if (( | |
1391 | + | let hv = fK(fL, ht, bm, ab, ac) | |
1392 | + | if ((hv == hv)) | |
1405 | 1393 | then { | |
1406 | - | let | |
1407 | - | let | |
1408 | - | let | |
1409 | - | let | |
1410 | - | let | |
1411 | - | let | |
1412 | - | then ( | |
1394 | + | let fN = hv._5 | |
1395 | + | let hb = hv._4 | |
1396 | + | let fe = hv._3 | |
1397 | + | let el = hv._2 | |
1398 | + | let hm = hv._1 | |
1399 | + | let bW = if (if ((gV > 0)) | |
1400 | + | then (gV > hm) | |
1413 | 1401 | else false) | |
1414 | - | then | |
1415 | - | else | |
1416 | - | let | |
1417 | - | if (( | |
1402 | + | then aQ(makeString(["amount to receive is less than ", toString(gV)], "")) | |
1403 | + | else hm | |
1404 | + | let hn = invoke(aT, "burn", [ht], [AttachedPayment(bm, ht)]) | |
1405 | + | if ((hn == hn)) | |
1418 | 1406 | then { | |
1419 | - | let | |
1420 | - | if (( | |
1407 | + | let gB = cK(hj, bW) | |
1408 | + | if ((gB == gB)) | |
1421 | 1409 | then { | |
1422 | - | let | |
1423 | - | let | |
1424 | - | then [ScriptTransfer( | |
1410 | + | let ho = [ScriptTransfer(eS.caller, bW, fL)] | |
1411 | + | let hf = if ((fe > 0)) | |
1412 | + | then [ScriptTransfer(aU, fe, fL)] | |
1425 | 1413 | else nil | |
1426 | - | let | |
1427 | - | let | |
1414 | + | let hw = { | |
1415 | + | let hq = if ((this == aU)) | |
1428 | 1416 | then 0 | |
1429 | - | else | |
1430 | - | if ( | |
1431 | - | then $Tuple2(-(( | |
1432 | - | else $Tuple2(0, -(( | |
1417 | + | else fe | |
1418 | + | if (fN) | |
1419 | + | then $Tuple2(-((bW + hq)), 0) | |
1420 | + | else $Tuple2(0, -((bW + hq))) | |
1433 | 1421 | } | |
1434 | - | let | |
1435 | - | let | |
1436 | - | let | |
1437 | - | let | |
1438 | - | let | |
1439 | - | let | |
1440 | - | if (( | |
1441 | - | then $Tuple2((((( | |
1422 | + | let eB = hw._1 | |
1423 | + | let eC = hw._2 | |
1424 | + | let hx = eA(eB, eC, 0) | |
1425 | + | let gQ = hx._1 | |
1426 | + | let er = hx._2 | |
1427 | + | let gR = eE(ez, er) | |
1428 | + | if ((gR == gR)) | |
1429 | + | then $Tuple2(((((el ++ gB) ++ ho) ++ hf) ++ gQ), bW) | |
1442 | 1430 | else throw("Strict value is not equal to itself.") | |
1443 | 1431 | } | |
1444 | 1432 | else throw("Strict value is not equal to itself.") | |
1445 | 1433 | } | |
1446 | 1434 | else throw("Strict value is not equal to itself.") | |
1447 | 1435 | } | |
1448 | 1436 | else throw("Strict value is not equal to itself.") | |
1449 | 1437 | } | |
1450 | 1438 | else throw("Strict value is not equal to itself.") | |
1451 | 1439 | } | |
1452 | 1440 | else throw("Strict value is not equal to itself.") | |
1453 | 1441 | } | |
1454 | 1442 | else throw("Strict value is not equal to itself.") | |
1455 | 1443 | } | |
1456 | 1444 | ||
1457 | 1445 | ||
1458 | 1446 | ||
1459 | - | @Callable( | |
1447 | + | @Callable(eS) | |
1460 | 1448 | func get () = { | |
1461 | - | let | |
1462 | - | let | |
1463 | - | let | |
1464 | - | let | |
1465 | - | let | |
1466 | - | let | |
1467 | - | let | |
1468 | - | if (( | |
1449 | + | let dW = eR(eS) | |
1450 | + | let hy = dW._1 | |
1451 | + | let dB = dW._2 | |
1452 | + | let eU = dW._3 | |
1453 | + | let dj = dW._4 | |
1454 | + | let dE = dW._5 | |
1455 | + | let ez = es(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1456 | + | if ((ez == ez)) | |
1469 | 1457 | then { | |
1470 | - | let | |
1471 | - | if (( | |
1458 | + | let hz = invoke(aT, "burn", [eU], [AttachedPayment(dj, eU)]) | |
1459 | + | if ((hz == hz)) | |
1472 | 1460 | then { | |
1473 | - | let | |
1474 | - | let | |
1475 | - | let | |
1476 | - | let | |
1477 | - | if (( | |
1478 | - | then ( | |
1461 | + | let hA = eA(-(hy), -(dB), 0) | |
1462 | + | let gQ = hA._1 | |
1463 | + | let er = hA._2 | |
1464 | + | let gR = eE(ez, er) | |
1465 | + | if ((gR == gR)) | |
1466 | + | then (dE ++ gQ) | |
1479 | 1467 | else throw("Strict value is not equal to itself.") | |
1480 | 1468 | } | |
1481 | 1469 | else throw("Strict value is not equal to itself.") | |
1482 | 1470 | } | |
1483 | 1471 | else throw("Strict value is not equal to itself.") | |
1484 | 1472 | } | |
1485 | 1473 | ||
1486 | 1474 | ||
1487 | 1475 | ||
1488 | - | @Callable( | |
1489 | - | func getNoLess ( | |
1490 | - | let | |
1491 | - | let | |
1492 | - | let | |
1493 | - | let | |
1494 | - | let | |
1495 | - | let | |
1496 | - | if (( | |
1497 | - | then throw(((("noLessThenAmtAsset failed: " + toString( | |
1498 | - | else if (( | |
1499 | - | then throw(((("noLessThenPriceAsset failed: " + toString( | |
1476 | + | @Callable(eS) | |
1477 | + | func getNoLess (hB,hC) = { | |
1478 | + | let dW = eR(eS) | |
1479 | + | let dA = dW._1 | |
1480 | + | let dB = dW._2 | |
1481 | + | let eU = dW._3 | |
1482 | + | let dj = dW._4 | |
1483 | + | let dE = dW._5 | |
1484 | + | if ((hB > dA)) | |
1485 | + | then throw(((("noLessThenAmtAsset failed: " + toString(dA)) + " < ") + toString(hB))) | |
1486 | + | else if ((hC > dB)) | |
1487 | + | then throw(((("noLessThenPriceAsset failed: " + toString(dB)) + " < ") + toString(hC))) | |
1500 | 1488 | else { | |
1501 | - | let | |
1502 | - | if (( | |
1489 | + | let ez = es(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1490 | + | if ((ez == ez)) | |
1503 | 1491 | then { | |
1504 | - | let | |
1505 | - | if (( | |
1492 | + | let hz = invoke(aT, "burn", [eU], [AttachedPayment(dj, eU)]) | |
1493 | + | if ((hz == hz)) | |
1506 | 1494 | then { | |
1507 | - | let | |
1508 | - | let | |
1509 | - | let | |
1510 | - | let | |
1511 | - | if (( | |
1512 | - | then ( | |
1495 | + | let hD = eA(-(dA), -(dB), 0) | |
1496 | + | let gQ = hD._1 | |
1497 | + | let er = hD._2 | |
1498 | + | let gR = eE(ez, er) | |
1499 | + | if ((gR == gR)) | |
1500 | + | then (dE ++ gQ) | |
1513 | 1501 | else throw("Strict value is not equal to itself.") | |
1514 | 1502 | } | |
1515 | 1503 | else throw("Strict value is not equal to itself.") | |
1516 | 1504 | } | |
1517 | 1505 | else throw("Strict value is not equal to itself.") | |
1518 | 1506 | } | |
1519 | 1507 | } | |
1520 | 1508 | ||
1521 | 1509 | ||
1522 | 1510 | ||
1523 | - | @Callable( | |
1524 | - | func unstakeAndGet ( | |
1525 | - | let | |
1511 | + | @Callable(eS) | |
1512 | + | func unstakeAndGet (bW) = { | |
1513 | + | let hE = if ((size(eS.payments) != 0)) | |
1526 | 1514 | then throw("No payments are expected") | |
1527 | 1515 | else true | |
1528 | - | if (( | |
1516 | + | if ((hE == hE)) | |
1529 | 1517 | then { | |
1530 | - | let | |
1531 | - | let | |
1532 | - | let | |
1533 | - | if (( | |
1518 | + | let cY = ba() | |
1519 | + | let dl = fromBase58String(cY[q]) | |
1520 | + | let ez = es(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1521 | + | if ((ez == ez)) | |
1534 | 1522 | then { | |
1535 | - | let | |
1536 | - | if (( | |
1523 | + | let hu = invoke(bs, "unstake", [toBase58String(dl), bW], nil) | |
1524 | + | if ((hu == hu)) | |
1537 | 1525 | then { | |
1538 | - | let | |
1539 | - | let | |
1540 | - | let | |
1541 | - | let | |
1542 | - | let | |
1543 | - | let | |
1526 | + | let dW = dh(toBase58String(eS.transactionId), toBase58String(dl), bW, eS.caller) | |
1527 | + | let dA = dW._1 | |
1528 | + | let dB = dW._2 | |
1529 | + | let do = parseIntValue(dW._9) | |
1530 | + | let dE = dW._10 | |
1531 | + | let hF = if (if (aY()) | |
1544 | 1532 | then true | |
1545 | - | else ( | |
1546 | - | then throw(("Get operation is blocked by admin. Status = " + toString( | |
1533 | + | else (do == n)) | |
1534 | + | then throw(("Get operation is blocked by admin. Status = " + toString(do))) | |
1547 | 1535 | else true | |
1548 | - | if (( | |
1536 | + | if ((hF == hF)) | |
1549 | 1537 | then { | |
1550 | - | let | |
1551 | - | if (( | |
1538 | + | let hz = invoke(aT, "burn", [bW], [AttachedPayment(dl, bW)]) | |
1539 | + | if ((hz == hz)) | |
1552 | 1540 | then { | |
1553 | - | let | |
1554 | - | let | |
1555 | - | let | |
1556 | - | let | |
1557 | - | if (( | |
1558 | - | then ( | |
1541 | + | let hG = eA(-(dA), -(dB), 0) | |
1542 | + | let gQ = hG._1 | |
1543 | + | let er = hG._2 | |
1544 | + | let gR = eE(ez, er) | |
1545 | + | if ((gR == gR)) | |
1546 | + | then (dE ++ gQ) | |
1559 | 1547 | else throw("Strict value is not equal to itself.") | |
1560 | 1548 | } | |
1561 | 1549 | else throw("Strict value is not equal to itself.") | |
1562 | 1550 | } | |
1563 | 1551 | else throw("Strict value is not equal to itself.") | |
1564 | 1552 | } | |
1565 | 1553 | else throw("Strict value is not equal to itself.") | |
1566 | 1554 | } | |
1567 | 1555 | else throw("Strict value is not equal to itself.") | |
1568 | 1556 | } | |
1569 | 1557 | else throw("Strict value is not equal to itself.") | |
1570 | 1558 | } | |
1571 | 1559 | ||
1572 | 1560 | ||
1573 | 1561 | ||
1574 | - | @Callable( | |
1575 | - | func unstakeAndGetNoLess ( | |
1576 | - | let | |
1562 | + | @Callable(eS) | |
1563 | + | func unstakeAndGetNoLess (ht,hH,hC) = { | |
1564 | + | let hk = if (aY()) | |
1577 | 1565 | then true | |
1578 | - | else ( | |
1579 | - | let | |
1566 | + | else (bl == n) | |
1567 | + | let fM = [if (!(hk)) | |
1580 | 1568 | then true | |
1581 | - | else throw("get operation is blocked by admin"), if ((size( | |
1569 | + | else throw("get operation is blocked by admin"), if ((size(eS.payments) == 0)) | |
1582 | 1570 | then true | |
1583 | 1571 | else throw("no payments are expected")] | |
1584 | - | if (( | |
1572 | + | if ((fM == fM)) | |
1585 | 1573 | then { | |
1586 | - | let | |
1587 | - | if (( | |
1574 | + | let ez = es(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1575 | + | if ((ez == ez)) | |
1588 | 1576 | then { | |
1589 | - | let | |
1590 | - | if (( | |
1577 | + | let hu = invoke(bs, "unstake", [toBase58String(bm), ht], nil) | |
1578 | + | if ((hu == hu)) | |
1591 | 1579 | then { | |
1592 | - | let | |
1593 | - | let | |
1594 | - | let | |
1595 | - | let | |
1596 | - | let | |
1580 | + | let dW = dh(toBase58String(eS.transactionId), toBase58String(bm), ht, eS.caller) | |
1581 | + | let dA = dW._1 | |
1582 | + | let dB = dW._2 | |
1583 | + | let dE = dW._10 | |
1584 | + | let hI = [if ((dA >= hH)) | |
1597 | 1585 | then true | |
1598 | - | else throw(makeString(["amount asset amount to receive is less than ", toString( | |
1586 | + | else throw(makeString(["amount asset amount to receive is less than ", toString(hH)], "")), if ((dB >= hC)) | |
1599 | 1587 | then true | |
1600 | - | else throw(makeString(["price asset amount to receive is less than ", toString( | |
1601 | - | if (( | |
1588 | + | else throw(makeString(["price asset amount to receive is less than ", toString(hC)], ""))] | |
1589 | + | if ((hI == hI)) | |
1602 | 1590 | then { | |
1603 | - | let | |
1604 | - | if (( | |
1591 | + | let hz = invoke(aT, "burn", [ht], [AttachedPayment(bm, ht)]) | |
1592 | + | if ((hz == hz)) | |
1605 | 1593 | then { | |
1606 | - | let | |
1607 | - | let | |
1608 | - | let | |
1609 | - | let | |
1610 | - | if (( | |
1611 | - | then ( | |
1594 | + | let hJ = eA(-(dA), -(dB), 0) | |
1595 | + | let gQ = hJ._1 | |
1596 | + | let er = hJ._2 | |
1597 | + | let gR = eE(ez, er) | |
1598 | + | if ((gR == gR)) | |
1599 | + | then (dE ++ gQ) | |
1612 | 1600 | else throw("Strict value is not equal to itself.") | |
1613 | 1601 | } | |
1614 | 1602 | else throw("Strict value is not equal to itself.") | |
1615 | 1603 | } | |
1616 | 1604 | else throw("Strict value is not equal to itself.") | |
1617 | 1605 | } | |
1618 | 1606 | else throw("Strict value is not equal to itself.") | |
1619 | 1607 | } | |
1620 | 1608 | else throw("Strict value is not equal to itself.") | |
1621 | 1609 | } | |
1622 | 1610 | else throw("Strict value is not equal to itself.") | |
1623 | 1611 | } | |
1624 | 1612 | ||
1625 | 1613 | ||
1626 | 1614 | ||
1627 | - | @Callable( | |
1628 | - | func activate ( | |
1615 | + | @Callable(eS) | |
1616 | + | func activate (hK,hL) = if ((toString(eS.caller) != toString(aT))) | |
1629 | 1617 | then throw("permissions denied") | |
1630 | - | else $Tuple2([StringEntry(ae(), | |
1618 | + | else $Tuple2([StringEntry(ae(), hK), StringEntry(af(), hL)], "success") | |
1631 | 1619 | ||
1632 | 1620 | ||
1633 | 1621 | ||
1634 | - | @Callable( | |
1622 | + | @Callable(eS) | |
1635 | 1623 | func refreshKLp () = { | |
1636 | - | let | |
1637 | - | let | |
1624 | + | let hM = valueOrElse(getInteger(ak), 0) | |
1625 | + | let hN = if (((height - hM) >= an)) | |
1638 | 1626 | then unit | |
1639 | - | else | |
1640 | - | if (( | |
1627 | + | else aQ(makeString([toString(an), " blocks have not passed since the previous call"], "")) | |
1628 | + | if ((hN == hN)) | |
1641 | 1629 | then { | |
1642 | - | let | |
1643 | - | let | |
1644 | - | let | |
1645 | - | let | |
1646 | - | let | |
1647 | - | then | |
1648 | - | else | |
1649 | - | $Tuple2( | |
1630 | + | let eL = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, aj), "0")), aS("invalid kLp")) | |
1631 | + | let hO = eA(0, 0, 0) | |
1632 | + | let hP = hO._1 | |
1633 | + | let er = hO._2 | |
1634 | + | let eD = if ((eL != er)) | |
1635 | + | then hP | |
1636 | + | else aQ("nothing to refresh") | |
1637 | + | $Tuple2(eD, toString(er)) | |
1650 | 1638 | } | |
1651 | 1639 | else throw("Strict value is not equal to itself.") | |
1652 | 1640 | } | |
1653 | 1641 | ||
1654 | 1642 | ||
1655 | 1643 | ||
1656 | - | @Callable( | |
1657 | - | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, | |
1644 | + | @Callable(eS) | |
1645 | + | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, ba()) | |
1658 | 1646 | ||
1659 | 1647 | ||
1660 | 1648 | ||
1661 | - | @Callable( | |
1662 | - | func getAccBalanceWrapperREADONLY ( | |
1649 | + | @Callable(eS) | |
1650 | + | func getAccBalanceWrapperREADONLY (ap) = $Tuple2(nil, bJ(ap)) | |
1663 | 1651 | ||
1664 | 1652 | ||
1665 | 1653 | ||
1666 | - | @Callable( | |
1667 | - | func calcPricesWrapperREADONLY ( | |
1668 | - | let | |
1669 | - | $Tuple2(nil, [toString( | |
1654 | + | @Callable(eS) | |
1655 | + | func calcPricesWrapperREADONLY (cS,cT,cX) = { | |
1656 | + | let dg = cW(cS, cT, cX) | |
1657 | + | $Tuple2(nil, [toString(dg[0]), toString(dg[1]), toString(dg[2])]) | |
1670 | 1658 | } | |
1671 | 1659 | ||
1672 | 1660 | ||
1673 | 1661 | ||
1674 | - | @Callable( | |
1662 | + | @Callable(eS) | |
1675 | 1663 | func toX18WrapperREADONLY (E,F) = $Tuple2(nil, toString(D(E, F))) | |
1676 | 1664 | ||
1677 | 1665 | ||
1678 | 1666 | ||
1679 | - | @Callable( | |
1667 | + | @Callable(eS) | |
1680 | 1668 | func fromX18WrapperREADONLY (I,J) = $Tuple2(nil, H(parseBigIntValue(I), J)) | |
1681 | 1669 | ||
1682 | 1670 | ||
1683 | 1671 | ||
1684 | - | @Callable( | |
1685 | - | func calcPriceBigIntWrapperREADONLY ( | |
1672 | + | @Callable(eS) | |
1673 | + | func calcPriceBigIntWrapperREADONLY (bN,bO) = $Tuple2(nil, toString(bM(parseBigIntValue(bN), parseBigIntValue(bO)))) | |
1686 | 1674 | ||
1687 | 1675 | ||
1688 | 1676 | ||
1689 | - | @Callable( | |
1690 | - | func estimatePutOperationWrapperREADONLY ( | |
1677 | + | @Callable(eS) | |
1678 | + | func estimatePutOperationWrapperREADONLY (di,dG,dH,dI,dJ,dK,ab,dL,dM) = $Tuple2(nil, dF(di, dG, dH, dI, dJ, dK, ab, dL, dM)) | |
1691 | 1679 | ||
1692 | 1680 | ||
1693 | 1681 | ||
1694 | - | @Callable( | |
1695 | - | func estimateGetOperationWrapperREADONLY ( | |
1696 | - | let | |
1697 | - | $Tuple2(nil, $Tuple10( | |
1682 | + | @Callable(eS) | |
1683 | + | func estimateGetOperationWrapperREADONLY (di,dj,dk,ab) = { | |
1684 | + | let dW = dh(di, dj, dk, addressFromStringValue(ab)) | |
1685 | + | $Tuple2(nil, $Tuple10(dW._1, dW._2, dW._3, dW._4, dW._5, dW._6, dW._7, toString(dW._8), dW._9, dW._10)) | |
1698 | 1686 | } | |
1699 | 1687 | ||
1700 | 1688 | ||
1701 | 1689 | ||
1702 | - | @Callable( | |
1690 | + | @Callable(eS) | |
1703 | 1691 | func statsREADONLY () = { | |
1704 | - | let | |
1705 | - | let | |
1706 | - | let | |
1707 | - | let | |
1708 | - | let | |
1709 | - | let | |
1710 | - | let | |
1711 | - | let | |
1712 | - | let | |
1713 | - | let | |
1714 | - | let | |
1715 | - | let | |
1692 | + | let cY = ba() | |
1693 | + | let dl = fromBase58String(cY[q]) | |
1694 | + | let hQ = cY[r] | |
1695 | + | let hR = cY[s] | |
1696 | + | let dP = cY[v] | |
1697 | + | let dQ = cY[w] | |
1698 | + | let cZ = parseIntValue(cY[t]) | |
1699 | + | let da = parseIntValue(cY[u]) | |
1700 | + | let hS = valueOrErrorMessage(assetInfo(dl), (("Asset " + toBase58String(dl)) + " doesn't exist")).quantity | |
1701 | + | let hT = bJ(hQ) | |
1702 | + | let hU = bJ(hR) | |
1703 | + | let hV = if ((hS == 0)) | |
1716 | 1704 | then [e, e, e] | |
1717 | - | else | |
1718 | - | let | |
1719 | - | let | |
1720 | - | let | |
1721 | - | let | |
1722 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString( | |
1705 | + | else cW(hT, hU, hS) | |
1706 | + | let dv = 0 | |
1707 | + | let hW = H(hV[1], b) | |
1708 | + | let hX = H(hV[2], b) | |
1709 | + | let hY = value(getInteger(aT, aD(toString(this)))) | |
1710 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(hT), toString(hU), toString(hS), toString(dv), toString(hW), toString(hX), toString(hY)], j)) | |
1723 | 1711 | } | |
1724 | 1712 | ||
1725 | 1713 | ||
1726 | 1714 | ||
1727 | - | @Callable( | |
1728 | - | func evaluatePutByAmountAssetREADONLY ( | |
1729 | - | let | |
1730 | - | let | |
1731 | - | let | |
1732 | - | let | |
1733 | - | let | |
1734 | - | let | |
1735 | - | let | |
1736 | - | let | |
1737 | - | let | |
1738 | - | let | |
1739 | - | let | |
1740 | - | let | |
1741 | - | let | |
1742 | - | let | |
1743 | - | let | |
1715 | + | @Callable(eS) | |
1716 | + | func evaluatePutByAmountAssetREADONLY (dH) = { | |
1717 | + | let cY = ba() | |
1718 | + | let dl = fromBase58String(cY[q]) | |
1719 | + | let dN = cY[r] | |
1720 | + | let dm = fromBase58String(dN) | |
1721 | + | let dO = cY[s] | |
1722 | + | let dn = fromBase58String(dO) | |
1723 | + | let cZ = parseIntValue(cY[t]) | |
1724 | + | let da = parseIntValue(cY[u]) | |
1725 | + | let do = cY[p] | |
1726 | + | let hS = valueOrErrorMessage(assetInfo(dl), (("Asset " + toBase58String(dl)) + " doesn't exist")).quantity | |
1727 | + | let hT = bJ(dN) | |
1728 | + | let hU = bJ(dO) | |
1729 | + | let cU = D(hT, cZ) | |
1730 | + | let cV = D(hU, da) | |
1731 | + | let du = if ((hS == 0)) | |
1744 | 1732 | then e | |
1745 | - | else | |
1746 | - | let | |
1747 | - | let | |
1748 | - | let | |
1749 | - | let | |
1750 | - | let | |
1751 | - | let | |
1752 | - | let | |
1753 | - | let | |
1754 | - | let | |
1755 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString( | |
1733 | + | else bM(cV, cU) | |
1734 | + | let dT = D(dH, cZ) | |
1735 | + | let dU = fraction(dT, du, d) | |
1736 | + | let dJ = H(dU, da) | |
1737 | + | let eY = dF("", 500000, dH, dm, dJ, dn, "", true, false) | |
1738 | + | let ee = eY._1 | |
1739 | + | let hZ = eY._3 | |
1740 | + | let dq = eY._4 | |
1741 | + | let ds = eY._5 | |
1742 | + | let dp = eY._6 | |
1743 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(ee), toString(H(du, b)), toString(dq), toString(ds), toString(dp), do, toString(dH), toString(dJ)], j)) | |
1756 | 1744 | } | |
1757 | 1745 | ||
1758 | 1746 | ||
1759 | 1747 | ||
1760 | - | @Callable( | |
1761 | - | func evaluatePutByPriceAssetREADONLY ( | |
1762 | - | let | |
1763 | - | let | |
1764 | - | let | |
1765 | - | let | |
1766 | - | let | |
1767 | - | let | |
1768 | - | let | |
1769 | - | let | |
1770 | - | let | |
1771 | - | let | |
1772 | - | let | |
1773 | - | let | |
1774 | - | let | |
1775 | - | let | |
1776 | - | let | |
1748 | + | @Callable(eS) | |
1749 | + | func evaluatePutByPriceAssetREADONLY (dJ) = { | |
1750 | + | let cY = ba() | |
1751 | + | let dl = fromBase58String(cY[q]) | |
1752 | + | let dN = cY[r] | |
1753 | + | let dm = fromBase58String(dN) | |
1754 | + | let dO = cY[s] | |
1755 | + | let dn = fromBase58String(dO) | |
1756 | + | let cZ = parseIntValue(cY[t]) | |
1757 | + | let da = parseIntValue(cY[u]) | |
1758 | + | let do = cY[p] | |
1759 | + | let hS = valueOrErrorMessage(assetInfo(dl), (("Asset " + toBase58String(dl)) + " doesn't exist")).quantity | |
1760 | + | let ia = bJ(dN) | |
1761 | + | let ib = bJ(dO) | |
1762 | + | let ic = D(ia, cZ) | |
1763 | + | let id = D(ib, da) | |
1764 | + | let du = if ((hS == 0)) | |
1777 | 1765 | then e | |
1778 | - | else | |
1779 | - | let | |
1780 | - | let | |
1781 | - | let | |
1782 | - | let | |
1783 | - | let | |
1784 | - | let | |
1785 | - | let | |
1786 | - | let | |
1787 | - | let | |
1788 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString( | |
1766 | + | else bM(id, ic) | |
1767 | + | let dU = D(dJ, da) | |
1768 | + | let dT = fraction(dU, d, du) | |
1769 | + | let dH = H(dT, cZ) | |
1770 | + | let eY = dF("", 500000, dH, dm, dJ, dn, "", true, false) | |
1771 | + | let ee = eY._1 | |
1772 | + | let hZ = eY._3 | |
1773 | + | let dq = eY._4 | |
1774 | + | let ds = eY._5 | |
1775 | + | let dp = eY._6 | |
1776 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(ee), toString(H(du, b)), toString(dq), toString(ds), toString(dp), do, toString(dH), toString(dJ)], j)) | |
1789 | 1777 | } | |
1790 | 1778 | ||
1791 | 1779 | ||
1792 | 1780 | ||
1793 | - | @Callable( | |
1794 | - | func evaluateGetREADONLY ( | |
1795 | - | let | |
1796 | - | let | |
1797 | - | let | |
1798 | - | let | |
1799 | - | let | |
1800 | - | let | |
1801 | - | let | |
1802 | - | let | |
1803 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString( | |
1781 | + | @Callable(eS) | |
1782 | + | func evaluateGetREADONLY (ie,if) = { | |
1783 | + | let dW = dh("", ie, if, this) | |
1784 | + | let dA = dW._1 | |
1785 | + | let dB = dW._2 | |
1786 | + | let dq = dW._5 | |
1787 | + | let ds = dW._6 | |
1788 | + | let dp = dW._7 | |
1789 | + | let dv = dW._8 | |
1790 | + | let do = parseIntValue(dW._9) | |
1791 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(dA), toString(dB), toString(dq), toString(ds), toString(dp), toString(dv), toString(do)], j)) | |
1804 | 1792 | } | |
1805 | 1793 | ||
1806 | 1794 | ||
1807 | - | @Verifier( | |
1808 | - | func | |
1809 | - | let | |
1810 | - | let | |
1811 | - | if ($isInstanceOf( | |
1795 | + | @Verifier(ig) | |
1796 | + | func ih () = { | |
1797 | + | let ii = { | |
1798 | + | let bT = ge() | |
1799 | + | if ($isInstanceOf(bT, "ByteVector")) | |
1812 | 1800 | then { | |
1813 | - | let | |
1814 | - | | |
1801 | + | let gi = bT | |
1802 | + | gi | |
1815 | 1803 | } | |
1816 | - | else if ($isInstanceOf( | |
1817 | - | then | |
1804 | + | else if ($isInstanceOf(bT, "Unit")) | |
1805 | + | then ig.senderPublicKey | |
1818 | 1806 | else throw("Match error") | |
1819 | 1807 | } | |
1820 | - | let | |
1821 | - | if ($isInstanceOf( | |
1808 | + | let bT = ig | |
1809 | + | if ($isInstanceOf(bT, "Order")) | |
1822 | 1810 | then { | |
1823 | - | let | |
1824 | - | let | |
1825 | - | let | |
1826 | - | let | |
1827 | - | let | |
1828 | - | let | |
1829 | - | let | |
1830 | - | if (if (if ( | |
1831 | - | then | |
1811 | + | let eH = bT | |
1812 | + | let ij = aZ() | |
1813 | + | let ik = eG(eH) | |
1814 | + | let aI = ik._1 | |
1815 | + | let aJ = ik._2 | |
1816 | + | let aK = sigVerify(eH.bodyBytes, eH.proofs[0], eH.senderPublicKey) | |
1817 | + | let aL = sigVerify(eH.bodyBytes, eH.proofs[1], ij) | |
1818 | + | if (if (if (aI) | |
1819 | + | then aK | |
1832 | 1820 | else false) | |
1833 | - | then | |
1821 | + | then aL | |
1834 | 1822 | else false) | |
1835 | 1823 | then true | |
1836 | - | else aJ | |
1824 | + | else aH(aI, aJ, aK, aL) | |
1837 | 1825 | } | |
1838 | - | else if ($isInstanceOf( | |
1826 | + | else if ($isInstanceOf(bT, "SetScriptTransaction")) | |
1839 | 1827 | then { | |
1840 | - | let | |
1841 | - | if (sigVerify( | |
1828 | + | let gf = bT | |
1829 | + | if (sigVerify(ig.bodyBytes, ig.proofs[0], ii)) | |
1842 | 1830 | then true | |
1843 | 1831 | else { | |
1844 | - | let | |
1845 | - | let | |
1846 | - | let | |
1847 | - | if (( | |
1848 | - | then ( | |
1832 | + | let il = blake2b256(value(gf.script)) | |
1833 | + | let im = fromBase64String(value(getString(aT, aF()))) | |
1834 | + | let in = scriptHash(this) | |
1835 | + | if ((im == il)) | |
1836 | + | then (in != il) | |
1849 | 1837 | else false | |
1850 | 1838 | } | |
1851 | 1839 | } | |
1852 | - | else sigVerify( | |
1840 | + | else sigVerify(ig.bodyBytes, ig.proofs[0], ii) | |
1853 | 1841 | } | |
1854 | 1842 |
github/deemru/w8io/169f3d6 670.96 ms ◑