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