tx · 319rJAAw9xqhiwHhkf2aoRxkpy2JsiWLU9sKv1ym55HG 3Myn55vLkduxbX3ZXfiDCZhaQsLxYp1kmCy: -0.02700000 Waves 2023.08.14 17:39 [2710362] smart account 3Myn55vLkduxbX3ZXfiDCZhaQsLxYp1kmCy > SELF 0.00000000 Waves
{ "type": 13, "id": "319rJAAw9xqhiwHhkf2aoRxkpy2JsiWLU9sKv1ym55HG", "fee": 2700000, "feeAssetId": null, "timestamp": 1692024013968, "version": 2, "chainId": 84, "sender": "3Myn55vLkduxbX3ZXfiDCZhaQsLxYp1kmCy", "senderPublicKey": "9W33iCCNfmFxUbiC6XZcH5x7f6xfwC7Jb3BoExT5q2PV", "proofs": [ "5TurZTvh4sezLLsSA11iYEwJ87tQps1BaiMacwUADhLiaw28wkMrvNeNJKNKs8T8WL9VvFnf43aHxEiCmkobo5Y" ], "script": "base64:BgKZLwgCEggKBggIAQEBCBIFCgMBCAISAwoBARIDCgEBEgQKAggIEgQKAggIEgMKAQgSAwoBCBIDCgEIEgQKAggBEgASABIFCgMICAQSAwoBCBIDCgEIEgQKAggIEgQKAggIIgNTRVAiBlNDQUxFOCIFTVVMVDgiDlBPT0xXRUlHSFRNVUxUIgd3cmFwRXJyIgNtc2ciCHRocm93RXJyIgRzdHJmIgdhZGRyZXNzIgNrZXkiA2lveiIDaW9kIgpkZWZhdWx0VmFsIgNpb2YiA2FicyIDdmFsIgNhYWwiByRtYXRjaDAiCnZhbEFueUx5c3QiAmFpIgZ2YWxJbnQiG2tleVJlZmVycmFsc0NvbnRyYWN0QWRkcmVzcyIecmVmZXJyYWxzQ29udHJhY3RBZGRyZXNzT3JGYWlsIhZrZXlSZWZlcnJhbFByb2dyYW1OYW1lIhpyZWZlcnJhbFByb2dyYW1OYW1lRGVmYXVsdCITcmVmZXJyYWxQcm9ncmFtTmFtZSIRa2V5RmFjdG9yeUFkZHJlc3MiGElkeEZhY3RvcnlDZmdTdGFraW5nRGFwcCIZSWR4RmFjdG9yeUNmZ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ldFVzZXJWb3RlRmluYWxpemVkUkVBRE9OTFkCAmJKAmJSCQCUCgIFA25pbAkBAmRpAgUCYkoFAmJSAmFJASFnZXRVc2VyVm90ZVN0YWtlZEludGVncmFsUkVBRE9OTFkCAmJKAmJSCQCUCgIFA25pbAkBAmREAgUCYkoFAmJSAQJmcAECZnEABAJmcgQBcgkBAmFGAAMJAAECBQFyAgpCeXRlVmVjdG9yBAJhSwUBcgUCYUsDCQABAgUBcgIEVW5pdAgFAmZwD3NlbmRlclB1YmxpY0tleQkAAgECC01hdGNoIGVycm9yCQD0AwMIBQJmcAlib2R5Qnl0ZXMJAJEDAggFAmZwBnByb29mcwAABQJmclpY1bA=", "height": 2710362, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FisWfXcmP2HDisjzh8QUDSVtj5gya5bWqp5HuzvvbgSt Next: AuGR23H1WV8mAjnRLoKH5dQnxjNH7SeF9ifWm75DfPFJ Diff:
Old | New | Differences | |
---|---|---|---|
9 | 9 | ||
10 | 10 | let d = c | |
11 | 11 | ||
12 | - | let e = "boosting.ride" | |
13 | - | ||
14 | - | let f = 18 | |
15 | - | ||
16 | - | let g = 1000000000000000000 | |
17 | - | ||
18 | - | let h = toBigInt(g) | |
19 | - | ||
20 | - | let i = [1, 3, 6, 12, 24, 48] | |
21 | - | ||
22 | - | let j = 1440 | |
23 | - | ||
24 | - | let k = 43800 | |
25 | - | ||
26 | - | func l (m) = makeString([e, ": ", m], "") | |
12 | + | func e (f) = makeString(["boosting.ride:", f], " ") | |
27 | 13 | ||
28 | 14 | ||
29 | - | func | |
15 | + | func g (f) = throw(e(f)) | |
30 | 16 | ||
31 | 17 | ||
32 | - | func | |
18 | + | func h (i,j) = valueOrErrorMessage(getString(i, j), e((("mandatory this." + j) + " is not defined"))) | |
33 | 19 | ||
34 | 20 | ||
35 | - | func | |
21 | + | func k (i,j) = valueOrElse(getInteger(i, j), 0) | |
36 | 22 | ||
37 | 23 | ||
38 | - | func | |
24 | + | func l (i,j,m) = valueOrElse(getInteger(i, j), m) | |
39 | 25 | ||
40 | 26 | ||
41 | - | func | |
27 | + | func n (i,j) = valueOrErrorMessage(getInteger(i, j), e((("mandatory this." + j) + " is not defined"))) | |
42 | 28 | ||
43 | 29 | ||
44 | - | func | |
45 | - | then -( | |
46 | - | else | |
30 | + | func o (p) = if ((0 > p)) | |
31 | + | then -(p) | |
32 | + | else p | |
47 | 33 | ||
48 | 34 | ||
49 | - | func x (y,z) = if ((y >= 0)) | |
50 | - | then y | |
51 | - | else n((valueOrElse(z, "value") + " should be positive")) | |
35 | + | func q (p) = { | |
36 | + | let r = p | |
37 | + | if ($isInstanceOf(r, "List[Any]")) | |
38 | + | then { | |
39 | + | let s = r | |
40 | + | s | |
41 | + | } | |
42 | + | else g("fail to cast into List[Any]") | |
43 | + | } | |
52 | 44 | ||
53 | 45 | ||
54 | - | func A () = makeString(["%s%s", "config", "referralsContractAddress"], a) | |
46 | + | func t (p) = { | |
47 | + | let r = p | |
48 | + | if ($isInstanceOf(r, "Int")) | |
49 | + | then { | |
50 | + | let u = r | |
51 | + | u | |
52 | + | } | |
53 | + | else g("fail to cast into Int") | |
54 | + | } | |
55 | 55 | ||
56 | 56 | ||
57 | - | let B = addressFromStringValue(o(this, A())) | |
58 | - | ||
59 | - | let C = makeString(["%s%s", "referral", "programName"], a) | |
60 | - | ||
61 | - | let D = "wxlock" | |
62 | - | ||
63 | - | let E = valueOrElse(getString(this, C), D) | |
64 | - | ||
65 | - | func F () = "%s%s__config__factoryAddress" | |
57 | + | func v () = makeString(["%s%s", "config", "referralsContractAddress"], a) | |
66 | 58 | ||
67 | 59 | ||
68 | - | let | |
60 | + | let w = addressFromStringValue(h(this, v())) | |
69 | 61 | ||
70 | - | let | |
62 | + | let x = makeString(["%s%s", "referral", "programName"], a) | |
71 | 63 | ||
72 | - | let | |
64 | + | let y = "wxlock" | |
73 | 65 | ||
74 | - | let | |
66 | + | let z = valueOrElse(getString(this, x), y) | |
75 | 67 | ||
76 | - | let K = 5 | |
77 | - | ||
78 | - | let L = 6 | |
79 | - | ||
80 | - | let M = 7 | |
81 | - | ||
82 | - | let N = 8 | |
83 | - | ||
84 | - | let O = 9 | |
85 | - | ||
86 | - | let P = 10 | |
87 | - | ||
88 | - | let Q = 11 | |
89 | - | ||
90 | - | func R () = "%s__factoryConfig" | |
68 | + | func A () = "%s%s__config__factoryAddress" | |
91 | 69 | ||
92 | 70 | ||
93 | - | func S (T) = makeString(["%s%s%s", T, "mappings__lpAsset2PoolContract"], a) | |
71 | + | let B = 1 | |
72 | + | ||
73 | + | let C = 2 | |
74 | + | ||
75 | + | let D = 3 | |
76 | + | ||
77 | + | let E = 4 | |
78 | + | ||
79 | + | let F = 5 | |
80 | + | ||
81 | + | let G = 6 | |
82 | + | ||
83 | + | let H = 7 | |
84 | + | ||
85 | + | let I = 8 | |
86 | + | ||
87 | + | let J = 9 | |
88 | + | ||
89 | + | let K = 10 | |
90 | + | ||
91 | + | let L = 11 | |
92 | + | ||
93 | + | func M () = "%s__factoryConfig" | |
94 | 94 | ||
95 | 95 | ||
96 | - | func | |
96 | + | func N () = "%s__lpTokensList" | |
97 | 97 | ||
98 | 98 | ||
99 | - | func | |
99 | + | func O (P) = makeString(["%s%s%s", P, "mappings__lpAsset2PoolContract"], a) | |
100 | 100 | ||
101 | 101 | ||
102 | - | func | |
102 | + | func Q (R) = makeString(["%s%s", "poolWeight", R], a) | |
103 | 103 | ||
104 | 104 | ||
105 | - | func | |
105 | + | func S (T,U) = ((("%s%s__poolWeight__" + T) + "__") + toString(U)) | |
106 | 106 | ||
107 | 107 | ||
108 | - | func | |
108 | + | func V () = addressFromStringValue(h(this, A())) | |
109 | 109 | ||
110 | 110 | ||
111 | - | func | |
111 | + | func W () = split(valueOrElse(getString(V(), N()), ""), a) | |
112 | 112 | ||
113 | 113 | ||
114 | - | func | |
114 | + | func X (Y) = split(h(Y, M()), a) | |
115 | 115 | ||
116 | 116 | ||
117 | - | func | |
117 | + | func Z (aa) = addressFromStringValue(aa[C]) | |
118 | 118 | ||
119 | 119 | ||
120 | - | func | |
120 | + | func ab (aa) = addressFromStringValue(aa[F]) | |
121 | 121 | ||
122 | 122 | ||
123 | - | func | |
123 | + | func ac (aa) = addressFromStringValue(aa[B]) | |
124 | 124 | ||
125 | 125 | ||
126 | - | func | |
126 | + | func ad (aa) = addressFromStringValue(aa[K]) | |
127 | 127 | ||
128 | 128 | ||
129 | - | func | |
129 | + | func ae () = "%s__managerPublicKey" | |
130 | 130 | ||
131 | 131 | ||
132 | - | func | |
132 | + | func af () = "%s__managerVaultAddress" | |
133 | 133 | ||
134 | 134 | ||
135 | - | func | |
135 | + | func ag () = "%s%s__ratePerBlock__current" | |
136 | 136 | ||
137 | 137 | ||
138 | - | func | |
138 | + | func ah () = "%s%s__ratePerBlockMax__current" | |
139 | 139 | ||
140 | 140 | ||
141 | - | func | |
141 | + | func ai () = "%s%s__emission__startBlock" | |
142 | 142 | ||
143 | 143 | ||
144 | - | func | |
144 | + | func aj () = "%s%s__boostingV2__startBlock" | |
145 | 145 | ||
146 | 146 | ||
147 | - | let aq = 1 | |
148 | - | ||
149 | - | let ar = 2 | |
150 | - | ||
151 | - | let as = 3 | |
152 | - | ||
153 | - | let at = 4 | |
154 | - | ||
155 | - | let au = 5 | |
156 | - | ||
157 | - | let av = 6 | |
158 | - | ||
159 | - | func aw () = "%s__config" | |
147 | + | func ak () = "%s%s__boostingV2__integral" | |
160 | 148 | ||
161 | 149 | ||
162 | - | func | |
150 | + | func al () = "%s%s__emission__duration" | |
163 | 151 | ||
164 | 152 | ||
165 | - | let ay = ax() | |
166 | - | ||
167 | - | let az = fromBase58String(ay[aq]) | |
168 | - | ||
169 | - | let aA = valueOrErrorMessage(parseInt(ay[ar]), l("invalid min lock amount")) | |
170 | - | ||
171 | - | let aB = valueOrErrorMessage(parseInt(ay[as]), l("invalid min lock duration")) | |
172 | - | ||
173 | - | let aC = valueOrErrorMessage(parseInt(ay[at]), l("invalid max lock duration")) | |
174 | - | ||
175 | - | let aD = valueOrErrorMessage(addressFromString(ay[au]), l("invalid math contract address")) | |
176 | - | ||
177 | - | let aE = valueOrErrorMessage(parseInt(ay[av]), l("invalid blocks in period")) | |
178 | - | ||
179 | - | func aF (az,aA,aB,aC,aD) = makeString(["%s%d%d%d%s", az, aA, aB, aC, aD], a) | |
153 | + | func am () = "%s%s__emission__endBlock" | |
180 | 154 | ||
181 | 155 | ||
182 | - | func | |
156 | + | func an () = "%s__nextPeriod" | |
183 | 157 | ||
184 | 158 | ||
185 | - | func aH () = { | |
186 | - | let aI = getString(ai()) | |
187 | - | if ($isInstanceOf(aI, "String")) | |
159 | + | func ao () = "%s%s__gwxRewardEmissionPart__startHeight" | |
160 | + | ||
161 | + | ||
162 | + | let ap = 1 | |
163 | + | ||
164 | + | let aq = 2 | |
165 | + | ||
166 | + | let ar = 3 | |
167 | + | ||
168 | + | let as = 4 | |
169 | + | ||
170 | + | let at = 5 | |
171 | + | ||
172 | + | func au () = "%s__config" | |
173 | + | ||
174 | + | ||
175 | + | func av () = split(h(this, au()), a) | |
176 | + | ||
177 | + | ||
178 | + | let aw = addressFromStringValue(av()[at]) | |
179 | + | ||
180 | + | func ax (ay,az,aA,aB,aw) = makeString(["%s%d%d%d", ay, az, aA, aB, aw], a) | |
181 | + | ||
182 | + | ||
183 | + | func aC (ay,az,aA,aB,aw) = ax(ay, toString(az), toString(aA), toString(aB), aw) | |
184 | + | ||
185 | + | ||
186 | + | func aD () = { | |
187 | + | let r = getString(af()) | |
188 | + | if ($isInstanceOf(r, "String")) | |
188 | 189 | then { | |
189 | - | let | |
190 | - | addressFromStringValue( | |
190 | + | let aE = r | |
191 | + | addressFromStringValue(aE) | |
191 | 192 | } | |
192 | 193 | else this | |
193 | 194 | } | |
194 | 195 | ||
195 | 196 | ||
196 | - | func | |
197 | - | let | |
198 | - | let | |
199 | - | if ($isInstanceOf( | |
197 | + | func aF () = { | |
198 | + | let aG = aD() | |
199 | + | let r = getString(aG, ae()) | |
200 | + | if ($isInstanceOf(r, "String")) | |
200 | 201 | then { | |
201 | - | let | |
202 | - | fromBase58String( | |
202 | + | let aE = r | |
203 | + | fromBase58String(aE) | |
203 | 204 | } | |
204 | - | else if ($isInstanceOf( | |
205 | + | else if ($isInstanceOf(r, "Unit")) | |
205 | 206 | then unit | |
206 | 207 | else throw("Match error") | |
207 | 208 | } | |
208 | 209 | ||
209 | 210 | ||
210 | - | func | |
211 | - | let | |
212 | - | let | |
213 | - | if ($isInstanceOf( | |
211 | + | func aH (aI) = { | |
212 | + | let aJ = g("Permission denied") | |
213 | + | let r = aF() | |
214 | + | if ($isInstanceOf(r, "ByteVector")) | |
214 | 215 | then { | |
215 | - | let | |
216 | - | if (( | |
216 | + | let aK = r | |
217 | + | if ((aI.callerPublicKey == aK)) | |
217 | 218 | then true | |
218 | - | else | |
219 | + | else aJ | |
219 | 220 | } | |
220 | - | else if ($isInstanceOf( | |
221 | - | then if (( | |
221 | + | else if ($isInstanceOf(r, "Unit")) | |
222 | + | then if ((aI.caller == this)) | |
222 | 223 | then true | |
223 | - | else | |
224 | + | else aJ | |
224 | 225 | else throw("Match error") | |
225 | 226 | } | |
226 | 227 | ||
227 | 228 | ||
228 | - | let | |
229 | + | let aL = 1 | |
229 | 230 | ||
230 | - | let | |
231 | + | let aM = 2 | |
231 | 232 | ||
232 | - | let | |
233 | + | let aN = 3 | |
233 | 234 | ||
234 | - | let | |
235 | + | let aO = 4 | |
235 | 236 | ||
236 | - | let | |
237 | + | let aP = 5 | |
237 | 238 | ||
238 | - | let | |
239 | + | let aQ = 6 | |
239 | 240 | ||
240 | - | func aW (aX,aY) = makeString(["%s%s%s__lock", toString(aX), { | |
241 | - | let aI = aY | |
242 | - | if ($isInstanceOf(aI, "ByteVector")) | |
243 | - | then { | |
244 | - | let aZ = aI | |
245 | - | toBase58String(aZ) | |
246 | - | } | |
247 | - | else if ($isInstanceOf(aI, "Unit")) | |
248 | - | then "legacy" | |
249 | - | else throw("Match error") | |
250 | - | }], a) | |
241 | + | func aR (aS) = makeString(["%s%s__lock", aS], a) | |
251 | 242 | ||
252 | 243 | ||
253 | - | func | |
244 | + | func aT (aS) = split(h(this, aR(aS)), a) | |
254 | 245 | ||
255 | 246 | ||
256 | - | func | |
247 | + | func aU (aV,aW,aX,aY,aZ,ba,bb,bc) = makeString(["%d%d%d%d%d%d%d%d", aV, aW, aX, aY, aZ, ba, bb, bc], a) | |
257 | 248 | ||
258 | 249 | ||
259 | - | func | |
250 | + | func bd (aV,aW,aX,aY,aZ,ba,bc) = aU(aV, toString(aW), toString(aX), toString(aY), toString(aZ), toString(ba), toString(lastBlock.timestamp), toString(bc)) | |
260 | 251 | ||
261 | 252 | ||
262 | - | func | |
253 | + | func be () = "%s__nextUserNum" | |
263 | 254 | ||
264 | 255 | ||
265 | - | func | |
256 | + | func bf (aS) = makeString(["%s%s%s__mapping__user2num", aS], a) | |
266 | 257 | ||
267 | 258 | ||
268 | - | func | |
259 | + | func bg (U) = makeString(["%s%s%s__mapping__num2user", U], a) | |
269 | 260 | ||
270 | 261 | ||
271 | - | func | |
262 | + | func bh (aV) = makeString(["%s%d%s__paramByUserNum", aV, "amount"], a) | |
272 | 263 | ||
273 | 264 | ||
274 | - | func | |
265 | + | func bi (aV) = makeString(["%s%d%s__paramByUserNum", aV, "start"], a) | |
275 | 266 | ||
276 | 267 | ||
277 | - | func | |
268 | + | func bj (aV) = makeString(["%s%d%s__paramByUserNum", aV, "duration"], a) | |
278 | 269 | ||
279 | 270 | ||
280 | - | func | |
271 | + | func bk (aV) = makeString(["%s%d%s__paramByUserNum", aV, "k"], a) | |
281 | 272 | ||
282 | 273 | ||
283 | - | func | |
274 | + | func bl (aV) = makeString(["%s%d%s__paramByUserNum", aV, "b"], a) | |
284 | 275 | ||
285 | 276 | ||
286 | - | func | |
277 | + | func bm (aV,bn) = makeString(["%s%d%s%d__paramByPeriod", aV, "k", bn], a) | |
287 | 278 | ||
288 | 279 | ||
289 | - | func | |
280 | + | func bo (aV,bn) = makeString(["%s%d%s%d__paramByPeriod", aV, "b", bn], a) | |
290 | 281 | ||
291 | 282 | ||
292 | - | func | |
283 | + | func bp () = "%s%s__stats__activeTotalLocked" | |
293 | 284 | ||
294 | 285 | ||
295 | - | func | |
286 | + | func bq () = "%s%s__stats__locksDurationSumInBlocks" | |
296 | 287 | ||
297 | 288 | ||
298 | - | func | |
289 | + | func br () = "%s%s__stats__locksCount" | |
299 | 290 | ||
300 | 291 | ||
301 | - | func | |
292 | + | func bs () = "%s%s__stats__activeUsersCount" | |
302 | 293 | ||
303 | 294 | ||
304 | - | func | |
295 | + | func bt (aV) = makeString(["%s%d__userBoostEmissionLastIntV2", aV], a) | |
305 | 296 | ||
306 | 297 | ||
307 | - | func | |
298 | + | func bu (aV,bv) = makeString(["%s%d__userBoostEmissionLastIntV2", aV, bv], a) | |
308 | 299 | ||
309 | 300 | ||
310 | - | func | |
301 | + | func bw (aV) = makeString(["%s%d__maxBoostInt", aV], a) | |
311 | 302 | ||
312 | 303 | ||
313 | - | func | |
304 | + | func bx () = "%s%s__maxBoostInt__total" | |
314 | 305 | ||
315 | 306 | ||
316 | - | func | |
307 | + | func by (aV) = makeString(["%s%d__userBoostAvaliableToClaimTotal", aV], a) | |
317 | 308 | ||
318 | 309 | ||
319 | - | func | |
310 | + | func bz (aV) = makeString(["%s%d__userBoostClaimed", aV], a) | |
320 | 311 | ||
321 | 312 | ||
322 | - | func | |
313 | + | func bA () = "%s%s__gwxCached__total" | |
323 | 314 | ||
324 | 315 | ||
325 | - | func | |
316 | + | func bB () = "%s__gwxCachedTotalCorrective" | |
326 | 317 | ||
327 | 318 | ||
328 | - | func | |
319 | + | func bC (bD,bE,i,bF) = makeString(["%s%s%s%s%d", "vote", bD, bE, toString(i), toString(bF)], a) | |
329 | 320 | ||
330 | 321 | ||
331 | - | func | |
322 | + | func bG (bF) = makeString(["%s%d", "startHeight", toString(bF)], a) | |
332 | 323 | ||
333 | 324 | ||
334 | - | func | |
325 | + | func bH () = makeString(["%s", "currentEpochUi"], a) | |
335 | 326 | ||
336 | 327 | ||
337 | - | ||
328 | + | func bI (bJ,bF) = makeString(["%s%s%d", "votingResultStaked", bJ, toString(bF)], a) | |
338 | 329 | ||
339 | - | let ad = aa(bO) | |
340 | 330 | ||
341 | - | ||
331 | + | func bK (bJ,bF) = makeString(["%s%s%d", "votingResultStakedIntegral", bJ, toString(bF)], a) | |
342 | 332 | ||
343 | - | let bQ = af(ad) | |
344 | 333 | ||
345 | - | ||
334 | + | func bL (bJ,bF) = makeString(["%s%s%d", "votingResultStakedIntegralLastUpdateHeight", bJ, toString(bF)], a) | |
346 | 335 | ||
347 | - | let bS = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(makeString(["%s", "lpStakingPoolsContract"], a)), l("lp_staking_pools contract address is undefined"))), l("invalid lp_staking_pools contract address")) | |
348 | 336 | ||
349 | - | ||
337 | + | func bM (bJ,i,bF) = makeString(["%s%s%s%d", "votingResultStakedIntegralLast", bJ, toString(i), toString(bF)], a) | |
350 | 338 | ||
351 | - | let bU = addressFromStringValue(getStringValue(bO, bT)) | |
352 | 339 | ||
353 | - | ||
340 | + | func bN (bJ,i,bF) = makeString(["%s%s%s%d", "voteStakedIntegral", bJ, toString(i), toString(bF)], a) | |
354 | 341 | ||
355 | - | let bW = { | |
356 | - | let bX = invoke(bP, "getBoostCoeffREADONLY", nil, nil) | |
357 | - | if ($isInstanceOf(bX, "Int")) | |
358 | - | then bX | |
359 | - | else throw(($getType(bX) + " couldn't be cast to Int")) | |
342 | + | ||
343 | + | func bO (bJ,i,bF) = makeString(["%s%s%s%d", "voteStakedIntegralLastUpdateHeight", bJ, toString(i), toString(bF)], a) | |
344 | + | ||
345 | + | ||
346 | + | func bP (bJ,i,bF) = makeString(["%s%s%s%d", "voteStakedIntegralLast", bJ, toString(i), toString(bF)], a) | |
347 | + | ||
348 | + | ||
349 | + | func bQ (bR,bJ) = makeString(["%s%s%s", "staked", bR, bJ], a) | |
350 | + | ||
351 | + | ||
352 | + | let bS = V() | |
353 | + | ||
354 | + | let aa = X(bS) | |
355 | + | ||
356 | + | let bT = ab(aa) | |
357 | + | ||
358 | + | let bU = ac(aa) | |
359 | + | ||
360 | + | let bV = ad(aa) | |
361 | + | ||
362 | + | let bW = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(makeString(["%s", "lpStakingPoolsContract"], a)), e("lp_staking_pools contract address is undefined"))), e("invalid lp_staking_pools contract address")) | |
363 | + | ||
364 | + | let bX = makeString(["%s", "votingEmissionContract"], a) | |
365 | + | ||
366 | + | let bY = addressFromStringValue(getStringValue(bS, bX)) | |
367 | + | ||
368 | + | let bZ = { | |
369 | + | let ca = invoke(bT, "getBoostCoeffREADONLY", nil, nil) | |
370 | + | if ($isInstanceOf(ca, "Int")) | |
371 | + | then ca | |
372 | + | else throw(($getType(ca) + " couldn't be cast to Int")) | |
360 | 373 | } | |
361 | 374 | ||
362 | - | func bY (aX) = { | |
363 | - | let aI = getString(this, bj(toString(aX))) | |
364 | - | if ($isInstanceOf(aI, "String")) | |
365 | - | then { | |
366 | - | let aJ = aI | |
367 | - | valueOrErrorMessage(parseInt(aJ), l("invalid user number")) | |
368 | - | } | |
369 | - | else if ($isInstanceOf(aI, "Unit")) | |
370 | - | then n("invalid user") | |
371 | - | else throw("Match error") | |
375 | + | func cb (cc) = { | |
376 | + | let cd = getIntegerValue(bY, bH()) | |
377 | + | let ce = makeString(["%s%s", "totalCachedGwxCorrection__activationEpoch"], a) | |
378 | + | let cf = getInteger(this, ce) | |
379 | + | let cg = valueOrElse(getInteger(this, bA()), 0) | |
380 | + | let ch = if (isDefined(cf)) | |
381 | + | then (cd >= value(cf)) | |
382 | + | else false | |
383 | + | let ci = if (if (ch) | |
384 | + | then cc | |
385 | + | else false) | |
386 | + | then valueOrElse(getInteger(this, bB()), 0) | |
387 | + | else 0 | |
388 | + | max([0, (cg + ci)]) | |
372 | 389 | } | |
373 | 390 | ||
374 | 391 | ||
375 | - | func bZ () = valueOrElse(getInteger(this, bx()), 0) | |
376 | - | ||
377 | - | ||
378 | - | func ca (aX) = { | |
379 | - | let cb = "getLockedGwxAmount" | |
380 | - | let cc = valueOrErrorMessage({ | |
381 | - | let aI = getString(bU, bV) | |
382 | - | if ($isInstanceOf(aI, "Unit")) | |
383 | - | then unit | |
384 | - | else if ($isInstanceOf(aI, "String")) | |
385 | - | then { | |
386 | - | let aJ = aI | |
387 | - | addressFromString(aJ) | |
388 | - | } | |
389 | - | else throw("Match error") | |
390 | - | }, l("invalid voting emission rate address")) | |
391 | - | let cd = { | |
392 | - | let bX = invoke(bU, cb, [toString(aX)], nil) | |
393 | - | if ($isInstanceOf(bX, "Int")) | |
394 | - | then bX | |
395 | - | else throw(($getType(bX) + " couldn't be cast to Int")) | |
396 | - | } | |
397 | - | let ce = { | |
398 | - | let bX = invoke(cc, cb, [toString(aX)], nil) | |
399 | - | if ($isInstanceOf(bX, "Int")) | |
400 | - | then bX | |
401 | - | else throw(($getType(bX) + " couldn't be cast to Int")) | |
402 | - | } | |
403 | - | let cf = max([cd, ce]) | |
404 | - | cf | |
392 | + | func cj (ck,cl,aW,cm,aY,cn,co,aI) = { | |
393 | + | let cp = makeString(["%s%s%s%s__history", ck, cl, toBase58String(aI.transactionId)], a) | |
394 | + | let cq = makeString(["%d%d%d%d%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(aW), toString(cm), toString(aY), toString(cn), toString(co)], a) | |
395 | + | StringEntry(cp, cq) | |
405 | 396 | } | |
406 | 397 | ||
407 | 398 | ||
408 | - | func cg (ch,ci,bd,cj,bf,bg,aN) = { | |
409 | - | let ck = makeString(["%s%s%s%s__history", ch, ci, toBase58String(aN.transactionId)], a) | |
410 | - | let cl = makeString(["%d%d%d%d%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(bd), toString(cj), toString(bf), toString(bg)], a) | |
411 | - | StringEntry(ck, cl) | |
399 | + | func cr (cs,ct,cu,cv) = { | |
400 | + | let cw = bq() | |
401 | + | let cx = br() | |
402 | + | let cy = bs() | |
403 | + | let cz = bp() | |
404 | + | let cA = k(this, cw) | |
405 | + | let cB = k(this, cx) | |
406 | + | let cC = k(this, cy) | |
407 | + | let cD = k(this, cz) | |
408 | + | [IntegerEntry(cw, (cA + ct)), IntegerEntry(cx, (cB + cu)), IntegerEntry(cy, (cC + cv)), IntegerEntry(cz, (cD + cs))] | |
412 | 409 | } | |
413 | 410 | ||
414 | 411 | ||
415 | - | func cm (cn,co,cp,cq) = { | |
416 | - | let cr = bm() | |
417 | - | let cs = bn() | |
418 | - | let ct = bo() | |
419 | - | let cu = bl() | |
420 | - | let cv = r(this, cr) | |
421 | - | let cw = r(this, cs) | |
422 | - | let cx = r(this, ct) | |
423 | - | let cy = r(this, cu) | |
424 | - | [IntegerEntry(cr, (cv + co)), IntegerEntry(cs, (cw + cp)), IntegerEntry(ct, (cx + cq)), IntegerEntry(cu, (cy + cn))] | |
412 | + | func cE (cF,cG,cH) = { | |
413 | + | let cI = 1000 | |
414 | + | (((cF * cH) + cG) / cI) | |
425 | 415 | } | |
426 | 416 | ||
427 | 417 | ||
428 | - | func cz (aX,aY,bd,be,bf,bg,bh) = [StringEntry(aW(aX, aY), bc(bd, be, bf, bg, bh))] | |
418 | + | func cJ (aS,aV,aW,aX,aY,cn,co,bn) = { | |
419 | + | let cK = bh(aV) | |
420 | + | let cL = bi(aV) | |
421 | + | let cM = bj(aV) | |
422 | + | let cN = bk(aV) | |
423 | + | let cO = bl(aV) | |
424 | + | let cP = bm(aV, bn) | |
425 | + | let cQ = bo(aV, bn) | |
426 | + | let bc = cE(cn, co, height) | |
427 | + | [IntegerEntry(cK, aW), IntegerEntry(cL, aX), IntegerEntry(cM, aY), IntegerEntry(cN, cn), IntegerEntry(cO, co), IntegerEntry(cP, cn), IntegerEntry(cQ, co), StringEntry(aR(aS), bd(aV, aW, aX, aY, cn, co, bc))] | |
428 | + | } | |
429 | 429 | ||
430 | 430 | ||
431 | - | func | |
432 | - | then | |
433 | - | else if ((size( | |
431 | + | func cR (aI,cS) = if ((size(aI.payments) > 1)) | |
432 | + | then g("only one payment is allowed") | |
433 | + | else if ((size(aI.payments) == 0)) | |
434 | 434 | then 0 | |
435 | 435 | else { | |
436 | - | let | |
437 | - | if ((value( | |
438 | - | then | |
439 | - | else | |
436 | + | let cT = aI.payments[0] | |
437 | + | if ((value(cT.assetId) != cS)) | |
438 | + | then g("invalid asset id in payment") | |
439 | + | else cT.amount | |
440 | 440 | } | |
441 | 441 | ||
442 | 442 | ||
443 | - | func cD (aX) = valueOrElse(getInteger(this, bb(aX)), 0) | |
444 | - | ||
445 | - | ||
446 | - | func cE () = { | |
447 | - | let cF = { | |
448 | - | let cG = value(getInteger(bU, bD())) | |
449 | - | let cH = (cG - 1) | |
450 | - | if ((0 > cH)) | |
451 | - | then n("invalid epoch") | |
452 | - | else $Tuple2(cG, cH) | |
453 | - | } | |
454 | - | let cG = cF._1 | |
455 | - | let cH = cF._2 | |
456 | - | let cI = value(getInteger(bU, bC(cG))) | |
457 | - | $Tuple2(cH, cI) | |
443 | + | func cU (aS,cV) = { | |
444 | + | let cW = "empty" | |
445 | + | let cX = bf(aS) | |
446 | + | let aV = valueOrElse(getString(cX), cW) | |
447 | + | let cn = valueOrElse(getInteger(bk(aV)), 0) | |
448 | + | let co = valueOrElse(getInteger(bl(aV)), 0) | |
449 | + | let cY = cE(cn, co, cV) | |
450 | + | let bc = if ((0 > cY)) | |
451 | + | then 0 | |
452 | + | else cY | |
453 | + | bc | |
458 | 454 | } | |
459 | 455 | ||
460 | 456 | ||
461 | - | func cJ (bF) = { | |
462 | - | let cK = 4 | |
463 | - | let cL = 5 | |
464 | - | let cM = { | |
465 | - | let bX = invoke(bO, "getPoolConfigByLpAssetIdREADONLY", [bF], nil) | |
466 | - | if ($isInstanceOf(bX, "List[Any]")) | |
467 | - | then bX | |
468 | - | else throw(($getType(bX) + " couldn't be cast to List[Any]")) | |
457 | + | func cZ (aS) = cU(aS, height) | |
458 | + | ||
459 | + | ||
460 | + | func da () = { | |
461 | + | let db = { | |
462 | + | let cd = value(getInteger(bY, bH())) | |
463 | + | let dc = (cd - 1) | |
464 | + | if ((0 > dc)) | |
465 | + | then g("invalid epoch") | |
466 | + | else $Tuple2(cd, dc) | |
469 | 467 | } | |
470 | - | let bz = { | |
471 | - | let bX = cM[cK] | |
472 | - | if ($isInstanceOf(bX, "String")) | |
473 | - | then bX | |
474 | - | else throw(($getType(bX) + " couldn't be cast to String")) | |
475 | - | } | |
476 | - | let bA = { | |
477 | - | let bX = cM[cL] | |
478 | - | if ($isInstanceOf(bX, "String")) | |
479 | - | then bX | |
480 | - | else throw(($getType(bX) + " couldn't be cast to String")) | |
481 | - | } | |
482 | - | $Tuple2(bz, bA) | |
468 | + | let cd = db._1 | |
469 | + | let dc = db._2 | |
470 | + | let dd = value(getInteger(bY, bG(cd))) | |
471 | + | $Tuple2(dc, dd) | |
483 | 472 | } | |
484 | 473 | ||
485 | 474 | ||
486 | - | func cN (bF,bN) = { | |
487 | - | let aX = addressFromStringValue(bN) | |
488 | - | let cO = cE() | |
489 | - | let cH = cO._1 | |
490 | - | let cI = cO._2 | |
491 | - | let cP = cJ(bF) | |
492 | - | let bz = cP._1 | |
493 | - | let bA = cP._2 | |
494 | - | let cQ = by(bz, bA, aX, cH) | |
495 | - | let cR = valueOrElse(getInteger(bU, cQ), 0) | |
496 | - | cR | |
475 | + | func de (bJ) = { | |
476 | + | let df = 4 | |
477 | + | let dg = 5 | |
478 | + | let dh = { | |
479 | + | let ca = invoke(bS, "getPoolConfigByLpAssetIdREADONLY", [bJ], nil) | |
480 | + | if ($isInstanceOf(ca, "List[Any]")) | |
481 | + | then ca | |
482 | + | else throw(($getType(ca) + " couldn't be cast to List[Any]")) | |
483 | + | } | |
484 | + | let bD = { | |
485 | + | let ca = dh[df] | |
486 | + | if ($isInstanceOf(ca, "String")) | |
487 | + | then ca | |
488 | + | else throw(($getType(ca) + " couldn't be cast to String")) | |
489 | + | } | |
490 | + | let bE = { | |
491 | + | let ca = dh[dg] | |
492 | + | if ($isInstanceOf(ca, "String")) | |
493 | + | then ca | |
494 | + | else throw(($getType(ca) + " couldn't be cast to String")) | |
495 | + | } | |
496 | + | $Tuple2(bD, bE) | |
497 | 497 | } | |
498 | 498 | ||
499 | 499 | ||
500 | - | func cS (bF,bN) = { | |
501 | - | let cT = valueOrElse(getInteger(bQ, bM(bN, bF)), 0) | |
502 | - | let cR = cN(bF, bN) | |
503 | - | if ((cT == 0)) | |
504 | - | then 0 | |
505 | - | else cR | |
500 | + | func di (bJ,bR) = { | |
501 | + | let aS = addressFromStringValue(bR) | |
502 | + | let dj = da() | |
503 | + | let dc = dj._1 | |
504 | + | let dd = dj._2 | |
505 | + | let dk = de(bJ) | |
506 | + | let bD = dk._1 | |
507 | + | let bE = dk._2 | |
508 | + | let dl = bC(bD, bE, aS, dc) | |
509 | + | let dm = valueOrElse(getInteger(bY, dl), 0) | |
510 | + | dm | |
506 | 511 | } | |
507 | 512 | ||
508 | 513 | ||
509 | - | func cU (bF) = { | |
510 | - | let cV = cE() | |
511 | - | let cH = cV._1 | |
512 | - | let cI = cV._2 | |
513 | - | let cW = valueOrElse(getInteger(bU, bE(bF, cH)), 0) | |
514 | - | let cX = valueOrElse(getInteger(this, bE(bF, cH)), cW) | |
515 | - | cX | |
514 | + | func dn (bJ,bR) = { | |
515 | + | let do = valueOrElse(getInteger(bU, bQ(bR, bJ)), 0) | |
516 | + | let dm = di(bJ, bR) | |
517 | + | if ((do == 0)) | |
518 | + | then 0 | |
519 | + | else dm | |
516 | 520 | } | |
517 | 521 | ||
518 | 522 | ||
519 | - | func cY (bF) = { | |
520 | - | let cZ = cE() | |
521 | - | let cH = cZ._1 | |
522 | - | let cI = cZ._2 | |
523 | - | let cX = cU(bF) | |
524 | - | let da = valueOrElse(getInteger(this, bG(bF, cH)), 0) | |
525 | - | let db = valueOrElse(getInteger(this, bH(bF, cH)), cI) | |
526 | - | let dc = (height - db) | |
527 | - | let dd = ((dc * cX) + da) | |
528 | - | dd | |
523 | + | func dp (bJ) = { | |
524 | + | let dq = da() | |
525 | + | let dc = dq._1 | |
526 | + | let dd = dq._2 | |
527 | + | let dr = valueOrElse(getInteger(bY, bI(bJ, dc)), 0) | |
528 | + | let ds = valueOrElse(getInteger(this, bI(bJ, dc)), dr) | |
529 | + | ds | |
529 | 530 | } | |
530 | 531 | ||
531 | 532 | ||
532 | - | func de (bF,df) = { | |
533 | - | let dg = cE() | |
534 | - | let cH = dg._1 | |
535 | - | let cI = dg._2 | |
536 | - | let cX = cU(bF) | |
537 | - | let dh = (cX + df) | |
538 | - | let dd = cY(bF) | |
539 | - | [IntegerEntry(bE(bF, cH), dh), IntegerEntry(bH(bF, cH), height), IntegerEntry(bG(bF, cH), dd)] | |
533 | + | func dt (bJ) = { | |
534 | + | let du = da() | |
535 | + | let dc = du._1 | |
536 | + | let dd = du._2 | |
537 | + | let ds = dp(bJ) | |
538 | + | let dv = valueOrElse(getInteger(this, bK(bJ, dc)), 0) | |
539 | + | let dw = valueOrElse(getInteger(this, bL(bJ, dc)), dd) | |
540 | + | let dx = (height - dw) | |
541 | + | let dy = ((dx * ds) + dv) | |
542 | + | dy | |
540 | 543 | } | |
541 | 544 | ||
542 | 545 | ||
543 | - | func di (bF,bN) = { | |
544 | - | let dj = cE() | |
545 | - | let cH = dj._1 | |
546 | - | let cI = dj._2 | |
547 | - | let aX = addressFromStringValue(bN) | |
548 | - | let dk = cS(bF, bN) | |
549 | - | let dl = valueOrElse(getInteger(this, bJ(bF, aX, cH)), 0) | |
550 | - | let dm = valueOrElse(getInteger(this, bK(bF, aX, cH)), cI) | |
551 | - | let dn = (height - dm) | |
552 | - | let do = ((dn * dk) + dl) | |
553 | - | do | |
546 | + | func dz (bJ,dA) = { | |
547 | + | let dB = da() | |
548 | + | let dc = dB._1 | |
549 | + | let dd = dB._2 | |
550 | + | let ds = dp(bJ) | |
551 | + | let dC = (ds + dA) | |
552 | + | let dy = dt(bJ) | |
553 | + | [IntegerEntry(bI(bJ, dc), dC), IntegerEntry(bL(bJ, dc), height), IntegerEntry(bK(bJ, dc), dy)] | |
554 | 554 | } | |
555 | 555 | ||
556 | 556 | ||
557 | - | func dp (bF,bN,dq) = { | |
558 | - | let dr = cE() | |
559 | - | let cH = dr._1 | |
560 | - | let cI = dr._2 | |
561 | - | let aX = addressFromStringValue(bN) | |
562 | - | let ds = cN(bF, bN) | |
563 | - | let dt = if ((ds == 0)) | |
564 | - | then nil | |
565 | - | else { | |
566 | - | let df = if (dq) | |
567 | - | then ds | |
568 | - | else -(ds) | |
569 | - | let du = de(bF, df) | |
570 | - | let do = di(bF, bN) | |
571 | - | let dv = [IntegerEntry(bK(bF, aX, cH), height), IntegerEntry(bJ(bF, aX, cH), do)] | |
572 | - | (du ++ dv) | |
573 | - | } | |
574 | - | dt | |
557 | + | func dD (bJ,bR) = { | |
558 | + | let dE = da() | |
559 | + | let dc = dE._1 | |
560 | + | let dd = dE._2 | |
561 | + | let aS = addressFromStringValue(bR) | |
562 | + | let dF = dn(bJ, bR) | |
563 | + | let dG = valueOrElse(getInteger(this, bN(bJ, aS, dc)), 0) | |
564 | + | let dH = valueOrElse(getInteger(this, bO(bJ, aS, dc)), dd) | |
565 | + | let dI = (height - dH) | |
566 | + | let dJ = ((dI * dF) + dG) | |
567 | + | dJ | |
575 | 568 | } | |
576 | 569 | ||
577 | 570 | ||
578 | - | func dw (bF,bN) = { | |
579 | - | let dx = cE() | |
580 | - | let cH = dx._1 | |
581 | - | let cI = dx._2 | |
582 | - | let aX = addressFromStringValue(bN) | |
583 | - | let dy = bL(bF, aX, cH) | |
584 | - | let dz = valueOrElse(getInteger(this, dy), 0) | |
585 | - | let dA = bI(bF, aX, cH) | |
586 | - | let dB = valueOrElse(getInteger(this, dA), 0) | |
587 | - | let do = di(bF, bN) | |
588 | - | let dd = cY(bF) | |
589 | - | let dC = (do - dz) | |
590 | - | let dD = (dd - dB) | |
591 | - | $Tuple3([IntegerEntry(dy, do), IntegerEntry(dA, dd)], dC, dD) | |
571 | + | func dK (bJ,bR,dL) = { | |
572 | + | let dM = da() | |
573 | + | let dc = dM._1 | |
574 | + | let dd = dM._2 | |
575 | + | let aS = addressFromStringValue(bR) | |
576 | + | let dN = di(bJ, bR) | |
577 | + | let dO = if ((dN == 0)) | |
578 | + | then nil | |
579 | + | else { | |
580 | + | let dA = if (dL) | |
581 | + | then dN | |
582 | + | else -(dN) | |
583 | + | let dP = dz(bJ, dA) | |
584 | + | let dJ = dD(bJ, bR) | |
585 | + | let dQ = [IntegerEntry(bO(bJ, aS, dc), height), IntegerEntry(bN(bJ, aS, dc), dJ)] | |
586 | + | (dP ++ dQ) | |
587 | + | } | |
588 | + | dO | |
592 | 589 | } | |
593 | 590 | ||
594 | 591 | ||
595 | - | func dE () = { | |
596 | - | let dF = u(bP, aj()) | |
597 | - | let dG = getInteger(this, am()) | |
598 | - | let dH = getInteger(this, an()) | |
599 | - | let dI = u(bP, ap()) | |
600 | - | let dJ = if ((height > dI)) | |
601 | - | then dI | |
592 | + | func dR (bJ,bR) = { | |
593 | + | let dS = da() | |
594 | + | let dc = dS._1 | |
595 | + | let dd = dS._2 | |
596 | + | let aS = addressFromStringValue(bR) | |
597 | + | let dT = bP(bJ, aS, dc) | |
598 | + | let dU = valueOrElse(getInteger(this, dT), 0) | |
599 | + | let dV = bM(bJ, aS, dc) | |
600 | + | let dW = valueOrElse(getInteger(this, dV), 0) | |
601 | + | let dJ = dD(bJ, bR) | |
602 | + | let dy = dt(bJ) | |
603 | + | let dX = (dJ - dU) | |
604 | + | let dY = (dy - dW) | |
605 | + | $Tuple3([IntegerEntry(dT, dJ), IntegerEntry(dV, dy)], dX, dY) | |
606 | + | } | |
607 | + | ||
608 | + | ||
609 | + | func dZ () = { | |
610 | + | let ea = n(bT, ag()) | |
611 | + | let eb = getInteger(this, aj()) | |
612 | + | let ec = getInteger(this, ak()) | |
613 | + | let ed = n(bT, am()) | |
614 | + | let cH = if ((height > ed)) | |
615 | + | then ed | |
602 | 616 | else height | |
603 | - | let | |
604 | - | let | |
605 | - | if ($isInstanceOf( | |
617 | + | let ee = { | |
618 | + | let r = eb | |
619 | + | if ($isInstanceOf(r, "Int")) | |
606 | 620 | then { | |
607 | - | let | |
608 | - | max([( | |
621 | + | let ef = r | |
622 | + | max([(cH - ef), 0]) | |
609 | 623 | } | |
610 | - | else if ($isInstanceOf( | |
624 | + | else if ($isInstanceOf(r, "Unit")) | |
611 | 625 | then 0 | |
612 | 626 | else throw("Match error") | |
613 | 627 | } | |
614 | - | let | |
615 | - | let | |
616 | - | let | |
617 | - | $Tuple2([IntegerEntry( | |
628 | + | let eg = ((ea * (bZ - 1)) / bZ) | |
629 | + | let eh = valueOrElse(ec, 0) | |
630 | + | let ei = ((eg * ee) + eh) | |
631 | + | $Tuple2([IntegerEntry(ak(), ei), IntegerEntry(aj(), height)], ei) | |
618 | 632 | } | |
619 | 633 | ||
620 | 634 | ||
621 | - | func dP (bF,bN,dQ) = { | |
622 | - | let aX = valueOrErrorMessage(addressFromString(bN), l("invalid user address")) | |
623 | - | let bq = bY(aX) | |
624 | - | if ((bq == bq)) | |
625 | - | then { | |
626 | - | let dR = "empty" | |
627 | - | let dS = if ((bF != dR)) | |
635 | + | func ej (bJ,bR,ek) = { | |
636 | + | let el = getString(this, aR(bR)) | |
637 | + | if ((el == unit)) | |
638 | + | then $Tuple3(0, nil, "userRecord::is::empty") | |
639 | + | else { | |
640 | + | let em = split(value(el), a) | |
641 | + | let en = em[aL] | |
642 | + | let eo = "empty" | |
643 | + | let ep = if ((bJ != eo)) | |
628 | 644 | then { | |
629 | - | let | |
630 | - | getIntegerValue( | |
645 | + | let eq = valueOrErrorMessage(getString(bS, O(bJ)), e(("unsupported lp asset " + bJ))) | |
646 | + | getIntegerValue(bS, Q(eq)) | |
631 | 647 | } | |
632 | - | else if ( | |
648 | + | else if (ek) | |
633 | 649 | then 0 | |
634 | - | else | |
635 | - | let | |
636 | - | let | |
637 | - | let | |
638 | - | let | |
639 | - | let | |
640 | - | if ((0 > | |
641 | - | then | |
650 | + | else g(("not readonly mode: unsupported lp asset " + bJ)) | |
651 | + | let er = bu(en, bJ) | |
652 | + | let es = bt(en) | |
653 | + | let et = valueOrElse(getInteger(this, er), k(this, es)) | |
654 | + | let ei = dZ()._2 | |
655 | + | let eu = (ei - et) | |
656 | + | if ((0 > eu)) | |
657 | + | then g("wrong calculations") | |
642 | 658 | else { | |
643 | - | let | |
644 | - | let | |
645 | - | let | |
646 | - | let | |
647 | - | let | |
648 | - | let | |
659 | + | let ev = dR(bJ, bR) | |
660 | + | let ew = ev._1 | |
661 | + | let ex = ev._2 | |
662 | + | let ey = ev._3 | |
663 | + | let ez = fraction(eu, ep, d) | |
664 | + | let eA = if ((ey == 0)) | |
649 | 665 | then 0 | |
650 | - | else fraction( | |
651 | - | let | |
652 | - | let | |
653 | - | $Tuple3( | |
666 | + | else fraction(ez, ex, ey) | |
667 | + | let eB = ([IntegerEntry(er, ei)] ++ ew) | |
668 | + | let eC = makeString([toString(et), toString(eu), toString(ep), toString(ex), toString(ey)], ":") | |
669 | + | $Tuple3(eA, eB, eC) | |
654 | 670 | } | |
655 | 671 | } | |
656 | - | else throw("Strict value is not equal to itself.") | |
657 | 672 | } | |
658 | 673 | ||
659 | 674 | ||
660 | - | func eg (aN,eh) = if (!(containsElement(i, eh))) | |
661 | - | then n("invalid duration") | |
662 | - | else { | |
663 | - | let bf = (eh * k) | |
664 | - | let ei = toBase58String(az) | |
665 | - | if ((size(aN.payments) != 1)) | |
666 | - | then n("invalid payment - exact one payment must be attached") | |
667 | - | else { | |
668 | - | let cC = aN.payments[0] | |
669 | - | let ej = cC.amount | |
670 | - | if ((az != value(cC.assetId))) | |
671 | - | then n((("invalid asset is in payment - " + ei) + " is expected")) | |
672 | - | else { | |
673 | - | let ek = bi() | |
674 | - | let aX = aN.caller | |
675 | - | let bN = toString(aX) | |
676 | - | let el = isDefined(getString(bj(bN))) | |
677 | - | let em = if (el) | |
678 | - | then value(getString(bj(bN))) | |
679 | - | else toString(u(this, ek)) | |
680 | - | let bq = parseIntValue(em) | |
681 | - | let cj = height | |
682 | - | if (if ((aA > ej)) | |
683 | - | then (aX != bS) | |
684 | - | else false) | |
685 | - | then n(("amount is less then minLockAmount=" + toString(aA))) | |
686 | - | else if ((aB > bf)) | |
687 | - | then n(("passed duration is less then minLockDuration=" + toString(aB))) | |
688 | - | else if ((bf > aC)) | |
689 | - | then n(("passed duration is greater then maxLockDuration=" + toString(aC))) | |
690 | - | else { | |
691 | - | let en = fraction(ej, bf, aC) | |
692 | - | let eo = bZ() | |
693 | - | let dV = bp(bq) | |
694 | - | let dO = dE()._2 | |
695 | - | let ep = cD(aX) | |
696 | - | let eq = reentrantInvoke(bR, "refreshUserReward", [aX.bytes], nil) | |
697 | - | if ((eq == eq)) | |
698 | - | then { | |
699 | - | let er = if (el) | |
700 | - | then nil | |
701 | - | else [IntegerEntry(ek, (bq + 1)), StringEntry(bj(bN), em), StringEntry(bk(em), bN)] | |
702 | - | $Tuple2(((((er ++ cz(aX, aN.transactionId, ej, cj, bf, en, 0)) ++ cm(ej, bf, 1, if (el) | |
703 | - | then 0 | |
704 | - | else 1)) :+ cg("lock", bN, ej, cj, bf, en, aN)) ++ [IntegerEntry(dV, dO), IntegerEntry(bx(), (eo + en)), IntegerEntry(bb(aX), (ep + en))]), en) | |
705 | - | } | |
706 | - | else throw("Strict value is not equal to itself.") | |
707 | - | } | |
708 | - | } | |
709 | - | } | |
710 | - | } | |
711 | - | ||
712 | - | ||
713 | - | func es (aX,et) = { | |
714 | - | let eu = ba(aX, et) | |
715 | - | let ev = parseIntValue(eu[aQ]) | |
716 | - | let cj = parseIntValue(eu[aR]) | |
717 | - | let ew = parseIntValue(eu[aS]) | |
718 | - | let ex = (cj + ew) | |
719 | - | let bh = parseIntValue(eu[aV]) | |
720 | - | let ey = ((height - cj) / aE) | |
721 | - | let ez = fraction(toBigInt(ey), (toBigInt((8 * aE)) * h), toBigInt(ew)) | |
722 | - | let eA = if ((height > ex)) | |
723 | - | then ev | |
724 | - | else (toInt(fraction(toBigInt(ev), (h - pow(toBigInt(5), 1, ez, f, f, DOWN)), h)) - bh) | |
725 | - | eA | |
675 | + | func eD (aI,aY) = { | |
676 | + | let eE = av() | |
677 | + | let eF = eE[ap] | |
678 | + | let ay = fromBase58String(eF) | |
679 | + | let az = parseIntValue(eE[aq]) | |
680 | + | let aA = parseIntValue(eE[ar]) | |
681 | + | let aB = parseIntValue(eE[as]) | |
682 | + | if ((size(aI.payments) != 1)) | |
683 | + | then g("invalid payment - exact one payment must be attached") | |
684 | + | else { | |
685 | + | let cT = aI.payments[0] | |
686 | + | let eG = cT.amount | |
687 | + | if ((ay != value(cT.assetId))) | |
688 | + | then g((("invalid asset is in payment - " + eF) + " is expected")) | |
689 | + | else { | |
690 | + | let eH = be() | |
691 | + | let bR = toString(aI.caller) | |
692 | + | let eI = isDefined(getString(bf(bR))) | |
693 | + | let en = if (eI) | |
694 | + | then value(getString(bf(bR))) | |
695 | + | else toString(n(this, eH)) | |
696 | + | let aV = parseIntValue(en) | |
697 | + | let cm = height | |
698 | + | let cL = bi(en) | |
699 | + | let cM = bj(en) | |
700 | + | let cK = bh(en) | |
701 | + | if (if ((az > eG)) | |
702 | + | then (aI.caller != bW) | |
703 | + | else false) | |
704 | + | then g(("amount is less then minLockAmount=" + toString(az))) | |
705 | + | else if ((aA > aY)) | |
706 | + | then g(("passed duration is less then minLockDuration=" + toString(aA))) | |
707 | + | else if ((aY > aB)) | |
708 | + | then g(("passed duration is greater then maxLockDuration=" + toString(aB))) | |
709 | + | else if (if (eI) | |
710 | + | then ((n(this, cL) + n(this, cM)) >= cm) | |
711 | + | else false) | |
712 | + | then g("there is an active lock - consider to use increaseLock") | |
713 | + | else if ((k(this, cK) > 0)) | |
714 | + | then g(("there are locked WXs - consider to use increaseLock " + cK)) | |
715 | + | else { | |
716 | + | let eJ = fraction(aY, c, aB) | |
717 | + | let eK = fraction(eG, eJ, c) | |
718 | + | let eL = q(invoke(aw, "calcGwxParamsREADONLY", [eK, cm, aY], nil)) | |
719 | + | let cn = t(eL[0]) | |
720 | + | let co = t(eL[1]) | |
721 | + | let bn = toString(t(eL[2])) | |
722 | + | let cg = cb(false) | |
723 | + | let es = bt(en) | |
724 | + | let ei = dZ()._2 | |
725 | + | let eM = if (eI) | |
726 | + | then nil | |
727 | + | else [IntegerEntry(eH, (aV + 1)), StringEntry(bf(bR), en), StringEntry(bg(en), bR)] | |
728 | + | $Tuple2(((((eM ++ cJ(bR, en, eG, cm, aY, cn, co, bn)) ++ cr(eG, aY, 1, if (eI) | |
729 | + | then 0 | |
730 | + | else 1)) :+ cj("lock", bR, eG, cm, aY, cn, co, aI)) ++ [IntegerEntry(es, ei), IntegerEntry(bA(), (cg + eK))]), eK) | |
731 | + | } | |
732 | + | } | |
733 | + | } | |
726 | 734 | } | |
727 | 735 | ||
728 | 736 | ||
729 | - | @Callable( | |
730 | - | func constructor ( | |
731 | - | let | |
732 | - | if (( | |
733 | - | then ([IntegerEntry( | |
737 | + | @Callable(aI) | |
738 | + | func constructor (eN,eO,az,eP,eQ,aw) = { | |
739 | + | let eR = aH(aI) | |
740 | + | if ((eR == eR)) | |
741 | + | then ([IntegerEntry(be(), 0), StringEntry(au(), aC(eO, az, eP, eQ, aw)), StringEntry(A(), eN)] ++ cr(0, 0, 0, 0)) | |
734 | 742 | else throw("Strict value is not equal to itself.") | |
735 | 743 | } | |
736 | 744 | ||
737 | 745 | ||
738 | 746 | ||
739 | - | @Callable( | |
740 | - | func lockRef ( | |
741 | - | let | |
742 | - | let | |
743 | - | let | |
744 | - | let | |
745 | - | let | |
747 | + | @Callable(aI) | |
748 | + | func lockRef (aY,eS,eT) = { | |
749 | + | let eU = eD(aI, aY) | |
750 | + | let eV = eU._1 | |
751 | + | let eK = eU._2 | |
752 | + | let eW = toString(aI.caller) | |
753 | + | let eX = if (if ((eS == "")) | |
746 | 754 | then true | |
747 | - | else ( | |
755 | + | else (eT == base58'')) | |
748 | 756 | then unit | |
749 | - | else invoke( | |
750 | - | if (( | |
757 | + | else invoke(w, "createPair", [z, eS, eW, eT], nil) | |
758 | + | if ((eX == eX)) | |
751 | 759 | then { | |
752 | - | let | |
753 | - | if (( | |
754 | - | then $Tuple2( | |
760 | + | let eY = invoke(aw, "updateReferralActivity", [toString(aI.caller), eK], nil) | |
761 | + | if ((eY == eY)) | |
762 | + | then $Tuple2(eV, unit) | |
755 | 763 | else throw("Strict value is not equal to itself.") | |
756 | 764 | } | |
757 | 765 | else throw("Strict value is not equal to itself.") | |
759 | 767 | ||
760 | 768 | ||
761 | 769 | ||
762 | - | @Callable( | |
763 | - | func lock ( | |
764 | - | let | |
765 | - | let | |
766 | - | let | |
767 | - | let | |
768 | - | if (( | |
769 | - | then $Tuple2( | |
770 | + | @Callable(aI) | |
771 | + | func lock (aY) = { | |
772 | + | let eZ = eD(aI, aY) | |
773 | + | let eV = eZ._1 | |
774 | + | let eK = eZ._2 | |
775 | + | let eY = invoke(aw, "updateReferralActivity", [toString(aI.caller), eK], nil) | |
776 | + | if ((eY == eY)) | |
777 | + | then $Tuple2(eV, unit) | |
770 | 778 | else throw("Strict value is not equal to itself.") | |
771 | 779 | } | |
772 | 780 | ||
773 | 781 | ||
774 | 782 | ||
775 | - | @Callable(aN) | |
776 | - | func claimWxBoost (bF,bN) = if ((bQ != aN.caller)) | |
777 | - | then n("permissions denied") | |
783 | + | @Callable(aI) | |
784 | + | func increaseLock (fa) = { | |
785 | + | let eE = av() | |
786 | + | let eF = eE[ap] | |
787 | + | let ay = fromBase58String(eF) | |
788 | + | let aA = parseIntValue(eE[ar]) | |
789 | + | let aB = parseIntValue(eE[as]) | |
790 | + | let eG = cR(aI, ay) | |
791 | + | let bR = toString(aI.caller) | |
792 | + | let em = aT(bR) | |
793 | + | let en = em[aL] | |
794 | + | let fb = parseIntValue(em[aM]) | |
795 | + | let cm = parseIntValue(em[aN]) | |
796 | + | let fc = parseIntValue(em[aO]) | |
797 | + | let fd = (cm + fc) | |
798 | + | let fe = max([(fd - height), 0]) | |
799 | + | let ff = (fb + eG) | |
800 | + | let fg = (fe + fa) | |
801 | + | if ((0 > fa)) | |
802 | + | then g("duration is less then zero") | |
803 | + | else if ((aA > fg)) | |
804 | + | then g(("lockDurationNew is less then minLockDuration=" + toString(aA))) | |
805 | + | else if ((fg > aB)) | |
806 | + | then g(("deltaDuration + existedLockDuration is greater then maxLockDuration=" + toString(aB))) | |
807 | + | else { | |
808 | + | let eJ = fraction(fg, c, aB) | |
809 | + | let eK = fraction(ff, eJ, c) | |
810 | + | let eY = invoke(aw, "updateReferralActivity", [toString(aI.caller), eK], nil) | |
811 | + | if ((eY == eY)) | |
812 | + | then { | |
813 | + | let fh = height | |
814 | + | let eL = q(invoke(aw, "calcGwxParamsREADONLY", [eK, fh, fg], nil)) | |
815 | + | let cn = t(eL[0]) | |
816 | + | let co = t(eL[1]) | |
817 | + | let bn = toString(t(eL[2])) | |
818 | + | let fi = cZ(bR) | |
819 | + | let fj = (eK - fi) | |
820 | + | if ((0 > fj)) | |
821 | + | then g(("gwxDiff is less then 0: " + toString(fj))) | |
822 | + | else { | |
823 | + | let cg = cb(false) | |
824 | + | let fk = cb(true) | |
825 | + | (((cJ(bR, en, ff, fh, fg, cn, co, bn) ++ cr(eG, fa, 0, 0)) :+ cj("lock", bR, eG, cm, fg, cn, co, aI)) ++ [IntegerEntry(bA(), (cg + fj))]) | |
826 | + | } | |
827 | + | } | |
828 | + | else throw("Strict value is not equal to itself.") | |
829 | + | } | |
830 | + | } | |
831 | + | ||
832 | + | ||
833 | + | ||
834 | + | @Callable(aI) | |
835 | + | func claimWxBoost (bJ,bR) = if ((bU != aI.caller)) | |
836 | + | then g("permissions denied") | |
778 | 837 | else { | |
779 | - | let | |
780 | - | let | |
781 | - | let | |
782 | - | let | |
783 | - | $Tuple2( | |
838 | + | let fl = ej(bJ, bR, false) | |
839 | + | let fm = fl._1 | |
840 | + | let eB = fl._2 | |
841 | + | let eC = fl._3 | |
842 | + | $Tuple2(eB, [fm]) | |
784 | 843 | } | |
785 | 844 | ||
786 | 845 | ||
787 | 846 | ||
788 | - | @Callable( | |
789 | - | func claimWxBoostREADONLY ( | |
790 | - | let | |
791 | - | let | |
792 | - | let | |
793 | - | let | |
794 | - | $Tuple2(nil, [ | |
847 | + | @Callable(aI) | |
848 | + | func claimWxBoostREADONLY (bJ,bR) = { | |
849 | + | let fn = ej(bJ, bR, true) | |
850 | + | let fm = fn._1 | |
851 | + | let eB = fn._2 | |
852 | + | let eC = fn._3 | |
853 | + | $Tuple2(nil, [fm, eC]) | |
795 | 854 | } | |
796 | 855 | ||
797 | 856 | ||
798 | 857 | ||
799 | - | @Callable(aN) | |
800 | - | func unlock (eR) = { | |
801 | - | let aX = aN.caller | |
802 | - | let bN = toString(aX) | |
803 | - | let aY = fromBase58String(eR) | |
804 | - | let eu = ba(aX, if ((eR == "")) | |
805 | - | then unit | |
806 | - | else aY) | |
807 | - | let ev = parseIntValue(eu[aQ]) | |
808 | - | let cj = parseIntValue(eu[aR]) | |
809 | - | let ew = parseIntValue(eu[aS]) | |
810 | - | let bh = parseIntValue(eu[aV]) | |
811 | - | let bg = parseIntValue(eu[aU]) | |
812 | - | let ey = ((height - cj) / aE) | |
813 | - | let eA = es(aX, if ((eR == "")) | |
814 | - | then unit | |
815 | - | else aY) | |
816 | - | let en = fraction(ev, ew, aC) | |
817 | - | let eS = min([fraction((ey * aE), en, aC), bg]) | |
818 | - | let eT = x((bg - eS), "gwxRemaining") | |
819 | - | let eU = ca(aX) | |
820 | - | if ((0 >= ev)) | |
821 | - | then n("nothing to unlock") | |
858 | + | @Callable(aI) | |
859 | + | func unlock (aS) = { | |
860 | + | let em = aT(aS) | |
861 | + | let en = em[aL] | |
862 | + | let fb = parseIntValue(em[aM]) | |
863 | + | let cm = parseIntValue(em[aN]) | |
864 | + | let fc = parseIntValue(em[aO]) | |
865 | + | let fd = (cm + fc) | |
866 | + | let eE = av() | |
867 | + | let ay = fromBase58String(eE[ap]) | |
868 | + | if ((fd >= height)) | |
869 | + | then g((("wait " + toString(fd)) + " to unlock")) | |
870 | + | else if ((0 >= fb)) | |
871 | + | then g("nothing to unlock") | |
872 | + | else { | |
873 | + | let bn = valueOrElse(getInteger(aw, an()), 0) | |
874 | + | (((cJ(aS, en, 0, cm, fc, 0, 0, toString(bn)) ++ cr(-(fb), 0, 0, -1)) :+ cj("unlock", aS, fb, cm, fc, 0, 0, aI)) :+ ScriptTransfer(addressFromStringValue(aS), fb, ay)) | |
875 | + | } | |
876 | + | } | |
877 | + | ||
878 | + | ||
879 | + | ||
880 | + | @Callable(aI) | |
881 | + | func gwxUserInfoREADONLY (aS) = { | |
882 | + | let bc = cZ(aS) | |
883 | + | $Tuple2(nil, [bc]) | |
884 | + | } | |
885 | + | ||
886 | + | ||
887 | + | ||
888 | + | @Callable(aI) | |
889 | + | func userMaxDurationREADONLY (bR) = { | |
890 | + | let eE = av() | |
891 | + | let aB = parseIntValue(eE[as]) | |
892 | + | let el = getString(this, aR(bR)) | |
893 | + | if ((el == unit)) | |
894 | + | then $Tuple2(nil, $Tuple2("lock", aB)) | |
822 | 895 | else { | |
823 | - | let eo = bZ() | |
824 | - | let ep = cD(aX) | |
825 | - | let eV = x((ep - eS), "userGwxAmountTotalNew") | |
826 | - | if ((eU > eV)) | |
827 | - | then n(("locked gwx amount: " + toString(eU))) | |
828 | - | else { | |
829 | - | let eq = reentrantInvoke(bR, "refreshUserReward", [aX.bytes], nil) | |
830 | - | if ((eq == eq)) | |
831 | - | then ((((cz(aX, aY, ev, cj, ew, eT, (bh + eA)) ++ cm(-(eA), 0, 0, 0)) :+ cg("unlock", bN, eA, cj, ew, eS, aN)) :+ ScriptTransfer(aX, eA, az)) ++ [IntegerEntry(bx(), x((eo - eS), "gwxTotal")), IntegerEntry(bb(aX), eV)]) | |
832 | - | else throw("Strict value is not equal to itself.") | |
833 | - | } | |
896 | + | let em = split(value(el), a) | |
897 | + | let cm = parseIntValue(em[aN]) | |
898 | + | let fc = parseIntValue(em[aO]) | |
899 | + | let fd = (cm + fc) | |
900 | + | let fe = max([(fd - height), 0]) | |
901 | + | let fo = (aB - fe) | |
902 | + | $Tuple2(nil, $Tuple2("increaseLock", fo)) | |
834 | 903 | } | |
835 | 904 | } | |
836 | 905 | ||
837 | 906 | ||
838 | 907 | ||
839 | - | @Callable(aN) | |
840 | - | func gwxUserInfoREADONLY (bN) = { | |
841 | - | let aX = valueOrErrorMessage(addressFromString(bN), l("invalid user address")) | |
842 | - | let bg = cD(aX) | |
843 | - | $Tuple2(nil, [bg]) | |
908 | + | @Callable(aI) | |
909 | + | func getUserGwxAmountAtHeightREADONLY (aS,cV) = { | |
910 | + | let bc = cU(aS, cV) | |
911 | + | $Tuple2(nil, bc) | |
844 | 912 | } | |
845 | 913 | ||
846 | 914 | ||
847 | 915 | ||
848 | - | @Callable( | |
849 | - | func | |
916 | + | @Callable(aI) | |
917 | + | func getTotalCachedGwxREADONLY () = $Tuple2(nil, cb(true)) | |
850 | 918 | ||
851 | 919 | ||
852 | 920 | ||
853 | - | @Callable(aN) | |
854 | - | func getUserGwxAmountAtHeightREADONLY (bN,eW) = { | |
855 | - | let aX = valueOrErrorMessage(addressFromString(bN), l("invalid user address")) | |
856 | - | let bg = cD(aX) | |
857 | - | $Tuple2(nil, bg) | |
858 | - | } | |
859 | - | ||
860 | - | ||
861 | - | ||
862 | - | @Callable(aN) | |
863 | - | func getUserGwxAmount (bN) = { | |
864 | - | let aX = valueOrErrorMessage(addressFromString(bN), l("invalid user address")) | |
865 | - | let bg = cD(aX) | |
866 | - | $Tuple2(nil, bg) | |
867 | - | } | |
868 | - | ||
869 | - | ||
870 | - | ||
871 | - | @Callable(aN) | |
872 | - | func getGwxTotalREADONLY () = $Tuple2(nil, bZ()) | |
873 | - | ||
874 | - | ||
875 | - | ||
876 | - | @Callable(aN) | |
921 | + | @Callable(aI) | |
877 | 922 | func onBoostEmissionUpdate () = { | |
878 | - | let | |
923 | + | let eR = if ((aI.caller == bT)) | |
879 | 924 | then true | |
880 | - | else | |
881 | - | if (( | |
882 | - | then | |
925 | + | else aH(aI) | |
926 | + | if ((eR == eR)) | |
927 | + | then dZ() | |
883 | 928 | else throw("Strict value is not equal to itself.") | |
884 | 929 | } | |
885 | 930 | ||
886 | 931 | ||
887 | 932 | ||
888 | - | @Callable( | |
889 | - | func onStakedVoteUpdate ( | |
890 | - | let | |
933 | + | @Callable(aI) | |
934 | + | func onStakedVoteUpdate (bJ,bR,dL) = { | |
935 | + | let eR = if ((aI.caller == bU)) | |
891 | 936 | then true | |
892 | - | else | |
893 | - | if (( | |
937 | + | else aH(aI) | |
938 | + | if ((eR == eR)) | |
894 | 939 | then { | |
895 | - | let | |
896 | - | $Tuple2( | |
940 | + | let dO = dK(bJ, bR, dL) | |
941 | + | $Tuple2(dO, unit) | |
897 | 942 | } | |
898 | 943 | else throw("Strict value is not equal to itself.") | |
899 | 944 | } | |
900 | 945 | ||
901 | 946 | ||
902 | 947 | ||
903 | - | @Callable( | |
904 | - | func getVotingResultStakedREADONLY ( | |
948 | + | @Callable(aI) | |
949 | + | func getVotingResultStakedREADONLY (bJ) = $Tuple2(nil, dp(bJ)) | |
905 | 950 | ||
906 | 951 | ||
907 | 952 | ||
908 | - | @Callable( | |
909 | - | func getVotingResultStakedIntegralREADONLY ( | |
953 | + | @Callable(aI) | |
954 | + | func getVotingResultStakedIntegralREADONLY (bJ) = $Tuple2(nil, dt(bJ)) | |
910 | 955 | ||
911 | 956 | ||
912 | 957 | ||
913 | - | @Callable( | |
914 | - | func getUserVoteFinalizedREADONLY ( | |
958 | + | @Callable(aI) | |
959 | + | func getUserVoteFinalizedREADONLY (bJ,bR) = $Tuple2(nil, di(bJ, bR)) | |
915 | 960 | ||
916 | 961 | ||
917 | 962 | ||
918 | - | @Callable( | |
919 | - | func getUserVoteStakedIntegralREADONLY ( | |
963 | + | @Callable(aI) | |
964 | + | func getUserVoteStakedIntegralREADONLY (bJ,bR) = $Tuple2(nil, dD(bJ, bR)) | |
920 | 965 | ||
921 | 966 | ||
922 | - | @Verifier( | |
923 | - | func | |
924 | - | let | |
925 | - | let | |
926 | - | if ($isInstanceOf( | |
967 | + | @Verifier(fp) | |
968 | + | func fq () = { | |
969 | + | let fr = { | |
970 | + | let r = aF() | |
971 | + | if ($isInstanceOf(r, "ByteVector")) | |
927 | 972 | then { | |
928 | - | let | |
929 | - | | |
973 | + | let aK = r | |
974 | + | aK | |
930 | 975 | } | |
931 | - | else if ($isInstanceOf( | |
932 | - | then | |
976 | + | else if ($isInstanceOf(r, "Unit")) | |
977 | + | then fp.senderPublicKey | |
933 | 978 | else throw("Match error") | |
934 | 979 | } | |
935 | - | sigVerify( | |
980 | + | sigVerify(fp.bodyBytes, fp.proofs[0], fr) | |
936 | 981 | } | |
937 | 982 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "__" | |
5 | 5 | ||
6 | 6 | let b = 8 | |
7 | 7 | ||
8 | 8 | let c = 100000000 | |
9 | 9 | ||
10 | 10 | let d = c | |
11 | 11 | ||
12 | - | let e = "boosting.ride" | |
13 | - | ||
14 | - | let f = 18 | |
15 | - | ||
16 | - | let g = 1000000000000000000 | |
17 | - | ||
18 | - | let h = toBigInt(g) | |
19 | - | ||
20 | - | let i = [1, 3, 6, 12, 24, 48] | |
21 | - | ||
22 | - | let j = 1440 | |
23 | - | ||
24 | - | let k = 43800 | |
25 | - | ||
26 | - | func l (m) = makeString([e, ": ", m], "") | |
12 | + | func e (f) = makeString(["boosting.ride:", f], " ") | |
27 | 13 | ||
28 | 14 | ||
29 | - | func | |
15 | + | func g (f) = throw(e(f)) | |
30 | 16 | ||
31 | 17 | ||
32 | - | func | |
18 | + | func h (i,j) = valueOrErrorMessage(getString(i, j), e((("mandatory this." + j) + " is not defined"))) | |
33 | 19 | ||
34 | 20 | ||
35 | - | func | |
21 | + | func k (i,j) = valueOrElse(getInteger(i, j), 0) | |
36 | 22 | ||
37 | 23 | ||
38 | - | func | |
24 | + | func l (i,j,m) = valueOrElse(getInteger(i, j), m) | |
39 | 25 | ||
40 | 26 | ||
41 | - | func | |
27 | + | func n (i,j) = valueOrErrorMessage(getInteger(i, j), e((("mandatory this." + j) + " is not defined"))) | |
42 | 28 | ||
43 | 29 | ||
44 | - | func | |
45 | - | then -( | |
46 | - | else | |
30 | + | func o (p) = if ((0 > p)) | |
31 | + | then -(p) | |
32 | + | else p | |
47 | 33 | ||
48 | 34 | ||
49 | - | func x (y,z) = if ((y >= 0)) | |
50 | - | then y | |
51 | - | else n((valueOrElse(z, "value") + " should be positive")) | |
35 | + | func q (p) = { | |
36 | + | let r = p | |
37 | + | if ($isInstanceOf(r, "List[Any]")) | |
38 | + | then { | |
39 | + | let s = r | |
40 | + | s | |
41 | + | } | |
42 | + | else g("fail to cast into List[Any]") | |
43 | + | } | |
52 | 44 | ||
53 | 45 | ||
54 | - | func A () = makeString(["%s%s", "config", "referralsContractAddress"], a) | |
46 | + | func t (p) = { | |
47 | + | let r = p | |
48 | + | if ($isInstanceOf(r, "Int")) | |
49 | + | then { | |
50 | + | let u = r | |
51 | + | u | |
52 | + | } | |
53 | + | else g("fail to cast into Int") | |
54 | + | } | |
55 | 55 | ||
56 | 56 | ||
57 | - | let B = addressFromStringValue(o(this, A())) | |
58 | - | ||
59 | - | let C = makeString(["%s%s", "referral", "programName"], a) | |
60 | - | ||
61 | - | let D = "wxlock" | |
62 | - | ||
63 | - | let E = valueOrElse(getString(this, C), D) | |
64 | - | ||
65 | - | func F () = "%s%s__config__factoryAddress" | |
57 | + | func v () = makeString(["%s%s", "config", "referralsContractAddress"], a) | |
66 | 58 | ||
67 | 59 | ||
68 | - | let | |
60 | + | let w = addressFromStringValue(h(this, v())) | |
69 | 61 | ||
70 | - | let | |
62 | + | let x = makeString(["%s%s", "referral", "programName"], a) | |
71 | 63 | ||
72 | - | let | |
64 | + | let y = "wxlock" | |
73 | 65 | ||
74 | - | let | |
66 | + | let z = valueOrElse(getString(this, x), y) | |
75 | 67 | ||
76 | - | let K = 5 | |
77 | - | ||
78 | - | let L = 6 | |
79 | - | ||
80 | - | let M = 7 | |
81 | - | ||
82 | - | let N = 8 | |
83 | - | ||
84 | - | let O = 9 | |
85 | - | ||
86 | - | let P = 10 | |
87 | - | ||
88 | - | let Q = 11 | |
89 | - | ||
90 | - | func R () = "%s__factoryConfig" | |
68 | + | func A () = "%s%s__config__factoryAddress" | |
91 | 69 | ||
92 | 70 | ||
93 | - | func S (T) = makeString(["%s%s%s", T, "mappings__lpAsset2PoolContract"], a) | |
71 | + | let B = 1 | |
72 | + | ||
73 | + | let C = 2 | |
74 | + | ||
75 | + | let D = 3 | |
76 | + | ||
77 | + | let E = 4 | |
78 | + | ||
79 | + | let F = 5 | |
80 | + | ||
81 | + | let G = 6 | |
82 | + | ||
83 | + | let H = 7 | |
84 | + | ||
85 | + | let I = 8 | |
86 | + | ||
87 | + | let J = 9 | |
88 | + | ||
89 | + | let K = 10 | |
90 | + | ||
91 | + | let L = 11 | |
92 | + | ||
93 | + | func M () = "%s__factoryConfig" | |
94 | 94 | ||
95 | 95 | ||
96 | - | func | |
96 | + | func N () = "%s__lpTokensList" | |
97 | 97 | ||
98 | 98 | ||
99 | - | func | |
99 | + | func O (P) = makeString(["%s%s%s", P, "mappings__lpAsset2PoolContract"], a) | |
100 | 100 | ||
101 | 101 | ||
102 | - | func | |
102 | + | func Q (R) = makeString(["%s%s", "poolWeight", R], a) | |
103 | 103 | ||
104 | 104 | ||
105 | - | func | |
105 | + | func S (T,U) = ((("%s%s__poolWeight__" + T) + "__") + toString(U)) | |
106 | 106 | ||
107 | 107 | ||
108 | - | func | |
108 | + | func V () = addressFromStringValue(h(this, A())) | |
109 | 109 | ||
110 | 110 | ||
111 | - | func | |
111 | + | func W () = split(valueOrElse(getString(V(), N()), ""), a) | |
112 | 112 | ||
113 | 113 | ||
114 | - | func | |
114 | + | func X (Y) = split(h(Y, M()), a) | |
115 | 115 | ||
116 | 116 | ||
117 | - | func | |
117 | + | func Z (aa) = addressFromStringValue(aa[C]) | |
118 | 118 | ||
119 | 119 | ||
120 | - | func | |
120 | + | func ab (aa) = addressFromStringValue(aa[F]) | |
121 | 121 | ||
122 | 122 | ||
123 | - | func | |
123 | + | func ac (aa) = addressFromStringValue(aa[B]) | |
124 | 124 | ||
125 | 125 | ||
126 | - | func | |
126 | + | func ad (aa) = addressFromStringValue(aa[K]) | |
127 | 127 | ||
128 | 128 | ||
129 | - | func | |
129 | + | func ae () = "%s__managerPublicKey" | |
130 | 130 | ||
131 | 131 | ||
132 | - | func | |
132 | + | func af () = "%s__managerVaultAddress" | |
133 | 133 | ||
134 | 134 | ||
135 | - | func | |
135 | + | func ag () = "%s%s__ratePerBlock__current" | |
136 | 136 | ||
137 | 137 | ||
138 | - | func | |
138 | + | func ah () = "%s%s__ratePerBlockMax__current" | |
139 | 139 | ||
140 | 140 | ||
141 | - | func | |
141 | + | func ai () = "%s%s__emission__startBlock" | |
142 | 142 | ||
143 | 143 | ||
144 | - | func | |
144 | + | func aj () = "%s%s__boostingV2__startBlock" | |
145 | 145 | ||
146 | 146 | ||
147 | - | let aq = 1 | |
148 | - | ||
149 | - | let ar = 2 | |
150 | - | ||
151 | - | let as = 3 | |
152 | - | ||
153 | - | let at = 4 | |
154 | - | ||
155 | - | let au = 5 | |
156 | - | ||
157 | - | let av = 6 | |
158 | - | ||
159 | - | func aw () = "%s__config" | |
147 | + | func ak () = "%s%s__boostingV2__integral" | |
160 | 148 | ||
161 | 149 | ||
162 | - | func | |
150 | + | func al () = "%s%s__emission__duration" | |
163 | 151 | ||
164 | 152 | ||
165 | - | let ay = ax() | |
166 | - | ||
167 | - | let az = fromBase58String(ay[aq]) | |
168 | - | ||
169 | - | let aA = valueOrErrorMessage(parseInt(ay[ar]), l("invalid min lock amount")) | |
170 | - | ||
171 | - | let aB = valueOrErrorMessage(parseInt(ay[as]), l("invalid min lock duration")) | |
172 | - | ||
173 | - | let aC = valueOrErrorMessage(parseInt(ay[at]), l("invalid max lock duration")) | |
174 | - | ||
175 | - | let aD = valueOrErrorMessage(addressFromString(ay[au]), l("invalid math contract address")) | |
176 | - | ||
177 | - | let aE = valueOrErrorMessage(parseInt(ay[av]), l("invalid blocks in period")) | |
178 | - | ||
179 | - | func aF (az,aA,aB,aC,aD) = makeString(["%s%d%d%d%s", az, aA, aB, aC, aD], a) | |
153 | + | func am () = "%s%s__emission__endBlock" | |
180 | 154 | ||
181 | 155 | ||
182 | - | func | |
156 | + | func an () = "%s__nextPeriod" | |
183 | 157 | ||
184 | 158 | ||
185 | - | func aH () = { | |
186 | - | let aI = getString(ai()) | |
187 | - | if ($isInstanceOf(aI, "String")) | |
159 | + | func ao () = "%s%s__gwxRewardEmissionPart__startHeight" | |
160 | + | ||
161 | + | ||
162 | + | let ap = 1 | |
163 | + | ||
164 | + | let aq = 2 | |
165 | + | ||
166 | + | let ar = 3 | |
167 | + | ||
168 | + | let as = 4 | |
169 | + | ||
170 | + | let at = 5 | |
171 | + | ||
172 | + | func au () = "%s__config" | |
173 | + | ||
174 | + | ||
175 | + | func av () = split(h(this, au()), a) | |
176 | + | ||
177 | + | ||
178 | + | let aw = addressFromStringValue(av()[at]) | |
179 | + | ||
180 | + | func ax (ay,az,aA,aB,aw) = makeString(["%s%d%d%d", ay, az, aA, aB, aw], a) | |
181 | + | ||
182 | + | ||
183 | + | func aC (ay,az,aA,aB,aw) = ax(ay, toString(az), toString(aA), toString(aB), aw) | |
184 | + | ||
185 | + | ||
186 | + | func aD () = { | |
187 | + | let r = getString(af()) | |
188 | + | if ($isInstanceOf(r, "String")) | |
188 | 189 | then { | |
189 | - | let | |
190 | - | addressFromStringValue( | |
190 | + | let aE = r | |
191 | + | addressFromStringValue(aE) | |
191 | 192 | } | |
192 | 193 | else this | |
193 | 194 | } | |
194 | 195 | ||
195 | 196 | ||
196 | - | func | |
197 | - | let | |
198 | - | let | |
199 | - | if ($isInstanceOf( | |
197 | + | func aF () = { | |
198 | + | let aG = aD() | |
199 | + | let r = getString(aG, ae()) | |
200 | + | if ($isInstanceOf(r, "String")) | |
200 | 201 | then { | |
201 | - | let | |
202 | - | fromBase58String( | |
202 | + | let aE = r | |
203 | + | fromBase58String(aE) | |
203 | 204 | } | |
204 | - | else if ($isInstanceOf( | |
205 | + | else if ($isInstanceOf(r, "Unit")) | |
205 | 206 | then unit | |
206 | 207 | else throw("Match error") | |
207 | 208 | } | |
208 | 209 | ||
209 | 210 | ||
210 | - | func | |
211 | - | let | |
212 | - | let | |
213 | - | if ($isInstanceOf( | |
211 | + | func aH (aI) = { | |
212 | + | let aJ = g("Permission denied") | |
213 | + | let r = aF() | |
214 | + | if ($isInstanceOf(r, "ByteVector")) | |
214 | 215 | then { | |
215 | - | let | |
216 | - | if (( | |
216 | + | let aK = r | |
217 | + | if ((aI.callerPublicKey == aK)) | |
217 | 218 | then true | |
218 | - | else | |
219 | + | else aJ | |
219 | 220 | } | |
220 | - | else if ($isInstanceOf( | |
221 | - | then if (( | |
221 | + | else if ($isInstanceOf(r, "Unit")) | |
222 | + | then if ((aI.caller == this)) | |
222 | 223 | then true | |
223 | - | else | |
224 | + | else aJ | |
224 | 225 | else throw("Match error") | |
225 | 226 | } | |
226 | 227 | ||
227 | 228 | ||
228 | - | let | |
229 | + | let aL = 1 | |
229 | 230 | ||
230 | - | let | |
231 | + | let aM = 2 | |
231 | 232 | ||
232 | - | let | |
233 | + | let aN = 3 | |
233 | 234 | ||
234 | - | let | |
235 | + | let aO = 4 | |
235 | 236 | ||
236 | - | let | |
237 | + | let aP = 5 | |
237 | 238 | ||
238 | - | let | |
239 | + | let aQ = 6 | |
239 | 240 | ||
240 | - | func aW (aX,aY) = makeString(["%s%s%s__lock", toString(aX), { | |
241 | - | let aI = aY | |
242 | - | if ($isInstanceOf(aI, "ByteVector")) | |
243 | - | then { | |
244 | - | let aZ = aI | |
245 | - | toBase58String(aZ) | |
246 | - | } | |
247 | - | else if ($isInstanceOf(aI, "Unit")) | |
248 | - | then "legacy" | |
249 | - | else throw("Match error") | |
250 | - | }], a) | |
241 | + | func aR (aS) = makeString(["%s%s__lock", aS], a) | |
251 | 242 | ||
252 | 243 | ||
253 | - | func | |
244 | + | func aT (aS) = split(h(this, aR(aS)), a) | |
254 | 245 | ||
255 | 246 | ||
256 | - | func | |
247 | + | func aU (aV,aW,aX,aY,aZ,ba,bb,bc) = makeString(["%d%d%d%d%d%d%d%d", aV, aW, aX, aY, aZ, ba, bb, bc], a) | |
257 | 248 | ||
258 | 249 | ||
259 | - | func | |
250 | + | func bd (aV,aW,aX,aY,aZ,ba,bc) = aU(aV, toString(aW), toString(aX), toString(aY), toString(aZ), toString(ba), toString(lastBlock.timestamp), toString(bc)) | |
260 | 251 | ||
261 | 252 | ||
262 | - | func | |
253 | + | func be () = "%s__nextUserNum" | |
263 | 254 | ||
264 | 255 | ||
265 | - | func | |
256 | + | func bf (aS) = makeString(["%s%s%s__mapping__user2num", aS], a) | |
266 | 257 | ||
267 | 258 | ||
268 | - | func | |
259 | + | func bg (U) = makeString(["%s%s%s__mapping__num2user", U], a) | |
269 | 260 | ||
270 | 261 | ||
271 | - | func | |
262 | + | func bh (aV) = makeString(["%s%d%s__paramByUserNum", aV, "amount"], a) | |
272 | 263 | ||
273 | 264 | ||
274 | - | func | |
265 | + | func bi (aV) = makeString(["%s%d%s__paramByUserNum", aV, "start"], a) | |
275 | 266 | ||
276 | 267 | ||
277 | - | func | |
268 | + | func bj (aV) = makeString(["%s%d%s__paramByUserNum", aV, "duration"], a) | |
278 | 269 | ||
279 | 270 | ||
280 | - | func | |
271 | + | func bk (aV) = makeString(["%s%d%s__paramByUserNum", aV, "k"], a) | |
281 | 272 | ||
282 | 273 | ||
283 | - | func | |
274 | + | func bl (aV) = makeString(["%s%d%s__paramByUserNum", aV, "b"], a) | |
284 | 275 | ||
285 | 276 | ||
286 | - | func | |
277 | + | func bm (aV,bn) = makeString(["%s%d%s%d__paramByPeriod", aV, "k", bn], a) | |
287 | 278 | ||
288 | 279 | ||
289 | - | func | |
280 | + | func bo (aV,bn) = makeString(["%s%d%s%d__paramByPeriod", aV, "b", bn], a) | |
290 | 281 | ||
291 | 282 | ||
292 | - | func | |
283 | + | func bp () = "%s%s__stats__activeTotalLocked" | |
293 | 284 | ||
294 | 285 | ||
295 | - | func | |
286 | + | func bq () = "%s%s__stats__locksDurationSumInBlocks" | |
296 | 287 | ||
297 | 288 | ||
298 | - | func | |
289 | + | func br () = "%s%s__stats__locksCount" | |
299 | 290 | ||
300 | 291 | ||
301 | - | func | |
292 | + | func bs () = "%s%s__stats__activeUsersCount" | |
302 | 293 | ||
303 | 294 | ||
304 | - | func | |
295 | + | func bt (aV) = makeString(["%s%d__userBoostEmissionLastIntV2", aV], a) | |
305 | 296 | ||
306 | 297 | ||
307 | - | func | |
298 | + | func bu (aV,bv) = makeString(["%s%d__userBoostEmissionLastIntV2", aV, bv], a) | |
308 | 299 | ||
309 | 300 | ||
310 | - | func | |
301 | + | func bw (aV) = makeString(["%s%d__maxBoostInt", aV], a) | |
311 | 302 | ||
312 | 303 | ||
313 | - | func | |
304 | + | func bx () = "%s%s__maxBoostInt__total" | |
314 | 305 | ||
315 | 306 | ||
316 | - | func | |
307 | + | func by (aV) = makeString(["%s%d__userBoostAvaliableToClaimTotal", aV], a) | |
317 | 308 | ||
318 | 309 | ||
319 | - | func | |
310 | + | func bz (aV) = makeString(["%s%d__userBoostClaimed", aV], a) | |
320 | 311 | ||
321 | 312 | ||
322 | - | func | |
313 | + | func bA () = "%s%s__gwxCached__total" | |
323 | 314 | ||
324 | 315 | ||
325 | - | func | |
316 | + | func bB () = "%s__gwxCachedTotalCorrective" | |
326 | 317 | ||
327 | 318 | ||
328 | - | func | |
319 | + | func bC (bD,bE,i,bF) = makeString(["%s%s%s%s%d", "vote", bD, bE, toString(i), toString(bF)], a) | |
329 | 320 | ||
330 | 321 | ||
331 | - | func | |
322 | + | func bG (bF) = makeString(["%s%d", "startHeight", toString(bF)], a) | |
332 | 323 | ||
333 | 324 | ||
334 | - | func | |
325 | + | func bH () = makeString(["%s", "currentEpochUi"], a) | |
335 | 326 | ||
336 | 327 | ||
337 | - | ||
328 | + | func bI (bJ,bF) = makeString(["%s%s%d", "votingResultStaked", bJ, toString(bF)], a) | |
338 | 329 | ||
339 | - | let ad = aa(bO) | |
340 | 330 | ||
341 | - | ||
331 | + | func bK (bJ,bF) = makeString(["%s%s%d", "votingResultStakedIntegral", bJ, toString(bF)], a) | |
342 | 332 | ||
343 | - | let bQ = af(ad) | |
344 | 333 | ||
345 | - | ||
334 | + | func bL (bJ,bF) = makeString(["%s%s%d", "votingResultStakedIntegralLastUpdateHeight", bJ, toString(bF)], a) | |
346 | 335 | ||
347 | - | let bS = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(makeString(["%s", "lpStakingPoolsContract"], a)), l("lp_staking_pools contract address is undefined"))), l("invalid lp_staking_pools contract address")) | |
348 | 336 | ||
349 | - | ||
337 | + | func bM (bJ,i,bF) = makeString(["%s%s%s%d", "votingResultStakedIntegralLast", bJ, toString(i), toString(bF)], a) | |
350 | 338 | ||
351 | - | let bU = addressFromStringValue(getStringValue(bO, bT)) | |
352 | 339 | ||
353 | - | ||
340 | + | func bN (bJ,i,bF) = makeString(["%s%s%s%d", "voteStakedIntegral", bJ, toString(i), toString(bF)], a) | |
354 | 341 | ||
355 | - | let bW = { | |
356 | - | let bX = invoke(bP, "getBoostCoeffREADONLY", nil, nil) | |
357 | - | if ($isInstanceOf(bX, "Int")) | |
358 | - | then bX | |
359 | - | else throw(($getType(bX) + " couldn't be cast to Int")) | |
342 | + | ||
343 | + | func bO (bJ,i,bF) = makeString(["%s%s%s%d", "voteStakedIntegralLastUpdateHeight", bJ, toString(i), toString(bF)], a) | |
344 | + | ||
345 | + | ||
346 | + | func bP (bJ,i,bF) = makeString(["%s%s%s%d", "voteStakedIntegralLast", bJ, toString(i), toString(bF)], a) | |
347 | + | ||
348 | + | ||
349 | + | func bQ (bR,bJ) = makeString(["%s%s%s", "staked", bR, bJ], a) | |
350 | + | ||
351 | + | ||
352 | + | let bS = V() | |
353 | + | ||
354 | + | let aa = X(bS) | |
355 | + | ||
356 | + | let bT = ab(aa) | |
357 | + | ||
358 | + | let bU = ac(aa) | |
359 | + | ||
360 | + | let bV = ad(aa) | |
361 | + | ||
362 | + | let bW = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(makeString(["%s", "lpStakingPoolsContract"], a)), e("lp_staking_pools contract address is undefined"))), e("invalid lp_staking_pools contract address")) | |
363 | + | ||
364 | + | let bX = makeString(["%s", "votingEmissionContract"], a) | |
365 | + | ||
366 | + | let bY = addressFromStringValue(getStringValue(bS, bX)) | |
367 | + | ||
368 | + | let bZ = { | |
369 | + | let ca = invoke(bT, "getBoostCoeffREADONLY", nil, nil) | |
370 | + | if ($isInstanceOf(ca, "Int")) | |
371 | + | then ca | |
372 | + | else throw(($getType(ca) + " couldn't be cast to Int")) | |
360 | 373 | } | |
361 | 374 | ||
362 | - | func bY (aX) = { | |
363 | - | let aI = getString(this, bj(toString(aX))) | |
364 | - | if ($isInstanceOf(aI, "String")) | |
365 | - | then { | |
366 | - | let aJ = aI | |
367 | - | valueOrErrorMessage(parseInt(aJ), l("invalid user number")) | |
368 | - | } | |
369 | - | else if ($isInstanceOf(aI, "Unit")) | |
370 | - | then n("invalid user") | |
371 | - | else throw("Match error") | |
375 | + | func cb (cc) = { | |
376 | + | let cd = getIntegerValue(bY, bH()) | |
377 | + | let ce = makeString(["%s%s", "totalCachedGwxCorrection__activationEpoch"], a) | |
378 | + | let cf = getInteger(this, ce) | |
379 | + | let cg = valueOrElse(getInteger(this, bA()), 0) | |
380 | + | let ch = if (isDefined(cf)) | |
381 | + | then (cd >= value(cf)) | |
382 | + | else false | |
383 | + | let ci = if (if (ch) | |
384 | + | then cc | |
385 | + | else false) | |
386 | + | then valueOrElse(getInteger(this, bB()), 0) | |
387 | + | else 0 | |
388 | + | max([0, (cg + ci)]) | |
372 | 389 | } | |
373 | 390 | ||
374 | 391 | ||
375 | - | func bZ () = valueOrElse(getInteger(this, bx()), 0) | |
376 | - | ||
377 | - | ||
378 | - | func ca (aX) = { | |
379 | - | let cb = "getLockedGwxAmount" | |
380 | - | let cc = valueOrErrorMessage({ | |
381 | - | let aI = getString(bU, bV) | |
382 | - | if ($isInstanceOf(aI, "Unit")) | |
383 | - | then unit | |
384 | - | else if ($isInstanceOf(aI, "String")) | |
385 | - | then { | |
386 | - | let aJ = aI | |
387 | - | addressFromString(aJ) | |
388 | - | } | |
389 | - | else throw("Match error") | |
390 | - | }, l("invalid voting emission rate address")) | |
391 | - | let cd = { | |
392 | - | let bX = invoke(bU, cb, [toString(aX)], nil) | |
393 | - | if ($isInstanceOf(bX, "Int")) | |
394 | - | then bX | |
395 | - | else throw(($getType(bX) + " couldn't be cast to Int")) | |
396 | - | } | |
397 | - | let ce = { | |
398 | - | let bX = invoke(cc, cb, [toString(aX)], nil) | |
399 | - | if ($isInstanceOf(bX, "Int")) | |
400 | - | then bX | |
401 | - | else throw(($getType(bX) + " couldn't be cast to Int")) | |
402 | - | } | |
403 | - | let cf = max([cd, ce]) | |
404 | - | cf | |
392 | + | func cj (ck,cl,aW,cm,aY,cn,co,aI) = { | |
393 | + | let cp = makeString(["%s%s%s%s__history", ck, cl, toBase58String(aI.transactionId)], a) | |
394 | + | let cq = makeString(["%d%d%d%d%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(aW), toString(cm), toString(aY), toString(cn), toString(co)], a) | |
395 | + | StringEntry(cp, cq) | |
405 | 396 | } | |
406 | 397 | ||
407 | 398 | ||
408 | - | func cg (ch,ci,bd,cj,bf,bg,aN) = { | |
409 | - | let ck = makeString(["%s%s%s%s__history", ch, ci, toBase58String(aN.transactionId)], a) | |
410 | - | let cl = makeString(["%d%d%d%d%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(bd), toString(cj), toString(bf), toString(bg)], a) | |
411 | - | StringEntry(ck, cl) | |
399 | + | func cr (cs,ct,cu,cv) = { | |
400 | + | let cw = bq() | |
401 | + | let cx = br() | |
402 | + | let cy = bs() | |
403 | + | let cz = bp() | |
404 | + | let cA = k(this, cw) | |
405 | + | let cB = k(this, cx) | |
406 | + | let cC = k(this, cy) | |
407 | + | let cD = k(this, cz) | |
408 | + | [IntegerEntry(cw, (cA + ct)), IntegerEntry(cx, (cB + cu)), IntegerEntry(cy, (cC + cv)), IntegerEntry(cz, (cD + cs))] | |
412 | 409 | } | |
413 | 410 | ||
414 | 411 | ||
415 | - | func cm (cn,co,cp,cq) = { | |
416 | - | let cr = bm() | |
417 | - | let cs = bn() | |
418 | - | let ct = bo() | |
419 | - | let cu = bl() | |
420 | - | let cv = r(this, cr) | |
421 | - | let cw = r(this, cs) | |
422 | - | let cx = r(this, ct) | |
423 | - | let cy = r(this, cu) | |
424 | - | [IntegerEntry(cr, (cv + co)), IntegerEntry(cs, (cw + cp)), IntegerEntry(ct, (cx + cq)), IntegerEntry(cu, (cy + cn))] | |
412 | + | func cE (cF,cG,cH) = { | |
413 | + | let cI = 1000 | |
414 | + | (((cF * cH) + cG) / cI) | |
425 | 415 | } | |
426 | 416 | ||
427 | 417 | ||
428 | - | func cz (aX,aY,bd,be,bf,bg,bh) = [StringEntry(aW(aX, aY), bc(bd, be, bf, bg, bh))] | |
418 | + | func cJ (aS,aV,aW,aX,aY,cn,co,bn) = { | |
419 | + | let cK = bh(aV) | |
420 | + | let cL = bi(aV) | |
421 | + | let cM = bj(aV) | |
422 | + | let cN = bk(aV) | |
423 | + | let cO = bl(aV) | |
424 | + | let cP = bm(aV, bn) | |
425 | + | let cQ = bo(aV, bn) | |
426 | + | let bc = cE(cn, co, height) | |
427 | + | [IntegerEntry(cK, aW), IntegerEntry(cL, aX), IntegerEntry(cM, aY), IntegerEntry(cN, cn), IntegerEntry(cO, co), IntegerEntry(cP, cn), IntegerEntry(cQ, co), StringEntry(aR(aS), bd(aV, aW, aX, aY, cn, co, bc))] | |
428 | + | } | |
429 | 429 | ||
430 | 430 | ||
431 | - | func | |
432 | - | then | |
433 | - | else if ((size( | |
431 | + | func cR (aI,cS) = if ((size(aI.payments) > 1)) | |
432 | + | then g("only one payment is allowed") | |
433 | + | else if ((size(aI.payments) == 0)) | |
434 | 434 | then 0 | |
435 | 435 | else { | |
436 | - | let | |
437 | - | if ((value( | |
438 | - | then | |
439 | - | else | |
436 | + | let cT = aI.payments[0] | |
437 | + | if ((value(cT.assetId) != cS)) | |
438 | + | then g("invalid asset id in payment") | |
439 | + | else cT.amount | |
440 | 440 | } | |
441 | 441 | ||
442 | 442 | ||
443 | - | func cD (aX) = valueOrElse(getInteger(this, bb(aX)), 0) | |
444 | - | ||
445 | - | ||
446 | - | func cE () = { | |
447 | - | let cF = { | |
448 | - | let cG = value(getInteger(bU, bD())) | |
449 | - | let cH = (cG - 1) | |
450 | - | if ((0 > cH)) | |
451 | - | then n("invalid epoch") | |
452 | - | else $Tuple2(cG, cH) | |
453 | - | } | |
454 | - | let cG = cF._1 | |
455 | - | let cH = cF._2 | |
456 | - | let cI = value(getInteger(bU, bC(cG))) | |
457 | - | $Tuple2(cH, cI) | |
443 | + | func cU (aS,cV) = { | |
444 | + | let cW = "empty" | |
445 | + | let cX = bf(aS) | |
446 | + | let aV = valueOrElse(getString(cX), cW) | |
447 | + | let cn = valueOrElse(getInteger(bk(aV)), 0) | |
448 | + | let co = valueOrElse(getInteger(bl(aV)), 0) | |
449 | + | let cY = cE(cn, co, cV) | |
450 | + | let bc = if ((0 > cY)) | |
451 | + | then 0 | |
452 | + | else cY | |
453 | + | bc | |
458 | 454 | } | |
459 | 455 | ||
460 | 456 | ||
461 | - | func cJ (bF) = { | |
462 | - | let cK = 4 | |
463 | - | let cL = 5 | |
464 | - | let cM = { | |
465 | - | let bX = invoke(bO, "getPoolConfigByLpAssetIdREADONLY", [bF], nil) | |
466 | - | if ($isInstanceOf(bX, "List[Any]")) | |
467 | - | then bX | |
468 | - | else throw(($getType(bX) + " couldn't be cast to List[Any]")) | |
457 | + | func cZ (aS) = cU(aS, height) | |
458 | + | ||
459 | + | ||
460 | + | func da () = { | |
461 | + | let db = { | |
462 | + | let cd = value(getInteger(bY, bH())) | |
463 | + | let dc = (cd - 1) | |
464 | + | if ((0 > dc)) | |
465 | + | then g("invalid epoch") | |
466 | + | else $Tuple2(cd, dc) | |
469 | 467 | } | |
470 | - | let bz = { | |
471 | - | let bX = cM[cK] | |
472 | - | if ($isInstanceOf(bX, "String")) | |
473 | - | then bX | |
474 | - | else throw(($getType(bX) + " couldn't be cast to String")) | |
475 | - | } | |
476 | - | let bA = { | |
477 | - | let bX = cM[cL] | |
478 | - | if ($isInstanceOf(bX, "String")) | |
479 | - | then bX | |
480 | - | else throw(($getType(bX) + " couldn't be cast to String")) | |
481 | - | } | |
482 | - | $Tuple2(bz, bA) | |
468 | + | let cd = db._1 | |
469 | + | let dc = db._2 | |
470 | + | let dd = value(getInteger(bY, bG(cd))) | |
471 | + | $Tuple2(dc, dd) | |
483 | 472 | } | |
484 | 473 | ||
485 | 474 | ||
486 | - | func cN (bF,bN) = { | |
487 | - | let aX = addressFromStringValue(bN) | |
488 | - | let cO = cE() | |
489 | - | let cH = cO._1 | |
490 | - | let cI = cO._2 | |
491 | - | let cP = cJ(bF) | |
492 | - | let bz = cP._1 | |
493 | - | let bA = cP._2 | |
494 | - | let cQ = by(bz, bA, aX, cH) | |
495 | - | let cR = valueOrElse(getInteger(bU, cQ), 0) | |
496 | - | cR | |
475 | + | func de (bJ) = { | |
476 | + | let df = 4 | |
477 | + | let dg = 5 | |
478 | + | let dh = { | |
479 | + | let ca = invoke(bS, "getPoolConfigByLpAssetIdREADONLY", [bJ], nil) | |
480 | + | if ($isInstanceOf(ca, "List[Any]")) | |
481 | + | then ca | |
482 | + | else throw(($getType(ca) + " couldn't be cast to List[Any]")) | |
483 | + | } | |
484 | + | let bD = { | |
485 | + | let ca = dh[df] | |
486 | + | if ($isInstanceOf(ca, "String")) | |
487 | + | then ca | |
488 | + | else throw(($getType(ca) + " couldn't be cast to String")) | |
489 | + | } | |
490 | + | let bE = { | |
491 | + | let ca = dh[dg] | |
492 | + | if ($isInstanceOf(ca, "String")) | |
493 | + | then ca | |
494 | + | else throw(($getType(ca) + " couldn't be cast to String")) | |
495 | + | } | |
496 | + | $Tuple2(bD, bE) | |
497 | 497 | } | |
498 | 498 | ||
499 | 499 | ||
500 | - | func cS (bF,bN) = { | |
501 | - | let cT = valueOrElse(getInteger(bQ, bM(bN, bF)), 0) | |
502 | - | let cR = cN(bF, bN) | |
503 | - | if ((cT == 0)) | |
504 | - | then 0 | |
505 | - | else cR | |
500 | + | func di (bJ,bR) = { | |
501 | + | let aS = addressFromStringValue(bR) | |
502 | + | let dj = da() | |
503 | + | let dc = dj._1 | |
504 | + | let dd = dj._2 | |
505 | + | let dk = de(bJ) | |
506 | + | let bD = dk._1 | |
507 | + | let bE = dk._2 | |
508 | + | let dl = bC(bD, bE, aS, dc) | |
509 | + | let dm = valueOrElse(getInteger(bY, dl), 0) | |
510 | + | dm | |
506 | 511 | } | |
507 | 512 | ||
508 | 513 | ||
509 | - | func cU (bF) = { | |
510 | - | let cV = cE() | |
511 | - | let cH = cV._1 | |
512 | - | let cI = cV._2 | |
513 | - | let cW = valueOrElse(getInteger(bU, bE(bF, cH)), 0) | |
514 | - | let cX = valueOrElse(getInteger(this, bE(bF, cH)), cW) | |
515 | - | cX | |
514 | + | func dn (bJ,bR) = { | |
515 | + | let do = valueOrElse(getInteger(bU, bQ(bR, bJ)), 0) | |
516 | + | let dm = di(bJ, bR) | |
517 | + | if ((do == 0)) | |
518 | + | then 0 | |
519 | + | else dm | |
516 | 520 | } | |
517 | 521 | ||
518 | 522 | ||
519 | - | func cY (bF) = { | |
520 | - | let cZ = cE() | |
521 | - | let cH = cZ._1 | |
522 | - | let cI = cZ._2 | |
523 | - | let cX = cU(bF) | |
524 | - | let da = valueOrElse(getInteger(this, bG(bF, cH)), 0) | |
525 | - | let db = valueOrElse(getInteger(this, bH(bF, cH)), cI) | |
526 | - | let dc = (height - db) | |
527 | - | let dd = ((dc * cX) + da) | |
528 | - | dd | |
523 | + | func dp (bJ) = { | |
524 | + | let dq = da() | |
525 | + | let dc = dq._1 | |
526 | + | let dd = dq._2 | |
527 | + | let dr = valueOrElse(getInteger(bY, bI(bJ, dc)), 0) | |
528 | + | let ds = valueOrElse(getInteger(this, bI(bJ, dc)), dr) | |
529 | + | ds | |
529 | 530 | } | |
530 | 531 | ||
531 | 532 | ||
532 | - | func de (bF,df) = { | |
533 | - | let dg = cE() | |
534 | - | let cH = dg._1 | |
535 | - | let cI = dg._2 | |
536 | - | let cX = cU(bF) | |
537 | - | let dh = (cX + df) | |
538 | - | let dd = cY(bF) | |
539 | - | [IntegerEntry(bE(bF, cH), dh), IntegerEntry(bH(bF, cH), height), IntegerEntry(bG(bF, cH), dd)] | |
533 | + | func dt (bJ) = { | |
534 | + | let du = da() | |
535 | + | let dc = du._1 | |
536 | + | let dd = du._2 | |
537 | + | let ds = dp(bJ) | |
538 | + | let dv = valueOrElse(getInteger(this, bK(bJ, dc)), 0) | |
539 | + | let dw = valueOrElse(getInteger(this, bL(bJ, dc)), dd) | |
540 | + | let dx = (height - dw) | |
541 | + | let dy = ((dx * ds) + dv) | |
542 | + | dy | |
540 | 543 | } | |
541 | 544 | ||
542 | 545 | ||
543 | - | func di (bF,bN) = { | |
544 | - | let dj = cE() | |
545 | - | let cH = dj._1 | |
546 | - | let cI = dj._2 | |
547 | - | let aX = addressFromStringValue(bN) | |
548 | - | let dk = cS(bF, bN) | |
549 | - | let dl = valueOrElse(getInteger(this, bJ(bF, aX, cH)), 0) | |
550 | - | let dm = valueOrElse(getInteger(this, bK(bF, aX, cH)), cI) | |
551 | - | let dn = (height - dm) | |
552 | - | let do = ((dn * dk) + dl) | |
553 | - | do | |
546 | + | func dz (bJ,dA) = { | |
547 | + | let dB = da() | |
548 | + | let dc = dB._1 | |
549 | + | let dd = dB._2 | |
550 | + | let ds = dp(bJ) | |
551 | + | let dC = (ds + dA) | |
552 | + | let dy = dt(bJ) | |
553 | + | [IntegerEntry(bI(bJ, dc), dC), IntegerEntry(bL(bJ, dc), height), IntegerEntry(bK(bJ, dc), dy)] | |
554 | 554 | } | |
555 | 555 | ||
556 | 556 | ||
557 | - | func dp (bF,bN,dq) = { | |
558 | - | let dr = cE() | |
559 | - | let cH = dr._1 | |
560 | - | let cI = dr._2 | |
561 | - | let aX = addressFromStringValue(bN) | |
562 | - | let ds = cN(bF, bN) | |
563 | - | let dt = if ((ds == 0)) | |
564 | - | then nil | |
565 | - | else { | |
566 | - | let df = if (dq) | |
567 | - | then ds | |
568 | - | else -(ds) | |
569 | - | let du = de(bF, df) | |
570 | - | let do = di(bF, bN) | |
571 | - | let dv = [IntegerEntry(bK(bF, aX, cH), height), IntegerEntry(bJ(bF, aX, cH), do)] | |
572 | - | (du ++ dv) | |
573 | - | } | |
574 | - | dt | |
557 | + | func dD (bJ,bR) = { | |
558 | + | let dE = da() | |
559 | + | let dc = dE._1 | |
560 | + | let dd = dE._2 | |
561 | + | let aS = addressFromStringValue(bR) | |
562 | + | let dF = dn(bJ, bR) | |
563 | + | let dG = valueOrElse(getInteger(this, bN(bJ, aS, dc)), 0) | |
564 | + | let dH = valueOrElse(getInteger(this, bO(bJ, aS, dc)), dd) | |
565 | + | let dI = (height - dH) | |
566 | + | let dJ = ((dI * dF) + dG) | |
567 | + | dJ | |
575 | 568 | } | |
576 | 569 | ||
577 | 570 | ||
578 | - | func dw (bF,bN) = { | |
579 | - | let dx = cE() | |
580 | - | let cH = dx._1 | |
581 | - | let cI = dx._2 | |
582 | - | let aX = addressFromStringValue(bN) | |
583 | - | let dy = bL(bF, aX, cH) | |
584 | - | let dz = valueOrElse(getInteger(this, dy), 0) | |
585 | - | let dA = bI(bF, aX, cH) | |
586 | - | let dB = valueOrElse(getInteger(this, dA), 0) | |
587 | - | let do = di(bF, bN) | |
588 | - | let dd = cY(bF) | |
589 | - | let dC = (do - dz) | |
590 | - | let dD = (dd - dB) | |
591 | - | $Tuple3([IntegerEntry(dy, do), IntegerEntry(dA, dd)], dC, dD) | |
571 | + | func dK (bJ,bR,dL) = { | |
572 | + | let dM = da() | |
573 | + | let dc = dM._1 | |
574 | + | let dd = dM._2 | |
575 | + | let aS = addressFromStringValue(bR) | |
576 | + | let dN = di(bJ, bR) | |
577 | + | let dO = if ((dN == 0)) | |
578 | + | then nil | |
579 | + | else { | |
580 | + | let dA = if (dL) | |
581 | + | then dN | |
582 | + | else -(dN) | |
583 | + | let dP = dz(bJ, dA) | |
584 | + | let dJ = dD(bJ, bR) | |
585 | + | let dQ = [IntegerEntry(bO(bJ, aS, dc), height), IntegerEntry(bN(bJ, aS, dc), dJ)] | |
586 | + | (dP ++ dQ) | |
587 | + | } | |
588 | + | dO | |
592 | 589 | } | |
593 | 590 | ||
594 | 591 | ||
595 | - | func dE () = { | |
596 | - | let dF = u(bP, aj()) | |
597 | - | let dG = getInteger(this, am()) | |
598 | - | let dH = getInteger(this, an()) | |
599 | - | let dI = u(bP, ap()) | |
600 | - | let dJ = if ((height > dI)) | |
601 | - | then dI | |
592 | + | func dR (bJ,bR) = { | |
593 | + | let dS = da() | |
594 | + | let dc = dS._1 | |
595 | + | let dd = dS._2 | |
596 | + | let aS = addressFromStringValue(bR) | |
597 | + | let dT = bP(bJ, aS, dc) | |
598 | + | let dU = valueOrElse(getInteger(this, dT), 0) | |
599 | + | let dV = bM(bJ, aS, dc) | |
600 | + | let dW = valueOrElse(getInteger(this, dV), 0) | |
601 | + | let dJ = dD(bJ, bR) | |
602 | + | let dy = dt(bJ) | |
603 | + | let dX = (dJ - dU) | |
604 | + | let dY = (dy - dW) | |
605 | + | $Tuple3([IntegerEntry(dT, dJ), IntegerEntry(dV, dy)], dX, dY) | |
606 | + | } | |
607 | + | ||
608 | + | ||
609 | + | func dZ () = { | |
610 | + | let ea = n(bT, ag()) | |
611 | + | let eb = getInteger(this, aj()) | |
612 | + | let ec = getInteger(this, ak()) | |
613 | + | let ed = n(bT, am()) | |
614 | + | let cH = if ((height > ed)) | |
615 | + | then ed | |
602 | 616 | else height | |
603 | - | let | |
604 | - | let | |
605 | - | if ($isInstanceOf( | |
617 | + | let ee = { | |
618 | + | let r = eb | |
619 | + | if ($isInstanceOf(r, "Int")) | |
606 | 620 | then { | |
607 | - | let | |
608 | - | max([( | |
621 | + | let ef = r | |
622 | + | max([(cH - ef), 0]) | |
609 | 623 | } | |
610 | - | else if ($isInstanceOf( | |
624 | + | else if ($isInstanceOf(r, "Unit")) | |
611 | 625 | then 0 | |
612 | 626 | else throw("Match error") | |
613 | 627 | } | |
614 | - | let | |
615 | - | let | |
616 | - | let | |
617 | - | $Tuple2([IntegerEntry( | |
628 | + | let eg = ((ea * (bZ - 1)) / bZ) | |
629 | + | let eh = valueOrElse(ec, 0) | |
630 | + | let ei = ((eg * ee) + eh) | |
631 | + | $Tuple2([IntegerEntry(ak(), ei), IntegerEntry(aj(), height)], ei) | |
618 | 632 | } | |
619 | 633 | ||
620 | 634 | ||
621 | - | func dP (bF,bN,dQ) = { | |
622 | - | let aX = valueOrErrorMessage(addressFromString(bN), l("invalid user address")) | |
623 | - | let bq = bY(aX) | |
624 | - | if ((bq == bq)) | |
625 | - | then { | |
626 | - | let dR = "empty" | |
627 | - | let dS = if ((bF != dR)) | |
635 | + | func ej (bJ,bR,ek) = { | |
636 | + | let el = getString(this, aR(bR)) | |
637 | + | if ((el == unit)) | |
638 | + | then $Tuple3(0, nil, "userRecord::is::empty") | |
639 | + | else { | |
640 | + | let em = split(value(el), a) | |
641 | + | let en = em[aL] | |
642 | + | let eo = "empty" | |
643 | + | let ep = if ((bJ != eo)) | |
628 | 644 | then { | |
629 | - | let | |
630 | - | getIntegerValue( | |
645 | + | let eq = valueOrErrorMessage(getString(bS, O(bJ)), e(("unsupported lp asset " + bJ))) | |
646 | + | getIntegerValue(bS, Q(eq)) | |
631 | 647 | } | |
632 | - | else if ( | |
648 | + | else if (ek) | |
633 | 649 | then 0 | |
634 | - | else | |
635 | - | let | |
636 | - | let | |
637 | - | let | |
638 | - | let | |
639 | - | let | |
640 | - | if ((0 > | |
641 | - | then | |
650 | + | else g(("not readonly mode: unsupported lp asset " + bJ)) | |
651 | + | let er = bu(en, bJ) | |
652 | + | let es = bt(en) | |
653 | + | let et = valueOrElse(getInteger(this, er), k(this, es)) | |
654 | + | let ei = dZ()._2 | |
655 | + | let eu = (ei - et) | |
656 | + | if ((0 > eu)) | |
657 | + | then g("wrong calculations") | |
642 | 658 | else { | |
643 | - | let | |
644 | - | let | |
645 | - | let | |
646 | - | let | |
647 | - | let | |
648 | - | let | |
659 | + | let ev = dR(bJ, bR) | |
660 | + | let ew = ev._1 | |
661 | + | let ex = ev._2 | |
662 | + | let ey = ev._3 | |
663 | + | let ez = fraction(eu, ep, d) | |
664 | + | let eA = if ((ey == 0)) | |
649 | 665 | then 0 | |
650 | - | else fraction( | |
651 | - | let | |
652 | - | let | |
653 | - | $Tuple3( | |
666 | + | else fraction(ez, ex, ey) | |
667 | + | let eB = ([IntegerEntry(er, ei)] ++ ew) | |
668 | + | let eC = makeString([toString(et), toString(eu), toString(ep), toString(ex), toString(ey)], ":") | |
669 | + | $Tuple3(eA, eB, eC) | |
654 | 670 | } | |
655 | 671 | } | |
656 | - | else throw("Strict value is not equal to itself.") | |
657 | 672 | } | |
658 | 673 | ||
659 | 674 | ||
660 | - | func eg (aN,eh) = if (!(containsElement(i, eh))) | |
661 | - | then n("invalid duration") | |
662 | - | else { | |
663 | - | let bf = (eh * k) | |
664 | - | let ei = toBase58String(az) | |
665 | - | if ((size(aN.payments) != 1)) | |
666 | - | then n("invalid payment - exact one payment must be attached") | |
667 | - | else { | |
668 | - | let cC = aN.payments[0] | |
669 | - | let ej = cC.amount | |
670 | - | if ((az != value(cC.assetId))) | |
671 | - | then n((("invalid asset is in payment - " + ei) + " is expected")) | |
672 | - | else { | |
673 | - | let ek = bi() | |
674 | - | let aX = aN.caller | |
675 | - | let bN = toString(aX) | |
676 | - | let el = isDefined(getString(bj(bN))) | |
677 | - | let em = if (el) | |
678 | - | then value(getString(bj(bN))) | |
679 | - | else toString(u(this, ek)) | |
680 | - | let bq = parseIntValue(em) | |
681 | - | let cj = height | |
682 | - | if (if ((aA > ej)) | |
683 | - | then (aX != bS) | |
684 | - | else false) | |
685 | - | then n(("amount is less then minLockAmount=" + toString(aA))) | |
686 | - | else if ((aB > bf)) | |
687 | - | then n(("passed duration is less then minLockDuration=" + toString(aB))) | |
688 | - | else if ((bf > aC)) | |
689 | - | then n(("passed duration is greater then maxLockDuration=" + toString(aC))) | |
690 | - | else { | |
691 | - | let en = fraction(ej, bf, aC) | |
692 | - | let eo = bZ() | |
693 | - | let dV = bp(bq) | |
694 | - | let dO = dE()._2 | |
695 | - | let ep = cD(aX) | |
696 | - | let eq = reentrantInvoke(bR, "refreshUserReward", [aX.bytes], nil) | |
697 | - | if ((eq == eq)) | |
698 | - | then { | |
699 | - | let er = if (el) | |
700 | - | then nil | |
701 | - | else [IntegerEntry(ek, (bq + 1)), StringEntry(bj(bN), em), StringEntry(bk(em), bN)] | |
702 | - | $Tuple2(((((er ++ cz(aX, aN.transactionId, ej, cj, bf, en, 0)) ++ cm(ej, bf, 1, if (el) | |
703 | - | then 0 | |
704 | - | else 1)) :+ cg("lock", bN, ej, cj, bf, en, aN)) ++ [IntegerEntry(dV, dO), IntegerEntry(bx(), (eo + en)), IntegerEntry(bb(aX), (ep + en))]), en) | |
705 | - | } | |
706 | - | else throw("Strict value is not equal to itself.") | |
707 | - | } | |
708 | - | } | |
709 | - | } | |
710 | - | } | |
711 | - | ||
712 | - | ||
713 | - | func es (aX,et) = { | |
714 | - | let eu = ba(aX, et) | |
715 | - | let ev = parseIntValue(eu[aQ]) | |
716 | - | let cj = parseIntValue(eu[aR]) | |
717 | - | let ew = parseIntValue(eu[aS]) | |
718 | - | let ex = (cj + ew) | |
719 | - | let bh = parseIntValue(eu[aV]) | |
720 | - | let ey = ((height - cj) / aE) | |
721 | - | let ez = fraction(toBigInt(ey), (toBigInt((8 * aE)) * h), toBigInt(ew)) | |
722 | - | let eA = if ((height > ex)) | |
723 | - | then ev | |
724 | - | else (toInt(fraction(toBigInt(ev), (h - pow(toBigInt(5), 1, ez, f, f, DOWN)), h)) - bh) | |
725 | - | eA | |
675 | + | func eD (aI,aY) = { | |
676 | + | let eE = av() | |
677 | + | let eF = eE[ap] | |
678 | + | let ay = fromBase58String(eF) | |
679 | + | let az = parseIntValue(eE[aq]) | |
680 | + | let aA = parseIntValue(eE[ar]) | |
681 | + | let aB = parseIntValue(eE[as]) | |
682 | + | if ((size(aI.payments) != 1)) | |
683 | + | then g("invalid payment - exact one payment must be attached") | |
684 | + | else { | |
685 | + | let cT = aI.payments[0] | |
686 | + | let eG = cT.amount | |
687 | + | if ((ay != value(cT.assetId))) | |
688 | + | then g((("invalid asset is in payment - " + eF) + " is expected")) | |
689 | + | else { | |
690 | + | let eH = be() | |
691 | + | let bR = toString(aI.caller) | |
692 | + | let eI = isDefined(getString(bf(bR))) | |
693 | + | let en = if (eI) | |
694 | + | then value(getString(bf(bR))) | |
695 | + | else toString(n(this, eH)) | |
696 | + | let aV = parseIntValue(en) | |
697 | + | let cm = height | |
698 | + | let cL = bi(en) | |
699 | + | let cM = bj(en) | |
700 | + | let cK = bh(en) | |
701 | + | if (if ((az > eG)) | |
702 | + | then (aI.caller != bW) | |
703 | + | else false) | |
704 | + | then g(("amount is less then minLockAmount=" + toString(az))) | |
705 | + | else if ((aA > aY)) | |
706 | + | then g(("passed duration is less then minLockDuration=" + toString(aA))) | |
707 | + | else if ((aY > aB)) | |
708 | + | then g(("passed duration is greater then maxLockDuration=" + toString(aB))) | |
709 | + | else if (if (eI) | |
710 | + | then ((n(this, cL) + n(this, cM)) >= cm) | |
711 | + | else false) | |
712 | + | then g("there is an active lock - consider to use increaseLock") | |
713 | + | else if ((k(this, cK) > 0)) | |
714 | + | then g(("there are locked WXs - consider to use increaseLock " + cK)) | |
715 | + | else { | |
716 | + | let eJ = fraction(aY, c, aB) | |
717 | + | let eK = fraction(eG, eJ, c) | |
718 | + | let eL = q(invoke(aw, "calcGwxParamsREADONLY", [eK, cm, aY], nil)) | |
719 | + | let cn = t(eL[0]) | |
720 | + | let co = t(eL[1]) | |
721 | + | let bn = toString(t(eL[2])) | |
722 | + | let cg = cb(false) | |
723 | + | let es = bt(en) | |
724 | + | let ei = dZ()._2 | |
725 | + | let eM = if (eI) | |
726 | + | then nil | |
727 | + | else [IntegerEntry(eH, (aV + 1)), StringEntry(bf(bR), en), StringEntry(bg(en), bR)] | |
728 | + | $Tuple2(((((eM ++ cJ(bR, en, eG, cm, aY, cn, co, bn)) ++ cr(eG, aY, 1, if (eI) | |
729 | + | then 0 | |
730 | + | else 1)) :+ cj("lock", bR, eG, cm, aY, cn, co, aI)) ++ [IntegerEntry(es, ei), IntegerEntry(bA(), (cg + eK))]), eK) | |
731 | + | } | |
732 | + | } | |
733 | + | } | |
726 | 734 | } | |
727 | 735 | ||
728 | 736 | ||
729 | - | @Callable( | |
730 | - | func constructor ( | |
731 | - | let | |
732 | - | if (( | |
733 | - | then ([IntegerEntry( | |
737 | + | @Callable(aI) | |
738 | + | func constructor (eN,eO,az,eP,eQ,aw) = { | |
739 | + | let eR = aH(aI) | |
740 | + | if ((eR == eR)) | |
741 | + | then ([IntegerEntry(be(), 0), StringEntry(au(), aC(eO, az, eP, eQ, aw)), StringEntry(A(), eN)] ++ cr(0, 0, 0, 0)) | |
734 | 742 | else throw("Strict value is not equal to itself.") | |
735 | 743 | } | |
736 | 744 | ||
737 | 745 | ||
738 | 746 | ||
739 | - | @Callable( | |
740 | - | func lockRef ( | |
741 | - | let | |
742 | - | let | |
743 | - | let | |
744 | - | let | |
745 | - | let | |
747 | + | @Callable(aI) | |
748 | + | func lockRef (aY,eS,eT) = { | |
749 | + | let eU = eD(aI, aY) | |
750 | + | let eV = eU._1 | |
751 | + | let eK = eU._2 | |
752 | + | let eW = toString(aI.caller) | |
753 | + | let eX = if (if ((eS == "")) | |
746 | 754 | then true | |
747 | - | else ( | |
755 | + | else (eT == base58'')) | |
748 | 756 | then unit | |
749 | - | else invoke( | |
750 | - | if (( | |
757 | + | else invoke(w, "createPair", [z, eS, eW, eT], nil) | |
758 | + | if ((eX == eX)) | |
751 | 759 | then { | |
752 | - | let | |
753 | - | if (( | |
754 | - | then $Tuple2( | |
760 | + | let eY = invoke(aw, "updateReferralActivity", [toString(aI.caller), eK], nil) | |
761 | + | if ((eY == eY)) | |
762 | + | then $Tuple2(eV, unit) | |
755 | 763 | else throw("Strict value is not equal to itself.") | |
756 | 764 | } | |
757 | 765 | else throw("Strict value is not equal to itself.") | |
758 | 766 | } | |
759 | 767 | ||
760 | 768 | ||
761 | 769 | ||
762 | - | @Callable( | |
763 | - | func lock ( | |
764 | - | let | |
765 | - | let | |
766 | - | let | |
767 | - | let | |
768 | - | if (( | |
769 | - | then $Tuple2( | |
770 | + | @Callable(aI) | |
771 | + | func lock (aY) = { | |
772 | + | let eZ = eD(aI, aY) | |
773 | + | let eV = eZ._1 | |
774 | + | let eK = eZ._2 | |
775 | + | let eY = invoke(aw, "updateReferralActivity", [toString(aI.caller), eK], nil) | |
776 | + | if ((eY == eY)) | |
777 | + | then $Tuple2(eV, unit) | |
770 | 778 | else throw("Strict value is not equal to itself.") | |
771 | 779 | } | |
772 | 780 | ||
773 | 781 | ||
774 | 782 | ||
775 | - | @Callable(aN) | |
776 | - | func claimWxBoost (bF,bN) = if ((bQ != aN.caller)) | |
777 | - | then n("permissions denied") | |
783 | + | @Callable(aI) | |
784 | + | func increaseLock (fa) = { | |
785 | + | let eE = av() | |
786 | + | let eF = eE[ap] | |
787 | + | let ay = fromBase58String(eF) | |
788 | + | let aA = parseIntValue(eE[ar]) | |
789 | + | let aB = parseIntValue(eE[as]) | |
790 | + | let eG = cR(aI, ay) | |
791 | + | let bR = toString(aI.caller) | |
792 | + | let em = aT(bR) | |
793 | + | let en = em[aL] | |
794 | + | let fb = parseIntValue(em[aM]) | |
795 | + | let cm = parseIntValue(em[aN]) | |
796 | + | let fc = parseIntValue(em[aO]) | |
797 | + | let fd = (cm + fc) | |
798 | + | let fe = max([(fd - height), 0]) | |
799 | + | let ff = (fb + eG) | |
800 | + | let fg = (fe + fa) | |
801 | + | if ((0 > fa)) | |
802 | + | then g("duration is less then zero") | |
803 | + | else if ((aA > fg)) | |
804 | + | then g(("lockDurationNew is less then minLockDuration=" + toString(aA))) | |
805 | + | else if ((fg > aB)) | |
806 | + | then g(("deltaDuration + existedLockDuration is greater then maxLockDuration=" + toString(aB))) | |
807 | + | else { | |
808 | + | let eJ = fraction(fg, c, aB) | |
809 | + | let eK = fraction(ff, eJ, c) | |
810 | + | let eY = invoke(aw, "updateReferralActivity", [toString(aI.caller), eK], nil) | |
811 | + | if ((eY == eY)) | |
812 | + | then { | |
813 | + | let fh = height | |
814 | + | let eL = q(invoke(aw, "calcGwxParamsREADONLY", [eK, fh, fg], nil)) | |
815 | + | let cn = t(eL[0]) | |
816 | + | let co = t(eL[1]) | |
817 | + | let bn = toString(t(eL[2])) | |
818 | + | let fi = cZ(bR) | |
819 | + | let fj = (eK - fi) | |
820 | + | if ((0 > fj)) | |
821 | + | then g(("gwxDiff is less then 0: " + toString(fj))) | |
822 | + | else { | |
823 | + | let cg = cb(false) | |
824 | + | let fk = cb(true) | |
825 | + | (((cJ(bR, en, ff, fh, fg, cn, co, bn) ++ cr(eG, fa, 0, 0)) :+ cj("lock", bR, eG, cm, fg, cn, co, aI)) ++ [IntegerEntry(bA(), (cg + fj))]) | |
826 | + | } | |
827 | + | } | |
828 | + | else throw("Strict value is not equal to itself.") | |
829 | + | } | |
830 | + | } | |
831 | + | ||
832 | + | ||
833 | + | ||
834 | + | @Callable(aI) | |
835 | + | func claimWxBoost (bJ,bR) = if ((bU != aI.caller)) | |
836 | + | then g("permissions denied") | |
778 | 837 | else { | |
779 | - | let | |
780 | - | let | |
781 | - | let | |
782 | - | let | |
783 | - | $Tuple2( | |
838 | + | let fl = ej(bJ, bR, false) | |
839 | + | let fm = fl._1 | |
840 | + | let eB = fl._2 | |
841 | + | let eC = fl._3 | |
842 | + | $Tuple2(eB, [fm]) | |
784 | 843 | } | |
785 | 844 | ||
786 | 845 | ||
787 | 846 | ||
788 | - | @Callable( | |
789 | - | func claimWxBoostREADONLY ( | |
790 | - | let | |
791 | - | let | |
792 | - | let | |
793 | - | let | |
794 | - | $Tuple2(nil, [ | |
847 | + | @Callable(aI) | |
848 | + | func claimWxBoostREADONLY (bJ,bR) = { | |
849 | + | let fn = ej(bJ, bR, true) | |
850 | + | let fm = fn._1 | |
851 | + | let eB = fn._2 | |
852 | + | let eC = fn._3 | |
853 | + | $Tuple2(nil, [fm, eC]) | |
795 | 854 | } | |
796 | 855 | ||
797 | 856 | ||
798 | 857 | ||
799 | - | @Callable(aN) | |
800 | - | func unlock (eR) = { | |
801 | - | let aX = aN.caller | |
802 | - | let bN = toString(aX) | |
803 | - | let aY = fromBase58String(eR) | |
804 | - | let eu = ba(aX, if ((eR == "")) | |
805 | - | then unit | |
806 | - | else aY) | |
807 | - | let ev = parseIntValue(eu[aQ]) | |
808 | - | let cj = parseIntValue(eu[aR]) | |
809 | - | let ew = parseIntValue(eu[aS]) | |
810 | - | let bh = parseIntValue(eu[aV]) | |
811 | - | let bg = parseIntValue(eu[aU]) | |
812 | - | let ey = ((height - cj) / aE) | |
813 | - | let eA = es(aX, if ((eR == "")) | |
814 | - | then unit | |
815 | - | else aY) | |
816 | - | let en = fraction(ev, ew, aC) | |
817 | - | let eS = min([fraction((ey * aE), en, aC), bg]) | |
818 | - | let eT = x((bg - eS), "gwxRemaining") | |
819 | - | let eU = ca(aX) | |
820 | - | if ((0 >= ev)) | |
821 | - | then n("nothing to unlock") | |
858 | + | @Callable(aI) | |
859 | + | func unlock (aS) = { | |
860 | + | let em = aT(aS) | |
861 | + | let en = em[aL] | |
862 | + | let fb = parseIntValue(em[aM]) | |
863 | + | let cm = parseIntValue(em[aN]) | |
864 | + | let fc = parseIntValue(em[aO]) | |
865 | + | let fd = (cm + fc) | |
866 | + | let eE = av() | |
867 | + | let ay = fromBase58String(eE[ap]) | |
868 | + | if ((fd >= height)) | |
869 | + | then g((("wait " + toString(fd)) + " to unlock")) | |
870 | + | else if ((0 >= fb)) | |
871 | + | then g("nothing to unlock") | |
872 | + | else { | |
873 | + | let bn = valueOrElse(getInteger(aw, an()), 0) | |
874 | + | (((cJ(aS, en, 0, cm, fc, 0, 0, toString(bn)) ++ cr(-(fb), 0, 0, -1)) :+ cj("unlock", aS, fb, cm, fc, 0, 0, aI)) :+ ScriptTransfer(addressFromStringValue(aS), fb, ay)) | |
875 | + | } | |
876 | + | } | |
877 | + | ||
878 | + | ||
879 | + | ||
880 | + | @Callable(aI) | |
881 | + | func gwxUserInfoREADONLY (aS) = { | |
882 | + | let bc = cZ(aS) | |
883 | + | $Tuple2(nil, [bc]) | |
884 | + | } | |
885 | + | ||
886 | + | ||
887 | + | ||
888 | + | @Callable(aI) | |
889 | + | func userMaxDurationREADONLY (bR) = { | |
890 | + | let eE = av() | |
891 | + | let aB = parseIntValue(eE[as]) | |
892 | + | let el = getString(this, aR(bR)) | |
893 | + | if ((el == unit)) | |
894 | + | then $Tuple2(nil, $Tuple2("lock", aB)) | |
822 | 895 | else { | |
823 | - | let eo = bZ() | |
824 | - | let ep = cD(aX) | |
825 | - | let eV = x((ep - eS), "userGwxAmountTotalNew") | |
826 | - | if ((eU > eV)) | |
827 | - | then n(("locked gwx amount: " + toString(eU))) | |
828 | - | else { | |
829 | - | let eq = reentrantInvoke(bR, "refreshUserReward", [aX.bytes], nil) | |
830 | - | if ((eq == eq)) | |
831 | - | then ((((cz(aX, aY, ev, cj, ew, eT, (bh + eA)) ++ cm(-(eA), 0, 0, 0)) :+ cg("unlock", bN, eA, cj, ew, eS, aN)) :+ ScriptTransfer(aX, eA, az)) ++ [IntegerEntry(bx(), x((eo - eS), "gwxTotal")), IntegerEntry(bb(aX), eV)]) | |
832 | - | else throw("Strict value is not equal to itself.") | |
833 | - | } | |
896 | + | let em = split(value(el), a) | |
897 | + | let cm = parseIntValue(em[aN]) | |
898 | + | let fc = parseIntValue(em[aO]) | |
899 | + | let fd = (cm + fc) | |
900 | + | let fe = max([(fd - height), 0]) | |
901 | + | let fo = (aB - fe) | |
902 | + | $Tuple2(nil, $Tuple2("increaseLock", fo)) | |
834 | 903 | } | |
835 | 904 | } | |
836 | 905 | ||
837 | 906 | ||
838 | 907 | ||
839 | - | @Callable(aN) | |
840 | - | func gwxUserInfoREADONLY (bN) = { | |
841 | - | let aX = valueOrErrorMessage(addressFromString(bN), l("invalid user address")) | |
842 | - | let bg = cD(aX) | |
843 | - | $Tuple2(nil, [bg]) | |
908 | + | @Callable(aI) | |
909 | + | func getUserGwxAmountAtHeightREADONLY (aS,cV) = { | |
910 | + | let bc = cU(aS, cV) | |
911 | + | $Tuple2(nil, bc) | |
844 | 912 | } | |
845 | 913 | ||
846 | 914 | ||
847 | 915 | ||
848 | - | @Callable( | |
849 | - | func | |
916 | + | @Callable(aI) | |
917 | + | func getTotalCachedGwxREADONLY () = $Tuple2(nil, cb(true)) | |
850 | 918 | ||
851 | 919 | ||
852 | 920 | ||
853 | - | @Callable(aN) | |
854 | - | func getUserGwxAmountAtHeightREADONLY (bN,eW) = { | |
855 | - | let aX = valueOrErrorMessage(addressFromString(bN), l("invalid user address")) | |
856 | - | let bg = cD(aX) | |
857 | - | $Tuple2(nil, bg) | |
858 | - | } | |
859 | - | ||
860 | - | ||
861 | - | ||
862 | - | @Callable(aN) | |
863 | - | func getUserGwxAmount (bN) = { | |
864 | - | let aX = valueOrErrorMessage(addressFromString(bN), l("invalid user address")) | |
865 | - | let bg = cD(aX) | |
866 | - | $Tuple2(nil, bg) | |
867 | - | } | |
868 | - | ||
869 | - | ||
870 | - | ||
871 | - | @Callable(aN) | |
872 | - | func getGwxTotalREADONLY () = $Tuple2(nil, bZ()) | |
873 | - | ||
874 | - | ||
875 | - | ||
876 | - | @Callable(aN) | |
921 | + | @Callable(aI) | |
877 | 922 | func onBoostEmissionUpdate () = { | |
878 | - | let | |
923 | + | let eR = if ((aI.caller == bT)) | |
879 | 924 | then true | |
880 | - | else | |
881 | - | if (( | |
882 | - | then | |
925 | + | else aH(aI) | |
926 | + | if ((eR == eR)) | |
927 | + | then dZ() | |
883 | 928 | else throw("Strict value is not equal to itself.") | |
884 | 929 | } | |
885 | 930 | ||
886 | 931 | ||
887 | 932 | ||
888 | - | @Callable( | |
889 | - | func onStakedVoteUpdate ( | |
890 | - | let | |
933 | + | @Callable(aI) | |
934 | + | func onStakedVoteUpdate (bJ,bR,dL) = { | |
935 | + | let eR = if ((aI.caller == bU)) | |
891 | 936 | then true | |
892 | - | else | |
893 | - | if (( | |
937 | + | else aH(aI) | |
938 | + | if ((eR == eR)) | |
894 | 939 | then { | |
895 | - | let | |
896 | - | $Tuple2( | |
940 | + | let dO = dK(bJ, bR, dL) | |
941 | + | $Tuple2(dO, unit) | |
897 | 942 | } | |
898 | 943 | else throw("Strict value is not equal to itself.") | |
899 | 944 | } | |
900 | 945 | ||
901 | 946 | ||
902 | 947 | ||
903 | - | @Callable( | |
904 | - | func getVotingResultStakedREADONLY ( | |
948 | + | @Callable(aI) | |
949 | + | func getVotingResultStakedREADONLY (bJ) = $Tuple2(nil, dp(bJ)) | |
905 | 950 | ||
906 | 951 | ||
907 | 952 | ||
908 | - | @Callable( | |
909 | - | func getVotingResultStakedIntegralREADONLY ( | |
953 | + | @Callable(aI) | |
954 | + | func getVotingResultStakedIntegralREADONLY (bJ) = $Tuple2(nil, dt(bJ)) | |
910 | 955 | ||
911 | 956 | ||
912 | 957 | ||
913 | - | @Callable( | |
914 | - | func getUserVoteFinalizedREADONLY ( | |
958 | + | @Callable(aI) | |
959 | + | func getUserVoteFinalizedREADONLY (bJ,bR) = $Tuple2(nil, di(bJ, bR)) | |
915 | 960 | ||
916 | 961 | ||
917 | 962 | ||
918 | - | @Callable( | |
919 | - | func getUserVoteStakedIntegralREADONLY ( | |
963 | + | @Callable(aI) | |
964 | + | func getUserVoteStakedIntegralREADONLY (bJ,bR) = $Tuple2(nil, dD(bJ, bR)) | |
920 | 965 | ||
921 | 966 | ||
922 | - | @Verifier( | |
923 | - | func | |
924 | - | let | |
925 | - | let | |
926 | - | if ($isInstanceOf( | |
967 | + | @Verifier(fp) | |
968 | + | func fq () = { | |
969 | + | let fr = { | |
970 | + | let r = aF() | |
971 | + | if ($isInstanceOf(r, "ByteVector")) | |
927 | 972 | then { | |
928 | - | let | |
929 | - | | |
973 | + | let aK = r | |
974 | + | aK | |
930 | 975 | } | |
931 | - | else if ($isInstanceOf( | |
932 | - | then | |
976 | + | else if ($isInstanceOf(r, "Unit")) | |
977 | + | then fp.senderPublicKey | |
933 | 978 | else throw("Match error") | |
934 | 979 | } | |
935 | - | sigVerify( | |
980 | + | sigVerify(fp.bodyBytes, fp.proofs[0], fr) | |
936 | 981 | } | |
937 | 982 |
github/deemru/w8io/026f985 278.85 ms ◑