tx · A23uyJcPFbSeJSK1YvxF1druv295S4vMd9oPuLYTUvMJ

3NADcxHXbecCheinqFbvhDjfzZhsMFZJUuH:  -0.03400000 Waves

2022.11.25 19:32 [2332867] smart account 3NADcxHXbecCheinqFbvhDjfzZhsMFZJUuH > SELF 0.00000000 Waves

{ "type": 13, "id": "A23uyJcPFbSeJSK1YvxF1druv295S4vMd9oPuLYTUvMJ", "fee": 3400000, "feeAssetId": null, "timestamp": 1669394020376, "version": 2, "chainId": 84, "sender": "3NADcxHXbecCheinqFbvhDjfzZhsMFZJUuH", "senderPublicKey": "DKfzQgvVdTqPHgGbdZptWYA8G5xVfmSMAwL3UnhwQmdy", "proofs": [ "3AKVucqfD7PxPFgB8WaCBMY7t1bCvFy6ezxYCZat82JCTgJJGB31hMsyhQ4ez9YVsViZ8G7ayuxNwAvLU2oBCLEH" ], "script": "base64:BgIhCAISAwoBCBIAEgMKAQESABIAEgMKAQESAwoBARIDCgEILwANa190b3RhbFN1cHBseQINa190b3RhbFN1cHBseQAPa19sb2NrZWRCYWxhbmNlAg9rX2xvY2tlZEJhbGFuY2UADWtfZnJlZUJhbGFuY2UCDWtfZnJlZUJhbGFuY2UABmtfcmF0ZQIGa19yYXRlAAlrX2JhbGFuY2UCCWtfYmFsYW5jZQAOa19hdmVyYWdlX3JhdGUCDmtfYXZlcmFnZV9yYXRlAA9rX3dpdGhkcmF3X3JhdGUCD2tfd2l0aGRyYXdfcmF0ZQANa19pbml0aWFsaXplZAINa19pbml0aWFsaXplZAAUa19jb29yZGluYXRvckFkZHJlc3MCFGtfY29vcmRpbmF0b3JBZGRyZXNzAAVrX2FtbQIFa19hbW0ADWtfcXVvdGVfYXNzZXQCDWtfcXVvdGVfYXNzZXQAEmtfYWRtaW5fcHVibGljX2tleQISa19hZG1pbl9wdWJsaWNfa2V5AA9rX2FkbWluX2FkZHJlc3MCD2tfYWRtaW5fYWRkcmVzcwARa19tYW5hZ2VyX2FkZHJlc3MCEWtfbWFuYWdlcl9hZGR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AS0BBRJhbW91bnRPZlF1b3RlQXNzZXQJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwgFAWkGY2FsbGVyBQdfYW1vdW50CQEKcXVvdGVBc3NldAAFA25pbAkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgFpAQt2aWV3X3Jld2FyZAEHX3RyYWRlcgQHYmFsYW5jZQkBCWJhbGFuY2VPZgEFB190cmFkZXIED2RlcG9zaXRlZEFtb3VudAkBBG11bGQCCQELYXZlcmFnZVJhdGUBBQdfdHJhZGVyBQdiYWxhbmNlBA1jdXJyZW50QW1vdW50CQEEbXVsZAIJAQRyYXRlAAUHYmFsYW5jZQQGZWFybmVkCQBlAgUNY3VycmVudEFtb3VudAUPZGVwb3NpdGVkQW1vdW50CQACAQkApAMBBQZlYXJuZWQBAnR4AQZ2ZXJpZnkACQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACQEOYWRtaW5QdWJsaWNLZXkA82JmFQ==", "height": 2332867, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: CePWAsvbqcM4ypm1268t74p7MsF7Bo5GFNqxSfGUZCej Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 6 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let a = "k_totalSupply"
5+
6+let b = "k_lockedBalance"
7+
8+let c = "k_freeBalance"
9+
10+let d = "k_rate"
11+
12+let e = "k_balance"
13+
14+let f = "k_average_rate"
15+
16+let g = "k_withdraw_rate"
17+
18+let h = "k_initialized"
19+
20+let i = "k_coordinatorAddress"
21+
22+let j = "k_amm"
23+
24+let k = "k_quote_asset"
25+
26+let l = "k_admin_public_key"
27+
28+let m = "k_admin_address"
29+
30+let n = "k_manager_address"
31+
32+func o (p,q) = ((p + "_") + q)
33+
34+
35+func r () = valueOrErrorMessage(addressFromString(getStringValue(this, i)), "Coordinator not set")
36+
37+
38+func s (q) = valueOrElse(getBoolean(r(), o(j, q)), false)
39+
40+
41+func t () = fromBase58String(getStringValue(r(), l))
42+
43+
44+func u () = addressFromString(valueOrErrorMessage(getString(r(), m), "Admin address not set"))
45+
46+
47+func v () = fromBase58String(getStringValue(r(), k))
48+
49+
50+func w () = valueOrErrorMessage(addressFromString(getStringValue(r(), n)), "Manager not set")
51+
52+
53+let x = (1 * (((((((10 * 10) * 10) * 10) * 10) * 10) * 10) * 10))
54+
55+let y = ((60 * 60) * 24)
56+
57+let z = ""
58+
59+let A = 0
60+
61+func B (C) = (C / 100)
62+
63+
64+func D (C) = (C * 100)
65+
66+
67+func E (F,G) = fraction(F, x, G, HALFEVEN)
68+
69+
70+func H (F,G) = fraction(F, G, x, HALFEVEN)
71+
72+
73+func I (F) = if ((F > 0))
74+ then F
75+ else -(F)
76+
77+
78+func J (F,G) = if ((F > G))
79+ then G
80+ else F
81+
82+
83+func K (L) = valueOrErrorMessage(getInteger(this, L), ("no value for " + L))
84+
85+
86+func M (L) = valueOrElse(getInteger(this, L), 0)
87+
88+
89+func N (L) = valueOrElse(getInteger(this, L), x)
90+
91+
92+func O () = M(a)
93+
94+
95+func P () = N(d)
96+
97+
98+func Q (R) = M(o(e, R))
99+
100+
101+func S (R) = M(o(f, R))
102+
103+
104+func T () = M(c)
105+
106+
107+func U () = M(b)
108+
109+
110+func V () = valueOrElse(getBoolean(this, h), false)
111+
112+
113+func W (X,Y) = [IntegerEntry(o(e, X), (Q(X) + Y))]
114+
115+
116+func Z (X,aa) = [IntegerEntry(o(f, X), aa)]
117+
118+
119+func ab (Y) = [IntegerEntry(c, (T() + Y))]
120+
121+
122+func ac (Y) = [IntegerEntry(b, (U() + Y))]
123+
124+
125+func ad (Y) = [IntegerEntry(a, (O() + Y))]
126+
127+
128+func ae (aa) = [IntegerEntry(d, aa)]
129+
130+
131+@Callable(af)
132+func initialize (ag) = if (V())
133+ then throw("Already initialized")
134+ else [StringEntry(i, ag), BooleanEntry(h, true)]
135+
136+
137+
138+@Callable(af)
139+func stake () = {
140+ let R = toString(af.caller)
141+ let C = af.payments[0].amount
142+ if (if ((af.payments[0].assetId != v()))
143+ then true
144+ else !(V()))
145+ then throw("Invalid call to stake")
146+ else {
147+ let ah = P()
148+ let ai = S(R)
149+ let aj = E(D(C), ah)
150+ let ak = E((H(aj, ah) + H(Q(R), ai)), (ah + ai))
151+ let al = invoke(w(), "deposit", nil, [AttachedPayment(v(), C)])
152+ if ((al == al))
153+ then (((ab(C) ++ W(R, aj)) ++ Z(R, ak)) ++ ad(aj))
154+ else throw("Strict value is not equal to itself.")
155+ }
156+ }
157+
158+
159+
160+@Callable(af)
161+func unStake (am) = {
162+ let R = toString(af.caller)
163+ if (if (if ((am > Q(R)))
164+ then true
165+ else (af.payments != nil))
166+ then true
167+ else !(V()))
168+ then throw("Invalid call to unStake")
169+ else {
170+ let an = H(am, P())
171+ if ((T() > an))
172+ then throw("Balance to low")
173+ else {
174+ let al = invoke(w(), "withdraw", [toBase58String(v()), B(an)], nil)
175+ if ((al == al))
176+ then (((ab(-(an)) ++ W(R, -(am))) ++ ad(-(am))) ++ [ScriptTransfer(af.caller, B(an), v())])
177+ else throw("Strict value is not equal to itself.")
178+ }
179+ }
180+ }
181+
182+
183+
184+@Callable(af)
185+func addFree () = {
186+ let C = af.payments[0].amount
187+ if (if (if ((af.payments[0].assetId != v()))
188+ then true
189+ else !(V()))
190+ then true
191+ else !(if (s(toString(af.caller)))
192+ then true
193+ else (af.caller == u())))
194+ then throw("Invalid addFree params")
195+ else {
196+ let an = D(C)
197+ let ao = if ((O() > 0))
198+ then E((T() + an), O())
199+ else x
200+ let al = invoke(w(), "deposit", nil, [AttachedPayment(v(), C)])
201+ if ((al == al))
202+ then (ab(an) ++ ae(ao))
203+ else throw("Strict value is not equal to itself.")
204+ }
205+ }
206+
207+
208+
209+@Callable(af)
210+func addLocked () = {
211+ let C = af.payments[0].amount
212+ if (if (if ((af.payments[0].assetId != v()))
213+ then true
214+ else !(V()))
215+ then true
216+ else !(if (s(toString(af.caller)))
217+ then true
218+ else (af.caller == u())))
219+ then throw("Invalid addLocked params")
220+ else {
221+ let an = D(C)
222+ let al = invoke(w(), "deposit", nil, [AttachedPayment(v(), C)])
223+ if ((al == al))
224+ then ac(an)
225+ else throw("Strict value is not equal to itself.")
226+ }
227+ }
228+
229+
230+
231+@Callable(af)
232+func exchangeFreeAndLocked (C) = if (if (!(V()))
233+ then true
234+ else !(if (s(toString(af.caller)))
235+ then true
236+ else (af.caller == u())))
237+ then throw("Invalid exchangeFreeAndLocked params")
238+ else {
239+ let an = D(C)
240+ let ao = if ((O() > 0))
241+ then E((T() - an), O())
242+ else x
243+ ((ac(an) ++ ab(-(an))) ++ ae(ao))
244+ }
245+
246+
247+
248+@Callable(af)
249+func withdrawLocked (C) = if (if (if (!(V()))
250+ then true
251+ else (0 >= C))
252+ then true
253+ else !(s(toString(af.caller))))
254+ then throw("Invalid withdrawLocked params")
255+ else {
256+ let an = D(C)
257+ let al = invoke(w(), "withdraw", [toBase58String(v()), C], nil)
258+ if ((al == al))
259+ then (ac(-(an)) ++ [ScriptTransfer(af.caller, C, v())])
260+ else throw("Strict value is not equal to itself.")
261+ }
262+
263+
264+
265+@Callable(af)
266+func view_reward (ap) = {
267+ let aq = Q(ap)
268+ let ar = H(S(ap), aq)
269+ let as = H(P(), aq)
270+ let at = (as - ar)
271+ throw(toString(at))
272+ }
273+
274+
275+@Verifier(au)
276+func av () = sigVerify(au.bodyBytes, au.proofs[0], t())
277+

github/deemru/w8io/169f3d6 
40.64 ms