tx · Bvw6u6GTGPf6eG5b2vv3CR4nqVRUFBtTj1xeXpTFn4ib

3N2j6yXv5aLx1DTVGpwUmJHKZb5XwMfWZhk:  -0.05000000 Waves

2022.07.13 18:44 [2138155] smart account 3N2j6yXv5aLx1DTVGpwUmJHKZb5XwMfWZhk > SELF 0.00000000 Waves

{ "type": 13, "id": "Bvw6u6GTGPf6eG5b2vv3CR4nqVRUFBtTj1xeXpTFn4ib", "fee": 5000000, "feeAssetId": null, "timestamp": 1657727189655, "version": 2, "chainId": 84, "sender": "3N2j6yXv5aLx1DTVGpwUmJHKZb5XwMfWZhk", "senderPublicKey": "8ZzMCsQ15BKiHk944146A5WQ8eSFd8vaff4xaktCKSBK", "proofs": [ "5Ei1zjNGjNYPzkdaWX3dqHnFzemmcdLyikJnSZRmk3iXRJfKbVHV4Kv5ErjLNuoATZXjzBKUdcZnSiefHxBRkR9d" ], "script": "base64:BgIMCAISABIAEgQKAggIEAAJc2VwYXJhdG9yAgFfAQ1nZXRQYWlyTGVuZ3RoAAkBC3ZhbHVlT3JFbHNlAgkAmggCBQR0aGlzAgpwYWlyTGVuZ3RoAAABDXNldFBhaXJMZW5naHQBCW5ld0xlbmd0aAkBDEludGVnZXJFbnRyeQICCnBhaXJMZW5ndGgFCW5ld0xlbmd0aAEKZ2V0UGFpcktleQIGdG9rZW4wBnRva2VuMQQIdG9rZW4wQlYJALEJAQkA2QQBBQZ0b2tlbjAECHRva2VuMUJWCQCxCQEJANkEAQUGdG9rZW4xAwkAZgIFCHRva2VuMUJWBQh0b2tlbjBCVgkAuQkCCQDMCAIFBnRva2VuMAkAzAgCBQZ0b2tlbjEFA25pbAUJc2VwYXJhdG9yCQC5CQIJAMwIAgUGdG9rZW4xCQDMCAIFBnRva2VuMAUDbmlsBQlzZXBhcmF0b3IBDmdldFBhaXJUb2tlbklkAgZ0b2tlbjAGdG9rZW4xCQERQGV4dHJOYXRpdmUoMTA1MykCBQR0aGlzCQEKZ2V0UGFpcktleQIFBnRva2Vu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haXICBQZ0b2tlbjAFBnRva2VuMQMJAQIhPQIFBnRva2VuMAUGdG9rZW4xAwMJAQ1pc1Rva2VuRXhpc3RzAQUGdG9rZW4wCQENaXNUb2tlbkV4aXN0cwEFBnRva2VuMQcECG5ld1Rva2VuCQDCCAUJANgEAQkAyQECCAUBaQ10cmFuc2FjdGlvbklkAAoCAAAAAAAGBAdpc3N1ZUlkCQDYBAEJALgIAQUIbmV3VG9rZW4EEGN1cnJlbnRQYWlySW5kZXgJAQ1nZXRQYWlyTGVuZ3RoAAkAzAgCBQhuZXdUb2tlbgkAzAgCCQELU3RyaW5nRW50cnkCCQCkAwEFEGN1cnJlbnRQYWlySW5kZXgFB2lzc3VlSWQJAMwIAgkBDXNldFBhaXJMZW5naHQBCQBkAgUQY3VycmVudFBhaXJJbmRleAABCQDMCAIJAQ5zZXRQYWlyVG9rZW5JZAMFBnRva2VuMAUGdG9rZW4xBQdpc3N1ZUlkCQDMCAIJAQ5zZXRQYWlyRGV0YWlscwUFB2lzc3VlSWQFBnRva2VuMAUGdG9rZW4xAAAAAAUDbmlsCQACAQIMV3JvbmcgdG9rZW5zCQACAQIMRXF1YWwgdG9rZW5zCQACAQITUGFpciBhbHJlYWR5IGV4aXN0cwAkZbmA", "height": 2138155, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Gv1U45NncsM3aiCmtw837WHdw4xS1MzpJcqFe15PC6oe Next: B2DDZ8w6q11WQ1tef5ojtMWJHdTZNMYaDdu83GS7t6iZ Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "_"
55
66 func b () = valueOrElse(getInteger(this, "pairLength"), 0)
77
88
99 func c (d) = IntegerEntry("pairLength", d)
1010
1111
1212 func e (f,g) = {
1313 let h = toInt(fromBase58String(f))
1414 let i = toInt(fromBase58String(g))
1515 if ((i > h))
1616 then makeString([f, g], a)
1717 else makeString([g, f], a)
1818 }
1919
2020
2121 func j (f,g) = getStringValue(this, e(f, g))
2222
2323
2424 func k (f,g,l) = StringEntry(e(f, g), l)
2525
2626
2727 func m (f,g,n,o) = makeString([f, g, toString(n), toString(o)], a)
2828
2929
3030 func p (q) = {
3131 let r = split(valueOrElse(getString(this, q), "assetId0_assetId1_0_0"), a)
3232 $Tuple4(r[0], r[1], parseIntValue(r[2]), parseIntValue(r[3]))
3333 }
3434
3535
3636 func s (q,f,g,n,o) = StringEntry(q, m(f, g, n, o))
3737
3838
3939 func t (q) = valueOrElse(getInteger(this, (("totalSupply" + a) + q)), 0)
4040
4141
4242 func u (q,v) = IntegerEntry((("totalSupply" + a) + q), v)
4343
4444
4545 func w (f,g) = !(isDefined(getString(e(f, g))))
4646
4747
4848 func x (y) = true
4949
5050
5151 let z = 1000000000000
5252
5353 let A = value(addressFromString("3M4qwDomRabJKLZxuXhwfqLApQkU592nWxF"))
5454
5555 let B = 100000
5656
5757 @Callable(C)
5858 func mint () = {
5959 let f = toBase58String(value(C.payments[0].assetId))
6060 let g = toBase58String(value(C.payments[1].assetId))
6161 let D = j(f, g)
6262 let E = value(C.payments[0].amount)
6363 let F = value(C.payments[1].amount)
6464 let G = p(D)
6565 let H = G._1
6666 let I = G._2
6767 let J = G._3
6868 let K = G._4
6969 let L = t(D)
7070 if ((L == 0))
7171 then {
7272 let M = (sqrt((E * F), 0, 0, DOWN) - B)
7373 [Reissue(fromBase58String(D), (M + B), true), ScriptTransfer(A, B, fromBase58String(D)), ScriptTransfer(C.caller, M, fromBase58String(D)), u(D, (M + B)), s(D, f, g, (J + E), (K + F))]
7474 }
7575 else {
7676 let M = min([((E * L) / J), ((F * L) / K)])
7777 [Reissue(fromBase58String(D), M, true), ScriptTransfer(C.caller, M, fromBase58String(D)), u(D, M), s(D, f, g, (J + E), (K + F))]
7878 }
7979 }
8080
8181
8282
8383 @Callable(C)
8484 func burn () = {
8585 let N = value(C.payments[0].amount)
8686 let O = value(C.payments[0].assetId)
8787 let P = p(toBase58String(O))
8888 let H = P._1
8989 let I = P._2
9090 let J = P._3
9191 let K = P._4
9292 let D = j(H, I)
9393 let L = t(D)
9494 let Q = ((N * z) / L)
9595 let E = ((Q * J) / z)
9696 let F = ((Q * K) / z)
9797 [Burn(fromBase58String(D), N), ScriptTransfer(C.caller, E, fromBase58String(H)), ScriptTransfer(C.caller, F, fromBase58String(I)), u(D, (L - N)), s(D, H, I, (J - E), (K - F))]
9898 }
9999
100100
101101
102102 @Callable(C)
103103 func addLiquidityPool (f,g) = if (w(f, g))
104104 then if ((f != g))
105105 then if (if (x(f))
106106 then x(g)
107107 else false)
108108 then {
109109 let R = Issue(toBase58String(take(C.transactionId, 10)), "", 0, 0, true)
110110 let l = toBase58String(calculateAssetId(R))
111111 let S = b()
112112 [R, StringEntry(toString(S), l), c((S + 1)), k(f, g, l), s(l, f, g, 0, 0)]
113113 }
114114 else throw("Wrong tokens")
115115 else throw("Equal tokens")
116116 else throw("Pair already exists")
117117
118118

github/deemru/w8io/169f3d6 
23.75 ms