tx · DCKGNAwRjGUSt2oyuhKPQrkAcemx85YkmidsrKxPvwPs 3MvGMtmdY1eSW4iY922zj5bx8hBfyP1qgHo: -0.04000000 Waves 2021.09.05 01:32 [1688902] smart account 3MvGMtmdY1eSW4iY922zj5bx8hBfyP1qgHo > SELF 0.00000000 Waves
{ "type": 13, "id": "DCKGNAwRjGUSt2oyuhKPQrkAcemx85YkmidsrKxPvwPs", "fee": 4000000, "feeAssetId": null, "timestamp": 1630794761531, "version": 2, "chainId": 84, "sender": "3MvGMtmdY1eSW4iY922zj5bx8hBfyP1qgHo", "senderPublicKey": "CD4N2SBeZVBUwmtsqwfmQ3ZKnBP3AxpZCvJ5QkHytUed", "proofs": [ "4DM56RMd2nkpk5giNx11ozqRsSyctWBP494zD6kZXfqw9tsC3A4FT6zeKAaxKAHZRZAjCG8mUGhn9V1XkvLpsL7d" ], "script": "base64:AAIFAAAAAAAAACkIAhIECgIIGBIDCgEIEgMKAQgSBAoCCAQSAwoBCBIDCgEIEgUKAwgIAQAAAAwAAAAABmNvbmZpZwkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkBAAAAEUBleHRyTmF0aXZlKDEwNTMpAAAAAgUAAAAEdGhpcwIAAAAGY29uZmlnAgAAAAAAAAAABWFkbWluCQEAAAALdmFsdWVPckVsc2UAAAACCQEAAAARQGV4dHJOYXRpdmUoMTA1MykAAAACCQEAAAARQGV4dHJOYXRpdmUoMTA2MikAAAABBQAAAAZjb25maWcCAAAABWFkbWluAgAAAAAAAAAABXBvb2xzCQEAAAALdmFsdWVPckVsc2UAAAACCQEAAAARQGV4dHJOYXRpdmUoMTA1MykAAAACBQAAAAR0aGlzAgAAAAVwb29scwIAAAAAAQAAAAdpc0FkbWluAAAAAQAAAA1jYWxsZXJBZGRyZXNzAwkAAAAAAAACBQAAAA1jYWxsZXJBZGRyZXNzCQEAAAARQGV4dHJOYXRpdmUoMTA2MikAAAABBQAAAAVhZG1pbgYHAQAAAAljaGVja1Bvb2wAAAABAAAAB3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SgxMDYyKQAAAAEFAAAAC3Bvb2xBZGRyZXNzAgAAAAdhc3NldElkAwkAAAAAAAACBQAAAAlwb29sQXNzZXQFAAAAB2Fzc2V0SWQDCQEAAAASY2hlY2tQb29sTGlxdWlkaXR5AAAAAgUAAAALcG9vbEFkZHJlc3MFAAAABmFtb3VudAQAAAAEdXNlcgkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzAwkBAAAAD2NoZWNrVXNlckhlYWx0aAAAAAUFAAAABHVzZXIFAAAABmFtb3VudAUAAAAHYXNzZXRJZAAAAAAAAAAAAAIAAAAABQAAAANuaWwJAAACAAAAAQIAAAAbQm9ycm93IGV4Y2VlZHMgdXNlciBoZWFsdGghCQAAAgAAAAECAAAAIVBvb2wgbGlxdWlkaXR5IGlzIG5vdCBzdWZmaWNpZW50IQkAAAIAAAABAgAAABdBc3NldElkcyBkb2VzIG5vdCBtYXRjaAkAAAIAAAABAgAAABdQb29sIGFkZHJlc3Mgbm90IGZvdW5kIQAAAADA5YYI", "height": 1688902, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HTJ3HgBmFsnQYV2RYceizJivKZewYYtousKdAFE9DABR Next: 5TmJ2Pvb3wS4uU1iG5s531vznwJMfu8CYGRbpKKxP34E Diff:
Old | New | Differences | |
---|---|---|---|
34 | 34 | ||
35 | 35 | ||
36 | 36 | func s (t,n,u,v,w,x) = { | |
37 | - | let y = | |
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 { |
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 | - | let y = | |
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("Wrong Datatyp!") | |
45 | 45 | } | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | func B (C,D) = fraction((C - D), 1000, C) | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | func E (t,u,v,w,x) = { | |
52 | 52 | let F = split(c, ";") | |
53 | 53 | let G = size(F) | |
54 | 54 | func H (I,J) = { | |
55 | 55 | let K = s(t, J, u, v, w, x) | |
56 | 56 | let z = K | |
57 | 57 | if ($isInstanceOf(z, "(Int, Int)")) | |
58 | 58 | then { | |
59 | 59 | let A = z | |
60 | 60 | $Tuple2((I._1 + K._1), (I._2 + K._1)) | |
61 | 61 | } | |
62 | 62 | else { | |
63 | 63 | let L = z | |
64 | 64 | throw("Test") | |
65 | 65 | } | |
66 | 66 | } | |
67 | 67 | ||
68 | 68 | let M = F | |
69 | 69 | let N = size(M) | |
70 | 70 | let O = $Tuple2(0, 0) | |
71 | 71 | if ((N == 0)) | |
72 | 72 | then O | |
73 | 73 | else { | |
74 | 74 | let P = H(O, M[0]) | |
75 | 75 | if ((N == 1)) | |
76 | 76 | then P | |
77 | 77 | else { | |
78 | 78 | let Q = H(P, M[1]) | |
79 | 79 | if ((N == 2)) | |
80 | 80 | then Q | |
81 | 81 | else { | |
82 | 82 | let R = H(Q, M[2]) | |
83 | 83 | throw("List size exceed 2") | |
84 | 84 | } | |
85 | 85 | } | |
86 | 86 | } | |
87 | 87 | } | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func S (t,u,v,w,x) = { | |
91 | 91 | let T = E(t, u, v, w, x) | |
92 | 92 | let U = B(T._1, T._2) | |
93 | 93 | if ((U >= 0)) | |
94 | 94 | then true | |
95 | 95 | else false | |
96 | 96 | } | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | @Callable(V) | |
100 | 100 | func setup (W,c) = if (if (!(isDefined(getString(this, "config")))) | |
101 | 101 | then !(isDefined(getString(this, "pools"))) | |
102 | 102 | else false) | |
103 | 103 | then [h("config", W), h("pools", makeString(c, ";"))] | |
104 | 104 | else throw("Admin and config address already definied!") | |
105 | 105 | ||
106 | 106 | ||
107 | 107 | ||
108 | 108 | @Callable(V) | |
109 | 109 | func addPool (n) = if (d(V.caller)) | |
110 | 110 | then { | |
111 | 111 | let F = split(c, ";") | |
112 | 112 | if ((containsElement(F, n) == false)) | |
113 | 113 | then { | |
114 | 114 | let X = (F :+ n) | |
115 | 115 | [h("pools", makeString(X, ";"))] | |
116 | 116 | } | |
117 | 117 | else throw("Pool already exists!") | |
118 | 118 | } | |
119 | 119 | else throw("Address does not match with admin address!") | |
120 | 120 | ||
121 | 121 | ||
122 | 122 | ||
123 | 123 | @Callable(V) | |
124 | 124 | func updateConfig (W) = if (d(V.caller)) | |
125 | 125 | then [h("config", W)] | |
126 | 126 | else throw("Address does not match with admin address!") | |
127 | 127 | ||
128 | 128 | ||
129 | 129 | ||
130 | 130 | @Callable(V) | |
131 | 131 | func depositAt (n,Y) = if (f(n)) | |
132 | 132 | then if ((size(V.payments) > 0)) | |
133 | 133 | then { | |
134 | 134 | let t = toBase58String(V.caller.bytes) | |
135 | 135 | let Z = invoke(addressFromStringValue(n), "deposit", [t, Y], V.payments) | |
136 | 136 | if ((Z == Z)) | |
137 | 137 | then { | |
138 | 138 | let aa = getStringValue(addressFromStringValue(n), "dTokenId") | |
139 | 139 | let z = Z | |
140 | 140 | if ($isInstanceOf(z, "Int")) | |
141 | 141 | then { | |
142 | 142 | let A = z | |
143 | 143 | [ScriptTransfer(V.caller, A, fromBase58String(aa))] | |
144 | 144 | } | |
145 | 145 | else if ($isInstanceOf(z, "String")) | |
146 | 146 | then { | |
147 | 147 | let A = z | |
148 | 148 | nil | |
149 | 149 | } | |
150 | 150 | else throw("Incorrect invoke result!") | |
151 | 151 | } | |
152 | 152 | else throw("Strict value is not equal to itself.") | |
153 | 153 | } | |
154 | 154 | else throw("No payment attached!") | |
155 | 155 | else throw("Pool address not found!") | |
156 | 156 | ||
157 | 157 | ||
158 | 158 | ||
159 | 159 | @Callable(V) | |
160 | 160 | func withdrawFrom (n) = if (f(n)) | |
161 | 161 | then { | |
162 | 162 | let ab = getStringValue(addressFromStringValue(n), "dTokenId") | |
163 | 163 | if ((fromBase58String(ab) == V.payments[0].assetId)) | |
164 | 164 | then if ((size(V.payments) > 0)) | |
165 | 165 | then { | |
166 | 166 | let t = toBase58String(V.caller.bytes) | |
167 | 167 | let Z = invoke(addressFromStringValue(n), "withdraw", [t], V.payments) | |
168 | 168 | if ((Z == Z)) | |
169 | 169 | then { | |
170 | 170 | let aa = getStringValue(addressFromStringValue(n), "assetId") | |
171 | 171 | let z = Z | |
172 | 172 | if ($isInstanceOf(z, "Int")) | |
173 | 173 | then { | |
174 | 174 | let A = z | |
175 | 175 | if ((aa == "WAVES")) | |
176 | 176 | then [ScriptTransfer(V.caller, A, unit)] | |
177 | 177 | else [ScriptTransfer(V.caller, A, fromBase58String(aa))] | |
178 | 178 | } | |
179 | 179 | else if ($isInstanceOf(z, "String")) | |
180 | 180 | then { | |
181 | 181 | let A = z | |
182 | 182 | nil | |
183 | 183 | } | |
184 | 184 | else throw("Incorrect invoke result!") | |
185 | 185 | } | |
186 | 186 | else throw("Strict value is not equal to itself.") | |
187 | 187 | } | |
188 | 188 | else throw("No payment attached!") | |
189 | 189 | else throw("AssetIds does not match") | |
190 | 190 | } | |
191 | 191 | else throw("Pool address not found!") | |
192 | 192 | ||
193 | 193 | ||
194 | 194 | ||
195 | 195 | @Callable(V) | |
196 | 196 | func lockAsCollateralAt (n) = if (f(n)) | |
197 | 197 | then { | |
198 | 198 | let ab = getStringValue(addressFromStringValue(n), "dTokenId") | |
199 | 199 | if ((fromBase58String(ab) == V.payments[0].assetId)) | |
200 | 200 | then if ((size(V.payments) > 0)) | |
201 | 201 | then { | |
202 | 202 | let t = toBase58String(V.caller.bytes) | |
203 | 203 | let ac = invoke(addressFromStringValue(n), "lockAsCollateral", [t], V.payments) | |
204 | 204 | if ((ac == ac)) | |
205 | 205 | then { | |
206 | 206 | let z = ac | |
207 | 207 | if ($isInstanceOf(z, "String")) | |
208 | 208 | then { | |
209 | 209 | let A = z | |
210 | 210 | nil | |
211 | 211 | } | |
212 | 212 | else throw("Incorrect invoke result!") | |
213 | 213 | } | |
214 | 214 | else throw("Strict value is not equal to itself.") | |
215 | 215 | } | |
216 | 216 | else throw("No payment attached!") | |
217 | 217 | else throw("AssetIds does not match") | |
218 | 218 | } | |
219 | 219 | else throw("Pool address not found!") | |
220 | 220 | ||
221 | 221 | ||
222 | 222 | ||
223 | 223 | @Callable(V) | |
224 | 224 | func borrowFrom (n,ad,o) = if (f(n)) | |
225 | 225 | then { | |
226 | 226 | let ae = getStringValue(addressFromStringValue(n), "assetId") | |
227 | 227 | if ((ae == ad)) | |
228 | 228 | then if (m(n, o)) | |
229 | 229 | then { | |
230 | 230 | let t = toBase58String(V.caller.bytes) | |
231 | 231 | if (S(t, o, ad, 0, "")) | |
232 | 232 | then nil | |
233 | 233 | else throw("Borrow exceeds user health!") | |
234 | 234 | } | |
235 | 235 | else throw("Pool liquidity is not sufficient!") | |
236 | 236 | else throw("AssetIds does not match") | |
237 | 237 | } | |
238 | 238 | else throw("Pool address not found!") | |
239 | 239 | ||
240 | 240 |
github/deemru/w8io/026f985 34.24 ms ◑