tx · HJNSTA4LU1KkwcJ1w4NDXyHRXeF3apNJWUKFMUAyw25e 3MrASWFH3k8Tkfq2eoMDH6vZWy2dywFQNen: -0.03400000 Waves 2022.11.10 12:43 [2310887] smart account 3MrASWFH3k8Tkfq2eoMDH6vZWy2dywFQNen > SELF 0.00000000 Waves
{ "type": 13, "id": "HJNSTA4LU1KkwcJ1w4NDXyHRXeF3apNJWUKFMUAyw25e", "fee": 3400000, "feeAssetId": null, "timestamp": 1668073464775, "version": 2, "chainId": 84, "sender": "3MrASWFH3k8Tkfq2eoMDH6vZWy2dywFQNen", "senderPublicKey": "9JqU7LHuYERXD76iWBYPkx8qsJ5kNWc8UjTncwigr2BS", "proofs": [ "2xChMAmpyJxjRXvJ4Fbfgixr31pisH7X4inDhdMCiba9fZkkt3xsuDvrEuRyn1Qhqwv5sotV8GXUNib4jJQnvsbD" ], "script": "base64:BgIgCAISBAoCCAgSAwoBCBIECgIICBIECgIICBIFCgMICAEfABJrX2Fzc2V0X2NvbGxhdGVyYWwCEmtfYXNzZXRfY29sbGF0ZXJhbAAga190cmFkZXJfbWFya2V0X2Fzc2V0X2NvbGxhdGVyYWwCIGtfdHJhZGVyX21hcmtldF9hc3NldF9jb2xsYXRlcmFsABFrX3doaXRlbGlzdF9hc3NldAIRa193aGl0ZWxpc3RfYXNzZXQADWtfaW5pdGlhbGl6ZWQCDWtfaW5pdGlhbGl6ZWQAFGtfY29vcmRpbmF0b3JBZGRyZXNzAhRrX2Nvb3JkaW5hdG9yQWRkcmVzcwASa19nb3Zlcm5hbmNlX2Fzc2V0AgtrX2dvdl9hc3NldAANa19xdW90ZV9hc3NldAINa19xdW90ZV9hc3NldAASa19hZG1pbl9wdWJsaWNfa2V5AhJrX2FkbWluX3B1YmxpY19rZXkAEWtfbWFuYWdlcl9hZGRyZXNzAhFrX21hbmFnZXJfYWRkcmVzcwAFa19hbW0CBWtfYW1tABNrX2luc3VyYW5jZV9hZGRyZXNzAhNrX2luc3VyYW5jZV9hZGRyZ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kACQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACQEOYWRtaW5QdWJsaWNLZXkAaxX5PQ==", "height": 2310887, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: HjFAsPEx8miJGpwHGm8oeru6Szzvk5yT5u4TifqfCTqK Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 6 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let a = "k_asset_collateral" | |
5 | + | ||
6 | + | let b = "k_trader_market_asset_collateral" | |
7 | + | ||
8 | + | let c = "k_whitelist_asset" | |
9 | + | ||
10 | + | let d = "k_initialized" | |
11 | + | ||
12 | + | let e = "k_coordinatorAddress" | |
13 | + | ||
14 | + | let f = "k_gov_asset" | |
15 | + | ||
16 | + | let g = "k_quote_asset" | |
17 | + | ||
18 | + | let h = "k_admin_public_key" | |
19 | + | ||
20 | + | let i = "k_manager_address" | |
21 | + | ||
22 | + | let j = "k_amm" | |
23 | + | ||
24 | + | let k = "k_insurance_address" | |
25 | + | ||
26 | + | let l = "k_exchange_address" | |
27 | + | ||
28 | + | func m (n,o) = ((n + "_") + o) | |
29 | + | ||
30 | + | ||
31 | + | func p () = valueOrErrorMessage(addressFromString(getStringValue(this, e)), "Coordinator not set") | |
32 | + | ||
33 | + | ||
34 | + | func q () = fromBase58String(getStringValue(p(), h)) | |
35 | + | ||
36 | + | ||
37 | + | func r () = fromBase58String(getStringValue(p(), f)) | |
38 | + | ||
39 | + | ||
40 | + | func s () = fromBase58String(getStringValue(p(), g)) | |
41 | + | ||
42 | + | ||
43 | + | func t () = valueOrErrorMessage(addressFromString(getStringValue(p(), i)), "Manager not set") | |
44 | + | ||
45 | + | ||
46 | + | func u (o) = valueOrElse(getBoolean(p(), m(j, o)), false) | |
47 | + | ||
48 | + | ||
49 | + | func v (w) = valueOrElse(getBoolean(this, m(c, w)), false) | |
50 | + | ||
51 | + | ||
52 | + | func x () = valueOrErrorMessage(addressFromString(getStringValue(p(), k)), "Insurance not set") | |
53 | + | ||
54 | + | ||
55 | + | func y () = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(p(), l), "No swap address")), "Invalid swap address") | |
56 | + | ||
57 | + | ||
58 | + | let z = (1 * (((((((10 * 10) * 10) * 10) * 10) * 10) * 10) * 10)) | |
59 | + | ||
60 | + | let A = ((60 * 60) * 24) | |
61 | + | ||
62 | + | let B = "" | |
63 | + | ||
64 | + | let C = 0 | |
65 | + | ||
66 | + | func D (E) = (E / 100) | |
67 | + | ||
68 | + | ||
69 | + | func F (E) = (E * 100) | |
70 | + | ||
71 | + | ||
72 | + | func G () = valueOrElse(getBoolean(this, d), false) | |
73 | + | ||
74 | + | ||
75 | + | func H (I,w,J) = ((((((b + "_") + I) + "_") + w) + "_") + J) | |
76 | + | ||
77 | + | ||
78 | + | func K (I,w,J) = { | |
79 | + | let L = H(I, w, J) | |
80 | + | valueOrElse(getInteger(this, L), 0) | |
81 | + | } | |
82 | + | ||
83 | + | ||
84 | + | @Callable(M) | |
85 | + | func initialize (N,O) = if (G()) | |
86 | + | then throw("Already initialized") | |
87 | + | else { | |
88 | + | let P = split(O, ",") | |
89 | + | func Q (R,w) = (R :+ BooleanEntry(m(c, w), true)) | |
90 | + | ||
91 | + | ({ | |
92 | + | let S = P | |
93 | + | let T = size(S) | |
94 | + | let U = nil | |
95 | + | func V (W,X) = if ((X >= T)) | |
96 | + | then W | |
97 | + | else Q(W, S[X]) | |
98 | + | ||
99 | + | func Y (W,X) = if ((X >= T)) | |
100 | + | then W | |
101 | + | else throw("List size exceeds 20") | |
102 | + | ||
103 | + | Y(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(V(U, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20) | |
104 | + | } ++ [StringEntry(e, N), BooleanEntry(d, true)]) | |
105 | + | } | |
106 | + | ||
107 | + | ||
108 | + | ||
109 | + | @Callable(M) | |
110 | + | func borrow (J) = { | |
111 | + | let Z = M.payments[0].amount | |
112 | + | let aa = toBase58String(valueOrErrorMessage(M.payments[0].assetId, "Invalid asset id")) | |
113 | + | let ab = toString(M.caller) | |
114 | + | if (if (!(u(ab))) | |
115 | + | then true | |
116 | + | else !(v(aa))) | |
117 | + | then throw("Invalid borrow parameters") | |
118 | + | else { | |
119 | + | let ac = invoke(x(), "withdraw", [Z], nil) | |
120 | + | if ((ac == ac)) | |
121 | + | then [ScriptTransfer(M.caller, Z, s()), IntegerEntry(H(ab, aa, J), (K(ab, aa, J) + Z))] | |
122 | + | else throw("Strict value is not equal to itself.") | |
123 | + | } | |
124 | + | } | |
125 | + | ||
126 | + | ||
127 | + | ||
128 | + | @Callable(M) | |
129 | + | func repay (J,w) = { | |
130 | + | let Z = M.payments[0].amount | |
131 | + | let ab = toString(M.caller) | |
132 | + | if (if (!(u(ab))) | |
133 | + | then true | |
134 | + | else !(v(w))) | |
135 | + | then throw("Invalid repay parameters") | |
136 | + | else { | |
137 | + | let ac = invoke(x(), "deposit", nil, [AttachedPayment(s(), Z)]) | |
138 | + | if ((ac == ac)) | |
139 | + | then { | |
140 | + | let ad = (K(ab, w, J) - Z) | |
141 | + | ([ScriptTransfer(M.caller, Z, fromBase58String(w))] ++ (if ((ad > 0)) | |
142 | + | then [IntegerEntry(H(ab, w, J), ad)] | |
143 | + | else [DeleteEntry(H(ab, w, J))])) | |
144 | + | } | |
145 | + | else throw("Strict value is not equal to itself.") | |
146 | + | } | |
147 | + | } | |
148 | + | ||
149 | + | ||
150 | + | ||
151 | + | @Callable(M) | |
152 | + | func realizePartiallyAndClose (J,w) = { | |
153 | + | let Z = if ((size(M.payments) > 0)) | |
154 | + | then M.payments[0].amount | |
155 | + | else 0 | |
156 | + | let ab = toString(M.caller) | |
157 | + | let ae = K(ab, w, J) | |
158 | + | let af = (ae - Z) | |
159 | + | let ag = if ((0 >= af)) | |
160 | + | then throw("Use repay instead") | |
161 | + | else nil | |
162 | + | if ((ag == ag)) | |
163 | + | then if (if (!(u(ab))) | |
164 | + | then true | |
165 | + | else !(v(w))) | |
166 | + | then throw("Invalid realizePartiallyAndClose parameters") | |
167 | + | else { | |
168 | + | let ah = assetBalance(this, s()) | |
169 | + | if ((ah == ah)) | |
170 | + | then { | |
171 | + | let ai = invoke(y(), "swap", [toBase58String(s()), 0], [AttachedPayment(fromBase58String(w), af)]) | |
172 | + | if ((ai == ai)) | |
173 | + | then { | |
174 | + | let aj = assetBalance(this, s()) | |
175 | + | if ((aj == aj)) | |
176 | + | then { | |
177 | + | let ak = (aj - ah) | |
178 | + | if ((ak == ak)) | |
179 | + | then { | |
180 | + | let ac = invoke(x(), "deposit", nil, [AttachedPayment(s(), (Z + ak))]) | |
181 | + | if ((ac == ac)) | |
182 | + | then { | |
183 | + | let al = (ae - af) | |
184 | + | if ((al > 0)) | |
185 | + | then [ScriptTransfer(M.caller, (ae - af), fromBase58String(w))] | |
186 | + | else (nil ++ [DeleteEntry(H(ab, w, J))]) | |
187 | + | } | |
188 | + | else throw("Strict value is not equal to itself.") | |
189 | + | } | |
190 | + | else throw("Strict value is not equal to itself.") | |
191 | + | } | |
192 | + | else throw("Strict value is not equal to itself.") | |
193 | + | } | |
194 | + | else throw("Strict value is not equal to itself.") | |
195 | + | } | |
196 | + | else throw("Strict value is not equal to itself.") | |
197 | + | } | |
198 | + | else throw("Strict value is not equal to itself.") | |
199 | + | } | |
200 | + | ||
201 | + | ||
202 | + | ||
203 | + | @Callable(M) | |
204 | + | func realizePartially (J,w,am) = { | |
205 | + | let ab = toString(M.caller) | |
206 | + | let ae = K(ab, w, J) | |
207 | + | let ag = if (if ((0 >= am)) | |
208 | + | then true | |
209 | + | else (am > ae)) | |
210 | + | then throw("Invalid realizePartiallyAndClose parameters") | |
211 | + | else nil | |
212 | + | if ((ag == ag)) | |
213 | + | then if (if (!(u(ab))) | |
214 | + | then true | |
215 | + | else !(v(w))) | |
216 | + | then throw("Invalid realizePartiallyAndClose parameters") | |
217 | + | else { | |
218 | + | let ah = assetBalance(this, s()) | |
219 | + | if ((ah == ah)) | |
220 | + | then { | |
221 | + | let ai = invoke(y(), "swap", [toBase58String(s()), 0], [AttachedPayment(fromBase58String(w), am)]) | |
222 | + | if ((ai == ai)) | |
223 | + | then { | |
224 | + | let aj = assetBalance(this, s()) | |
225 | + | if ((aj == aj)) | |
226 | + | then { | |
227 | + | let ak = (aj - ah) | |
228 | + | if ((ak == ak)) | |
229 | + | then { | |
230 | + | let ac = invoke(x(), "deposit", nil, [AttachedPayment(s(), ak)]) | |
231 | + | if ((ac == ac)) | |
232 | + | then [IntegerEntry(H(ab, w, J), (K(ab, w, J) - am))] | |
233 | + | else throw("Strict value is not equal to itself.") | |
234 | + | } | |
235 | + | else throw("Strict value is not equal to itself.") | |
236 | + | } | |
237 | + | else throw("Strict value is not equal to itself.") | |
238 | + | } | |
239 | + | else throw("Strict value is not equal to itself.") | |
240 | + | } | |
241 | + | else throw("Strict value is not equal to itself.") | |
242 | + | } | |
243 | + | else throw("Strict value is not equal to itself.") | |
244 | + | } | |
245 | + | ||
246 | + | ||
247 | + | @Verifier(an) | |
248 | + | func ao () = sigVerify(an.bodyBytes, an.proofs[0], q()) | |
249 | + |
github/deemru/w8io/169f3d6 28.40 ms ◑