tx · Gv1U45NncsM3aiCmtw837WHdw4xS1MzpJcqFe15PC6oe

3N2j6yXv5aLx1DTVGpwUmJHKZb5XwMfWZhk:  -0.00500000 Waves

2022.07.13 18:42 [2138154] smart account 3N2j6yXv5aLx1DTVGpwUmJHKZb5XwMfWZhk > SELF 0.00000000 Waves

{ "type": 13, "id": "Gv1U45NncsM3aiCmtw837WHdw4xS1MzpJcqFe15PC6oe", "fee": 500000, "feeAssetId": null, "timestamp": 1657727012736, "version": 2, "chainId": 84, "sender": "3N2j6yXv5aLx1DTVGpwUmJHKZb5XwMfWZhk", "senderPublicKey": "8ZzMCsQ15BKiHk944146A5WQ8eSFd8vaff4xaktCKSBK", "proofs": [ "qscxFYRt4cfmnShq96T5nM4RffASuwGmeuNPBs6QGmm84yd5qkqbGKaMGYTTz4spkRcHvsru8tp98xiGrj2XgQK" ], "script": "base64:BgIMCAISABIAEgQKAggIEAAJc2VwYXJhdG9yAgFfAQ1nZXRQYWlyTGVuZ3RoAAkBC3ZhbHVlT3JFbHNlAgkAmggCBQR0aGlzAgpwYWlyTGVuZ3RoAAABDXNldFBhaXJMZW5naHQBCW5ld0xlbmd0aAkBDEludGVnZXJFbnRyeQICCnBhaXJMZW5ndGgFCW5ld0xlbmd0aAEKZ2V0UGFpcktleQIGdG9rZW4wBnRva2VuMQQIdG9rZW4wQlYJALEJAQkA2QQBBQZ0b2tlbjAECHRva2VuMUJWCQCxCQEJANkEAQUGdG9rZW4xAwkAZgIFCHRva2VuMUJWBQh0b2tlbjBCVgkAuQkCCQDMCAIFBnRva2VuMAkAzAgCBQZ0b2tlbjEFA25pbAUJc2VwYXJhdG9yCQC5CQIJAMwIAgUGdG9rZW4xCQDMCAIFBnRva2VuMAUDbmlsBQlzZXBhcmF0b3IBDmdldFBhaXJUb2tlbklkAgZ0b2tlbjAGdG9rZW4xCQERQGV4dHJOYXRpdmUoMTA1MykCBQR0aGlzCQEKZ2V0UGFpcktleQIFBnRva2VuMAUGdG9rZW4xAQ5zZX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Rva2VuMQMJAQIhPQIFBnRva2VuMAUGdG9rZW4xAwMJAQ1pc1Rva2VuRXhpc3RzAQUGdG9rZW4wCQENaXNUb2tlbkV4aXN0cwEFBnRva2VuMQcECG5ld1Rva2VuCQDCCAUJANgEAQkAyQECCAUBaQ10cmFuc2FjdGlvbklkAAoCAAAAAAAGBAdpc3N1ZUlkCQDYBAEJALgIAQUIbmV3VG9rZW4EEGN1cnJlbnRQYWlySW5kZXgJAQ1nZXRQYWlyTGVuZ3RoAAkAzAgCBQhuZXdUb2tlbgkAzAgCCQELU3RyaW5nRW50cnkCCQCkAwEFEGN1cnJlbnRQYWlySW5kZXgFB2lzc3VlSWQJAMwIAgkBDXNldFBhaXJMZW5naHQBCQBkAgUQY3VycmVudFBhaXJJbmRleAABCQDMCAIJAQ5zZXRQYWlyVG9rZW5JZAMFBnRva2VuMAUGdG9rZW4xBQdpc3N1ZUlkCQDMCAIJAQ5zZXRQYWlyRGV0YWlscwUFB2lzc3VlSWQFBnRva2VuMAUGdG9rZW4xAAAAAAUDbmlsCQACAQIMV3JvbmcgdG9rZW5zCQACAQIMRXF1YWwgdG9rZW5zCQACAQITUGFpciBhbHJlYWR5IGV4aXN0cwAkZbmA", "height": 2138154, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: Bvw6u6GTGPf6eG5b2vv3CR4nqVRUFBtTj1xeXpTFn4ib Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 6 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let a = "_"
5+
6+func b () = valueOrElse(getInteger(this, "pairLength"), 0)
7+
8+
9+func c (d) = IntegerEntry("pairLength", d)
10+
11+
12+func e (f,g) = {
13+ let h = toInt(fromBase58String(f))
14+ let i = toInt(fromBase58String(g))
15+ if ((i > h))
16+ then makeString([f, g], a)
17+ else makeString([g, f], a)
18+ }
19+
20+
21+func j (f,g) = getStringValue(this, e(f, g))
22+
23+
24+func k (f,g,l) = StringEntry(e(f, g), l)
25+
26+
27+func m (f,g,n,o) = makeString([f, g, toString(n), toString(o)], a)
28+
29+
30+func p (q) = {
31+ let r = split(valueOrElse(getString(this, q), "assetId0_assetId1_0_0"), a)
32+ $Tuple4(r[0], r[1], parseIntValue(r[2]), parseIntValue(r[3]))
33+ }
34+
35+
36+func s (q,f,g,n,o) = StringEntry(q, m(f, g, n, o))
37+
38+
39+func t (q) = valueOrElse(getInteger(this, (("totalSupply" + a) + q)), 0)
40+
41+
42+func u (q,v) = IntegerEntry((("totalSupply" + a) + q), v)
43+
44+
45+func w (f,g) = !(isDefined(getString(e(f, g))))
46+
47+
48+func x (y) = true
49+
50+
51+let z = 1000000000000
52+
53+let A = value(addressFromString("3M4qwDomRabJKLZxuXhwfqLApQkU592nWxF"))
54+
55+let B = 100000
56+
57+@Callable(C)
58+func mint () = {
59+ let f = toBase58String(value(C.payments[0].assetId))
60+ let g = toBase58String(value(C.payments[1].assetId))
61+ let D = j(f, g)
62+ let E = value(C.payments[0].amount)
63+ let F = value(C.payments[1].amount)
64+ let G = p(D)
65+ let H = G._1
66+ let I = G._2
67+ let J = G._3
68+ let K = G._4
69+ let L = t(D)
70+ if ((L == 0))
71+ then {
72+ let M = (sqrt((E * F), 0, 0, DOWN) - B)
73+[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))]
74+ }
75+ else {
76+ let M = min([((E * L) / J), ((F * L) / K)])
77+[Reissue(fromBase58String(D), M, true), ScriptTransfer(C.caller, M, fromBase58String(D)), u(D, M), s(D, f, g, (J + E), (K + F))]
78+ }
79+ }
80+
81+
82+
83+@Callable(C)
84+func burn () = {
85+ let N = value(C.payments[0].amount)
86+ let O = value(C.payments[0].assetId)
87+ let P = p(toBase58String(O))
88+ let H = P._1
89+ let I = P._2
90+ let J = P._3
91+ let K = P._4
92+ let D = j(H, I)
93+ let L = t(D)
94+ let Q = ((N * z) / L)
95+ let E = ((Q * J) / z)
96+ let F = ((Q * K) / z)
97+[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))]
98+ }
99+
100+
101+
102+@Callable(C)
103+func addLiquidityPool (f,g) = if (w(f, g))
104+ then if ((f != g))
105+ then if (if (x(f))
106+ then x(g)
107+ else false)
108+ then {
109+ let R = Issue(toBase58String(take(C.transactionId, 10)), "", 0, 0, true)
110+ let l = toBase58String(calculateAssetId(R))
111+ let S = b()
112+[R, StringEntry(toString(S), l), c((S + 1)), k(f, g, l), s(l, f, g, 0, 0)]
113+ }
114+ else throw("Wrong tokens")
115+ else throw("Equal tokens")
116+ else throw("Pair already exists")
117+
118+

github/deemru/w8io/026f985 
16.86 ms