tx · wA1ZatXYhe3yozE1eFo5m2fzkzCthDYWNRLvfsHSH7W 3MxZ7YNAqigXR5jrgvpb48Uc6B29ouDzQyN: -0.03700000 Waves 2023.05.23 14:06 [2590541] smart account 3MxZ7YNAqigXR5jrgvpb48Uc6B29ouDzQyN > SELF 0.00000000 Waves
{ "type": 13, "id": "wA1ZatXYhe3yozE1eFo5m2fzkzCthDYWNRLvfsHSH7W", "fee": 3700000, "feeAssetId": null, "timestamp": 1684840019744, "version": 2, "chainId": 84, "sender": "3MxZ7YNAqigXR5jrgvpb48Uc6B29ouDzQyN", "senderPublicKey": "HHCdafdi3D2htEYJw8cBoNYC8w76euLWKYENK4kanmGM", "proofs": [ "3Ltw5WxfuXvVBbo53eSTPE18V572hbEdpFWC7CNhyU7AMcUB3vaeKgdgyiJ4tj9mQgCMH4LPopYiWf92KRKz18jy" ], "script": "base64:BgIzCAISBQoDCAgBEgASAwoBARIAEgASABIDCgEBEgMKAQESABIAEgMKAQgSAwoBCBIDCgEIXwANa190b3RhbFN1cHBseQINa190b3RhbFN1cHBseQAPa19yZXdhcmRCYWxhbmNlAg9rX3Jld2FyZEJhbGFuY2UAD2tfbG9ja2VkQmFsYW5jZQIPa19sb2NrZWRCYWxhbmNlAA1rX2ZyZWVCYWxhbmNlAg1rX2ZyZWVCYWxhbmNlAA9rX2V4Y2Vzc0JhbGFuY2UCD2tfZXhjZXNzQmFsYW5jZQAMa192YXVsdEFzc2V0AgxrX3ZhdWx0QXNzZXQAFGtfdmF1bHRBc3NldERlY2ltYWxzAhRrX3ZhdWx0QXNzZXREZWNpbWFscwAUa19tYXhTcG90VXRpbGl6YXRpb24CFGtfbWF4U3BvdFV0aWxpemF0aW9uAAZrX3JhdGUCBmtfcmF0ZQAQa19sYXN0VXBkYXRlVGltZQIQa19sYXN0VXBkYXRlVGltZQAWa19yZXdhcmRQZXJUb2tlblN0b3JlZAIWa19yZXdhcmRQZXJUb2tlblN0b3JlZAAMa19yZXdhcmRSYXRlAgxrX3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ZHJlc3MDCQEJaXNEZWZpbmVkAQUOY29vcmRpbmF0b3JTdHIEBWFkbWluCQCdCAIJARFAZXh0ck5hdGl2ZSgxMDYyKQEJAQV2YWx1ZQEFDmNvb3JkaW5hdG9yU3RyBQ9rX2FkbWluX2FkZHJlc3MDCQEJaXNEZWZpbmVkAQUFYWRtaW4JAQt2YWx1ZU9yRWxzZQIJAJsIAgkBEUBleHRyTmF0aXZlKDEwNjIpAQkBBXZhbHVlAQUFYWRtaW4JAKwCAgkArAICCQCsAgICB3N0YXR1c18JAKUIAQUEdGhpcwIBXwkA2AQBCAUCdHgCaWQHCQACAQIudW5hYmxlIHRvIHZlcmlmeTogYWRtaW4gbm90IHNldCBpbiBjb29yZGluYXRvcgkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleQ8opKU=", "height": 2590541, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AejWijU8Z9T6JnLSGmZ75dH1xNnQj4RGUwa9UNthJe8m Next: 2qRzKZdmurowyBEXEwxVC2au5ZwaH61iEi2Ddcc7neey Diff:
Old | New | Differences | |
---|---|---|---|
9 | 9 | ||
10 | 10 | let d = "k_freeBalance" | |
11 | 11 | ||
12 | - | let e = "k_ | |
12 | + | let e = "k_excessBalance" | |
13 | 13 | ||
14 | - | let f = "k_ | |
14 | + | let f = "k_vaultAsset" | |
15 | 15 | ||
16 | - | let g = "k_ | |
16 | + | let g = "k_vaultAssetDecimals" | |
17 | 17 | ||
18 | - | let h = "k_ | |
18 | + | let h = "k_maxSpotUtilization" | |
19 | 19 | ||
20 | - | let i = "k_ | |
20 | + | let i = "k_rate" | |
21 | 21 | ||
22 | - | let j = "k_ | |
22 | + | let j = "k_lastUpdateTime" | |
23 | 23 | ||
24 | - | let k = "k_ | |
24 | + | let k = "k_rewardPerTokenStored" | |
25 | 25 | ||
26 | - | let l = "k_ | |
26 | + | let l = "k_rewardRate" | |
27 | 27 | ||
28 | - | let m = "k_ | |
28 | + | let m = "k_periodFinish" | |
29 | 29 | ||
30 | - | let n = "k_ | |
30 | + | let n = "k_userRewardPerToken" | |
31 | 31 | ||
32 | - | let o = "k_ | |
32 | + | let o = "k_userReward" | |
33 | 33 | ||
34 | - | let p = "k_ | |
34 | + | let p = "k_balance" | |
35 | 35 | ||
36 | - | let q = "k_ | |
36 | + | let q = "k_average_rate" | |
37 | 37 | ||
38 | - | let r = "k_ | |
38 | + | let r = "k_withdraw_limit" | |
39 | 39 | ||
40 | - | let s = "k_ | |
40 | + | let s = "k_last_withdraw_date" | |
41 | 41 | ||
42 | - | let t = "k_ | |
42 | + | let t = "k_withdraw_in_period" | |
43 | 43 | ||
44 | - | let u = "k_ | |
44 | + | let u = "k_initialized" | |
45 | 45 | ||
46 | - | let v = "k_ | |
46 | + | let v = "k_coordinatorAddress" | |
47 | 47 | ||
48 | - | let w = "k_ | |
48 | + | let w = "k_amm" | |
49 | 49 | ||
50 | - | let x = "k_ | |
50 | + | let x = "k_gov_asset" | |
51 | 51 | ||
52 | - | func y (z,A) = ((z + "_") + A) | |
52 | + | let y = "k_quote_asset" | |
53 | + | ||
54 | + | let z = "k_admin_address" | |
55 | + | ||
56 | + | let A = "k_manager_address" | |
57 | + | ||
58 | + | let B = "k_spot_address" | |
59 | + | ||
60 | + | let C = "k_collateral_address" | |
61 | + | ||
62 | + | func D (E,F) = ((E + "_") + F) | |
53 | 63 | ||
54 | 64 | ||
55 | - | func | |
65 | + | func G () = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(this, v), "Coordinator not set")), "Coordinator address invalid") | |
56 | 66 | ||
57 | 67 | ||
58 | - | func | |
68 | + | func H () = addressFromString(valueOrErrorMessage(getString(G(), z), "Admin address not set")) | |
59 | 69 | ||
60 | 70 | ||
61 | - | func | |
71 | + | func I (F) = valueOrElse(getBoolean(G(), D(w, F)), false) | |
62 | 72 | ||
63 | 73 | ||
64 | - | func | |
74 | + | func J () = fromBase58String(valueOrErrorMessage(getString(G(), x), "Governance asset not set")) | |
65 | 75 | ||
66 | 76 | ||
67 | - | func | |
77 | + | func K () = fromBase58String(getStringValue(G(), y)) | |
68 | 78 | ||
69 | 79 | ||
70 | - | func | |
80 | + | func L () = valueOrErrorMessage(getString(this, f), "Vault asset not set") | |
71 | 81 | ||
72 | 82 | ||
73 | - | let H = (1 * (((((((10 * 10) * 10) * 10) * 10) * 10) * 10) * 10)) | |
74 | - | ||
75 | - | let I = (((7 * 60) * 60) * 24) | |
76 | - | ||
77 | - | let J = "" | |
78 | - | ||
79 | - | let K = 0 | |
80 | - | ||
81 | - | func L (M) = (M / 100) | |
82 | - | ||
83 | - | ||
84 | - | func N (M) = (M * 100) | |
85 | - | ||
86 | - | ||
87 | - | func O (P,Q) = fraction(P, H, Q, HALFEVEN) | |
88 | - | ||
89 | - | ||
90 | - | func R (P,Q) = fraction(P, Q, H, HALFEVEN) | |
91 | - | ||
92 | - | ||
93 | - | func S (P) = if ((P > 0)) | |
94 | - | then P | |
95 | - | else -(P) | |
96 | - | ||
97 | - | ||
98 | - | func T (P,Q) = if ((P > Q)) | |
99 | - | then Q | |
100 | - | else P | |
101 | - | ||
102 | - | ||
103 | - | let U = (86400 * 1000) | |
104 | - | ||
105 | - | let V = O((1 * H), (4 * H)) | |
106 | - | ||
107 | - | func W (X) = valueOrErrorMessage(getInteger(this, X), ("no value for " + X)) | |
108 | - | ||
109 | - | ||
110 | - | func Y (X) = valueOrElse(getInteger(this, X), 0) | |
111 | - | ||
112 | - | ||
113 | - | func Z (X) = valueOrElse(getInteger(this, X), H) | |
114 | - | ||
115 | - | ||
116 | - | func aa () = Y(a) | |
117 | - | ||
118 | - | ||
119 | - | func ab () = Z(e) | |
120 | - | ||
121 | - | ||
122 | - | func ac (ad) = Y(y(l, ad)) | |
123 | - | ||
124 | - | ||
125 | - | func ae (ad) = Y(y(m, ad)) | |
126 | - | ||
127 | - | ||
128 | - | func af (ad) = Y(y(n, ad)) | |
129 | - | ||
130 | - | ||
131 | - | func ag (ad) = Y(y(p, ad)) | |
132 | - | ||
133 | - | ||
134 | - | func ah (ad) = Y(y(o, ad)) | |
135 | - | ||
136 | - | ||
137 | - | func ai () = Y(d) | |
138 | - | ||
139 | - | ||
140 | - | func aj () = Y(c) | |
141 | - | ||
142 | - | ||
143 | - | func ak () = Y(g) | |
144 | - | ||
145 | - | ||
146 | - | func al () = Y(f) | |
147 | - | ||
148 | - | ||
149 | - | func am () = Y(h) | |
150 | - | ||
151 | - | ||
152 | - | func an () = Y(i) | |
153 | - | ||
154 | - | ||
155 | - | func ao () = Y(b) | |
156 | - | ||
157 | - | ||
158 | - | func ap (ad) = Y(y(k, ad)) | |
159 | - | ||
160 | - | ||
161 | - | func aq (ad) = Y(y(j, ad)) | |
162 | - | ||
163 | - | ||
164 | - | func ar () = valueOrElse(getBoolean(this, q), false) | |
165 | - | ||
166 | - | ||
167 | - | func as () = lastBlock.timestamp | |
168 | - | ||
169 | - | ||
170 | - | func at () = (as() / 1000) | |
171 | - | ||
172 | - | ||
173 | - | func au (ad) = { | |
174 | - | let av = as() | |
175 | - | let aw = ah(ad) | |
176 | - | let ax = if (((av - aw) > U)) | |
177 | - | then $Tuple3(av, af(ad), 0) | |
178 | - | else $Tuple3(aw, (af(ad) - ag(ad)), ag(ad)) | |
179 | - | let ay = ax._1 | |
180 | - | let az = ax._2 | |
181 | - | let aA = ax._3 | |
182 | - | $Tuple3(ay, az, aA) | |
83 | + | func M () = { | |
84 | + | let N = L() | |
85 | + | if ((N == "WAVES")) | |
86 | + | then unit | |
87 | + | else fromBase58String(N) | |
183 | 88 | } | |
184 | 89 | ||
185 | 90 | ||
186 | - | func aB (aC) = { | |
187 | - | let aD = if ((aa() > 0)) | |
188 | - | then O((ai() + aC), aa()) | |
189 | - | else H | |
190 | - | aD | |
91 | + | func O () = valueOrErrorMessage(getInteger(this, g), "Vault asset decimals not set") | |
92 | + | ||
93 | + | ||
94 | + | func P () = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(G(), A), "Manager address not set")), "Manager address invalid") | |
95 | + | ||
96 | + | ||
97 | + | let Q = (1 * (((((((10 * 10) * 10) * 10) * 10) * 10) * 10) * 10)) | |
98 | + | ||
99 | + | let R = (((7 * 60) * 60) * 24) | |
100 | + | ||
101 | + | let S = "" | |
102 | + | ||
103 | + | let T = 0 | |
104 | + | ||
105 | + | func U (V) = { | |
106 | + | let W = O() | |
107 | + | if ((W == 6)) | |
108 | + | then (V / 100) | |
109 | + | else if ((W == 8)) | |
110 | + | then V | |
111 | + | else throw("Invalid asset decimals") | |
191 | 112 | } | |
192 | 113 | ||
193 | 114 | ||
194 | - | func aE () = T(at(), an()) | |
115 | + | func X (V) = { | |
116 | + | let W = O() | |
117 | + | if ((W == 6)) | |
118 | + | then (V * 100) | |
119 | + | else if ((W == 8)) | |
120 | + | then V | |
121 | + | else throw("Invalid asset decimals") | |
122 | + | } | |
195 | 123 | ||
196 | 124 | ||
197 | - | func aF (aG) = if (((aa() + aG) == 0)) | |
198 | - | then ak() | |
125 | + | func Y (Z,aa) = fraction(Z, Q, aa, HALFEVEN) | |
126 | + | ||
127 | + | ||
128 | + | func ab (Z,aa) = fraction(Z, aa, Q, HALFEVEN) | |
129 | + | ||
130 | + | ||
131 | + | func ac (Z) = if ((Z > 0)) | |
132 | + | then Z | |
133 | + | else -(Z) | |
134 | + | ||
135 | + | ||
136 | + | func ad (Z,aa) = if ((Z > aa)) | |
137 | + | then aa | |
138 | + | else Z | |
139 | + | ||
140 | + | ||
141 | + | let ae = (86400 * 1000) | |
142 | + | ||
143 | + | let af = Y((1 * Q), (4 * Q)) | |
144 | + | ||
145 | + | func ag (ah) = valueOrErrorMessage(getInteger(this, ah), ("no value for " + ah)) | |
146 | + | ||
147 | + | ||
148 | + | func ai (ah) = valueOrElse(getInteger(this, ah), 0) | |
149 | + | ||
150 | + | ||
151 | + | func aj (ah) = valueOrElse(getInteger(this, ah), Q) | |
152 | + | ||
153 | + | ||
154 | + | func ak () = ai(a) | |
155 | + | ||
156 | + | ||
157 | + | func al () = aj(i) | |
158 | + | ||
159 | + | ||
160 | + | func am (an) = ai(D(p, an)) | |
161 | + | ||
162 | + | ||
163 | + | func ao (an) = ai(D(q, an)) | |
164 | + | ||
165 | + | ||
166 | + | func ap (an) = ai(D(r, an)) | |
167 | + | ||
168 | + | ||
169 | + | func aq (an) = ai(D(t, an)) | |
170 | + | ||
171 | + | ||
172 | + | func ar (an) = ai(D(s, an)) | |
173 | + | ||
174 | + | ||
175 | + | func as () = ai(d) | |
176 | + | ||
177 | + | ||
178 | + | func at () = ai(c) | |
179 | + | ||
180 | + | ||
181 | + | func au () = ai(e) | |
182 | + | ||
183 | + | ||
184 | + | func av () = ai(k) | |
185 | + | ||
186 | + | ||
187 | + | func aw () = ai(j) | |
188 | + | ||
189 | + | ||
190 | + | func ax () = ai(l) | |
191 | + | ||
192 | + | ||
193 | + | func ay () = ai(m) | |
194 | + | ||
195 | + | ||
196 | + | func az () = ai(b) | |
197 | + | ||
198 | + | ||
199 | + | func aA (an) = ai(D(o, an)) | |
200 | + | ||
201 | + | ||
202 | + | func aB (an) = ai(D(n, an)) | |
203 | + | ||
204 | + | ||
205 | + | func aC () = ai(h) | |
206 | + | ||
207 | + | ||
208 | + | func aD () = valueOrElse(getBoolean(this, u), false) | |
209 | + | ||
210 | + | ||
211 | + | func aE () = lastBlock.timestamp | |
212 | + | ||
213 | + | ||
214 | + | func aF () = (aE() / 1000) | |
215 | + | ||
216 | + | ||
217 | + | func aG (an) = { | |
218 | + | let aH = aE() | |
219 | + | let aI = ar(an) | |
220 | + | let aJ = if (((aH - aI) > ae)) | |
221 | + | then $Tuple3(aH, ap(an), 0) | |
222 | + | else $Tuple3(aI, (ap(an) - aq(an)), aq(an)) | |
223 | + | let aK = aJ._1 | |
224 | + | let aL = aJ._2 | |
225 | + | let aM = aJ._3 | |
226 | + | $Tuple3(aK, aL, aM) | |
227 | + | } | |
228 | + | ||
229 | + | ||
230 | + | func aN (aO) = { | |
231 | + | let aP = if ((ak() > 0)) | |
232 | + | then Y((as() + aO), ak()) | |
233 | + | else Q | |
234 | + | aP | |
235 | + | } | |
236 | + | ||
237 | + | ||
238 | + | func aQ () = ad(aF(), ay()) | |
239 | + | ||
240 | + | ||
241 | + | func aR (aS) = if (((ak() + aS) == 0)) | |
242 | + | then av() | |
199 | 243 | else { | |
200 | - | let | |
201 | - | let | |
244 | + | let aT = (aQ() - aw()) | |
245 | + | let aU = if ((0 > aT)) | |
202 | 246 | then 0 | |
203 | - | else | |
204 | - | let | |
205 | - | ( | |
247 | + | else aT | |
248 | + | let aV = Y((ax() * aU), (ak() + aS)) | |
249 | + | (av() + aV) | |
206 | 250 | } | |
207 | 251 | ||
208 | 252 | ||
209 | - | func | |
210 | - | let | |
211 | - | ( | |
253 | + | func aW (an,aS) = { | |
254 | + | let aX = (aR(aS) - aB(an)) | |
255 | + | (ab((am(an) + aS), aX) + aA(an)) | |
212 | 256 | } | |
213 | 257 | ||
214 | 258 | ||
215 | - | func | |
216 | - | let | |
217 | - | let | |
218 | - | let | |
219 | - | then $Tuple2( | |
259 | + | func aY (an,aS) = { | |
260 | + | let aZ = aR(aS) | |
261 | + | let ba = aF() | |
262 | + | let bb = if ((an != "")) | |
263 | + | then $Tuple2(aW(an, aS), aZ) | |
220 | 264 | else $Tuple2(0, 0) | |
221 | - | let | |
222 | - | let | |
223 | - | $Tuple4( | |
265 | + | let bc = bb._1 | |
266 | + | let bd = bb._2 | |
267 | + | $Tuple4(aZ, ba, bc, bd) | |
224 | 268 | } | |
225 | 269 | ||
226 | 270 | ||
227 | - | func | |
228 | - | then [IntegerEntry( | |
229 | - | else throw(((("Vault: can not update user balance. Balance: " + toString( | |
271 | + | func be (bf,bg) = if (((am(bf) + bg) >= 0)) | |
272 | + | then [IntegerEntry(D(p, bf), (am(bf) + bg))] | |
273 | + | else throw(((("Vault: can not update user balance. Balance: " + toString(am(bf))) + " change: ") + toString(bg))) | |
230 | 274 | ||
231 | 275 | ||
232 | - | func | |
276 | + | func bh (bf,bi) = [IntegerEntry(D(r, bf), bi)] | |
233 | 277 | ||
234 | 278 | ||
235 | - | func | |
279 | + | func bj (bf,bi) = [IntegerEntry(D(q, bf), bi)] | |
236 | 280 | ||
237 | 281 | ||
238 | - | func | |
239 | - | let | |
240 | - | if ((( | |
241 | - | then [IntegerEntry(d, ( | |
242 | - | else throw(((("Vault: can not update free balance. Balance: " + toString( | |
282 | + | func bk (bg) = { | |
283 | + | let bl = as() | |
284 | + | if (((bl + bg) >= 0)) | |
285 | + | then [IntegerEntry(d, (bl + bg))] | |
286 | + | else throw(((("Vault: can not update free balance. Balance: " + toString(bl)) + " change: ") + toString(bg))) | |
243 | 287 | } | |
244 | 288 | ||
245 | 289 | ||
246 | - | func | |
247 | - | let | |
248 | - | if ((( | |
249 | - | then [IntegerEntry(c, ( | |
250 | - | else throw(((("Vault: can not update locked balance. Balance: " + toString( | |
290 | + | func bm (bg) = { | |
291 | + | let bl = at() | |
292 | + | if (((bl + bg) >= 0)) | |
293 | + | then [IntegerEntry(c, (bl + bg))] | |
294 | + | else throw(((("Vault: can not update locked balance. Balance: " + toString(bl)) + " change: ") + toString(bg))) | |
251 | 295 | } | |
252 | 296 | ||
253 | 297 | ||
254 | - | func bb (aU) = [IntegerEntry(a, (aa() + aU))] | |
298 | + | func bn (bg) = { | |
299 | + | let bo = (au() + bg) | |
300 | + | let bp = Y(ac(bo), as()) | |
301 | + | if ((aC() > bp)) | |
302 | + | then [IntegerEntry(e, bo)] | |
303 | + | else throw(((((((("Vault: can not update excess balance. Balance: " + toString(au())) + " change: ") + toString(bg)) + " utilization rate: ") + toString(bp)) + " max utilization rate: ") + toString(aC()))) | |
304 | + | } | |
255 | 305 | ||
256 | 306 | ||
257 | - | func | |
307 | + | func bq (bg) = [IntegerEntry(a, (ak() + bg))] | |
258 | 308 | ||
259 | 309 | ||
260 | - | func | |
310 | + | func br (bi) = [IntegerEntry(i, bi)] | |
261 | 311 | ||
262 | 312 | ||
263 | - | func | |
313 | + | func bs (bf,bt,bu) = [IntegerEntry(D(s, bf), bt), IntegerEntry(D(t, bf), bu)] | |
264 | 314 | ||
265 | 315 | ||
266 | - | func | |
316 | + | func bv (bw) = [IntegerEntry(b, (az() + bw))] | |
267 | 317 | ||
268 | 318 | ||
269 | - | func | |
319 | + | func bx (by) = [IntegerEntry(l, by)] | |
270 | 320 | ||
271 | 321 | ||
272 | - | func | |
322 | + | func bz (bA,bB) = [IntegerEntry(j, bA), IntegerEntry(m, bB)] | |
273 | 323 | ||
274 | 324 | ||
275 | - | func | |
325 | + | func bC (bD) = [IntegerEntry(k, bD)] | |
276 | 326 | ||
277 | 327 | ||
278 | - | @Callable(bs) | |
279 | - | func initialize (bt) = if (if (ar()) | |
328 | + | func bE (an,bF,bG) = [IntegerEntry(D(o, an), bF), IntegerEntry(D(n, an), bG)] | |
329 | + | ||
330 | + | ||
331 | + | @Callable(bH) | |
332 | + | func initialize (bI,bJ,bK) = if (if (if (if (aD()) | |
280 | 333 | then true | |
281 | - | else (bs.caller != this)) | |
334 | + | else (bH.caller != this)) | |
335 | + | then true | |
336 | + | else (0 > bK)) | |
337 | + | then true | |
338 | + | else (bK > Q)) | |
282 | 339 | then throw("Unable to initialize") | |
283 | - | else [StringEntry(r, toString(valueOrErrorMessage(addressFromString(bt), "Invalid coordinator address"))), BooleanEntry(q, true)] | |
340 | + | else { | |
341 | + | let W = if ((bJ == "WAVES")) | |
342 | + | then 8 | |
343 | + | else { | |
344 | + | let bL = valueOrErrorMessage(assetInfo(fromBase58String(bJ)), ("Invalid token id: " + bJ)) | |
345 | + | bL.decimals | |
346 | + | } | |
347 | + | [StringEntry(v, toString(valueOrErrorMessage(addressFromString(bI), "Invalid coordinator address"))), StringEntry(f, bJ), IntegerEntry(g, W), IntegerEntry(h, bK), BooleanEntry(u, true)] | |
348 | + | } | |
284 | 349 | ||
285 | 350 | ||
286 | 351 | ||
287 | - | @Callable( | |
352 | + | @Callable(bH) | |
288 | 353 | func stake () = { | |
289 | - | let | |
290 | - | let | |
291 | - | if (if (if (( | |
354 | + | let an = toString(bH.caller) | |
355 | + | let V = X(bH.payments[0].amount) | |
356 | + | if (if (if ((bH.payments[0].assetId != M())) | |
292 | 357 | then true | |
293 | - | else (size( | |
358 | + | else (size(bH.payments) != 1)) | |
294 | 359 | then true | |
295 | - | else !( | |
360 | + | else !(aD())) | |
296 | 361 | then throw("Invalid call to stake") | |
297 | 362 | else { | |
298 | - | let | |
299 | - | let | |
300 | - | let | |
301 | - | let | |
302 | - | let | |
303 | - | let | |
304 | - | let | |
305 | - | let | |
306 | - | let | |
307 | - | let | |
308 | - | let | |
309 | - | let | |
310 | - | if (( | |
311 | - | then ((((((( | |
363 | + | let bM = aY(an, 0) | |
364 | + | let aZ = bM._1 | |
365 | + | let ba = bM._2 | |
366 | + | let bc = bM._3 | |
367 | + | let bd = bM._4 | |
368 | + | let bN = al() | |
369 | + | let bO = ao(an) | |
370 | + | let bP = Y(V, bN) | |
371 | + | let bQ = Y((ab(bP, bN) + ab(am(an), bO)), (bP + am(an))) | |
372 | + | let bR = (bP + am(an)) | |
373 | + | let bS = ab(bR, af) | |
374 | + | let bT = invoke(P(), "deposit", nil, [AttachedPayment(M(), U(V))]) | |
375 | + | if ((bT == bT)) | |
376 | + | then (((((((bE(an, bc, bd) ++ bC(aZ)) ++ bz(ba, ay())) ++ bk(V)) ++ be(an, bP)) ++ bj(an, bQ)) ++ bh(an, bS)) ++ bq(bP)) | |
312 | 377 | else throw("Strict value is not equal to itself.") | |
313 | 378 | } | |
314 | 379 | } | |
315 | 380 | ||
316 | 381 | ||
317 | 382 | ||
318 | - | @Callable( | |
319 | - | func unStake ( | |
320 | - | let | |
321 | - | let | |
322 | - | if (if (if (( | |
383 | + | @Callable(bH) | |
384 | + | func unStake (V) = { | |
385 | + | let an = toString(bH.caller) | |
386 | + | let bU = X(V) | |
387 | + | if (if (if ((bH.payments != nil)) | |
323 | 388 | then true | |
324 | - | else (0 >= | |
389 | + | else (0 >= bU)) | |
325 | 390 | then true | |
326 | - | else !( | |
391 | + | else !(aD())) | |
327 | 392 | then throw("Invalid call to unStake") | |
328 | 393 | else { | |
329 | - | let | |
330 | - | let | |
331 | - | let | |
332 | - | let | |
333 | - | let | |
334 | - | let | |
335 | - | let | |
336 | - | let | |
337 | - | let | |
338 | - | let | |
339 | - | if (( | |
394 | + | let bV = aY(an, 0) | |
395 | + | let aZ = bV._1 | |
396 | + | let ba = bV._2 | |
397 | + | let bc = bV._3 | |
398 | + | let bd = bV._4 | |
399 | + | let bW = aG(an) | |
400 | + | let aK = bW._1 | |
401 | + | let aL = bW._2 | |
402 | + | let aM = bW._3 | |
403 | + | let bP = Y(bU, al()) | |
404 | + | if ((bP > aL)) | |
340 | 405 | then throw("Invalid call to unStake: withdraw over limit") | |
341 | 406 | else { | |
342 | - | let | |
343 | - | if (( | |
407 | + | let bX = (aM + bP) | |
408 | + | if ((bU > as())) | |
344 | 409 | then throw("Invalid call to unStake: balance too low") | |
345 | 410 | else { | |
346 | - | let | |
347 | - | if (( | |
348 | - | then ((((((( | |
411 | + | let bY = invoke(P(), "withdraw", [L(), U(bU)], nil) | |
412 | + | if ((bY == bY)) | |
413 | + | then (((((((bE(an, bc, bd) ++ bC(aZ)) ++ bz(ba, ay())) ++ bk(-(bU))) ++ be(an, -(bP))) ++ bq(-(bP))) ++ bs(an, aK, bX)) ++ [ScriptTransfer(bH.caller, U(bU), M())]) | |
349 | 414 | else throw("Strict value is not equal to itself.") | |
350 | 415 | } | |
351 | 416 | } | |
354 | 419 | ||
355 | 420 | ||
356 | 421 | ||
357 | - | @Callable( | |
422 | + | @Callable(bH) | |
358 | 423 | func withdrawRewards () = { | |
359 | - | let | |
360 | - | let | |
361 | - | let | |
362 | - | let | |
363 | - | let | |
364 | - | let | |
365 | - | if (if ((0 >= | |
424 | + | let an = toString(bH.caller) | |
425 | + | let bZ = aY(an, 0) | |
426 | + | let aZ = bZ._1 | |
427 | + | let ba = bZ._2 | |
428 | + | let bc = bZ._3 | |
429 | + | let bd = bZ._4 | |
430 | + | if (if ((0 >= bc)) | |
366 | 431 | then true | |
367 | - | else !( | |
432 | + | else !(aD())) | |
368 | 433 | then throw("No reward: Vault") | |
369 | - | else (((( | |
434 | + | else ((((bE(an, 0, bd) ++ bC(aZ)) ++ bz(ba, ay())) ++ bv(-(bc))) ++ [ScriptTransfer(bH.caller, bc, J())]) | |
370 | 435 | } | |
371 | 436 | ||
372 | 437 | ||
373 | 438 | ||
374 | - | @Callable( | |
439 | + | @Callable(bH) | |
375 | 440 | func addFree () = { | |
376 | - | let | |
377 | - | if (if (if (if (( | |
441 | + | let V = X(bH.payments[0].amount) | |
442 | + | if (if (if (if ((bH.payments[0].assetId != M())) | |
378 | 443 | then true | |
379 | - | else (size( | |
444 | + | else (size(bH.payments) != 1)) | |
380 | 445 | then true | |
381 | - | else !( | |
446 | + | else !(aD())) | |
382 | 447 | then true | |
383 | - | else !(if ( | |
448 | + | else !(if (I(toString(bH.caller))) | |
384 | 449 | then true | |
385 | - | else ( | |
450 | + | else (bH.caller == H()))) | |
386 | 451 | then throw("Invalid addFree params") | |
387 | 452 | else { | |
388 | - | let | |
389 | - | let | |
390 | - | if (( | |
391 | - | then ( | |
453 | + | let aP = aN(V) | |
454 | + | let bT = invoke(P(), "deposit", nil, [AttachedPayment(M(), U(V))]) | |
455 | + | if ((bT == bT)) | |
456 | + | then (bk(V) ++ br(aP)) | |
392 | 457 | else throw("Strict value is not equal to itself.") | |
393 | 458 | } | |
394 | 459 | } | |
395 | 460 | ||
396 | 461 | ||
397 | 462 | ||
398 | - | @Callable( | |
463 | + | @Callable(bH) | |
399 | 464 | func addLocked () = { | |
400 | - | let | |
401 | - | if (if (if (if (( | |
465 | + | let V = X(bH.payments[0].amount) | |
466 | + | if (if (if (if ((bH.payments[0].assetId != M())) | |
402 | 467 | then true | |
403 | - | else (size( | |
468 | + | else (size(bH.payments) != 1)) | |
404 | 469 | then true | |
405 | - | else !( | |
470 | + | else !(aD())) | |
406 | 471 | then true | |
407 | - | else !(if ( | |
472 | + | else !(if (I(toString(bH.caller))) | |
408 | 473 | then true | |
409 | - | else ( | |
474 | + | else (bH.caller == H()))) | |
410 | 475 | then throw("Invalid addLocked params") | |
411 | 476 | else { | |
412 | - | let | |
413 | - | if (( | |
414 | - | then | |
477 | + | let bY = invoke(P(), "deposit", nil, [AttachedPayment(M(), U(V))]) | |
478 | + | if ((bY == bY)) | |
479 | + | then bm(V) | |
415 | 480 | else throw("Strict value is not equal to itself.") | |
416 | 481 | } | |
417 | 482 | } | |
418 | 483 | ||
419 | 484 | ||
420 | 485 | ||
421 | - | @Callable( | |
422 | - | func exchangeFreeAndLocked ( | |
486 | + | @Callable(bH) | |
487 | + | func exchangeFreeAndLocked (V) = if (if (!(aD())) | |
423 | 488 | then true | |
424 | - | else if (!( | |
425 | - | then ( | |
489 | + | else if (!(I(toString(bH.caller)))) | |
490 | + | then (bH.caller != H()) | |
426 | 491 | else false) | |
427 | 492 | then throw("Invalid exchangeFreeAndLocked params") | |
428 | 493 | else { | |
429 | - | let | |
430 | - | let | |
431 | - | (( | |
494 | + | let bU = X(V) | |
495 | + | let aP = aN(-(bU)) | |
496 | + | ((bm(bU) ++ bk(-(bU))) ++ br(aP)) | |
432 | 497 | } | |
433 | 498 | ||
434 | 499 | ||
435 | 500 | ||
436 | - | @Callable( | |
437 | - | func withdrawLocked ( | |
501 | + | @Callable(bH) | |
502 | + | func withdrawLocked (V) = if (if (if (!(aD())) | |
438 | 503 | then true | |
439 | - | else (0 >= | |
504 | + | else (0 >= V)) | |
440 | 505 | then true | |
441 | - | else !( | |
506 | + | else !(I(toString(bH.caller)))) | |
442 | 507 | then throw("Invalid withdrawLocked params") | |
443 | 508 | else { | |
444 | - | let | |
445 | - | let | |
446 | - | if (( | |
447 | - | then ( | |
509 | + | let bU = X(V) | |
510 | + | let bY = invoke(P(), "withdraw", [L(), U(bU)], nil) | |
511 | + | if ((bY == bY)) | |
512 | + | then (bm(-(bU)) ++ [ScriptTransfer(bH.caller, U(bU), M())]) | |
448 | 513 | else throw("Strict value is not equal to itself.") | |
449 | 514 | } | |
450 | 515 | ||
451 | 516 | ||
452 | 517 | ||
453 | - | @Callable( | |
454 | - | func addRewards () = if (if (if (( | |
518 | + | @Callable(bH) | |
519 | + | func addRewards () = if (if (if ((bH.payments[0].assetId != J())) | |
455 | 520 | then true | |
456 | - | else (size( | |
521 | + | else (size(bH.payments) != 1)) | |
457 | 522 | then true | |
458 | - | else !( | |
523 | + | else !(aD())) | |
459 | 524 | then throw("Invalid addRewards params") | |
460 | 525 | else { | |
461 | - | let | |
462 | - | let | |
463 | - | let | |
464 | - | let | |
465 | - | then ( | |
526 | + | let bF = bH.payments[0].amount | |
527 | + | let aZ = aY(S, T)._1 | |
528 | + | let ca = aF() | |
529 | + | let cb = if ((ca > ay())) | |
530 | + | then (bF / R) | |
466 | 531 | else { | |
467 | - | let | |
468 | - | let | |
469 | - | (( | |
532 | + | let cc = (ay() - ca) | |
533 | + | let cd = (ax() * cc) | |
534 | + | ((bF + cd) / R) | |
470 | 535 | } | |
471 | - | ((( | |
536 | + | (((bx(cb) ++ bC(aZ)) ++ bv(bF)) ++ bz(ca, (ca + R))) | |
472 | 537 | } | |
473 | 538 | ||
474 | 539 | ||
475 | 540 | ||
476 | - | @Callable( | |
541 | + | @Callable(bH) | |
477 | 542 | func ackRewards () = { | |
478 | - | let | |
479 | - | if (( | |
543 | + | let ce = invoke(P(), "claimProfit", [L()], nil) | |
544 | + | if ((ce == ce)) | |
480 | 545 | then { | |
481 | - | let | |
482 | - | let | |
483 | - | if ($isInstanceOf( | |
546 | + | let cf = { | |
547 | + | let cg = ce | |
548 | + | if ($isInstanceOf(cg, "Int")) | |
484 | 549 | then { | |
485 | - | let | |
486 | - | | |
550 | + | let ch = cg | |
551 | + | X(ch) | |
487 | 552 | } | |
488 | 553 | else throw("Invalid claimProfit response") | |
489 | 554 | } | |
490 | - | let | |
555 | + | let ci = if ((cf > 0)) | |
491 | 556 | then { | |
492 | - | let | |
493 | - | let | |
494 | - | if (( | |
495 | - | then ( | |
557 | + | let aP = aN(cf) | |
558 | + | let bT = invoke(P(), "deposit", nil, [AttachedPayment(M(), U(cf))]) | |
559 | + | if ((bT == bT)) | |
560 | + | then (bk(cf) ++ br(aP)) | |
496 | 561 | else throw("Strict value is not equal to itself.") | |
497 | 562 | } | |
498 | 563 | else nil | |
499 | - | if (( | |
500 | - | then | |
564 | + | if ((ci == ci)) | |
565 | + | then ci | |
501 | 566 | else throw("Strict value is not equal to itself.") | |
502 | 567 | } | |
503 | 568 | else throw("Strict value is not equal to itself.") | |
505 | 570 | ||
506 | 571 | ||
507 | 572 | ||
508 | - | @Callable( | |
509 | - | func view_reward ( | |
510 | - | let | |
511 | - | let | |
512 | - | let | |
513 | - | let | |
514 | - | throw(toString( | |
573 | + | @Callable(bH) | |
574 | + | func view_reward (an) = { | |
575 | + | let bl = am(an) | |
576 | + | let cj = ab(ao(an), bl) | |
577 | + | let ck = ab(al(), bl) | |
578 | + | let cl = (ck - cj) | |
579 | + | throw(toString(cl)) | |
515 | 580 | } | |
516 | 581 | ||
517 | 582 | ||
518 | 583 | ||
519 | - | @Callable( | |
520 | - | func view_stakingReward ( | |
521 | - | let | |
522 | - | throw(toString( | |
584 | + | @Callable(bH) | |
585 | + | func view_stakingReward (an) = { | |
586 | + | let bc = aY(an, 0)._3 | |
587 | + | throw(toString(U(bc))) | |
523 | 588 | } | |
524 | 589 | ||
525 | 590 | ||
526 | 591 | ||
527 | - | @Callable( | |
528 | - | func view_withdrawLimit ( | |
529 | - | let | |
530 | - | let | |
531 | - | throw(toString( | |
592 | + | @Callable(bH) | |
593 | + | func view_withdrawLimit (an) = { | |
594 | + | let aL = aG(an)._2 | |
595 | + | let cm = U(ab(aL, al())) | |
596 | + | throw(toString(cm)) | |
532 | 597 | } | |
533 | 598 | ||
534 | 599 | ||
535 | - | @Verifier( | |
536 | - | func | |
537 | - | let | |
538 | - | if (isDefined( | |
600 | + | @Verifier(cn) | |
601 | + | func co () = { | |
602 | + | let cp = getString(this, v) | |
603 | + | if (isDefined(cp)) | |
539 | 604 | then { | |
540 | - | let | |
541 | - | if (isDefined( | |
542 | - | then valueOrElse(getBoolean(addressFromStringValue(value( | |
605 | + | let cq = getString(addressFromStringValue(value(cp)), z) | |
606 | + | if (isDefined(cq)) | |
607 | + | then valueOrElse(getBoolean(addressFromStringValue(value(cq)), ((("status_" + toString(this)) + "_") + toBase58String(cn.id))), false) | |
543 | 608 | else throw("unable to verify: admin not set in coordinator") | |
544 | 609 | } | |
545 | - | else sigVerify( | |
610 | + | else sigVerify(cn.bodyBytes, cn.proofs[0], cn.senderPublicKey) | |
546 | 611 | } | |
547 | 612 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "k_totalSupply" | |
5 | 5 | ||
6 | 6 | let b = "k_rewardBalance" | |
7 | 7 | ||
8 | 8 | let c = "k_lockedBalance" | |
9 | 9 | ||
10 | 10 | let d = "k_freeBalance" | |
11 | 11 | ||
12 | - | let e = "k_ | |
12 | + | let e = "k_excessBalance" | |
13 | 13 | ||
14 | - | let f = "k_ | |
14 | + | let f = "k_vaultAsset" | |
15 | 15 | ||
16 | - | let g = "k_ | |
16 | + | let g = "k_vaultAssetDecimals" | |
17 | 17 | ||
18 | - | let h = "k_ | |
18 | + | let h = "k_maxSpotUtilization" | |
19 | 19 | ||
20 | - | let i = "k_ | |
20 | + | let i = "k_rate" | |
21 | 21 | ||
22 | - | let j = "k_ | |
22 | + | let j = "k_lastUpdateTime" | |
23 | 23 | ||
24 | - | let k = "k_ | |
24 | + | let k = "k_rewardPerTokenStored" | |
25 | 25 | ||
26 | - | let l = "k_ | |
26 | + | let l = "k_rewardRate" | |
27 | 27 | ||
28 | - | let m = "k_ | |
28 | + | let m = "k_periodFinish" | |
29 | 29 | ||
30 | - | let n = "k_ | |
30 | + | let n = "k_userRewardPerToken" | |
31 | 31 | ||
32 | - | let o = "k_ | |
32 | + | let o = "k_userReward" | |
33 | 33 | ||
34 | - | let p = "k_ | |
34 | + | let p = "k_balance" | |
35 | 35 | ||
36 | - | let q = "k_ | |
36 | + | let q = "k_average_rate" | |
37 | 37 | ||
38 | - | let r = "k_ | |
38 | + | let r = "k_withdraw_limit" | |
39 | 39 | ||
40 | - | let s = "k_ | |
40 | + | let s = "k_last_withdraw_date" | |
41 | 41 | ||
42 | - | let t = "k_ | |
42 | + | let t = "k_withdraw_in_period" | |
43 | 43 | ||
44 | - | let u = "k_ | |
44 | + | let u = "k_initialized" | |
45 | 45 | ||
46 | - | let v = "k_ | |
46 | + | let v = "k_coordinatorAddress" | |
47 | 47 | ||
48 | - | let w = "k_ | |
48 | + | let w = "k_amm" | |
49 | 49 | ||
50 | - | let x = "k_ | |
50 | + | let x = "k_gov_asset" | |
51 | 51 | ||
52 | - | func y (z,A) = ((z + "_") + A) | |
52 | + | let y = "k_quote_asset" | |
53 | + | ||
54 | + | let z = "k_admin_address" | |
55 | + | ||
56 | + | let A = "k_manager_address" | |
57 | + | ||
58 | + | let B = "k_spot_address" | |
59 | + | ||
60 | + | let C = "k_collateral_address" | |
61 | + | ||
62 | + | func D (E,F) = ((E + "_") + F) | |
53 | 63 | ||
54 | 64 | ||
55 | - | func | |
65 | + | func G () = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(this, v), "Coordinator not set")), "Coordinator address invalid") | |
56 | 66 | ||
57 | 67 | ||
58 | - | func | |
68 | + | func H () = addressFromString(valueOrErrorMessage(getString(G(), z), "Admin address not set")) | |
59 | 69 | ||
60 | 70 | ||
61 | - | func | |
71 | + | func I (F) = valueOrElse(getBoolean(G(), D(w, F)), false) | |
62 | 72 | ||
63 | 73 | ||
64 | - | func | |
74 | + | func J () = fromBase58String(valueOrErrorMessage(getString(G(), x), "Governance asset not set")) | |
65 | 75 | ||
66 | 76 | ||
67 | - | func | |
77 | + | func K () = fromBase58String(getStringValue(G(), y)) | |
68 | 78 | ||
69 | 79 | ||
70 | - | func | |
80 | + | func L () = valueOrErrorMessage(getString(this, f), "Vault asset not set") | |
71 | 81 | ||
72 | 82 | ||
73 | - | let H = (1 * (((((((10 * 10) * 10) * 10) * 10) * 10) * 10) * 10)) | |
74 | - | ||
75 | - | let I = (((7 * 60) * 60) * 24) | |
76 | - | ||
77 | - | let J = "" | |
78 | - | ||
79 | - | let K = 0 | |
80 | - | ||
81 | - | func L (M) = (M / 100) | |
82 | - | ||
83 | - | ||
84 | - | func N (M) = (M * 100) | |
85 | - | ||
86 | - | ||
87 | - | func O (P,Q) = fraction(P, H, Q, HALFEVEN) | |
88 | - | ||
89 | - | ||
90 | - | func R (P,Q) = fraction(P, Q, H, HALFEVEN) | |
91 | - | ||
92 | - | ||
93 | - | func S (P) = if ((P > 0)) | |
94 | - | then P | |
95 | - | else -(P) | |
96 | - | ||
97 | - | ||
98 | - | func T (P,Q) = if ((P > Q)) | |
99 | - | then Q | |
100 | - | else P | |
101 | - | ||
102 | - | ||
103 | - | let U = (86400 * 1000) | |
104 | - | ||
105 | - | let V = O((1 * H), (4 * H)) | |
106 | - | ||
107 | - | func W (X) = valueOrErrorMessage(getInteger(this, X), ("no value for " + X)) | |
108 | - | ||
109 | - | ||
110 | - | func Y (X) = valueOrElse(getInteger(this, X), 0) | |
111 | - | ||
112 | - | ||
113 | - | func Z (X) = valueOrElse(getInteger(this, X), H) | |
114 | - | ||
115 | - | ||
116 | - | func aa () = Y(a) | |
117 | - | ||
118 | - | ||
119 | - | func ab () = Z(e) | |
120 | - | ||
121 | - | ||
122 | - | func ac (ad) = Y(y(l, ad)) | |
123 | - | ||
124 | - | ||
125 | - | func ae (ad) = Y(y(m, ad)) | |
126 | - | ||
127 | - | ||
128 | - | func af (ad) = Y(y(n, ad)) | |
129 | - | ||
130 | - | ||
131 | - | func ag (ad) = Y(y(p, ad)) | |
132 | - | ||
133 | - | ||
134 | - | func ah (ad) = Y(y(o, ad)) | |
135 | - | ||
136 | - | ||
137 | - | func ai () = Y(d) | |
138 | - | ||
139 | - | ||
140 | - | func aj () = Y(c) | |
141 | - | ||
142 | - | ||
143 | - | func ak () = Y(g) | |
144 | - | ||
145 | - | ||
146 | - | func al () = Y(f) | |
147 | - | ||
148 | - | ||
149 | - | func am () = Y(h) | |
150 | - | ||
151 | - | ||
152 | - | func an () = Y(i) | |
153 | - | ||
154 | - | ||
155 | - | func ao () = Y(b) | |
156 | - | ||
157 | - | ||
158 | - | func ap (ad) = Y(y(k, ad)) | |
159 | - | ||
160 | - | ||
161 | - | func aq (ad) = Y(y(j, ad)) | |
162 | - | ||
163 | - | ||
164 | - | func ar () = valueOrElse(getBoolean(this, q), false) | |
165 | - | ||
166 | - | ||
167 | - | func as () = lastBlock.timestamp | |
168 | - | ||
169 | - | ||
170 | - | func at () = (as() / 1000) | |
171 | - | ||
172 | - | ||
173 | - | func au (ad) = { | |
174 | - | let av = as() | |
175 | - | let aw = ah(ad) | |
176 | - | let ax = if (((av - aw) > U)) | |
177 | - | then $Tuple3(av, af(ad), 0) | |
178 | - | else $Tuple3(aw, (af(ad) - ag(ad)), ag(ad)) | |
179 | - | let ay = ax._1 | |
180 | - | let az = ax._2 | |
181 | - | let aA = ax._3 | |
182 | - | $Tuple3(ay, az, aA) | |
83 | + | func M () = { | |
84 | + | let N = L() | |
85 | + | if ((N == "WAVES")) | |
86 | + | then unit | |
87 | + | else fromBase58String(N) | |
183 | 88 | } | |
184 | 89 | ||
185 | 90 | ||
186 | - | func aB (aC) = { | |
187 | - | let aD = if ((aa() > 0)) | |
188 | - | then O((ai() + aC), aa()) | |
189 | - | else H | |
190 | - | aD | |
91 | + | func O () = valueOrErrorMessage(getInteger(this, g), "Vault asset decimals not set") | |
92 | + | ||
93 | + | ||
94 | + | func P () = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(G(), A), "Manager address not set")), "Manager address invalid") | |
95 | + | ||
96 | + | ||
97 | + | let Q = (1 * (((((((10 * 10) * 10) * 10) * 10) * 10) * 10) * 10)) | |
98 | + | ||
99 | + | let R = (((7 * 60) * 60) * 24) | |
100 | + | ||
101 | + | let S = "" | |
102 | + | ||
103 | + | let T = 0 | |
104 | + | ||
105 | + | func U (V) = { | |
106 | + | let W = O() | |
107 | + | if ((W == 6)) | |
108 | + | then (V / 100) | |
109 | + | else if ((W == 8)) | |
110 | + | then V | |
111 | + | else throw("Invalid asset decimals") | |
191 | 112 | } | |
192 | 113 | ||
193 | 114 | ||
194 | - | func aE () = T(at(), an()) | |
115 | + | func X (V) = { | |
116 | + | let W = O() | |
117 | + | if ((W == 6)) | |
118 | + | then (V * 100) | |
119 | + | else if ((W == 8)) | |
120 | + | then V | |
121 | + | else throw("Invalid asset decimals") | |
122 | + | } | |
195 | 123 | ||
196 | 124 | ||
197 | - | func aF (aG) = if (((aa() + aG) == 0)) | |
198 | - | then ak() | |
125 | + | func Y (Z,aa) = fraction(Z, Q, aa, HALFEVEN) | |
126 | + | ||
127 | + | ||
128 | + | func ab (Z,aa) = fraction(Z, aa, Q, HALFEVEN) | |
129 | + | ||
130 | + | ||
131 | + | func ac (Z) = if ((Z > 0)) | |
132 | + | then Z | |
133 | + | else -(Z) | |
134 | + | ||
135 | + | ||
136 | + | func ad (Z,aa) = if ((Z > aa)) | |
137 | + | then aa | |
138 | + | else Z | |
139 | + | ||
140 | + | ||
141 | + | let ae = (86400 * 1000) | |
142 | + | ||
143 | + | let af = Y((1 * Q), (4 * Q)) | |
144 | + | ||
145 | + | func ag (ah) = valueOrErrorMessage(getInteger(this, ah), ("no value for " + ah)) | |
146 | + | ||
147 | + | ||
148 | + | func ai (ah) = valueOrElse(getInteger(this, ah), 0) | |
149 | + | ||
150 | + | ||
151 | + | func aj (ah) = valueOrElse(getInteger(this, ah), Q) | |
152 | + | ||
153 | + | ||
154 | + | func ak () = ai(a) | |
155 | + | ||
156 | + | ||
157 | + | func al () = aj(i) | |
158 | + | ||
159 | + | ||
160 | + | func am (an) = ai(D(p, an)) | |
161 | + | ||
162 | + | ||
163 | + | func ao (an) = ai(D(q, an)) | |
164 | + | ||
165 | + | ||
166 | + | func ap (an) = ai(D(r, an)) | |
167 | + | ||
168 | + | ||
169 | + | func aq (an) = ai(D(t, an)) | |
170 | + | ||
171 | + | ||
172 | + | func ar (an) = ai(D(s, an)) | |
173 | + | ||
174 | + | ||
175 | + | func as () = ai(d) | |
176 | + | ||
177 | + | ||
178 | + | func at () = ai(c) | |
179 | + | ||
180 | + | ||
181 | + | func au () = ai(e) | |
182 | + | ||
183 | + | ||
184 | + | func av () = ai(k) | |
185 | + | ||
186 | + | ||
187 | + | func aw () = ai(j) | |
188 | + | ||
189 | + | ||
190 | + | func ax () = ai(l) | |
191 | + | ||
192 | + | ||
193 | + | func ay () = ai(m) | |
194 | + | ||
195 | + | ||
196 | + | func az () = ai(b) | |
197 | + | ||
198 | + | ||
199 | + | func aA (an) = ai(D(o, an)) | |
200 | + | ||
201 | + | ||
202 | + | func aB (an) = ai(D(n, an)) | |
203 | + | ||
204 | + | ||
205 | + | func aC () = ai(h) | |
206 | + | ||
207 | + | ||
208 | + | func aD () = valueOrElse(getBoolean(this, u), false) | |
209 | + | ||
210 | + | ||
211 | + | func aE () = lastBlock.timestamp | |
212 | + | ||
213 | + | ||
214 | + | func aF () = (aE() / 1000) | |
215 | + | ||
216 | + | ||
217 | + | func aG (an) = { | |
218 | + | let aH = aE() | |
219 | + | let aI = ar(an) | |
220 | + | let aJ = if (((aH - aI) > ae)) | |
221 | + | then $Tuple3(aH, ap(an), 0) | |
222 | + | else $Tuple3(aI, (ap(an) - aq(an)), aq(an)) | |
223 | + | let aK = aJ._1 | |
224 | + | let aL = aJ._2 | |
225 | + | let aM = aJ._3 | |
226 | + | $Tuple3(aK, aL, aM) | |
227 | + | } | |
228 | + | ||
229 | + | ||
230 | + | func aN (aO) = { | |
231 | + | let aP = if ((ak() > 0)) | |
232 | + | then Y((as() + aO), ak()) | |
233 | + | else Q | |
234 | + | aP | |
235 | + | } | |
236 | + | ||
237 | + | ||
238 | + | func aQ () = ad(aF(), ay()) | |
239 | + | ||
240 | + | ||
241 | + | func aR (aS) = if (((ak() + aS) == 0)) | |
242 | + | then av() | |
199 | 243 | else { | |
200 | - | let | |
201 | - | let | |
244 | + | let aT = (aQ() - aw()) | |
245 | + | let aU = if ((0 > aT)) | |
202 | 246 | then 0 | |
203 | - | else | |
204 | - | let | |
205 | - | ( | |
247 | + | else aT | |
248 | + | let aV = Y((ax() * aU), (ak() + aS)) | |
249 | + | (av() + aV) | |
206 | 250 | } | |
207 | 251 | ||
208 | 252 | ||
209 | - | func | |
210 | - | let | |
211 | - | ( | |
253 | + | func aW (an,aS) = { | |
254 | + | let aX = (aR(aS) - aB(an)) | |
255 | + | (ab((am(an) + aS), aX) + aA(an)) | |
212 | 256 | } | |
213 | 257 | ||
214 | 258 | ||
215 | - | func | |
216 | - | let | |
217 | - | let | |
218 | - | let | |
219 | - | then $Tuple2( | |
259 | + | func aY (an,aS) = { | |
260 | + | let aZ = aR(aS) | |
261 | + | let ba = aF() | |
262 | + | let bb = if ((an != "")) | |
263 | + | then $Tuple2(aW(an, aS), aZ) | |
220 | 264 | else $Tuple2(0, 0) | |
221 | - | let | |
222 | - | let | |
223 | - | $Tuple4( | |
265 | + | let bc = bb._1 | |
266 | + | let bd = bb._2 | |
267 | + | $Tuple4(aZ, ba, bc, bd) | |
224 | 268 | } | |
225 | 269 | ||
226 | 270 | ||
227 | - | func | |
228 | - | then [IntegerEntry( | |
229 | - | else throw(((("Vault: can not update user balance. Balance: " + toString( | |
271 | + | func be (bf,bg) = if (((am(bf) + bg) >= 0)) | |
272 | + | then [IntegerEntry(D(p, bf), (am(bf) + bg))] | |
273 | + | else throw(((("Vault: can not update user balance. Balance: " + toString(am(bf))) + " change: ") + toString(bg))) | |
230 | 274 | ||
231 | 275 | ||
232 | - | func | |
276 | + | func bh (bf,bi) = [IntegerEntry(D(r, bf), bi)] | |
233 | 277 | ||
234 | 278 | ||
235 | - | func | |
279 | + | func bj (bf,bi) = [IntegerEntry(D(q, bf), bi)] | |
236 | 280 | ||
237 | 281 | ||
238 | - | func | |
239 | - | let | |
240 | - | if ((( | |
241 | - | then [IntegerEntry(d, ( | |
242 | - | else throw(((("Vault: can not update free balance. Balance: " + toString( | |
282 | + | func bk (bg) = { | |
283 | + | let bl = as() | |
284 | + | if (((bl + bg) >= 0)) | |
285 | + | then [IntegerEntry(d, (bl + bg))] | |
286 | + | else throw(((("Vault: can not update free balance. Balance: " + toString(bl)) + " change: ") + toString(bg))) | |
243 | 287 | } | |
244 | 288 | ||
245 | 289 | ||
246 | - | func | |
247 | - | let | |
248 | - | if ((( | |
249 | - | then [IntegerEntry(c, ( | |
250 | - | else throw(((("Vault: can not update locked balance. Balance: " + toString( | |
290 | + | func bm (bg) = { | |
291 | + | let bl = at() | |
292 | + | if (((bl + bg) >= 0)) | |
293 | + | then [IntegerEntry(c, (bl + bg))] | |
294 | + | else throw(((("Vault: can not update locked balance. Balance: " + toString(bl)) + " change: ") + toString(bg))) | |
251 | 295 | } | |
252 | 296 | ||
253 | 297 | ||
254 | - | func bb (aU) = [IntegerEntry(a, (aa() + aU))] | |
298 | + | func bn (bg) = { | |
299 | + | let bo = (au() + bg) | |
300 | + | let bp = Y(ac(bo), as()) | |
301 | + | if ((aC() > bp)) | |
302 | + | then [IntegerEntry(e, bo)] | |
303 | + | else throw(((((((("Vault: can not update excess balance. Balance: " + toString(au())) + " change: ") + toString(bg)) + " utilization rate: ") + toString(bp)) + " max utilization rate: ") + toString(aC()))) | |
304 | + | } | |
255 | 305 | ||
256 | 306 | ||
257 | - | func | |
307 | + | func bq (bg) = [IntegerEntry(a, (ak() + bg))] | |
258 | 308 | ||
259 | 309 | ||
260 | - | func | |
310 | + | func br (bi) = [IntegerEntry(i, bi)] | |
261 | 311 | ||
262 | 312 | ||
263 | - | func | |
313 | + | func bs (bf,bt,bu) = [IntegerEntry(D(s, bf), bt), IntegerEntry(D(t, bf), bu)] | |
264 | 314 | ||
265 | 315 | ||
266 | - | func | |
316 | + | func bv (bw) = [IntegerEntry(b, (az() + bw))] | |
267 | 317 | ||
268 | 318 | ||
269 | - | func | |
319 | + | func bx (by) = [IntegerEntry(l, by)] | |
270 | 320 | ||
271 | 321 | ||
272 | - | func | |
322 | + | func bz (bA,bB) = [IntegerEntry(j, bA), IntegerEntry(m, bB)] | |
273 | 323 | ||
274 | 324 | ||
275 | - | func | |
325 | + | func bC (bD) = [IntegerEntry(k, bD)] | |
276 | 326 | ||
277 | 327 | ||
278 | - | @Callable(bs) | |
279 | - | func initialize (bt) = if (if (ar()) | |
328 | + | func bE (an,bF,bG) = [IntegerEntry(D(o, an), bF), IntegerEntry(D(n, an), bG)] | |
329 | + | ||
330 | + | ||
331 | + | @Callable(bH) | |
332 | + | func initialize (bI,bJ,bK) = if (if (if (if (aD()) | |
280 | 333 | then true | |
281 | - | else (bs.caller != this)) | |
334 | + | else (bH.caller != this)) | |
335 | + | then true | |
336 | + | else (0 > bK)) | |
337 | + | then true | |
338 | + | else (bK > Q)) | |
282 | 339 | then throw("Unable to initialize") | |
283 | - | else [StringEntry(r, toString(valueOrErrorMessage(addressFromString(bt), "Invalid coordinator address"))), BooleanEntry(q, true)] | |
340 | + | else { | |
341 | + | let W = if ((bJ == "WAVES")) | |
342 | + | then 8 | |
343 | + | else { | |
344 | + | let bL = valueOrErrorMessage(assetInfo(fromBase58String(bJ)), ("Invalid token id: " + bJ)) | |
345 | + | bL.decimals | |
346 | + | } | |
347 | + | [StringEntry(v, toString(valueOrErrorMessage(addressFromString(bI), "Invalid coordinator address"))), StringEntry(f, bJ), IntegerEntry(g, W), IntegerEntry(h, bK), BooleanEntry(u, true)] | |
348 | + | } | |
284 | 349 | ||
285 | 350 | ||
286 | 351 | ||
287 | - | @Callable( | |
352 | + | @Callable(bH) | |
288 | 353 | func stake () = { | |
289 | - | let | |
290 | - | let | |
291 | - | if (if (if (( | |
354 | + | let an = toString(bH.caller) | |
355 | + | let V = X(bH.payments[0].amount) | |
356 | + | if (if (if ((bH.payments[0].assetId != M())) | |
292 | 357 | then true | |
293 | - | else (size( | |
358 | + | else (size(bH.payments) != 1)) | |
294 | 359 | then true | |
295 | - | else !( | |
360 | + | else !(aD())) | |
296 | 361 | then throw("Invalid call to stake") | |
297 | 362 | else { | |
298 | - | let | |
299 | - | let | |
300 | - | let | |
301 | - | let | |
302 | - | let | |
303 | - | let | |
304 | - | let | |
305 | - | let | |
306 | - | let | |
307 | - | let | |
308 | - | let | |
309 | - | let | |
310 | - | if (( | |
311 | - | then ((((((( | |
363 | + | let bM = aY(an, 0) | |
364 | + | let aZ = bM._1 | |
365 | + | let ba = bM._2 | |
366 | + | let bc = bM._3 | |
367 | + | let bd = bM._4 | |
368 | + | let bN = al() | |
369 | + | let bO = ao(an) | |
370 | + | let bP = Y(V, bN) | |
371 | + | let bQ = Y((ab(bP, bN) + ab(am(an), bO)), (bP + am(an))) | |
372 | + | let bR = (bP + am(an)) | |
373 | + | let bS = ab(bR, af) | |
374 | + | let bT = invoke(P(), "deposit", nil, [AttachedPayment(M(), U(V))]) | |
375 | + | if ((bT == bT)) | |
376 | + | then (((((((bE(an, bc, bd) ++ bC(aZ)) ++ bz(ba, ay())) ++ bk(V)) ++ be(an, bP)) ++ bj(an, bQ)) ++ bh(an, bS)) ++ bq(bP)) | |
312 | 377 | else throw("Strict value is not equal to itself.") | |
313 | 378 | } | |
314 | 379 | } | |
315 | 380 | ||
316 | 381 | ||
317 | 382 | ||
318 | - | @Callable( | |
319 | - | func unStake ( | |
320 | - | let | |
321 | - | let | |
322 | - | if (if (if (( | |
383 | + | @Callable(bH) | |
384 | + | func unStake (V) = { | |
385 | + | let an = toString(bH.caller) | |
386 | + | let bU = X(V) | |
387 | + | if (if (if ((bH.payments != nil)) | |
323 | 388 | then true | |
324 | - | else (0 >= | |
389 | + | else (0 >= bU)) | |
325 | 390 | then true | |
326 | - | else !( | |
391 | + | else !(aD())) | |
327 | 392 | then throw("Invalid call to unStake") | |
328 | 393 | else { | |
329 | - | let | |
330 | - | let | |
331 | - | let | |
332 | - | let | |
333 | - | let | |
334 | - | let | |
335 | - | let | |
336 | - | let | |
337 | - | let | |
338 | - | let | |
339 | - | if (( | |
394 | + | let bV = aY(an, 0) | |
395 | + | let aZ = bV._1 | |
396 | + | let ba = bV._2 | |
397 | + | let bc = bV._3 | |
398 | + | let bd = bV._4 | |
399 | + | let bW = aG(an) | |
400 | + | let aK = bW._1 | |
401 | + | let aL = bW._2 | |
402 | + | let aM = bW._3 | |
403 | + | let bP = Y(bU, al()) | |
404 | + | if ((bP > aL)) | |
340 | 405 | then throw("Invalid call to unStake: withdraw over limit") | |
341 | 406 | else { | |
342 | - | let | |
343 | - | if (( | |
407 | + | let bX = (aM + bP) | |
408 | + | if ((bU > as())) | |
344 | 409 | then throw("Invalid call to unStake: balance too low") | |
345 | 410 | else { | |
346 | - | let | |
347 | - | if (( | |
348 | - | then ((((((( | |
411 | + | let bY = invoke(P(), "withdraw", [L(), U(bU)], nil) | |
412 | + | if ((bY == bY)) | |
413 | + | then (((((((bE(an, bc, bd) ++ bC(aZ)) ++ bz(ba, ay())) ++ bk(-(bU))) ++ be(an, -(bP))) ++ bq(-(bP))) ++ bs(an, aK, bX)) ++ [ScriptTransfer(bH.caller, U(bU), M())]) | |
349 | 414 | else throw("Strict value is not equal to itself.") | |
350 | 415 | } | |
351 | 416 | } | |
352 | 417 | } | |
353 | 418 | } | |
354 | 419 | ||
355 | 420 | ||
356 | 421 | ||
357 | - | @Callable( | |
422 | + | @Callable(bH) | |
358 | 423 | func withdrawRewards () = { | |
359 | - | let | |
360 | - | let | |
361 | - | let | |
362 | - | let | |
363 | - | let | |
364 | - | let | |
365 | - | if (if ((0 >= | |
424 | + | let an = toString(bH.caller) | |
425 | + | let bZ = aY(an, 0) | |
426 | + | let aZ = bZ._1 | |
427 | + | let ba = bZ._2 | |
428 | + | let bc = bZ._3 | |
429 | + | let bd = bZ._4 | |
430 | + | if (if ((0 >= bc)) | |
366 | 431 | then true | |
367 | - | else !( | |
432 | + | else !(aD())) | |
368 | 433 | then throw("No reward: Vault") | |
369 | - | else (((( | |
434 | + | else ((((bE(an, 0, bd) ++ bC(aZ)) ++ bz(ba, ay())) ++ bv(-(bc))) ++ [ScriptTransfer(bH.caller, bc, J())]) | |
370 | 435 | } | |
371 | 436 | ||
372 | 437 | ||
373 | 438 | ||
374 | - | @Callable( | |
439 | + | @Callable(bH) | |
375 | 440 | func addFree () = { | |
376 | - | let | |
377 | - | if (if (if (if (( | |
441 | + | let V = X(bH.payments[0].amount) | |
442 | + | if (if (if (if ((bH.payments[0].assetId != M())) | |
378 | 443 | then true | |
379 | - | else (size( | |
444 | + | else (size(bH.payments) != 1)) | |
380 | 445 | then true | |
381 | - | else !( | |
446 | + | else !(aD())) | |
382 | 447 | then true | |
383 | - | else !(if ( | |
448 | + | else !(if (I(toString(bH.caller))) | |
384 | 449 | then true | |
385 | - | else ( | |
450 | + | else (bH.caller == H()))) | |
386 | 451 | then throw("Invalid addFree params") | |
387 | 452 | else { | |
388 | - | let | |
389 | - | let | |
390 | - | if (( | |
391 | - | then ( | |
453 | + | let aP = aN(V) | |
454 | + | let bT = invoke(P(), "deposit", nil, [AttachedPayment(M(), U(V))]) | |
455 | + | if ((bT == bT)) | |
456 | + | then (bk(V) ++ br(aP)) | |
392 | 457 | else throw("Strict value is not equal to itself.") | |
393 | 458 | } | |
394 | 459 | } | |
395 | 460 | ||
396 | 461 | ||
397 | 462 | ||
398 | - | @Callable( | |
463 | + | @Callable(bH) | |
399 | 464 | func addLocked () = { | |
400 | - | let | |
401 | - | if (if (if (if (( | |
465 | + | let V = X(bH.payments[0].amount) | |
466 | + | if (if (if (if ((bH.payments[0].assetId != M())) | |
402 | 467 | then true | |
403 | - | else (size( | |
468 | + | else (size(bH.payments) != 1)) | |
404 | 469 | then true | |
405 | - | else !( | |
470 | + | else !(aD())) | |
406 | 471 | then true | |
407 | - | else !(if ( | |
472 | + | else !(if (I(toString(bH.caller))) | |
408 | 473 | then true | |
409 | - | else ( | |
474 | + | else (bH.caller == H()))) | |
410 | 475 | then throw("Invalid addLocked params") | |
411 | 476 | else { | |
412 | - | let | |
413 | - | if (( | |
414 | - | then | |
477 | + | let bY = invoke(P(), "deposit", nil, [AttachedPayment(M(), U(V))]) | |
478 | + | if ((bY == bY)) | |
479 | + | then bm(V) | |
415 | 480 | else throw("Strict value is not equal to itself.") | |
416 | 481 | } | |
417 | 482 | } | |
418 | 483 | ||
419 | 484 | ||
420 | 485 | ||
421 | - | @Callable( | |
422 | - | func exchangeFreeAndLocked ( | |
486 | + | @Callable(bH) | |
487 | + | func exchangeFreeAndLocked (V) = if (if (!(aD())) | |
423 | 488 | then true | |
424 | - | else if (!( | |
425 | - | then ( | |
489 | + | else if (!(I(toString(bH.caller)))) | |
490 | + | then (bH.caller != H()) | |
426 | 491 | else false) | |
427 | 492 | then throw("Invalid exchangeFreeAndLocked params") | |
428 | 493 | else { | |
429 | - | let | |
430 | - | let | |
431 | - | (( | |
494 | + | let bU = X(V) | |
495 | + | let aP = aN(-(bU)) | |
496 | + | ((bm(bU) ++ bk(-(bU))) ++ br(aP)) | |
432 | 497 | } | |
433 | 498 | ||
434 | 499 | ||
435 | 500 | ||
436 | - | @Callable( | |
437 | - | func withdrawLocked ( | |
501 | + | @Callable(bH) | |
502 | + | func withdrawLocked (V) = if (if (if (!(aD())) | |
438 | 503 | then true | |
439 | - | else (0 >= | |
504 | + | else (0 >= V)) | |
440 | 505 | then true | |
441 | - | else !( | |
506 | + | else !(I(toString(bH.caller)))) | |
442 | 507 | then throw("Invalid withdrawLocked params") | |
443 | 508 | else { | |
444 | - | let | |
445 | - | let | |
446 | - | if (( | |
447 | - | then ( | |
509 | + | let bU = X(V) | |
510 | + | let bY = invoke(P(), "withdraw", [L(), U(bU)], nil) | |
511 | + | if ((bY == bY)) | |
512 | + | then (bm(-(bU)) ++ [ScriptTransfer(bH.caller, U(bU), M())]) | |
448 | 513 | else throw("Strict value is not equal to itself.") | |
449 | 514 | } | |
450 | 515 | ||
451 | 516 | ||
452 | 517 | ||
453 | - | @Callable( | |
454 | - | func addRewards () = if (if (if (( | |
518 | + | @Callable(bH) | |
519 | + | func addRewards () = if (if (if ((bH.payments[0].assetId != J())) | |
455 | 520 | then true | |
456 | - | else (size( | |
521 | + | else (size(bH.payments) != 1)) | |
457 | 522 | then true | |
458 | - | else !( | |
523 | + | else !(aD())) | |
459 | 524 | then throw("Invalid addRewards params") | |
460 | 525 | else { | |
461 | - | let | |
462 | - | let | |
463 | - | let | |
464 | - | let | |
465 | - | then ( | |
526 | + | let bF = bH.payments[0].amount | |
527 | + | let aZ = aY(S, T)._1 | |
528 | + | let ca = aF() | |
529 | + | let cb = if ((ca > ay())) | |
530 | + | then (bF / R) | |
466 | 531 | else { | |
467 | - | let | |
468 | - | let | |
469 | - | (( | |
532 | + | let cc = (ay() - ca) | |
533 | + | let cd = (ax() * cc) | |
534 | + | ((bF + cd) / R) | |
470 | 535 | } | |
471 | - | ((( | |
536 | + | (((bx(cb) ++ bC(aZ)) ++ bv(bF)) ++ bz(ca, (ca + R))) | |
472 | 537 | } | |
473 | 538 | ||
474 | 539 | ||
475 | 540 | ||
476 | - | @Callable( | |
541 | + | @Callable(bH) | |
477 | 542 | func ackRewards () = { | |
478 | - | let | |
479 | - | if (( | |
543 | + | let ce = invoke(P(), "claimProfit", [L()], nil) | |
544 | + | if ((ce == ce)) | |
480 | 545 | then { | |
481 | - | let | |
482 | - | let | |
483 | - | if ($isInstanceOf( | |
546 | + | let cf = { | |
547 | + | let cg = ce | |
548 | + | if ($isInstanceOf(cg, "Int")) | |
484 | 549 | then { | |
485 | - | let | |
486 | - | | |
550 | + | let ch = cg | |
551 | + | X(ch) | |
487 | 552 | } | |
488 | 553 | else throw("Invalid claimProfit response") | |
489 | 554 | } | |
490 | - | let | |
555 | + | let ci = if ((cf > 0)) | |
491 | 556 | then { | |
492 | - | let | |
493 | - | let | |
494 | - | if (( | |
495 | - | then ( | |
557 | + | let aP = aN(cf) | |
558 | + | let bT = invoke(P(), "deposit", nil, [AttachedPayment(M(), U(cf))]) | |
559 | + | if ((bT == bT)) | |
560 | + | then (bk(cf) ++ br(aP)) | |
496 | 561 | else throw("Strict value is not equal to itself.") | |
497 | 562 | } | |
498 | 563 | else nil | |
499 | - | if (( | |
500 | - | then | |
564 | + | if ((ci == ci)) | |
565 | + | then ci | |
501 | 566 | else throw("Strict value is not equal to itself.") | |
502 | 567 | } | |
503 | 568 | else throw("Strict value is not equal to itself.") | |
504 | 569 | } | |
505 | 570 | ||
506 | 571 | ||
507 | 572 | ||
508 | - | @Callable( | |
509 | - | func view_reward ( | |
510 | - | let | |
511 | - | let | |
512 | - | let | |
513 | - | let | |
514 | - | throw(toString( | |
573 | + | @Callable(bH) | |
574 | + | func view_reward (an) = { | |
575 | + | let bl = am(an) | |
576 | + | let cj = ab(ao(an), bl) | |
577 | + | let ck = ab(al(), bl) | |
578 | + | let cl = (ck - cj) | |
579 | + | throw(toString(cl)) | |
515 | 580 | } | |
516 | 581 | ||
517 | 582 | ||
518 | 583 | ||
519 | - | @Callable( | |
520 | - | func view_stakingReward ( | |
521 | - | let | |
522 | - | throw(toString( | |
584 | + | @Callable(bH) | |
585 | + | func view_stakingReward (an) = { | |
586 | + | let bc = aY(an, 0)._3 | |
587 | + | throw(toString(U(bc))) | |
523 | 588 | } | |
524 | 589 | ||
525 | 590 | ||
526 | 591 | ||
527 | - | @Callable( | |
528 | - | func view_withdrawLimit ( | |
529 | - | let | |
530 | - | let | |
531 | - | throw(toString( | |
592 | + | @Callable(bH) | |
593 | + | func view_withdrawLimit (an) = { | |
594 | + | let aL = aG(an)._2 | |
595 | + | let cm = U(ab(aL, al())) | |
596 | + | throw(toString(cm)) | |
532 | 597 | } | |
533 | 598 | ||
534 | 599 | ||
535 | - | @Verifier( | |
536 | - | func | |
537 | - | let | |
538 | - | if (isDefined( | |
600 | + | @Verifier(cn) | |
601 | + | func co () = { | |
602 | + | let cp = getString(this, v) | |
603 | + | if (isDefined(cp)) | |
539 | 604 | then { | |
540 | - | let | |
541 | - | if (isDefined( | |
542 | - | then valueOrElse(getBoolean(addressFromStringValue(value( | |
605 | + | let cq = getString(addressFromStringValue(value(cp)), z) | |
606 | + | if (isDefined(cq)) | |
607 | + | then valueOrElse(getBoolean(addressFromStringValue(value(cq)), ((("status_" + toString(this)) + "_") + toBase58String(cn.id))), false) | |
543 | 608 | else throw("unable to verify: admin not set in coordinator") | |
544 | 609 | } | |
545 | - | else sigVerify( | |
610 | + | else sigVerify(cn.bodyBytes, cn.proofs[0], cn.senderPublicKey) | |
546 | 611 | } | |
547 | 612 |
github/deemru/w8io/026f985 252.24 ms ◑