tx · HtV37J7tBNTzpMD31MYs2tDv8qk7j3DwebfkVyKUVUiY 3MyFHYRXw55tL2gQ928mKUuQoEabktL3hCR: -0.05000000 Waves 2023.07.18 16:28 [2671378] smart account 3MyFHYRXw55tL2gQ928mKUuQoEabktL3hCR > SELF 0.00000000 Waves
{ "type": 13, "id": "HtV37J7tBNTzpMD31MYs2tDv8qk7j3DwebfkVyKUVUiY", "fee": 5000000, "feeAssetId": null, "timestamp": 1689686928096, "version": 2, "chainId": 84, "sender": "3MyFHYRXw55tL2gQ928mKUuQoEabktL3hCR", "senderPublicKey": "bMD2x5tkB4skw1DeXM1jqE4hBh4o6tehbczXwwV7aRa", "proofs": [ "cUF7zACiTz4oJHBN6QHUzV1JgEPbj8V6wFCMnyEJacxpWq1E4M9BcKFZ6X12G9vx5sVw3XDNu6bvdtNL47tz649" ], "script": "base64:BgLnBwgCEgMKAQgSBQoDCAgIEgMKAQgSACIDU0VQIglQUkVDSVNJT04iFERFRkFVTFRfTUFYX1NMSVBQQUdFIgRtdWxwIgJfeCICX3kiBGpvaW4iAmFyIg5rZXlJbml0aWFsaXplZCIVa2V5Q29vcmRpbmF0b3JBZGRyZXNzIhJrZXlWZXJpZmllckFkZHJlc3MiFWtleUVhc3RTdGFraW5nQWRkcmVzcyISa2V5U3VidmF1bHRBZGRyZXNzIgxrZXlFYXN0QXNzZXQiDmtleU1heFNsaXBwYWdlIglrZXlTaWduZWQiCF9hZGRyZXNzIgVfdHhJZCINaXNJbml0aWFsaXplZCIPbXVzdEluaXRpYWxpemVkIhJtdXN0Tm90SW5pdGlhbGl6ZWQiCG11c3RTZWxmIgFpIgtjb29yZGluYXRvciIIdmVyaWZpZXIiByRtYXRjaDAiAXMiCmdldEFkZHJlc3MiA2tleSIDZXJyIhVnZXRFYXN0U3Rha2luZ0FkZHJlc3MiDmdldE1heFNsaXBwYWdlIg9nZXRFYXN0QXNzZXRTdHIiDGdldEVhc3RBc3NldCIMY2hlY2tBZGRyZXNzIgdhZGRyZX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Qgc2l6ZSBleGNlZWRzIDEwCQECYUECCQECYXgCCQECYXgCCQECYXgCCQECYXgCCQECYXgCCQECYXgCCQECYXgCCQECYXgCCQECYXgCCQECYXgCBQJhdwAAAAEAAgADAAQABQAGAAcACAAJAAoDCQAAAgUCYXQFAmF0BAJhQgkAZAIJAQFUAAUCYXQEAmFDCQEPQXR0YWNoZWRQYXltZW50AgkBAUgABQJhdAQCYUQJAPwHBAkBAUUAAhFhZGRTdGFraW5nUmV3YXJkcwUDbmlsCQDMCAIFAmFDBQNuaWwDCQAAAgUCYUQFAmFECQDMCAIJAQxJbnRlZ2VyRW50cnkCCQEBUAAFAmFCBQNuaWwJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4BAmFFAQJhRgAEAXoJAQF5AAMJAAECBQF6AgZTdHJpbmcEAUoFAXoJAQt2YWx1ZU9yRWxzZQIJAJsIAgkBEUBleHRyTmF0aXZlKDEwNjIpAQUBSgkBAXACCQClCAEFBHRoaXMJANgEAQgFAmFFAmlkBwkA9AMDCAUCYUUJYm9keUJ5dGVzCQCRAwIIBQJhRQZwcm9vZnMAAAgFAmFFD3NlbmRlclB1YmxpY0tleR+hRiM=", "height": 2671378, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
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 (R,S) = makeString(["%s%s", R, S], a) | |
116 | + | ||
117 | + | ||
118 | + | func T () = valueOrElse(getInteger(P()), 0) | |
119 | + | ||
120 | + | ||
121 | + | func U () = split(valueOrErrorMessage(getString(M()), "No assets configured."), a) | |
122 | + | ||
123 | + | ||
124 | + | func V () = { | |
125 | + | let z = getString(M()) | |
126 | + | if ($isInstanceOf(z, "String")) | |
127 | + | then { | |
128 | + | let A = z | |
129 | + | split(value(A), a) | |
130 | + | } | |
131 | + | else if ($isInstanceOf(z, "Unit")) | |
132 | + | then nil | |
133 | + | else throw("Match error") | |
134 | + | } | |
135 | + | ||
136 | + | ||
137 | + | func W (O) = { | |
138 | + | let X = split(valueOrErrorMessage(getString(N(O)), "Asset config not found."), a) | |
139 | + | let Y = addressFromStringValue(X[K]) | |
140 | + | let Z = addressFromStringValue(X[L]) | |
141 | + | $Tuple2(Y, Z) | |
142 | + | } | |
143 | + | ||
144 | + | ||
145 | + | @Callable(w) | |
146 | + | func initialize (aa) = { | |
147 | + | let ab = [v(w), u(), I(aa)] | |
148 | + | if ((ab == ab)) | |
149 | + | then [StringEntry(j(), aa), BooleanEntry(i(), true)] | |
150 | + | else throw("Strict value is not equal to itself.") | |
151 | + | } | |
152 | + | ||
153 | + | ||
154 | + | ||
155 | + | @Callable(w) | |
156 | + | func addAsset (O,R,S) = { | |
157 | + | let ab = [t(), v(w), I(R), I(S)] | |
158 | + | if ((ab == ab)) | |
159 | + | then { | |
160 | + | let ac = V() | |
161 | + | if (containsElement(ac, O)) | |
162 | + | then throw("Asset already exists.") | |
163 | + | else { | |
164 | + | let ad = makeString((ac :+ O), a) | |
165 | + | [StringEntry(M(), ad), StringEntry(N(O), Q(R, S))] | |
166 | + | } | |
167 | + | } | |
168 | + | else throw("Strict value is not equal to itself.") | |
169 | + | } | |
170 | + | ||
171 | + | ||
172 | + | ||
173 | + | @Callable(w) | |
174 | + | func removeAsset (O) = { | |
175 | + | let ab = [t(), v(w)] | |
176 | + | if ((ab == ab)) | |
177 | + | then { | |
178 | + | let ac = U() | |
179 | + | let ad = { | |
180 | + | let z = indexOf(ac, O) | |
181 | + | if ($isInstanceOf(z, "Int")) | |
182 | + | then { | |
183 | + | let ae = z | |
184 | + | makeString(removeByIndex(ac, ae), a) | |
185 | + | } | |
186 | + | else if ($isInstanceOf(z, "Unit")) | |
187 | + | then throw("Unable to proceed. Asset not found.") | |
188 | + | else throw("Match error") | |
189 | + | } | |
190 | + | [StringEntry(M(), ad), DeleteEntry(N(O))] | |
191 | + | } | |
192 | + | else throw("Strict value is not equal to itself.") | |
193 | + | } | |
194 | + | ||
195 | + | ||
196 | + | ||
197 | + | @Callable(w) | |
198 | + | func ackRewards () = { | |
199 | + | func af (ag,ah) = { | |
200 | + | let z = ah | |
201 | + | if ($isInstanceOf(z, "String")) | |
202 | + | then { | |
203 | + | let ai = z | |
204 | + | let aj = W(ai) | |
205 | + | let Y = aj._1 | |
206 | + | let Z = aj._2 | |
207 | + | let ak = { | |
208 | + | let al = invoke(Y, "claimProfit", nil, nil) | |
209 | + | if ($isInstanceOf(al, "Int")) | |
210 | + | then al | |
211 | + | else throw(($getType(al) + " couldn't be cast to Int")) | |
212 | + | } | |
213 | + | if ((ak == ak)) | |
214 | + | then { | |
215 | + | let am = addressFromStringValue(valueOrErrorMessage(getString(Y, m()), "Subvault not found.")) | |
216 | + | let an = { | |
217 | + | let al = invoke(am, "getCurrentUsdPrice", nil, nil) | |
218 | + | if ($isInstanceOf(al, "Int")) | |
219 | + | then al | |
220 | + | else throw(($getType(al) + " couldn't be cast to Int")) | |
221 | + | } | |
222 | + | if ((an == an)) | |
223 | + | then { | |
224 | + | let ao = d(ak, an) | |
225 | + | let ap = F() | |
226 | + | let aq = d(ao, ap) | |
227 | + | let ar = if ((ai == "WAVES")) | |
228 | + | then unit | |
229 | + | else fromBase58String(ai) | |
230 | + | let as = { | |
231 | + | let al = invoke(Z, "swap", [aq, G(), toString(this)], [AttachedPayment(ar, ak)]) | |
232 | + | if ($isInstanceOf(al, "Int")) | |
233 | + | then al | |
234 | + | else throw(($getType(al) + " couldn't be cast to Int")) | |
235 | + | } | |
236 | + | if ((as == as)) | |
237 | + | then (ag + as) | |
238 | + | else throw("Strict value is not equal to itself.") | |
239 | + | } | |
240 | + | else throw("Strict value is not equal to itself.") | |
241 | + | } | |
242 | + | else throw("Strict value is not equal to itself.") | |
243 | + | } | |
244 | + | else if ($isInstanceOf(z, "Unit")) | |
245 | + | then ag | |
246 | + | else throw("Match error") | |
247 | + | } | |
248 | + | ||
249 | + | let ac = U() | |
250 | + | let at = { | |
251 | + | let au = ac | |
252 | + | let av = size(au) | |
253 | + | let aw = 0 | |
254 | + | func ax (ay,az) = if ((az >= av)) | |
255 | + | then ay | |
256 | + | else af(ay, au[az]) | |
257 | + | ||
258 | + | func aA (ay,az) = if ((az >= av)) | |
259 | + | then ay | |
260 | + | else throw("List size exceeds 10") | |
261 | + | ||
262 | + | aA(ax(ax(ax(ax(ax(ax(ax(ax(ax(ax(aw, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
263 | + | } | |
264 | + | if ((at == at)) | |
265 | + | then { | |
266 | + | let aB = (T() + at) | |
267 | + | let aC = AttachedPayment(H(), at) | |
268 | + | let aD = invoke(E(), "addStakingRewards", nil, [aC]) | |
269 | + | if ((aD == aD)) | |
270 | + | then [IntegerEntry(P(), aB)] | |
271 | + | else throw("Strict value is not equal to itself.") | |
272 | + | } | |
273 | + | else throw("Strict value is not equal to itself.") | |
274 | + | } | |
275 | + | ||
276 | + | ||
277 | + | @Verifier(aE) | |
278 | + | func aF () = { | |
279 | + | let z = y() | |
280 | + | if ($isInstanceOf(z, "String")) | |
281 | + | then { | |
282 | + | let J = z | |
283 | + | valueOrElse(getBoolean(addressFromStringValue(J), p(toString(this), toBase58String(aE.id))), false) | |
284 | + | } | |
285 | + | else sigVerify(aE.bodyBytes, aE.proofs[0], aE.senderPublicKey) | |
286 | + | } | |
287 | + |
github/deemru/w8io/026f985 20.84 ms ◑