tx · 8XGNQH7eWoc3gVeP6sQJFmu11bkNvVSHcACBYLbY97oY

3Mv27MSC1Wm2P8euWECkqZp8EyfAL2zWXr4:  -0.05000000 Waves

2023.07.12 15:24 [2662676] smart account 3Mv27MSC1Wm2P8euWECkqZp8EyfAL2zWXr4 > SELF 0.00000000 Waves

{ "type": 13, "id": "8XGNQH7eWoc3gVeP6sQJFmu11bkNvVSHcACBYLbY97oY", "fee": 5000000, "feeAssetId": null, "timestamp": 1689164703483, "version": 2, "chainId": 84, "sender": "3Mv27MSC1Wm2P8euWECkqZp8EyfAL2zWXr4", "senderPublicKey": "GRxkJuBBYQZZbJnRT56xcdHdLiLLYK7Qtp8cLrX7s2V7", "proofs": [ "ptVgYUnBJYMYMjoNCwGJKoSuoAk5fLvqLRn6xki3DGNuWoLu1uX7zusvgjizSZL1hvyuBFCigmnMspdVSLkvjY2" ], "script": "base64:BgLcBwgCEgMKAQgSBQoDCAgIEgMKAQgSACIDU0VQIglQUkVDSVNJT04iFERFRkFVTFRfTUFYX1NMSVBQQUdFIgRtdWxwIgJfeCICX3kiBGpvaW4iAmFyIg5rZXlJbml0aWFsaXplZCIVa2V5Q29vcmRpbmF0b3JBZGRyZXNzIhJrZXlWZXJpZmllckFkZHJlc3MiFWtleUVhc3RTdGFraW5nQWRkcmVzcyISa2V5U3VidmF1bHRBZGRyZXNzIgxrZXlFYXN0QXNzZXQiDmtleU1heFNsaXBwYWdlIglrZXlTaWduZWQiCF9hZGRyZXNzIgVfdHhJZCINaXNJbml0aWFsaXplZCIPbXVzdEluaXRpYWxpemVkIhJtdXN0Tm90SW5pdGlhbGl6ZWQiCG11c3RTZWxmIgFpIgtjb29yZGluYXRvciIIdmVyaWZpZXIiByRtYXRjaDAiAXMiCmdldEFkZHJlc3MiA2tleSIDZXJyIhVnZXRFYXN0U3Rha2luZ0FkZHJlc3MiDmdldE1heFNsaXBwYWdlIg9nZXRFYXN0QXNzZXRTdHIiDGdldEVhc3RBc3NldCIMY2hlY2tBZG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AAIFAmFzBQJhcwQCYUEJAGQCCQEBUQAFAmFzBAJhQgkBD0F0dGFjaGVkUGF5bWVudAIJAQFIAAUCYXMEAmFDCQD8BwQJAQFFAAIRYWRkU3Rha2luZ1Jld2FyZHMFA25pbAkAzAgCBQJhQgUDbmlsAwkAAAIFAmFDBQJhQwkAzAgCCQEMSW50ZWdlckVudHJ5AgkBAVAABQJhQQUDbmlsCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAQJhRAECYUUABAF6CQEBeQADCQABAgUBegIGU3RyaW5nBAFKBQF6CQELdmFsdWVPckVsc2UCCQCbCAIJARFAZXh0ck5hdGl2ZSgxMDYyKQEFAUoJAQFwAgkApQgBBQR0aGlzCQDYBAEIBQJhRAJpZAcJAPQDAwgFAmFECWJvZHlCeXRlcwkAkQMCCAUCYUQGcHJvb2ZzAAAIBQJhRA9zZW5kZXJQdWJsaWNLZXkmJ+z7", "height": 2662676, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 6 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let a = "__"
5+
6+let b = 1000000000000
7+
8+let c = ((b / 20) * 19)
9+
10+func d (e,f) = fraction(e, f, b, HALFEVEN)
11+
12+
13+func g (h) = makeString(h, a)
14+
15+
16+func i () = g(["%s", "initialized"])
17+
18+
19+func j () = g(["%s", "coordinatorAddress"])
20+
21+
22+func k () = g(["%s", "verifierAddress"])
23+
24+
25+func l () = g(["%s", "eastStakingAddress"])
26+
27+
28+func m () = g(["%s", "subvaultAddress"])
29+
30+
31+func n () = g(["%s", "eastAsset"])
32+
33+
34+func o () = g(["%s", "maxSlippage"])
35+
36+
37+func p (q,r) = g(["%s%s%s", "signed", q, r])
38+
39+
40+func s () = valueOrElse(getBoolean(this, i()), false)
41+
42+
43+func t () = if (!(s()))
44+ then throw("Not initialized")
45+ else unit
46+
47+
48+func u () = if (s())
49+ then throw("Already initialized")
50+ else unit
51+
52+
53+func v (w) = if ((w.caller != this))
54+ then throw("Only self invocation allowed.")
55+ else unit
56+
57+
58+func x () = addressFromStringValue(valueOrErrorMessage(getString(j()), "Coordinator is not set"))
59+
60+
61+func y () = {
62+ let z = getString(j())
63+ if ($isInstanceOf(z, "String"))
64+ then {
65+ let A = z
66+ getString(addressFromStringValue(A), k())
67+ }
68+ else if ($isInstanceOf(z, "Unit"))
69+ then unit
70+ else throw("Match error")
71+ }
72+
73+
74+func B (C,D) = addressFromStringValue(valueOrErrorMessage(getString(x(), C), D))
75+
76+
77+func E () = B(l(), "East staking is not set")
78+
79+
80+func F () = valueOrElse(getInteger(x(), o()), c)
81+
82+
83+func G () = valueOrErrorMessage(getString(x(), n()), "East asset is not set")
84+
85+
86+func H () = fromBase58String(G())
87+
88+
89+func I (q) = {
90+ let z = addressFromString(q)
91+ if ($isInstanceOf(z, "Address"))
92+ then {
93+ let J = z
94+ true
95+ }
96+ else if ($isInstanceOf(z, "Unit"))
97+ then throw("Invalid address")
98+ else throw("Match error")
99+ }
100+
101+
102+let K = 1
103+
104+let L = 2
105+
106+func M () = g(["%s", "assets"])
107+
108+
109+func N (O) = g(["%s%s", "asset", O])
110+
111+
112+func P () = g(["%s", "totalRewardPayed"])
113+
114+
115+func Q () = valueOrElse(getInteger(P()), 0)
116+
117+
118+func R () = split(valueOrErrorMessage(getString(M()), "No assets configured."), a)
119+
120+
121+func S () = split(valueOrElse(getString(M()), ""), a)
122+
123+
124+func T (O) = {
125+ let U = split(valueOrErrorMessage(getString(N(O)), "Asset config not found."), a)
126+ let V = addressFromStringValue(U[K])
127+ let W = addressFromStringValue(U[L])
128+ $Tuple2(V, W)
129+ }
130+
131+
132+@Callable(w)
133+func initialize (X) = {
134+ let Y = [v(w), u(), I(X)]
135+ if ((Y == Y))
136+ then [StringEntry(j(), X), BooleanEntry(i(), true)]
137+ else throw("Strict value is not equal to itself.")
138+ }
139+
140+
141+
142+@Callable(w)
143+func addAsset (O,Z,aa) = {
144+ let Y = [t(), v(w)]
145+ if ((Y == Y))
146+ then {
147+ let ab = S()
148+ if (containsElement(ab, O))
149+ then throw("Asset already exists.")
150+ else {
151+ let ac = makeString((ab :+ O), a)
152+[StringEntry(M(), ac), StringEntry(N(O), makeString((ab :+ O), a))]
153+ }
154+ }
155+ else throw("Strict value is not equal to itself.")
156+ }
157+
158+
159+
160+@Callable(w)
161+func removeAsset (O) = {
162+ let Y = [t(), v(w)]
163+ if ((Y == Y))
164+ then {
165+ let ab = R()
166+ let ac = {
167+ let z = indexOf(ab, O)
168+ if ($isInstanceOf(z, "Int"))
169+ then {
170+ let ad = z
171+ makeString(removeByIndex(ab, ad), a)
172+ }
173+ else if ($isInstanceOf(z, "Unit"))
174+ then throw("Unable to proceed. Asset not found.")
175+ else throw("Match error")
176+ }
177+[StringEntry(M(), ac), DeleteEntry(N(O))]
178+ }
179+ else throw("Strict value is not equal to itself.")
180+ }
181+
182+
183+
184+@Callable(w)
185+func ackRewards () = {
186+ func ae (af,ag) = {
187+ let z = ag
188+ if ($isInstanceOf(z, "String"))
189+ then {
190+ let ah = z
191+ let ai = T(ah)
192+ let V = ai._1
193+ let W = ai._2
194+ let aj = {
195+ let ak = invoke(V, "claimProfit", nil, nil)
196+ if ($isInstanceOf(ak, "Int"))
197+ then ak
198+ else throw(($getType(ak) + " couldn't be cast to Int"))
199+ }
200+ if ((aj == aj))
201+ then {
202+ let al = addressFromStringValue(valueOrErrorMessage(getString(V, m()), "Subvault not found."))
203+ let am = {
204+ let ak = invoke(al, "getCurrentUsdPrice", nil, nil)
205+ if ($isInstanceOf(ak, "Int"))
206+ then ak
207+ else throw(($getType(ak) + " couldn't be cast to Int"))
208+ }
209+ if ((am == am))
210+ then {
211+ let an = d(aj, am)
212+ let ao = F()
213+ let ap = d(an, ao)
214+ let aq = if ((ah == "WAVES"))
215+ then unit
216+ else fromBase58String(ah)
217+ let ar = {
218+ let ak = invoke(W, "swap", [ap, G(), toString(this)], [AttachedPayment(aq, aj)])
219+ if ($isInstanceOf(ak, "Int"))
220+ then ak
221+ else throw(($getType(ak) + " couldn't be cast to Int"))
222+ }
223+ if ((ar == ar))
224+ then (af + ar)
225+ else throw("Strict value is not equal to itself.")
226+ }
227+ else throw("Strict value is not equal to itself.")
228+ }
229+ else throw("Strict value is not equal to itself.")
230+ }
231+ else if ($isInstanceOf(z, "Unit"))
232+ then af
233+ else throw("Match error")
234+ }
235+
236+ let ab = R()
237+ let as = {
238+ let at = ab
239+ let au = size(at)
240+ let av = 0
241+ func aw (ax,ay) = if ((ay >= au))
242+ then ax
243+ else ae(ax, at[ay])
244+
245+ func az (ax,ay) = if ((ay >= au))
246+ then ax
247+ else throw("List size exceeds 10")
248+
249+ az(aw(aw(aw(aw(aw(aw(aw(aw(aw(aw(av, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
250+ }
251+ if ((as == as))
252+ then {
253+ let aA = (Q() + as)
254+ let aB = AttachedPayment(H(), as)
255+ let aC = invoke(E(), "addStakingRewards", nil, [aB])
256+ if ((aC == aC))
257+ then [IntegerEntry(P(), aA)]
258+ else throw("Strict value is not equal to itself.")
259+ }
260+ else throw("Strict value is not equal to itself.")
261+ }
262+
263+
264+@Verifier(aD)
265+func aE () = {
266+ let z = y()
267+ if ($isInstanceOf(z, "String"))
268+ then {
269+ let J = z
270+ valueOrElse(getBoolean(addressFromStringValue(J), p(toString(this), toBase58String(aD.id))), false)
271+ }
272+ else sigVerify(aD.bodyBytes, aD.proofs[0], aD.senderPublicKey)
273+ }
274+

github/deemru/w8io/169f3d6 
39.50 ms