tx · SW4DYDiJS8mTQTHcVvMZCrSmvYkzqn2JJSJTDyCgyVQ 3N1ytAUyhtig9X6F2hHHs1jbzYxr47Yp8Fr: -0.01700000 Waves 2024.12.20 11:19 [3422603] smart account 3N1ytAUyhtig9X6F2hHHs1jbzYxr47Yp8Fr > SELF 0.00000000 Waves
{ "type": 13, "id": "SW4DYDiJS8mTQTHcVvMZCrSmvYkzqn2JJSJTDyCgyVQ", "fee": 1700000, "feeAssetId": null, "timestamp": 1734682740129, "version": 2, "chainId": 84, "sender": "3N1ytAUyhtig9X6F2hHHs1jbzYxr47Yp8Fr", "senderPublicKey": "jXCTQV8PjX2uC9UHBFveupYy9cjhY7stHbzE9cptymw", "proofs": [ "4f5KnLPemK7U1Pk7D4YoGVqW4Zbuk1rK3MoG7oycFVp5v3PonmohVtUG2bynkx1ERoBF9HiwJGKXG6JYGWH9XMnK" ], "script": "base64:BwIxCAISAwoBCBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGDoACXNlcGFyYXRvcgICX18AC3dhdmVzU3RyaW5nAgVXQVZFUwAQY29udHJhY3RGaWxlbmFtZQIXbWVtZV9pbV9jYWxjdWxhdG9yLnJpZGUABW11bHQ4AIDC1y8BB3dyYXBFcnIBAXMJAKwCAgkArAICBRBjb250cmFjdEZpbGVuYW1lAgI6IAUBcwEIdGhyb3dFcnIBAXMJAAIBCQEHd3JhcEVycgEFAXMBD3ZhbGlkYXRlQWRkcmVzcwEHYWRkcmVzcwkBCWlzRGVmaW5lZAEJAKYIAQUHYWRkcmVzcwAMU1RBVFVTX0VNUFRZAAAADFNUQVRVU19SRUFEWQABABVTVEFUVVNfVEFSR0VUX1JFQUNIRUQAAgASU1RBVFVTX1RSQU5TRkVSUkVEAAMAC2RlZmF1bHRMb2dvAqYBPHN2ZyB3aWR0aD0nMzAnIGhlaWdodD0nMzAnIHhtbG5zPSdodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2Zyc+PGc+PGNpcmNsZSBjeD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HtJN Next: FZEFZsaSqaXyKCvpy8vzwP5SLByaLqgMypait27tGBq1 Diff:
Old | New | Differences | |
---|---|---|---|
197 | 197 | ||
198 | 198 | ||
199 | 199 | func ap (aq,ar) = { | |
200 | - | let as = ab(aq) | |
201 | - | let at = ab(ar) | |
202 | - | let au = makeString(["%s%s%s", "status", as, at], a) | |
203 | - | let av = valueOrElse(getString(P, au), "") | |
204 | - | (av == "active") | |
200 | + | let as = makeString(["%s%s%s", "status", aq, ar], a) | |
201 | + | let at = valueOrElse(getString(P, as), "") | |
202 | + | (at == "active") | |
205 | 203 | } | |
206 | 204 | ||
207 | 205 | ||
208 | - | @Callable( | |
209 | - | func init ( | |
210 | - | let | |
211 | - | if (( | |
212 | - | then [StringEntry(D, | |
206 | + | @Callable(au) | |
207 | + | func init (av) = { | |
208 | + | let aw = ae(au.caller) | |
209 | + | if ((aw == aw)) | |
210 | + | then [StringEntry(D, av)] | |
213 | 211 | else throw("Strict value is not equal to itself.") | |
214 | 212 | } | |
215 | 213 | ||
216 | 214 | ||
217 | 215 | ||
218 | - | @Callable( | |
219 | - | func addEmptyPool ( | |
220 | - | let | |
221 | - | let | |
222 | - | let | |
216 | + | @Callable(au) | |
217 | + | func addEmptyPool (ax,ay) = { | |
218 | + | let az = addressFromPublicKey(ax) | |
219 | + | let aA = (U + 1) | |
220 | + | let aB = [if (!(T)) | |
223 | 221 | then true | |
224 | - | else g("not allowed (shutdown)"), if (ag( | |
222 | + | else g("not allowed (shutdown)"), if (ag(az)) | |
225 | 223 | then true | |
226 | - | else g("pool script is not allowed"), if (!(ai( | |
224 | + | else g("pool script is not allowed"), if (!(ai(az))) | |
227 | 225 | then true | |
228 | 226 | else g("pool address is already registered")] | |
229 | - | if (( | |
227 | + | if ((aB == aB)) | |
230 | 228 | then { | |
231 | - | let | |
232 | - | $Tuple2(nil, | |
229 | + | let aC = [invoke(G, "integerEntry", [w, aA], nil), invoke(G, "stringEntry", [y(aA), toString(az)], nil), invoke(G, "integerEntry", [A(az), aA], nil), invoke(G, "integerEntry", [C(aA), j], nil)] | |
230 | + | $Tuple2(nil, aC) | |
233 | 231 | } | |
234 | 232 | else throw("Strict value is not equal to itself.") | |
235 | 233 | } | |
236 | 234 | ||
237 | 235 | ||
238 | 236 | ||
239 | - | @Callable( | |
240 | - | func createPool ( | |
241 | - | let | |
242 | - | let | |
237 | + | @Callable(au) | |
238 | + | func createPool (ax,ay) = { | |
239 | + | let aD = (W + X) | |
240 | + | let aB = [if (!(T)) | |
243 | 241 | then true | |
244 | - | else g("Temporary shutdown"), af( | |
242 | + | else g("Temporary shutdown"), af(au.caller), if (((U - V) > 0)) | |
245 | 243 | then true | |
246 | - | else g("No empty pool available"), if (( | |
244 | + | else g("No empty pool available"), if ((au.payments[0].assetId == unit)) | |
247 | 245 | then true | |
248 | - | else g("Payment should be in WAVES"), if (( | |
246 | + | else g("Payment should be in WAVES"), if ((au.payments[0].amount >= aD)) | |
249 | 247 | then true | |
250 | - | else g((("Payment should be greater or equal " + toString( | |
248 | + | else g((("Payment should be greater or equal " + toString(aD)) + " WAVELET")), if (isDefined(ay[0])) | |
251 | 249 | then true | |
252 | - | else g("Token name is not provided"), if (isDefined( | |
250 | + | else g("Token name is not provided"), if (isDefined(ay[1])) | |
253 | 251 | then true | |
254 | - | else g("Token description is not provided"), if (isDefined( | |
252 | + | else g("Token description is not provided"), if (isDefined(ay[2])) | |
255 | 253 | then true | |
256 | - | else g("Token quantity is not provided"), if ((parseInt( | |
254 | + | else g("Token quantity is not provided"), if ((parseInt(ay[2]) != unit)) | |
257 | 255 | then true | |
258 | 256 | else g("Token quantity should be a number")] | |
259 | - | if (( | |
257 | + | if ((aB == aB)) | |
260 | 258 | then { | |
261 | - | let | |
262 | - | let | |
263 | - | let aj = addressFromStringValue( | |
264 | - | let | |
265 | - | let | |
266 | - | let | |
267 | - | let | |
268 | - | let | |
269 | - | let | |
270 | - | let | |
271 | - | if (( | |
259 | + | let aE = (V + 1) | |
260 | + | let aF = getStringValue(G, y(aE)) | |
261 | + | let aj = addressFromStringValue(aF) | |
262 | + | let aG = addressFromPublicKey(ax) | |
263 | + | let aH = take(aF, 8) | |
264 | + | let aI = toString(aG) | |
265 | + | let aJ = ay[0] | |
266 | + | let aK = ay[1] | |
267 | + | let aL = ay[2] | |
268 | + | let aM = invoke(G, "initPoolInvoke", [aF, [aH, aI, aJ, aK, aL]], [AttachedPayment(au.payments[0].assetId, au.payments[0].amount)]) | |
269 | + | if ((aM == aM)) | |
272 | 270 | then { | |
273 | - | let | |
274 | - | $Tuple2(nil, | |
271 | + | let aC = [invoke(G, "integerEntry", [x, aE], nil), invoke(G, "integerEntry", [C(aE), k], nil)] | |
272 | + | $Tuple2(nil, aC) | |
275 | 273 | } | |
276 | 274 | else throw("Strict value is not equal to itself.") | |
277 | 275 | } | |
280 | 278 | ||
281 | 279 | ||
282 | 280 | ||
283 | - | @Callable( | |
284 | - | func notifyStatusUpdate ( | |
285 | - | let aj = addressFromPublicKey( | |
286 | - | let | |
281 | + | @Callable(au) | |
282 | + | func notifyStatusUpdate (ax,ay) = { | |
283 | + | let aj = addressFromPublicKey(ax) | |
284 | + | let aB = [if (ai(aj)) | |
287 | 285 | then true | |
288 | - | else g("pool not found"), af( | |
289 | - | if (( | |
286 | + | else g("pool not found"), af(au.caller)] | |
287 | + | if ((aB == aB)) | |
290 | 288 | then { | |
291 | - | let | |
292 | - | let | |
293 | - | let | |
294 | - | $Tuple2(nil, | |
289 | + | let aE = getIntegerValue(G, A(aj)) | |
290 | + | let aN = parseIntValue(ay[0]) | |
291 | + | let aC = [invoke(G, "integerEntry", [C(aE), aN], nil)] | |
292 | + | $Tuple2(nil, aC) | |
295 | 293 | } | |
296 | 294 | else throw("Strict value is not equal to itself.") | |
297 | 295 | } | |
298 | 296 | ||
299 | 297 | ||
300 | 298 | ||
301 | - | @Callable(aw) | |
302 | - | func swapREADONLY (az,aA) = { | |
303 | - | let aj = addressFromStringValue(aA[0]) | |
304 | - | let aQ = aA[1] | |
305 | - | let aR = aA[2] | |
306 | - | let aS = parseIntValue(aA[3]) | |
307 | - | let aD = [if (!(T)) | |
299 | + | @Callable(au) | |
300 | + | func isWxSwapActiveREADONLY (ax,ay) = { | |
301 | + | let aO = ay[1] | |
302 | + | let aP = ay[2] | |
303 | + | let aB = [af(au.caller)] | |
304 | + | if ((aB == aB)) | |
305 | + | then $Tuple2(nil, ap(aO, aP)) | |
306 | + | else throw("Strict value is not equal to itself.") | |
307 | + | } | |
308 | + | ||
309 | + | ||
310 | + | ||
311 | + | @Callable(au) | |
312 | + | func swapREADONLY (ax,ay) = { | |
313 | + | let aj = addressFromStringValue(ay[0]) | |
314 | + | let aO = ay[1] | |
315 | + | let aP = ay[2] | |
316 | + | let aQ = parseIntValue(ay[3]) | |
317 | + | let aB = [if (!(T)) | |
308 | 318 | then true | |
309 | - | else g("Temporary shutdown"), af( | |
310 | - | if (( | |
319 | + | else g("Temporary shutdown"), af(au.caller)] | |
320 | + | if ((aB == aB)) | |
311 | 321 | then if (al(aj)) | |
312 | 322 | then { | |
313 | - | let | |
314 | - | let | |
315 | - | if ($isInstanceOf( | |
316 | - | then | |
317 | - | else throw(($getType( | |
323 | + | let aR = { | |
324 | + | let aS = invoke(J, "swapCalculateREADONLY", [aQ, aO, aP], nil) | |
325 | + | if ($isInstanceOf(aS, "Int")) | |
326 | + | then aS | |
327 | + | else throw(($getType(aS) + " couldn't be cast to Int")) | |
318 | 328 | } | |
319 | - | $Tuple2(nil, $Tuple2( | |
329 | + | $Tuple2(nil, $Tuple2(aR, "WxSwap")) | |
320 | 330 | } | |
321 | 331 | else { | |
322 | - | let | |
323 | - | let | |
324 | - | if ($isInstanceOf( | |
325 | - | then | |
326 | - | else throw(($getType( | |
332 | + | let aT = { | |
333 | + | let aS = invoke(aj, "swapReadOnly", [aO, aP, aQ], nil) | |
334 | + | if ($isInstanceOf(aS, "Int")) | |
335 | + | then aS | |
336 | + | else throw(($getType(aS) + " couldn't be cast to Int")) | |
327 | 337 | } | |
328 | - | $Tuple2(nil, $Tuple2( | |
338 | + | $Tuple2(nil, $Tuple2(aT, "iMemePool")) | |
329 | 339 | } | |
330 | 340 | else throw("Strict value is not equal to itself.") | |
331 | 341 | } | |
332 | 342 | ||
333 | 343 | ||
334 | 344 | ||
335 | - | @Callable( | |
336 | - | func swap ( | |
337 | - | let | |
338 | - | let aj = addressFromStringValue( | |
339 | - | let | |
340 | - | let | |
341 | - | let | |
342 | - | let | |
343 | - | let | |
344 | - | let | |
345 | + | @Callable(au) | |
346 | + | func swap (ax,ay) = { | |
347 | + | let aG = addressFromPublicKey(ax) | |
348 | + | let aj = addressFromStringValue(ay[0]) | |
349 | + | let aP = ay[1] | |
350 | + | let aU = Z(aP) | |
351 | + | let aV = parseIntValue(ay[2]) | |
352 | + | let aW = au.payments[0].amount | |
353 | + | let aX = au.payments[0].assetId | |
354 | + | let aB = [if (!(T)) | |
345 | 355 | then true | |
346 | - | else g("Temporary shutdown"), af( | |
356 | + | else g("Temporary shutdown"), af(au.caller), if ((size(au.payments) == 1)) | |
347 | 357 | then true | |
348 | 358 | else g("exactly one payment is expected")] | |
349 | - | if (( | |
359 | + | if ((aB == aB)) | |
350 | 360 | then { | |
351 | - | let | |
352 | - | if (( | |
361 | + | let aY = am(this, aU) | |
362 | + | if ((aY == aY)) | |
353 | 363 | then { | |
354 | - | let | |
355 | - | then invoke(J, "swap", [ | |
356 | - | else invoke(aj, "swap", [ | |
357 | - | if (( | |
364 | + | let aZ = if (al(aj)) | |
365 | + | then invoke(J, "swap", [aV, aP, toString(this)], au.payments) | |
366 | + | else invoke(aj, "swap", [aP, aV], au.payments) | |
367 | + | if ((aZ == aZ)) | |
358 | 368 | then { | |
359 | - | let | |
360 | - | if (( | |
361 | - | then [ScriptTransfer( | |
369 | + | let ba = am(this, aU) | |
370 | + | if ((ba == ba)) | |
371 | + | then [ScriptTransfer(aG, (ba - aY), aU)] | |
362 | 372 | else throw("Strict value is not equal to itself.") | |
363 | 373 | } | |
364 | 374 | else throw("Strict value is not equal to itself.") | |
370 | 380 | ||
371 | 381 | ||
372 | 382 | ||
373 | - | @Callable( | |
374 | - | func transferPool ( | |
375 | - | let | |
376 | - | let aj = addressFromStringValue( | |
377 | - | let | |
378 | - | let | |
379 | - | let | |
380 | - | let | |
381 | - | then $Tuple2( | |
382 | - | else $Tuple2( | |
383 | - | let | |
384 | - | let | |
385 | - | let | |
386 | - | if (( | |
383 | + | @Callable(au) | |
384 | + | func transferPool (ax,ay) = { | |
385 | + | let aG = addressFromPublicKey(ax) | |
386 | + | let aj = addressFromStringValue(ay[0]) | |
387 | + | let bb = split(getStringValue(aj, u), ",") | |
388 | + | let bc = Z(bb[0]) | |
389 | + | let bd = Z(bb[1]) | |
390 | + | let be = if ((bc == unit)) | |
391 | + | then $Tuple2(bd, bc) | |
392 | + | else $Tuple2(bc, bd) | |
393 | + | let bf = be._1 | |
394 | + | let bg = be._2 | |
395 | + | let bh = am(G, bf) | |
396 | + | if ((bh == bh)) | |
387 | 397 | then { | |
388 | - | let | |
389 | - | if (( | |
398 | + | let bi = am(G, bg) | |
399 | + | if ((bi == bi)) | |
390 | 400 | then { | |
391 | - | let | |
392 | - | if (( | |
401 | + | let bj = invoke(G, "withdrawLiquidityFromPool", [aj.bytes], nil) | |
402 | + | if ((bj == bj)) | |
393 | 403 | then { | |
394 | - | let | |
395 | - | if (( | |
404 | + | let bk = am(G, bf) | |
405 | + | if ((bk == bk)) | |
396 | 406 | then { | |
397 | - | let | |
398 | - | if (( | |
407 | + | let bl = am(G, bg) | |
408 | + | if ((bl == bl)) | |
399 | 409 | then { | |
400 | - | let | |
401 | - | let | |
402 | - | if (if (( | |
403 | - | then ( | |
410 | + | let bm = (bk - bh) | |
411 | + | let bn = (bl - bi) | |
412 | + | if (if ((bm > 0)) | |
413 | + | then (bn > 0) | |
404 | 414 | else false) | |
405 | 415 | then { | |
406 | - | let | |
407 | - | let | |
408 | - | if (( | |
416 | + | let bo = fraction(bm, 20, 100) | |
417 | + | let bp = invoke(G, "burn", [bf, bo], nil) | |
418 | + | if ((bp == bp)) | |
409 | 419 | then { | |
410 | - | let | |
411 | - | let | |
412 | - | if (( | |
420 | + | let bq = fraction(bn, 20, 100) | |
421 | + | let br = invoke(G, "transferWaves", [M.bytes, bq], nil) | |
422 | + | if ((br == br)) | |
413 | 423 | then { | |
414 | - | let | |
415 | - | if (( | |
424 | + | let bs = invoke(G, "registerAsset", [S.bytes, ab(bf), n, true], nil) | |
425 | + | if ((bs == bs)) | |
416 | 426 | then { | |
417 | - | let | |
418 | - | if (( | |
427 | + | let bt = invoke(G, "createWxPool", [P.bytes, ab(bf), (bm - bo), ab(bg), (bn - bq)], nil) | |
428 | + | if ((bt == bt)) | |
419 | 429 | then { | |
420 | - | let | |
421 | - | if (( | |
430 | + | let bu = invoke(G, "integerEntry", [C(ak(aj)), m], nil) | |
431 | + | if ((bu == bu)) | |
422 | 432 | then nil | |
423 | 433 | else throw("Strict value is not equal to itself.") | |
424 | 434 | } | |
444 | 454 | } | |
445 | 455 | ||
446 | 456 | ||
447 | - | @Verifier( | |
448 | - | func | |
449 | - | let | |
450 | - | let | |
451 | - | let | |
452 | - | let | |
457 | + | @Verifier(bv) | |
458 | + | func bw () = { | |
459 | + | let bx = "%s__adminAddressList" | |
460 | + | let by = "%s__txId" | |
461 | + | let bz = split(valueOrElse(getString(G, bx), ""), "__") | |
462 | + | let bA = if ((size(bz) >= 3)) | |
453 | 463 | then false | |
454 | - | else sigVerify( | |
455 | - | let | |
456 | - | if ( | |
464 | + | else sigVerify(bv.bodyBytes, bv.proofs[0], bv.senderPublicKey) | |
465 | + | let bB = (bv.id == fromBase58String(valueOrElse(getString(G, by), ""))) | |
466 | + | if (bB) | |
457 | 467 | then true | |
458 | - | else | |
468 | + | else bA | |
459 | 469 | } | |
460 | 470 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 7 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "__" | |
5 | 5 | ||
6 | 6 | let b = "WAVES" | |
7 | 7 | ||
8 | 8 | let c = "meme_im_calculator.ride" | |
9 | 9 | ||
10 | 10 | let d = 100000000 | |
11 | 11 | ||
12 | 12 | func e (f) = ((c + ": ") + f) | |
13 | 13 | ||
14 | 14 | ||
15 | 15 | func g (f) = throw(e(f)) | |
16 | 16 | ||
17 | 17 | ||
18 | 18 | func h (i) = isDefined(addressFromString(i)) | |
19 | 19 | ||
20 | 20 | ||
21 | 21 | let j = 0 | |
22 | 22 | ||
23 | 23 | let k = 1 | |
24 | 24 | ||
25 | 25 | let l = 2 | |
26 | 26 | ||
27 | 27 | let m = 3 | |
28 | 28 | ||
29 | 29 | let n = "<svg width='30' height='30' xmlns='http://www.w3.org/2000/svg'><g><circle cx='15' cy='15' fill='#ccc' r='15'/><text x='1' y='18' font-size='10'>iMeme</text></g></svg>" | |
30 | 30 | ||
31 | 31 | let o = "shutdown__flag" | |
32 | 32 | ||
33 | 33 | let p = "price__asset" | |
34 | 34 | ||
35 | 35 | let q = "listing__volume" | |
36 | 36 | ||
37 | 37 | let r = "setup__creationFee" | |
38 | 38 | ||
39 | 39 | let s = "setup__curveTarget" | |
40 | 40 | ||
41 | 41 | let t = "setup__virtualLiquidity" | |
42 | 42 | ||
43 | 43 | let u = "static_tokenIds" | |
44 | 44 | ||
45 | 45 | let v = "pool__contract__hash" | |
46 | 46 | ||
47 | 47 | let w = "last__empty_pool__index" | |
48 | 48 | ||
49 | 49 | let x = "first__empty__pool__index" | |
50 | 50 | ||
51 | 51 | func y (z) = makeString(["pool", toString(z)], a) | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | func A (i) = makeString(["pool", toString(i)], a) | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func B (i) = makeString(["asset", toString(i)], a) | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | func C (z) = makeString(["pool", "status", toString(z)], a) | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | let D = "factory__address" | |
64 | 64 | ||
65 | 65 | let E = { | |
66 | 66 | let F = getString(this, D) | |
67 | 67 | if ($isInstanceOf(F, "String")) | |
68 | 68 | then { | |
69 | 69 | let f = F | |
70 | 70 | addressFromString(f) | |
71 | 71 | } | |
72 | 72 | else if ($isInstanceOf(F, "Unit")) | |
73 | 73 | then unit | |
74 | 74 | else throw("Match error") | |
75 | 75 | } | |
76 | 76 | ||
77 | 77 | let G = valueOrErrorMessage(E, e("invalid factory address")) | |
78 | 78 | ||
79 | 79 | let H = "wxswap__address" | |
80 | 80 | ||
81 | 81 | let I = { | |
82 | 82 | let F = getString(G, H) | |
83 | 83 | if ($isInstanceOf(F, "String")) | |
84 | 84 | then { | |
85 | 85 | let f = F | |
86 | 86 | addressFromString(f) | |
87 | 87 | } | |
88 | 88 | else unit | |
89 | 89 | } | |
90 | 90 | ||
91 | 91 | let J = valueOrErrorMessage(I, e("invalid wx swap address")) | |
92 | 92 | ||
93 | 93 | let K = "wxfee_address" | |
94 | 94 | ||
95 | 95 | let L = { | |
96 | 96 | let F = getString(G, K) | |
97 | 97 | if ($isInstanceOf(F, "String")) | |
98 | 98 | then { | |
99 | 99 | let f = F | |
100 | 100 | addressFromString(f) | |
101 | 101 | } | |
102 | 102 | else unit | |
103 | 103 | } | |
104 | 104 | ||
105 | 105 | let M = valueOrErrorMessage(L, e("invalid fee collector address")) | |
106 | 106 | ||
107 | 107 | let N = "userpools_address" | |
108 | 108 | ||
109 | 109 | let O = { | |
110 | 110 | let F = getString(G, N) | |
111 | 111 | if ($isInstanceOf(F, "String")) | |
112 | 112 | then { | |
113 | 113 | let f = F | |
114 | 114 | addressFromString(f) | |
115 | 115 | } | |
116 | 116 | else unit | |
117 | 117 | } | |
118 | 118 | ||
119 | 119 | let P = valueOrErrorMessage(O, e("invalid user_pools dapp address")) | |
120 | 120 | ||
121 | 121 | let Q = "assetstore_address" | |
122 | 122 | ||
123 | 123 | let R = { | |
124 | 124 | let F = getString(G, Q) | |
125 | 125 | if ($isInstanceOf(F, "String")) | |
126 | 126 | then { | |
127 | 127 | let f = F | |
128 | 128 | addressFromString(f) | |
129 | 129 | } | |
130 | 130 | else unit | |
131 | 131 | } | |
132 | 132 | ||
133 | 133 | let S = valueOrErrorMessage(R, e("invalid asset_store dapp address")) | |
134 | 134 | ||
135 | 135 | let T = valueOrElse(getBoolean(G, o), false) | |
136 | 136 | ||
137 | 137 | let U = valueOrElse(getInteger(G, w), 0) | |
138 | 138 | ||
139 | 139 | let V = valueOrElse(getInteger(G, x), 0) | |
140 | 140 | ||
141 | 141 | let W = valueOrElse(getInteger(G, q), 0) | |
142 | 142 | ||
143 | 143 | let X = valueOrElse(getInteger(G, r), 0) | |
144 | 144 | ||
145 | 145 | let Y = getBinary(G, v) | |
146 | 146 | ||
147 | 147 | func Z (aa) = if ((aa == b)) | |
148 | 148 | then unit | |
149 | 149 | else fromBase58String(aa) | |
150 | 150 | ||
151 | 151 | ||
152 | 152 | func ab (aa) = if ((aa == unit)) | |
153 | 153 | then b | |
154 | 154 | else toBase58String(value(aa)) | |
155 | 155 | ||
156 | 156 | ||
157 | 157 | func ac (ad,i) = if ((ad == i)) | |
158 | 158 | then true | |
159 | 159 | else g("permission denied") | |
160 | 160 | ||
161 | 161 | ||
162 | 162 | func ae (ad) = ac(ad, this) | |
163 | 163 | ||
164 | 164 | ||
165 | 165 | func af (ad) = ac(ad, G) | |
166 | 166 | ||
167 | 167 | ||
168 | 168 | func ag (i) = { | |
169 | 169 | let F = Y | |
170 | 170 | if ($isInstanceOf(F, "ByteVector")) | |
171 | 171 | then { | |
172 | 172 | let ah = F | |
173 | 173 | (scriptHash(i) == ah) | |
174 | 174 | } | |
175 | 175 | else true | |
176 | 176 | } | |
177 | 177 | ||
178 | 178 | ||
179 | 179 | func ai (aj) = isDefined(getInteger(G, A(aj))) | |
180 | 180 | ||
181 | 181 | ||
182 | 182 | func ak (aj) = valueOrErrorMessage(getInteger(G, A(aj)), "pool doesn't exists") | |
183 | 183 | ||
184 | 184 | ||
185 | 185 | func al (aj) = (valueOrElse(getInteger(G, C(ak(aj))), -1) == l) | |
186 | 186 | ||
187 | 187 | ||
188 | 188 | func am (i,an) = { | |
189 | 189 | let F = an | |
190 | 190 | if ($isInstanceOf(F, "ByteVector")) | |
191 | 191 | then { | |
192 | 192 | let ao = F | |
193 | 193 | assetBalance(i, ao) | |
194 | 194 | } | |
195 | 195 | else wavesBalance(i).available | |
196 | 196 | } | |
197 | 197 | ||
198 | 198 | ||
199 | 199 | func ap (aq,ar) = { | |
200 | - | let as = ab(aq) | |
201 | - | let at = ab(ar) | |
202 | - | let au = makeString(["%s%s%s", "status", as, at], a) | |
203 | - | let av = valueOrElse(getString(P, au), "") | |
204 | - | (av == "active") | |
200 | + | let as = makeString(["%s%s%s", "status", aq, ar], a) | |
201 | + | let at = valueOrElse(getString(P, as), "") | |
202 | + | (at == "active") | |
205 | 203 | } | |
206 | 204 | ||
207 | 205 | ||
208 | - | @Callable( | |
209 | - | func init ( | |
210 | - | let | |
211 | - | if (( | |
212 | - | then [StringEntry(D, | |
206 | + | @Callable(au) | |
207 | + | func init (av) = { | |
208 | + | let aw = ae(au.caller) | |
209 | + | if ((aw == aw)) | |
210 | + | then [StringEntry(D, av)] | |
213 | 211 | else throw("Strict value is not equal to itself.") | |
214 | 212 | } | |
215 | 213 | ||
216 | 214 | ||
217 | 215 | ||
218 | - | @Callable( | |
219 | - | func addEmptyPool ( | |
220 | - | let | |
221 | - | let | |
222 | - | let | |
216 | + | @Callable(au) | |
217 | + | func addEmptyPool (ax,ay) = { | |
218 | + | let az = addressFromPublicKey(ax) | |
219 | + | let aA = (U + 1) | |
220 | + | let aB = [if (!(T)) | |
223 | 221 | then true | |
224 | - | else g("not allowed (shutdown)"), if (ag( | |
222 | + | else g("not allowed (shutdown)"), if (ag(az)) | |
225 | 223 | then true | |
226 | - | else g("pool script is not allowed"), if (!(ai( | |
224 | + | else g("pool script is not allowed"), if (!(ai(az))) | |
227 | 225 | then true | |
228 | 226 | else g("pool address is already registered")] | |
229 | - | if (( | |
227 | + | if ((aB == aB)) | |
230 | 228 | then { | |
231 | - | let | |
232 | - | $Tuple2(nil, | |
229 | + | let aC = [invoke(G, "integerEntry", [w, aA], nil), invoke(G, "stringEntry", [y(aA), toString(az)], nil), invoke(G, "integerEntry", [A(az), aA], nil), invoke(G, "integerEntry", [C(aA), j], nil)] | |
230 | + | $Tuple2(nil, aC) | |
233 | 231 | } | |
234 | 232 | else throw("Strict value is not equal to itself.") | |
235 | 233 | } | |
236 | 234 | ||
237 | 235 | ||
238 | 236 | ||
239 | - | @Callable( | |
240 | - | func createPool ( | |
241 | - | let | |
242 | - | let | |
237 | + | @Callable(au) | |
238 | + | func createPool (ax,ay) = { | |
239 | + | let aD = (W + X) | |
240 | + | let aB = [if (!(T)) | |
243 | 241 | then true | |
244 | - | else g("Temporary shutdown"), af( | |
242 | + | else g("Temporary shutdown"), af(au.caller), if (((U - V) > 0)) | |
245 | 243 | then true | |
246 | - | else g("No empty pool available"), if (( | |
244 | + | else g("No empty pool available"), if ((au.payments[0].assetId == unit)) | |
247 | 245 | then true | |
248 | - | else g("Payment should be in WAVES"), if (( | |
246 | + | else g("Payment should be in WAVES"), if ((au.payments[0].amount >= aD)) | |
249 | 247 | then true | |
250 | - | else g((("Payment should be greater or equal " + toString( | |
248 | + | else g((("Payment should be greater or equal " + toString(aD)) + " WAVELET")), if (isDefined(ay[0])) | |
251 | 249 | then true | |
252 | - | else g("Token name is not provided"), if (isDefined( | |
250 | + | else g("Token name is not provided"), if (isDefined(ay[1])) | |
253 | 251 | then true | |
254 | - | else g("Token description is not provided"), if (isDefined( | |
252 | + | else g("Token description is not provided"), if (isDefined(ay[2])) | |
255 | 253 | then true | |
256 | - | else g("Token quantity is not provided"), if ((parseInt( | |
254 | + | else g("Token quantity is not provided"), if ((parseInt(ay[2]) != unit)) | |
257 | 255 | then true | |
258 | 256 | else g("Token quantity should be a number")] | |
259 | - | if (( | |
257 | + | if ((aB == aB)) | |
260 | 258 | then { | |
261 | - | let | |
262 | - | let | |
263 | - | let aj = addressFromStringValue( | |
264 | - | let | |
265 | - | let | |
266 | - | let | |
267 | - | let | |
268 | - | let | |
269 | - | let | |
270 | - | let | |
271 | - | if (( | |
259 | + | let aE = (V + 1) | |
260 | + | let aF = getStringValue(G, y(aE)) | |
261 | + | let aj = addressFromStringValue(aF) | |
262 | + | let aG = addressFromPublicKey(ax) | |
263 | + | let aH = take(aF, 8) | |
264 | + | let aI = toString(aG) | |
265 | + | let aJ = ay[0] | |
266 | + | let aK = ay[1] | |
267 | + | let aL = ay[2] | |
268 | + | let aM = invoke(G, "initPoolInvoke", [aF, [aH, aI, aJ, aK, aL]], [AttachedPayment(au.payments[0].assetId, au.payments[0].amount)]) | |
269 | + | if ((aM == aM)) | |
272 | 270 | then { | |
273 | - | let | |
274 | - | $Tuple2(nil, | |
271 | + | let aC = [invoke(G, "integerEntry", [x, aE], nil), invoke(G, "integerEntry", [C(aE), k], nil)] | |
272 | + | $Tuple2(nil, aC) | |
275 | 273 | } | |
276 | 274 | else throw("Strict value is not equal to itself.") | |
277 | 275 | } | |
278 | 276 | else throw("Strict value is not equal to itself.") | |
279 | 277 | } | |
280 | 278 | ||
281 | 279 | ||
282 | 280 | ||
283 | - | @Callable( | |
284 | - | func notifyStatusUpdate ( | |
285 | - | let aj = addressFromPublicKey( | |
286 | - | let | |
281 | + | @Callable(au) | |
282 | + | func notifyStatusUpdate (ax,ay) = { | |
283 | + | let aj = addressFromPublicKey(ax) | |
284 | + | let aB = [if (ai(aj)) | |
287 | 285 | then true | |
288 | - | else g("pool not found"), af( | |
289 | - | if (( | |
286 | + | else g("pool not found"), af(au.caller)] | |
287 | + | if ((aB == aB)) | |
290 | 288 | then { | |
291 | - | let | |
292 | - | let | |
293 | - | let | |
294 | - | $Tuple2(nil, | |
289 | + | let aE = getIntegerValue(G, A(aj)) | |
290 | + | let aN = parseIntValue(ay[0]) | |
291 | + | let aC = [invoke(G, "integerEntry", [C(aE), aN], nil)] | |
292 | + | $Tuple2(nil, aC) | |
295 | 293 | } | |
296 | 294 | else throw("Strict value is not equal to itself.") | |
297 | 295 | } | |
298 | 296 | ||
299 | 297 | ||
300 | 298 | ||
301 | - | @Callable(aw) | |
302 | - | func swapREADONLY (az,aA) = { | |
303 | - | let aj = addressFromStringValue(aA[0]) | |
304 | - | let aQ = aA[1] | |
305 | - | let aR = aA[2] | |
306 | - | let aS = parseIntValue(aA[3]) | |
307 | - | let aD = [if (!(T)) | |
299 | + | @Callable(au) | |
300 | + | func isWxSwapActiveREADONLY (ax,ay) = { | |
301 | + | let aO = ay[1] | |
302 | + | let aP = ay[2] | |
303 | + | let aB = [af(au.caller)] | |
304 | + | if ((aB == aB)) | |
305 | + | then $Tuple2(nil, ap(aO, aP)) | |
306 | + | else throw("Strict value is not equal to itself.") | |
307 | + | } | |
308 | + | ||
309 | + | ||
310 | + | ||
311 | + | @Callable(au) | |
312 | + | func swapREADONLY (ax,ay) = { | |
313 | + | let aj = addressFromStringValue(ay[0]) | |
314 | + | let aO = ay[1] | |
315 | + | let aP = ay[2] | |
316 | + | let aQ = parseIntValue(ay[3]) | |
317 | + | let aB = [if (!(T)) | |
308 | 318 | then true | |
309 | - | else g("Temporary shutdown"), af( | |
310 | - | if (( | |
319 | + | else g("Temporary shutdown"), af(au.caller)] | |
320 | + | if ((aB == aB)) | |
311 | 321 | then if (al(aj)) | |
312 | 322 | then { | |
313 | - | let | |
314 | - | let | |
315 | - | if ($isInstanceOf( | |
316 | - | then | |
317 | - | else throw(($getType( | |
323 | + | let aR = { | |
324 | + | let aS = invoke(J, "swapCalculateREADONLY", [aQ, aO, aP], nil) | |
325 | + | if ($isInstanceOf(aS, "Int")) | |
326 | + | then aS | |
327 | + | else throw(($getType(aS) + " couldn't be cast to Int")) | |
318 | 328 | } | |
319 | - | $Tuple2(nil, $Tuple2( | |
329 | + | $Tuple2(nil, $Tuple2(aR, "WxSwap")) | |
320 | 330 | } | |
321 | 331 | else { | |
322 | - | let | |
323 | - | let | |
324 | - | if ($isInstanceOf( | |
325 | - | then | |
326 | - | else throw(($getType( | |
332 | + | let aT = { | |
333 | + | let aS = invoke(aj, "swapReadOnly", [aO, aP, aQ], nil) | |
334 | + | if ($isInstanceOf(aS, "Int")) | |
335 | + | then aS | |
336 | + | else throw(($getType(aS) + " couldn't be cast to Int")) | |
327 | 337 | } | |
328 | - | $Tuple2(nil, $Tuple2( | |
338 | + | $Tuple2(nil, $Tuple2(aT, "iMemePool")) | |
329 | 339 | } | |
330 | 340 | else throw("Strict value is not equal to itself.") | |
331 | 341 | } | |
332 | 342 | ||
333 | 343 | ||
334 | 344 | ||
335 | - | @Callable( | |
336 | - | func swap ( | |
337 | - | let | |
338 | - | let aj = addressFromStringValue( | |
339 | - | let | |
340 | - | let | |
341 | - | let | |
342 | - | let | |
343 | - | let | |
344 | - | let | |
345 | + | @Callable(au) | |
346 | + | func swap (ax,ay) = { | |
347 | + | let aG = addressFromPublicKey(ax) | |
348 | + | let aj = addressFromStringValue(ay[0]) | |
349 | + | let aP = ay[1] | |
350 | + | let aU = Z(aP) | |
351 | + | let aV = parseIntValue(ay[2]) | |
352 | + | let aW = au.payments[0].amount | |
353 | + | let aX = au.payments[0].assetId | |
354 | + | let aB = [if (!(T)) | |
345 | 355 | then true | |
346 | - | else g("Temporary shutdown"), af( | |
356 | + | else g("Temporary shutdown"), af(au.caller), if ((size(au.payments) == 1)) | |
347 | 357 | then true | |
348 | 358 | else g("exactly one payment is expected")] | |
349 | - | if (( | |
359 | + | if ((aB == aB)) | |
350 | 360 | then { | |
351 | - | let | |
352 | - | if (( | |
361 | + | let aY = am(this, aU) | |
362 | + | if ((aY == aY)) | |
353 | 363 | then { | |
354 | - | let | |
355 | - | then invoke(J, "swap", [ | |
356 | - | else invoke(aj, "swap", [ | |
357 | - | if (( | |
364 | + | let aZ = if (al(aj)) | |
365 | + | then invoke(J, "swap", [aV, aP, toString(this)], au.payments) | |
366 | + | else invoke(aj, "swap", [aP, aV], au.payments) | |
367 | + | if ((aZ == aZ)) | |
358 | 368 | then { | |
359 | - | let | |
360 | - | if (( | |
361 | - | then [ScriptTransfer( | |
369 | + | let ba = am(this, aU) | |
370 | + | if ((ba == ba)) | |
371 | + | then [ScriptTransfer(aG, (ba - aY), aU)] | |
362 | 372 | else throw("Strict value is not equal to itself.") | |
363 | 373 | } | |
364 | 374 | else throw("Strict value is not equal to itself.") | |
365 | 375 | } | |
366 | 376 | else throw("Strict value is not equal to itself.") | |
367 | 377 | } | |
368 | 378 | else throw("Strict value is not equal to itself.") | |
369 | 379 | } | |
370 | 380 | ||
371 | 381 | ||
372 | 382 | ||
373 | - | @Callable( | |
374 | - | func transferPool ( | |
375 | - | let | |
376 | - | let aj = addressFromStringValue( | |
377 | - | let | |
378 | - | let | |
379 | - | let | |
380 | - | let | |
381 | - | then $Tuple2( | |
382 | - | else $Tuple2( | |
383 | - | let | |
384 | - | let | |
385 | - | let | |
386 | - | if (( | |
383 | + | @Callable(au) | |
384 | + | func transferPool (ax,ay) = { | |
385 | + | let aG = addressFromPublicKey(ax) | |
386 | + | let aj = addressFromStringValue(ay[0]) | |
387 | + | let bb = split(getStringValue(aj, u), ",") | |
388 | + | let bc = Z(bb[0]) | |
389 | + | let bd = Z(bb[1]) | |
390 | + | let be = if ((bc == unit)) | |
391 | + | then $Tuple2(bd, bc) | |
392 | + | else $Tuple2(bc, bd) | |
393 | + | let bf = be._1 | |
394 | + | let bg = be._2 | |
395 | + | let bh = am(G, bf) | |
396 | + | if ((bh == bh)) | |
387 | 397 | then { | |
388 | - | let | |
389 | - | if (( | |
398 | + | let bi = am(G, bg) | |
399 | + | if ((bi == bi)) | |
390 | 400 | then { | |
391 | - | let | |
392 | - | if (( | |
401 | + | let bj = invoke(G, "withdrawLiquidityFromPool", [aj.bytes], nil) | |
402 | + | if ((bj == bj)) | |
393 | 403 | then { | |
394 | - | let | |
395 | - | if (( | |
404 | + | let bk = am(G, bf) | |
405 | + | if ((bk == bk)) | |
396 | 406 | then { | |
397 | - | let | |
398 | - | if (( | |
407 | + | let bl = am(G, bg) | |
408 | + | if ((bl == bl)) | |
399 | 409 | then { | |
400 | - | let | |
401 | - | let | |
402 | - | if (if (( | |
403 | - | then ( | |
410 | + | let bm = (bk - bh) | |
411 | + | let bn = (bl - bi) | |
412 | + | if (if ((bm > 0)) | |
413 | + | then (bn > 0) | |
404 | 414 | else false) | |
405 | 415 | then { | |
406 | - | let | |
407 | - | let | |
408 | - | if (( | |
416 | + | let bo = fraction(bm, 20, 100) | |
417 | + | let bp = invoke(G, "burn", [bf, bo], nil) | |
418 | + | if ((bp == bp)) | |
409 | 419 | then { | |
410 | - | let | |
411 | - | let | |
412 | - | if (( | |
420 | + | let bq = fraction(bn, 20, 100) | |
421 | + | let br = invoke(G, "transferWaves", [M.bytes, bq], nil) | |
422 | + | if ((br == br)) | |
413 | 423 | then { | |
414 | - | let | |
415 | - | if (( | |
424 | + | let bs = invoke(G, "registerAsset", [S.bytes, ab(bf), n, true], nil) | |
425 | + | if ((bs == bs)) | |
416 | 426 | then { | |
417 | - | let | |
418 | - | if (( | |
427 | + | let bt = invoke(G, "createWxPool", [P.bytes, ab(bf), (bm - bo), ab(bg), (bn - bq)], nil) | |
428 | + | if ((bt == bt)) | |
419 | 429 | then { | |
420 | - | let | |
421 | - | if (( | |
430 | + | let bu = invoke(G, "integerEntry", [C(ak(aj)), m], nil) | |
431 | + | if ((bu == bu)) | |
422 | 432 | then nil | |
423 | 433 | else throw("Strict value is not equal to itself.") | |
424 | 434 | } | |
425 | 435 | else throw("Strict value is not equal to itself.") | |
426 | 436 | } | |
427 | 437 | else throw("Strict value is not equal to itself.") | |
428 | 438 | } | |
429 | 439 | else throw("Strict value is not equal to itself.") | |
430 | 440 | } | |
431 | 441 | else throw("Strict value is not equal to itself.") | |
432 | 442 | } | |
433 | 443 | else g("withdrawn amount from pool is too low") | |
434 | 444 | } | |
435 | 445 | else throw("Strict value is not equal to itself.") | |
436 | 446 | } | |
437 | 447 | else throw("Strict value is not equal to itself.") | |
438 | 448 | } | |
439 | 449 | else throw("Strict value is not equal to itself.") | |
440 | 450 | } | |
441 | 451 | else throw("Strict value is not equal to itself.") | |
442 | 452 | } | |
443 | 453 | else throw("Strict value is not equal to itself.") | |
444 | 454 | } | |
445 | 455 | ||
446 | 456 | ||
447 | - | @Verifier( | |
448 | - | func | |
449 | - | let | |
450 | - | let | |
451 | - | let | |
452 | - | let | |
457 | + | @Verifier(bv) | |
458 | + | func bw () = { | |
459 | + | let bx = "%s__adminAddressList" | |
460 | + | let by = "%s__txId" | |
461 | + | let bz = split(valueOrElse(getString(G, bx), ""), "__") | |
462 | + | let bA = if ((size(bz) >= 3)) | |
453 | 463 | then false | |
454 | - | else sigVerify( | |
455 | - | let | |
456 | - | if ( | |
464 | + | else sigVerify(bv.bodyBytes, bv.proofs[0], bv.senderPublicKey) | |
465 | + | let bB = (bv.id == fromBase58String(valueOrElse(getString(G, by), ""))) | |
466 | + | if (bB) | |
457 | 467 | then true | |
458 | - | else | |
468 | + | else bA | |
459 | 469 | } | |
460 | 470 |
github/deemru/w8io/169f3d6 110.85 ms ◑