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