tx · 58S5VFz1Fvx81Ufu1dckojkxjLNBcHvcMx2Gx9ZTVwvk 3MvGMtmdY1eSW4iY922zj5bx8hBfyP1qgHo: -0.04000000 Waves 2021.09.07 16:30 [1692685] smart account 3MvGMtmdY1eSW4iY922zj5bx8hBfyP1qgHo > SELF 0.00000000 Waves
{ "type": 13, "id": "58S5VFz1Fvx81Ufu1dckojkxjLNBcHvcMx2Gx9ZTVwvk", "fee": 4000000, "feeAssetId": null, "timestamp": 1631021461135, "version": 2, "chainId": 84, "sender": "3MvGMtmdY1eSW4iY922zj5bx8hBfyP1qgHo", "senderPublicKey": "CD4N2SBeZVBUwmtsqwfmQ3ZKnBP3AxpZCvJ5QkHytUed", "proofs": [ "3HJN4crrE2e7zFgeC1DNYXBGdAFrvnNyvrUSL6B7cQjq2ErYAr47oAYooGahNvSP4eR6Tt2R5ykrTXyNYsuA2ugm" ], "script": "base64:AAIFAAAAAAAAAEQIAhIAEgQKAggYEgMKAQgSAwoBCBIECgIIBBIDCgEIEgMKAQgSBgoECAgICBIFCgMICAESAwoBCBIFCgMICAESAwoBCAAAAA8AAAAABmNvbmZpZwkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkBAAAAEUBleHRyTmF0aXZlKDEwNTMpAAAAAgUAAAAEdGhpcwIAAAAGY29uZmlnAgAAAAAAAAAABWFkbWluCQEAAAALdmFsdWVPckVsc2UAAAACCQEAAAARQGV4dHJOYXRpdmUoMTA1MykAAAACCQEAAAARQGV4dHJOYXRpdmUoMTA2MikAAAABBQAAAAZjb25maWcCAAAABWFkbWluAgAAAAAAAAAABXBvb2xzCQEAAAALdmFsdWVPckVsc2UAAAACCQEAAAARQGV4dHJOYXRpdmUoMTA1MykAAAACBQAAAAR0aGlzAgAAAAVwb29scwIAAAAAAQAAAAdpc0FkbWluAAAAAQAAAA1jYWxsZXJBZGRyZXNzAwkAAAAAAAACBQAAAA1jYWxsZXJBZGRyZXNzCQEAAAARQGV4dHJOYXRpdmUoMTA2MikAAAABBQAA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AAckbWF0Y2gwAgAAAANJbnQEAAAAAXQFAAAAByRtYXRjaDAJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAAAF0CQACWQAAAAEFAAAAB3Rva2VuSWQFAAAAA25pbAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAF0BQAAAAckbWF0Y2gwBQAAAANuaWwJAAACAAAAAQIAAAAYSW5jb3JyZWN0IGludm9rZSByZXN1bHQhCQAAAgAAAAECAAAAJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAAIAAAABAgAAABtCb3Jyb3cgZXhjZWVkcyB1c2VyIGhlYWx0aCEJAAACAAAAAQIAAAAXQXNzZXRJZHMgZG9lcyBub3QgbWF0Y2gJAAACAAAAAQIAAAAXUG9vbCBhZGRyZXNzIG5vdCBmb3VuZCEAAAABaQEAAAAKZGVsZXRlRGF0YQAAAAEAAAAEbmFtZQkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABBQAAAARuYW1lBQAAAANuaWwAAAAA/pklUg==", "height": 1692685, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 59iroGMSmdiPPrq3WA3euMj4yabWeyG5ij8cPhQVfgTd Next: 4eoxz9iBHJD55uHwwMF8nD9vy8JtDrcigMLnBiGLNQN9 Diff:
Old | New | Differences | |
---|---|---|---|
132 | 132 | let t = toBase58String(al.caller.bytes) | |
133 | 133 | let T = E(t, 0, "", 0, "") | |
134 | 134 | let U = B(T._1, T._2) | |
135 | - | [k((t + "_health"), U)] | |
135 | + | [k((t + "_BC"), T._1), k((t + "_BCU"), T._2), k((t + "_health"), U)] | |
136 | 136 | } | |
137 | 137 | ||
138 | 138 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = valueOrElse(getStringValue(this, "config"), "") | |
5 | 5 | ||
6 | 6 | let b = valueOrElse(getStringValue(addressFromStringValue(a), "admin"), "") | |
7 | 7 | ||
8 | 8 | let c = valueOrElse(getStringValue(this, "pools"), "") | |
9 | 9 | ||
10 | 10 | func d (e) = if ((e == addressFromStringValue(b))) | |
11 | 11 | then true | |
12 | 12 | else false | |
13 | 13 | ||
14 | 14 | ||
15 | 15 | func f (g) = if (contains(c, g)) | |
16 | 16 | then true | |
17 | 17 | else false | |
18 | 18 | ||
19 | 19 | ||
20 | 20 | func h (i,j) = StringEntry(i, j) | |
21 | 21 | ||
22 | 22 | ||
23 | 23 | func k (i,l) = IntegerEntry(i, l) | |
24 | 24 | ||
25 | 25 | ||
26 | 26 | func m (n,o) = { | |
27 | 27 | let p = getIntegerValue(addressFromStringValue(n), "totalSupply") | |
28 | 28 | let q = getIntegerValue(addressFromStringValue(n), "totalBorrow") | |
29 | 29 | let r = (p - q) | |
30 | 30 | if ((r >= o)) | |
31 | 31 | then true | |
32 | 32 | else false | |
33 | 33 | } | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | func s (t,n,u,v,w,x) = { | |
37 | 37 | let y = invoke(addressFromStringValue(n), "getUserHealthParameter", [t, w, x, u, v], nil) | |
38 | 38 | let z = y | |
39 | 39 | if ($isInstanceOf(z, "(Int, Int)")) | |
40 | 40 | then { | |
41 | 41 | let A = z | |
42 | 42 | A | |
43 | 43 | } | |
44 | 44 | else throw("Return value has the wrong data type") | |
45 | 45 | } | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | func B (C,D) = if ((C > 0)) | |
49 | 49 | then fraction((C - D), 1000, C) | |
50 | 50 | else 0 | |
51 | 51 | ||
52 | 52 | ||
53 | 53 | func E (t,u,v,w,x) = { | |
54 | 54 | let F = split(c, ";") | |
55 | 55 | let G = size(F) | |
56 | 56 | func H (I,J) = { | |
57 | 57 | let K = s(t, J, u, v, w, x) | |
58 | 58 | let z = K | |
59 | 59 | if ($isInstanceOf(z, "(Int, Int)")) | |
60 | 60 | then { | |
61 | 61 | let A = z | |
62 | 62 | $Tuple2((I._1 + K._1), (I._2 + K._2)) | |
63 | 63 | } | |
64 | 64 | else { | |
65 | 65 | let L = z | |
66 | 66 | throw("Test") | |
67 | 67 | } | |
68 | 68 | } | |
69 | 69 | ||
70 | 70 | let M = F | |
71 | 71 | let N = size(M) | |
72 | 72 | let O = $Tuple2(0, 0) | |
73 | 73 | if ((N == 0)) | |
74 | 74 | then O | |
75 | 75 | else { | |
76 | 76 | let P = H(O, M[0]) | |
77 | 77 | if ((N == 1)) | |
78 | 78 | then P | |
79 | 79 | else { | |
80 | 80 | let Q = H(P, M[1]) | |
81 | 81 | if ((N == 2)) | |
82 | 82 | then Q | |
83 | 83 | else { | |
84 | 84 | let R = H(Q, M[2]) | |
85 | 85 | throw("List size exceed 2") | |
86 | 86 | } | |
87 | 87 | } | |
88 | 88 | } | |
89 | 89 | } | |
90 | 90 | ||
91 | 91 | ||
92 | 92 | func S (t,u,v,w,x) = { | |
93 | 93 | let T = E(t, u, v, w, x) | |
94 | 94 | let U = B(T._1, T._2) | |
95 | 95 | if ((U >= 0)) | |
96 | 96 | then true | |
97 | 97 | else false | |
98 | 98 | } | |
99 | 99 | ||
100 | 100 | ||
101 | 101 | func V (t,n,W) = { | |
102 | 102 | let X = getString(addressFromStringValue(n), "assetId") | |
103 | 103 | if ((X == W)) | |
104 | 104 | then { | |
105 | 105 | let Y = valueOrElse(getInteger(addressFromStringValue(n), (t + "_borrow")), 0) | |
106 | 106 | if ((Y > 0)) | |
107 | 107 | then true | |
108 | 108 | else false | |
109 | 109 | } | |
110 | 110 | else throw("AssetIds do not match!") | |
111 | 111 | } | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | func Z (t,n) = { | |
115 | 115 | let aa = valueOrElse(getInteger(addressFromStringValue(n), (t + "_locked")), 0) | |
116 | 116 | if ((aa > 0)) | |
117 | 117 | then true | |
118 | 118 | else false | |
119 | 119 | } | |
120 | 120 | ||
121 | 121 | ||
122 | 122 | func ab (ac,ad,ae,af,ag,ah) = { | |
123 | 123 | let ai = 1000 | |
124 | 124 | let aj = fraction(ac, ad, ae) | |
125 | 125 | let ak = fraction(aj, ah, ai) | |
126 | 126 | fraction((aj + ak), ag, af) | |
127 | 127 | } | |
128 | 128 | ||
129 | 129 | ||
130 | 130 | @Callable(al) | |
131 | 131 | func checkUserHealthTest () = { | |
132 | 132 | let t = toBase58String(al.caller.bytes) | |
133 | 133 | let T = E(t, 0, "", 0, "") | |
134 | 134 | let U = B(T._1, T._2) | |
135 | - | [k((t + "_health"), U)] | |
135 | + | [k((t + "_BC"), T._1), k((t + "_BCU"), T._2), k((t + "_health"), U)] | |
136 | 136 | } | |
137 | 137 | ||
138 | 138 | ||
139 | 139 | ||
140 | 140 | @Callable(al) | |
141 | 141 | func setup (am,c) = if (if (!(isDefined(getString(this, "config")))) | |
142 | 142 | then !(isDefined(getString(this, "pools"))) | |
143 | 143 | else false) | |
144 | 144 | then [h("config", am), h("pools", makeString(c, ";"))] | |
145 | 145 | else throw("Admin and config address already definied!") | |
146 | 146 | ||
147 | 147 | ||
148 | 148 | ||
149 | 149 | @Callable(al) | |
150 | 150 | func addPool (n) = if (d(al.caller)) | |
151 | 151 | then { | |
152 | 152 | let F = split(c, ";") | |
153 | 153 | if ((containsElement(F, n) == false)) | |
154 | 154 | then { | |
155 | 155 | let an = (F :+ n) | |
156 | 156 | [h("pools", makeString(an, ";"))] | |
157 | 157 | } | |
158 | 158 | else throw("Pool already exists!") | |
159 | 159 | } | |
160 | 160 | else throw("Address does not match with admin address!") | |
161 | 161 | ||
162 | 162 | ||
163 | 163 | ||
164 | 164 | @Callable(al) | |
165 | 165 | func updateConfig (am) = if (d(al.caller)) | |
166 | 166 | then [h("config", am)] | |
167 | 167 | else throw("Address does not match with admin address!") | |
168 | 168 | ||
169 | 169 | ||
170 | 170 | ||
171 | 171 | @Callable(al) | |
172 | 172 | func depositAt (n,ao) = if (f(n)) | |
173 | 173 | then if ((size(al.payments) > 0)) | |
174 | 174 | then { | |
175 | 175 | let t = toBase58String(al.caller.bytes) | |
176 | 176 | let ap = invoke(addressFromStringValue(n), "deposit", [t, ao], al.payments) | |
177 | 177 | if ((ap == ap)) | |
178 | 178 | then { | |
179 | 179 | let aq = getStringValue(addressFromStringValue(n), "dTokenId") | |
180 | 180 | let z = ap | |
181 | 181 | if ($isInstanceOf(z, "Int")) | |
182 | 182 | then { | |
183 | 183 | let A = z | |
184 | 184 | [ScriptTransfer(al.caller, A, fromBase58String(aq))] | |
185 | 185 | } | |
186 | 186 | else if ($isInstanceOf(z, "String")) | |
187 | 187 | then { | |
188 | 188 | let A = z | |
189 | 189 | nil | |
190 | 190 | } | |
191 | 191 | else throw("Incorrect invoke result!") | |
192 | 192 | } | |
193 | 193 | else throw("Strict value is not equal to itself.") | |
194 | 194 | } | |
195 | 195 | else throw("No payment attached!") | |
196 | 196 | else throw("Pool address not found!") | |
197 | 197 | ||
198 | 198 | ||
199 | 199 | ||
200 | 200 | @Callable(al) | |
201 | 201 | func withdrawFrom (n) = if (f(n)) | |
202 | 202 | then { | |
203 | 203 | let ar = getStringValue(addressFromStringValue(n), "dTokenId") | |
204 | 204 | if ((fromBase58String(ar) == al.payments[0].assetId)) | |
205 | 205 | then if ((size(al.payments) > 0)) | |
206 | 206 | then { | |
207 | 207 | let t = toBase58String(al.caller.bytes) | |
208 | 208 | let ap = invoke(addressFromStringValue(n), "withdraw", [t], al.payments) | |
209 | 209 | if ((ap == ap)) | |
210 | 210 | then { | |
211 | 211 | let aq = getStringValue(addressFromStringValue(n), "assetId") | |
212 | 212 | let z = ap | |
213 | 213 | if ($isInstanceOf(z, "Int")) | |
214 | 214 | then { | |
215 | 215 | let A = z | |
216 | 216 | if ((aq == "WAVES")) | |
217 | 217 | then [ScriptTransfer(al.caller, A, unit)] | |
218 | 218 | else [ScriptTransfer(al.caller, A, fromBase58String(aq))] | |
219 | 219 | } | |
220 | 220 | else if ($isInstanceOf(z, "String")) | |
221 | 221 | then { | |
222 | 222 | let A = z | |
223 | 223 | nil | |
224 | 224 | } | |
225 | 225 | else throw("Incorrect invoke result!") | |
226 | 226 | } | |
227 | 227 | else throw("Strict value is not equal to itself.") | |
228 | 228 | } | |
229 | 229 | else throw("No payment attached!") | |
230 | 230 | else throw("AssetIds does not match") | |
231 | 231 | } | |
232 | 232 | else throw("Pool address not found!") | |
233 | 233 | ||
234 | 234 | ||
235 | 235 | ||
236 | 236 | @Callable(al) | |
237 | 237 | func repayTo (n) = if (f(n)) | |
238 | 238 | then { | |
239 | 239 | let X = getStringValue(addressFromStringValue(n), "assetId") | |
240 | 240 | if ((fromBase58String(X) == al.payments[0].assetId)) | |
241 | 241 | then if ((size(al.payments) > 0)) | |
242 | 242 | then { | |
243 | 243 | let t = toBase58String(al.caller.bytes) | |
244 | 244 | let o = invoke(addressFromStringValue(n), "repay", [t], al.payments) | |
245 | 245 | if ((o == o)) | |
246 | 246 | then { | |
247 | 247 | let as = getStringValue(addressFromStringValue(n), "assetId") | |
248 | 248 | let z = o | |
249 | 249 | if ($isInstanceOf(z, "Int")) | |
250 | 250 | then { | |
251 | 251 | let A = z | |
252 | 252 | if ((as == "WAVES")) | |
253 | 253 | then [ScriptTransfer(al.caller, A, unit)] | |
254 | 254 | else [ScriptTransfer(al.caller, A, fromBase58String(as))] | |
255 | 255 | } | |
256 | 256 | else if ($isInstanceOf(z, "String")) | |
257 | 257 | then { | |
258 | 258 | let A = z | |
259 | 259 | nil | |
260 | 260 | } | |
261 | 261 | else throw("Incorrect invoke result!") | |
262 | 262 | } | |
263 | 263 | else throw("Strict value is not equal to itself.") | |
264 | 264 | } | |
265 | 265 | else throw("No payment attached!") | |
266 | 266 | else throw("AssetIds does not match") | |
267 | 267 | } | |
268 | 268 | else throw("Pool address not found!") | |
269 | 269 | ||
270 | 270 | ||
271 | 271 | ||
272 | 272 | @Callable(al) | |
273 | 273 | func liquidateAt (at,au,av,aw) = { | |
274 | 274 | let ax = getIntegerValue(addressFromStringValue(a), "closeFactor") | |
275 | 275 | let ah = getIntegerValue(addressFromStringValue(a), (aw + "_Penalty")) | |
276 | 276 | let ac = al.payments[0].amount | |
277 | 277 | if ((S(at, 0, "", 0, "") == false)) | |
278 | 278 | then { | |
279 | 279 | let W = { | |
280 | 280 | let z = al.payments[0].assetId | |
281 | 281 | if ($isInstanceOf(z, "ByteVector")) | |
282 | 282 | then { | |
283 | 283 | let A = z | |
284 | 284 | toBase58String(A) | |
285 | 285 | } | |
286 | 286 | else throw("AssetId is not a String") | |
287 | 287 | } | |
288 | 288 | if (if (V(at, au, W)) | |
289 | 289 | then Z(at, av) | |
290 | 290 | else false) | |
291 | 291 | then { | |
292 | 292 | let y = invoke(addressFromStringValue(au), "getBorrowUSD", [at], nil) | |
293 | 293 | if ((y == y)) | |
294 | 294 | then { | |
295 | 295 | let Y = { | |
296 | 296 | let z = y | |
297 | 297 | if ($isInstanceOf(z, "(Int, Int, Int)")) | |
298 | 298 | then { | |
299 | 299 | let A = z | |
300 | 300 | A | |
301 | 301 | } | |
302 | 302 | else throw("unexpected return value type") | |
303 | 303 | } | |
304 | 304 | let ay = invoke(addressFromStringValue(av), "getCollateralUSD", [at], nil) | |
305 | 305 | if ((ay == ay)) | |
306 | 306 | then { | |
307 | 307 | let aa = { | |
308 | 308 | let z = ay | |
309 | 309 | if ($isInstanceOf(z, "(Int, Int, Int)")) | |
310 | 310 | then { | |
311 | 311 | let az = z | |
312 | 312 | az | |
313 | 313 | } | |
314 | 314 | else throw("unexpected return value type") | |
315 | 315 | } | |
316 | 316 | if ((fraction(Y._1, ax, 1000) >= ac)) | |
317 | 317 | then { | |
318 | 318 | let w = ab(ac, Y._2, Y._3, aa._2, aa._3, ah) | |
319 | 319 | let aA = invoke(addressFromStringValue(au), "repay", [at], al.payments) | |
320 | 320 | if ((aA == aA)) | |
321 | 321 | then { | |
322 | 322 | let o = invoke(addressFromStringValue(av), "payoutPenalty", [at, w], nil) | |
323 | 323 | if ((o == o)) | |
324 | 324 | then { | |
325 | 325 | let as = getStringValue(addressFromStringValue(av), "assetId") | |
326 | 326 | let z = o | |
327 | 327 | if ($isInstanceOf(z, "Int")) | |
328 | 328 | then { | |
329 | 329 | let A = z | |
330 | 330 | if ((as == "WAVES")) | |
331 | 331 | then [ScriptTransfer(al.caller, A, unit)] | |
332 | 332 | else [ScriptTransfer(al.caller, A, fromBase58String(as))] | |
333 | 333 | } | |
334 | 334 | else if ($isInstanceOf(z, "String")) | |
335 | 335 | then { | |
336 | 336 | let A = z | |
337 | 337 | nil | |
338 | 338 | } | |
339 | 339 | else throw("Incorrect invoke result!") | |
340 | 340 | } | |
341 | 341 | else throw("Strict value is not equal to itself.") | |
342 | 342 | } | |
343 | 343 | else throw("Strict value is not equal to itself.") | |
344 | 344 | } | |
345 | 345 | else throw("Liquidation amount exceeds closefactor!") | |
346 | 346 | } | |
347 | 347 | else throw("Strict value is not equal to itself.") | |
348 | 348 | } | |
349 | 349 | else throw("Strict value is not equal to itself.") | |
350 | 350 | } | |
351 | 351 | else throw("User does not have the required assets!") | |
352 | 352 | } | |
353 | 353 | else throw("Only unhealthy accounts can be liquidated!") | |
354 | 354 | } | |
355 | 355 | ||
356 | 356 | ||
357 | 357 | ||
358 | 358 | @Callable(al) | |
359 | 359 | func borrowFrom (n,as,o) = if (f(n)) | |
360 | 360 | then { | |
361 | 361 | let X = getStringValue(addressFromStringValue(n), "assetId") | |
362 | 362 | if ((X == as)) | |
363 | 363 | then if (m(n, o)) | |
364 | 364 | then { | |
365 | 365 | let t = toBase58String(al.caller.bytes) | |
366 | 366 | if ((S(t, o, as, 0, "") == true)) | |
367 | 367 | then { | |
368 | 368 | let ap = invoke(addressFromStringValue(n), "borrow", [t, o], nil) | |
369 | 369 | if ((ap == ap)) | |
370 | 370 | then { | |
371 | 371 | let z = ap | |
372 | 372 | if ($isInstanceOf(z, "Int")) | |
373 | 373 | then { | |
374 | 374 | let A = z | |
375 | 375 | if ((X == "WAVES")) | |
376 | 376 | then [ScriptTransfer(al.caller, A, unit)] | |
377 | 377 | else [ScriptTransfer(al.caller, A, fromBase58String(X))] | |
378 | 378 | } | |
379 | 379 | else if ($isInstanceOf(z, "String")) | |
380 | 380 | then { | |
381 | 381 | let A = z | |
382 | 382 | nil | |
383 | 383 | } | |
384 | 384 | else throw("Incorrect invoke result!") | |
385 | 385 | } | |
386 | 386 | else throw("Strict value is not equal to itself.") | |
387 | 387 | } | |
388 | 388 | else throw("Borrow exceeds user health!") | |
389 | 389 | } | |
390 | 390 | else throw("Pool liquidity is not sufficient!") | |
391 | 391 | else throw("AssetIds does not match") | |
392 | 392 | } | |
393 | 393 | else throw("Pool address not found!") | |
394 | 394 | ||
395 | 395 | ||
396 | 396 | ||
397 | 397 | @Callable(al) | |
398 | 398 | func lockAsCollateralAt (n) = if (f(n)) | |
399 | 399 | then { | |
400 | 400 | let ar = getStringValue(addressFromStringValue(n), "dTokenId") | |
401 | 401 | if ((fromBase58String(ar) == al.payments[0].assetId)) | |
402 | 402 | then if ((size(al.payments) > 0)) | |
403 | 403 | then { | |
404 | 404 | let t = toBase58String(al.caller.bytes) | |
405 | 405 | let aB = invoke(addressFromStringValue(n), "lockAsCollateral", [t], al.payments) | |
406 | 406 | if ((aB == aB)) | |
407 | 407 | then { | |
408 | 408 | let z = aB | |
409 | 409 | if ($isInstanceOf(z, "String")) | |
410 | 410 | then { | |
411 | 411 | let A = z | |
412 | 412 | nil | |
413 | 413 | } | |
414 | 414 | else throw("Incorrect invoke result!") | |
415 | 415 | } | |
416 | 416 | else throw("Strict value is not equal to itself.") | |
417 | 417 | } | |
418 | 418 | else throw("No payment attached!") | |
419 | 419 | else throw("AssetIds does not match") | |
420 | 420 | } | |
421 | 421 | else throw("Pool address not found!") | |
422 | 422 | ||
423 | 423 | ||
424 | 424 | ||
425 | 425 | @Callable(al) | |
426 | 426 | func redeemCollateralFrom (n,aC,o) = if (f(n)) | |
427 | 427 | then { | |
428 | 428 | let aD = getStringValue(addressFromStringValue(n), "dTokenId") | |
429 | 429 | if ((aD == aC)) | |
430 | 430 | then { | |
431 | 431 | let t = toBase58String(al.caller.bytes) | |
432 | 432 | if ((S(t, 0, "", o, aC) == true)) | |
433 | 433 | then { | |
434 | 434 | let ap = invoke(addressFromStringValue(n), "redeemCollateral", [t, o], nil) | |
435 | 435 | if ((ap == ap)) | |
436 | 436 | then { | |
437 | 437 | let aq = getStringValue(addressFromStringValue(n), "dTokenId") | |
438 | 438 | let z = ap | |
439 | 439 | if ($isInstanceOf(z, "Int")) | |
440 | 440 | then { | |
441 | 441 | let A = z | |
442 | 442 | [ScriptTransfer(al.caller, A, fromBase58String(aq))] | |
443 | 443 | } | |
444 | 444 | else if ($isInstanceOf(z, "String")) | |
445 | 445 | then { | |
446 | 446 | let A = z | |
447 | 447 | nil | |
448 | 448 | } | |
449 | 449 | else throw("Incorrect invoke result!") | |
450 | 450 | } | |
451 | 451 | else throw("Strict value is not equal to itself.") | |
452 | 452 | } | |
453 | 453 | else throw("Borrow exceeds user health!") | |
454 | 454 | } | |
455 | 455 | else throw("AssetIds does not match") | |
456 | 456 | } | |
457 | 457 | else throw("Pool address not found!") | |
458 | 458 | ||
459 | 459 | ||
460 | 460 | ||
461 | 461 | @Callable(al) | |
462 | 462 | func deleteData (aE) = [DeleteEntry(aE)] | |
463 | 463 | ||
464 | 464 |
github/deemru/w8io/169f3d6 73.09 ms ◑