tx · AGsP8Ym1mk848FFLDZKoFojG7dBg2ztABQjkqkxEP2uM

3Myn55vLkduxbX3ZXfiDCZhaQsLxYp1kmCy:  -0.02300000 Waves

2023.03.14 10:06 [2489384] smart account 3Myn55vLkduxbX3ZXfiDCZhaQsLxYp1kmCy > SELF 0.00000000 Waves

{ "type": 13, "id": "AGsP8Ym1mk848FFLDZKoFojG7dBg2ztABQjkqkxEP2uM", "fee": 2300000, "feeAssetId": null, "timestamp": 1678777584503, "version": 2, "chainId": 84, "sender": "3Myn55vLkduxbX3ZXfiDCZhaQsLxYp1kmCy", "senderPublicKey": "9W33iCCNfmFxUbiC6XZcH5x7f6xfwC7Jb3BoExT5q2PV", "proofs": [ "3Bs7neZfbNkMrvLE5R85hm3cAnJMWNrkwzDnGP5YKhTyn7a199Q7T1LdoSk29NhN88jGgSkTF2ZWotjnEiB2pxg7" ], "script": "base64:BgLAJggCEggKBggIAQEBCBIFCgMBCAISAwoBARIDCgEBEgQKAggIEgQKAggIEgMKAQgSAwoBCBIDCgEIEgQKAggBEgASAwoBCBIAIgNTRVAiBlNDQUxFOCIFTVVMVDgiDlBPT0xXRUlHSFRNVUxUIgd3cmFwRXJyIgNtc2ciCHRocm93RXJyIgRzdHJmIgdhZGRyZXNzIgNrZXkiA2lveiIDaW9kIgpkZWZhdWx0VmFsIgNpb2YiA2FicyIDdmFsIgNhYWwiByRtYXRjaDAiCnZhbEFueUx5c3QiAmFpIgZ2YWxJbnQiG2tleVJlZmVycmFsc0NvbnRyYWN0QWRkcmVzcyIecmVmZXJyYWxzQ29udHJhY3RBZGRyZXNzT3JGYWlsIhZrZXlSZWZlcnJhbFByb2dyYW1OYW1lIhpyZWZlcnJhbFByb2dyYW1OYW1lRGVmYXVsdCITcmVmZXJyYWxQcm9ncmFtTmFtZSIRa2V5RmFjdG9yeUFkZHJlc3MiGElkeEZhY3RvcnlDZmdTdGFraW5nRGFwcCIZSWR4RmFjdG9yeUNmZ0Jvb3N0aW5nRGFwcCIUSWR4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MwIAgkBC0RlbGV0ZUVudHJ5AQkBAmFnAAUDbmlsCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAQJldwECZXgABAJleQQBcgkBAmFDAAMJAAECBQFyAgpCeXRlVmVjdG9yBAJhSQUBcgUCYUkDCQABAgUBcgIEVW5pdAgFAmV3D3NlbmRlclB1YmxpY0tleQkAAgECC01hdGNoIGVycm9yCQD0AwMIBQJldwlib2R5Qnl0ZXMJAJEDAggFAmV3BnByb29mcwAABQJlecET4hE=", "height": 2489384, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FzV24NVEjjqLnb7UqqJizKNRYBRrZELS3FnsSSHSfCUQ Next: 9nADWe8u2wXQ4GtPDijPpNWMpf89X1wkAox3R9brWmHt Diff:
OldNewDifferences
144144 func aj () = "%s%s__emission__startBlock"
145145
146146
147-func ak () = "%s%s__boostingV2__startBlock"
147+func ak () = "%s%s__emission__duration"
148148
149149
150-func al () = "%s%s__boostingV2__integral"
150+func al () = "%s%s__emission__endBlock"
151151
152152
153-func am () = "%s%s__emission__duration"
153+func am () = "%s__nextPeriod"
154154
155155
156-func an () = "%s%s__emission__endBlock"
156+func an () = "%s%s__gwxRewardEmissionPart__startHeight"
157157
158158
159-func ao () = "%s__nextPeriod"
159+let ao = 1
160+
161+let ap = 2
162+
163+let aq = 3
164+
165+let ar = 4
166+
167+let as = 5
168+
169+func at () = "%s__config"
160170
161171
162-func ap () = "%s%s__gwxRewardEmissionPart__startHeight"
172+func au () = split(h(this, at()), a)
163173
164174
165-let aq = 1
175+let av = addressFromStringValue(au()[as])
166176
167-let ar = 2
168-
169-let as = 3
170-
171-let at = 4
172-
173-let au = 5
174-
175-func av () = "%s__config"
177+func aw (ax,ay,az,aA,av) = makeString(["%s%d%d%d", ax, ay, az, aA, av], a)
176178
177179
178-func aw () = split(h(this, av()), a)
180+func aB (ax,ay,az,aA,av) = aw(ax, toString(ay), toString(az), toString(aA), av)
179181
180182
181-let ax = addressFromStringValue(aw()[au])
182-
183-func ay (az,aA,aB,aC,ax) = makeString(["%s%d%d%d", az, aA, aB, aC, ax], a)
184-
185-
186-func aD (az,aA,aB,aC,ax) = ay(az, toString(aA), toString(aB), toString(aC), ax)
187-
188-
189-func aE () = {
183+func aC () = {
190184 let r = getString(af())
191185 if ($isInstanceOf(r, "String"))
192186 then {
193- let aF = r
194- fromBase58String(aF)
187+ let aD = r
188+ fromBase58String(aD)
195189 }
196190 else if ($isInstanceOf(r, "Unit"))
197191 then unit
199193 }
200194
201195
202-func aG () = {
196+func aE () = {
203197 let r = getString(ag())
204198 if ($isInstanceOf(r, "String"))
205199 then {
206- let aF = r
207- fromBase58String(aF)
200+ let aD = r
201+ fromBase58String(aD)
208202 }
209203 else if ($isInstanceOf(r, "Unit"))
210204 then unit
212206 }
213207
214208
215-func aH (aI) = {
216- let aJ = throw("Permission denied")
217- let r = aE()
209+func aF (aG) = {
210+ let aH = throw("Permission denied")
211+ let r = aC()
218212 if ($isInstanceOf(r, "ByteVector"))
219213 then {
220- let aK = r
221- if ((aI.callerPublicKey == aK))
214+ let aI = r
215+ if ((aG.callerPublicKey == aI))
222216 then true
223- else aJ
217+ else aH
224218 }
225219 else if ($isInstanceOf(r, "Unit"))
226- then if ((aI.caller == this))
220+ then if ((aG.caller == this))
227221 then true
228- else aJ
222+ else aH
229223 else throw("Match error")
230224 }
231225
232226
233-let aL = 1
227+let aJ = 1
234228
235-let aM = 2
229+let aK = 2
236230
237-let aN = 3
231+let aL = 3
238232
239-let aO = 4
233+let aM = 4
240234
241-let aP = 5
235+let aN = 5
242236
243-let aQ = 6
237+let aO = 6
244238
245-func aR (aS) = makeString(["%s%s__lock", aS], a)
239+func aP (aQ) = makeString(["%s%s__lock", aQ], a)
246240
247241
248-func aT (aS) = split(h(this, aR(aS)), a)
242+func aR (aQ) = split(h(this, aP(aQ)), a)
249243
250244
251-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)
245+func aS (aT,aU,aV,aW,aX,aY,aZ,ba) = makeString(["%d%d%d%d%d%d%d%d", aT, aU, aV, aW, aX, aY, aZ, ba], a)
252246
253247
254-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))
248+func bb (aT,aU,aV,aW,aX,aY,ba) = aS(aT, toString(aU), toString(aV), toString(aW), toString(aX), toString(aY), toString(lastBlock.timestamp), toString(ba))
255249
256250
257-func be () = "%s__nextUserNum"
251+func bc () = "%s__nextUserNum"
258252
259253
260-func bf (aS) = makeString(["%s%s%s__mapping__user2num", aS], a)
254+func bd (aQ) = makeString(["%s%s%s__mapping__user2num", aQ], a)
261255
262256
263-func bg (V) = makeString(["%s%s%s__mapping__num2user", V], a)
257+func be (V) = makeString(["%s%s%s__mapping__num2user", V], a)
264258
265259
266-func bh (aV) = makeString(["%s%d%s__paramByUserNum", aV, "amount"], a)
260+func bf (aT) = makeString(["%s%d%s__paramByUserNum", aT, "amount"], a)
267261
268262
269-func bi (aV) = makeString(["%s%d%s__paramByUserNum", aV, "start"], a)
263+func bg (aT) = makeString(["%s%d%s__paramByUserNum", aT, "start"], a)
270264
271265
272-func bj (aV) = makeString(["%s%d%s__paramByUserNum", aV, "duration"], a)
266+func bh (aT) = makeString(["%s%d%s__paramByUserNum", aT, "duration"], a)
273267
274268
275-func bk (aV) = makeString(["%s%d%s__paramByUserNum", aV, "k"], a)
269+func bi (aT) = makeString(["%s%d%s__paramByUserNum", aT, "k"], a)
276270
277271
278-func bl (aV) = makeString(["%s%d%s__paramByUserNum", aV, "b"], a)
272+func bj (aT) = makeString(["%s%d%s__paramByUserNum", aT, "b"], a)
279273
280274
281-func bm (aV,bn) = makeString(["%s%d%s%d__paramByPeriod", aV, "k", bn], a)
275+func bk (aT,bl) = makeString(["%s%d%s%d__paramByPeriod", aT, "k", bl], a)
282276
283277
284-func bo (aV,bn) = makeString(["%s%d%s%d__paramByPeriod", aV, "b", bn], a)
278+func bm (aT,bl) = makeString(["%s%d%s%d__paramByPeriod", aT, "b", bl], a)
285279
286280
287-func bp () = "%s%s__stats__activeTotalLocked"
281+func bn () = "%s%s__stats__activeTotalLocked"
288282
289283
290-func bq () = "%s%s__stats__locksDurationSumInBlocks"
284+func bo () = "%s%s__stats__locksDurationSumInBlocks"
291285
292286
293-func br () = "%s%s__stats__locksCount"
287+func bp () = "%s%s__stats__locksCount"
294288
295289
296-func bs () = "%s%s__stats__activeUsersCount"
290+func bq () = "%s%s__stats__activeUsersCount"
297291
298292
299-func bt (aV) = makeString(["%s%d__userBoostEmissionLastIntV2", aV], a)
293+func br (aT) = makeString(["%s%d__userBoostEmissionLastInt", aT], a)
300294
301295
302-func bu (aV,bv) = makeString(["%s%d__userBoostEmissionLastIntV2", aV, bv], a)
296+func bs (aT,bt) = makeString(["%s%d__userBoostEmissionLastInt", aT, bt], a)
303297
304298
305-func bw (aV) = makeString(["%s%d__maxBoostInt", aV], a)
299+func bu (aT) = makeString(["%s%d__maxBoostInt", aT], a)
306300
307301
308-func bx () = "%s%s__maxBoostInt__total"
302+func bv () = "%s%s__maxBoostInt__total"
309303
310304
311-func by (aV) = makeString(["%s%d__userBoostAvaliableToClaimTotal", aV], a)
305+func bw (aT) = makeString(["%s%d__userBoostAvaliableToClaimTotal", aT], a)
312306
313307
314-func bz (aV) = makeString(["%s%d__userBoostClaimed", aV], a)
308+func bx (aT) = makeString(["%s%d__userBoostClaimed", aT], a)
315309
316310
317-func bA () = "%s%s__gwxCached__total"
311+func by () = "%s%s__gwxCached__total"
318312
319313
320-func bB () = "%s__gwxCachedTotalCorrective"
314+func bz () = "%s__gwxCachedTotalCorrective"
321315
322316
323-let bC = W()
317+let bA = W()
324318
325-let ab = Y(bC)
319+let ab = Y(bA)
326320
327-let bD = ac(ab)
321+let bB = ac(ab)
328322
329-let bE = ad(ab)
323+let bC = ad(ab)
330324
331-let bF = ae(ab)
325+let bD = ae(ab)
332326
333-let bG = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(makeString(["%s", "lpStakingPoolsContract"], a)), e("lp_staking_pools contract address is undefined"))), e("invalid lp_staking_pools contract address"))
327+let bE = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(makeString(["%s", "lpStakingPoolsContract"], a)), e("lp_staking_pools contract address is undefined"))), e("invalid lp_staking_pools contract address"))
334328
335-let bH = makeString(["%s", "votingEmissionContract"], a)
336-
337-let bI = addressFromStringValue(getStringValue(bC, bH))
338-
339-let bJ = {
340- let bK = invoke(bD, "getBoostCoeffREADONLY", nil, nil)
341- if ($isInstanceOf(bK, "Int"))
342- then bK
343- else throw(($getType(bK) + " couldn't be cast to Int"))
344- }
345-
346-func bL (bM) = {
347- let bN = makeString(["%s", "currentEpochUi"], a)
348- let bO = getIntegerValue(bI, bN)
349- let bP = makeString(["%s%s", "totalCachedGwxCorrection__activationEpoch"], a)
350- let bQ = getInteger(this, bP)
351- let bR = valueOrElse(getInteger(this, bA()), 0)
352- let bS = if (isDefined(bQ))
353- then (bO >= value(bQ))
329+func bF (bG) = {
330+ let bH = makeString(["%s", "votingEmissionContract"], a)
331+ let bI = addressFromStringValue(getStringValue(bA, bH))
332+ let bJ = makeString(["%s", "currentEpochUi"], a)
333+ let bK = getIntegerValue(bI, bJ)
334+ let bL = makeString(["%s%s", "totalCachedGwxCorrection__activationEpoch"], a)
335+ let bM = getInteger(this, bL)
336+ let bN = valueOrElse(getInteger(this, by()), 0)
337+ let bO = if (isDefined(bM))
338+ then (bK >= value(bM))
354339 else false
355- let bT = if (if (bS)
356- then bM
340+ let bP = if (if (bO)
341+ then bG
357342 else false)
358- then valueOrElse(getInteger(this, bB()), 0)
343+ then valueOrElse(getInteger(this, bz()), 0)
359344 else 0
360- max([0, (bR + bT)])
345+ max([0, (bN + bP)])
361346 }
362347
363348
364-func bU (bV,bW,aW,bX,aY,bY,bZ,aI) = {
365- let ca = makeString(["%s%s%s%s__history", bV, bW, toBase58String(aI.transactionId)], a)
366- let cb = makeString(["%d%d%d%d%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(aW), toString(bX), toString(aY), toString(bY), toString(bZ)], a)
367- StringEntry(ca, cb)
349+func bQ (bR,bS,aU,bT,aW,bU,bV,aG) = {
350+ let bW = makeString(["%s%s%s%s__history", bR, bS, toBase58String(aG.transactionId)], a)
351+ let bX = makeString(["%d%d%d%d%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(aU), toString(bT), toString(aW), toString(bU), toString(bV)], a)
352+ StringEntry(bW, bX)
368353 }
369354
370355
371-func cc (cd,ce,cf,cg) = {
372- let ch = bq()
373- let ci = br()
374- let cj = bs()
375- let ck = bp()
376- let cl = k(this, ch)
377- let cm = k(this, ci)
378- let cn = k(this, cj)
379- let co = k(this, ck)
380-[IntegerEntry(ch, (cl + ce)), IntegerEntry(ci, (cm + cf)), IntegerEntry(cj, (cn + cg)), IntegerEntry(ck, (co + cd))]
356+func bY (bZ,ca,cb,cc) = {
357+ let cd = bo()
358+ let ce = bp()
359+ let cf = bq()
360+ let cg = bn()
361+ let ch = k(this, cd)
362+ let ci = k(this, ce)
363+ let cj = k(this, cf)
364+ let ck = k(this, cg)
365+[IntegerEntry(cd, (ch + ca)), IntegerEntry(ce, (ci + cb)), IntegerEntry(cf, (cj + cc)), IntegerEntry(cg, (ck + bZ))]
381366 }
382367
383368
384-func cp (cq,cr,cs) = {
385- let ct = 1000
386- (((cq * cs) + cr) / ct)
369+func cl (cm,cn,co) = {
370+ let cp = 1000
371+ (((cm * co) + cn) / cp)
387372 }
388373
389374
390-func cu (aS,aV,aW,aX,aY,bY,bZ,bn) = {
391- let cv = bh(aV)
392- let cw = bi(aV)
393- let cx = bj(aV)
394- let cy = bk(aV)
395- let cz = bl(aV)
396- let cA = bm(aV, bn)
397- let cB = bo(aV, bn)
398- let bc = cp(bY, bZ, height)
399-[IntegerEntry(cv, aW), IntegerEntry(cw, aX), IntegerEntry(cx, aY), IntegerEntry(cy, bY), IntegerEntry(cz, bZ), IntegerEntry(cA, bY), IntegerEntry(cB, bZ), StringEntry(aR(aS), bd(aV, aW, aX, aY, bY, bZ, bc))]
375+func cq (aQ,aT,aU,aV,aW,bU,bV,bl) = {
376+ let cr = bf(aT)
377+ let cs = bg(aT)
378+ let ct = bh(aT)
379+ let cu = bi(aT)
380+ let cv = bj(aT)
381+ let cw = bk(aT, bl)
382+ let cx = bm(aT, bl)
383+ let ba = cl(bU, bV, height)
384+[IntegerEntry(cr, aU), IntegerEntry(cs, aV), IntegerEntry(ct, aW), IntegerEntry(cu, bU), IntegerEntry(cv, bV), IntegerEntry(cw, bU), IntegerEntry(cx, bV), StringEntry(aP(aQ), bb(aT, aU, aV, aW, bU, bV, ba))]
400385 }
401386
402387
403-func cC (aI,cD) = if ((size(aI.payments) > 1))
388+func cy (aG,cz) = if ((size(aG.payments) > 1))
404389 then throw("only one payment is allowed")
405- else if ((size(aI.payments) == 0))
390+ else if ((size(aG.payments) == 0))
406391 then 0
407392 else {
408- let cE = aI.payments[0]
409- if ((value(cE.assetId) != cD))
393+ let cA = aG.payments[0]
394+ if ((value(cA.assetId) != cz))
410395 then throw("invalid asset id in payment")
411- else cE.amount
396+ else cA.amount
412397 }
413398
414399
415-func cF (aS,cG) = {
416- let cH = "empty"
417- let cI = bf(aS)
418- let aV = valueOrElse(getString(cI), cH)
419- let bY = valueOrElse(getInteger(bk(aV)), 0)
420- let bZ = valueOrElse(getInteger(bl(aV)), 0)
421- let cJ = cp(bY, bZ, cG)
422- let bc = if ((0 > cJ))
400+func cB (aQ,cC) = {
401+ let cD = "empty"
402+ let cE = bd(aQ)
403+ let aT = valueOrElse(getString(cE), cD)
404+ let bU = valueOrElse(getInteger(bi(aT)), 0)
405+ let bV = valueOrElse(getInteger(bj(aT)), 0)
406+ let cF = cl(bU, bV, cC)
407+ let ba = if ((0 > cF))
423408 then 0
424- else cJ
425- bc
409+ else cF
410+ ba
426411 }
427412
428413
429-func cK (aS) = cF(aS, height)
414+func cG (aQ) = cB(aQ, height)
430415
431416
432-func cL () = {
433- let bN = makeString(["%s", "currentEpochUi"], a)
434- let cM = {
435- let bO = value(getInteger(bI, bN))
436- let cN = (bO - 1)
437- if ((0 > cN))
438- then g("invalid epoch")
439- else $Tuple2(bO, cN)
440- }
441- let bO = cM._1
442- let cN = cM._2
443- func cO (cP) = makeString(["%s%d", "startHeight", toString(cP)], a)
444-
445- let cQ = value(getInteger(bI, cO(bO)))
446- $Tuple2(cN, cQ)
447- }
448-
449-
450-func cR (cS) = {
451- let cT = 4
452- let cU = 5
453- let cV = {
454- let bK = invoke(bC, "getPoolConfigByLpAssetId", [cS], nil)
455- if ($isInstanceOf(bK, "List[Any]"))
456- then bK
457- else throw(($getType(bK) + " couldn't be cast to List[Any]"))
458- }
459- let cW = {
460- let bK = cV[cT]
461- if ($isInstanceOf(bK, "String"))
462- then bK
463- else throw(($getType(bK) + " couldn't be cast to String"))
464- }
465- let cX = {
466- let bK = cV[cU]
467- if ($isInstanceOf(bK, "String"))
468- then bK
469- else throw(($getType(bK) + " couldn't be cast to String"))
470- }
471- $Tuple2(cW, cX)
472- }
473-
474-
475-func cY (cW,cX,i,cP) = makeString(["%s%s%s%s%d", "vote", cW, cX, toString(i), toString(cP)], a)
476-
477-
478-func cZ (cS,cP) = makeString(["%s%s%d", "votingResultStaked", cS, toString(cP)], a)
479-
480-
481-func da (cS,cP) = makeString(["%s%s%d", "votingResultStakedIntegral", cS, toString(cP)], a)
482-
483-
484-func db (cS,cP) = makeString(["%s%s%d", "votingResultStakedIntegralLastUpdateHeight", cS, toString(cP)], a)
485-
486-
487-func dc (cS,i,cP) = makeString(["%s%s%s%d", "votingResultStakedIntegralLast", cS, toString(i), toString(cP)], a)
488-
489-
490-func dd (cS,i,cP) = makeString(["%s%s%s%d", "voteStakedIntegral", cS, toString(i), toString(cP)], a)
491-
492-
493-func de (cS,i,cP) = makeString(["%s%s%s%d", "voteStakedIntegralLastUpdateHeight", cS, toString(i), toString(cP)], a)
494-
495-
496-func df (cS,i,cP) = makeString(["%s%s%s%d", "voteStakedIntegralLast", cS, toString(i), toString(cP)], a)
497-
498-
499-func dg (dh,cS) = makeString(["%s%s%s", "staked", dh, cS], a)
500-
501-
502-func di (cS,dh) = {
503- let aS = addressFromStringValue(dh)
504- let dj = cL()
505- let cN = dj._1
506- let cQ = dj._2
507- let dk = cR(cS)
508- let cW = dk._1
509- let cX = dk._2
510- let dl = cY(cW, cX, aS, cN)
511- let dm = valueOrElse(getInteger(bI, dl), 0)
512- dm
513- }
514-
515-
516-func dn (cS,dh) = {
517- let do = valueOrElse(getInteger(bE, dg(dh, cS)), 0)
518- let dm = di(cS, dh)
519- if ((do == 0))
520- then 0
521- else dm
522- }
523-
524-
525-func dp (cS) = {
526- let dq = cL()
527- let cN = dq._1
528- let cQ = dq._2
529- let dr = valueOrElse(getInteger(bI, cZ(cS, cN)), 0)
530- let ds = valueOrElse(getInteger(this, cZ(cS, cN)), dr)
531- ds
532- }
533-
534-
535-func dt (cS,du) = {
536- let dv = cL()
537- let cN = dv._1
538- let cQ = dv._2
539- let ds = dp(cS)
540- let dw = (ds + du)
541- let dx = da(cS, cN)
542- let dy = valueOrElse(getInteger(this, dx), 0)
543- let dz = db(cS, cN)
544- let dA = valueOrElse(getInteger(this, dz), cQ)
545- let dB = (height - dA)
546- let dC = ((dB * ds) + dy)
547- $Tuple2([IntegerEntry(cZ(cS, cN), dw), IntegerEntry(dz, height), IntegerEntry(dx, dC)], dC)
548- }
549-
550-
551-func dD (cS,dh,dE) = {
552- let dF = cL()
553- let cN = dF._1
554- let cQ = dF._2
555- let aS = addressFromStringValue(dh)
556- let cT = 4
557- let cU = 5
558- let cV = {
559- let bK = invoke(bC, "getPoolConfigByLpAssetId", [cS], nil)
560- if ($isInstanceOf(bK, "List[Any]"))
561- then bK
562- else throw(($getType(bK) + " couldn't be cast to List[Any]"))
563- }
564- let cW = {
565- let bK = cV[cT]
566- if ($isInstanceOf(bK, "String"))
567- then bK
568- else throw(($getType(bK) + " couldn't be cast to String"))
569- }
570- let cX = {
571- let bK = cV[cU]
572- if ($isInstanceOf(bK, "String"))
573- then bK
574- else throw(($getType(bK) + " couldn't be cast to String"))
575- }
576- let dm = valueOrElse(getInteger(bI, cY(cW, cX, aS, cN)), 0)
577- let dG = if ((dm == 0))
578- then nil
579- else {
580- let du = if (dE)
581- then dm
582- else -(dm)
583- let dH = dt(cS, du)
584- let dI = dH._1
585- let dC = dH._2
586- let dJ = if (dE)
587- then 0
588- else dm
589- let dK = dd(cS, aS, cN)
590- let dL = valueOrElse(getInteger(this, dK), 0)
591- let dM = de(cS, aS, cN)
592- let dN = valueOrElse(getInteger(this, dM), cQ)
593- let dO = (height - dN)
594- let dP = ((dO * dJ) + dL)
595- let dQ = [IntegerEntry(dM, height), IntegerEntry(dK, dP)]
596- (dI ++ dQ)
597- }
598- dG
599- }
600-
601-
602-func dR (cS,dh) = {
603- let dS = cL()
604- let cN = dS._1
605- let cQ = dS._2
606- let aS = addressFromStringValue(dh)
607- let dJ = dn(cS, dh)
608- let ds = dp(cS)
609- let dL = valueOrElse(getInteger(this, dd(cS, aS, cN)), 0)
610- let dy = valueOrElse(getInteger(this, da(cS, cN)), 0)
611- let dN = valueOrElse(getInteger(this, de(cS, aS, cN)), cQ)
612- let dA = valueOrElse(getInteger(this, db(cS, cN)), cQ)
613- let dK = df(cS, aS, cN)
614- let dT = valueOrElse(getInteger(this, dK), 0)
615- let dx = dc(cS, aS, cN)
616- let dU = valueOrElse(getInteger(this, dx), 0)
617- let dO = (height - dN)
618- let dB = (height - dA)
619- let dP = ((dO * dJ) + dL)
620- let dC = ((dB * ds) + dy)
621- let dV = (dP - dT)
622- let dW = (dC - dU)
623- $Tuple3([IntegerEntry(dK, dP), IntegerEntry(dx, dC)], dV, dW)
624- }
625-
626-
627-func dX () = {
628- let dY = n(bD, ah())
629- let dZ = getInteger(bD, ak())
630- let ea = getInteger(this, al())
631- let eb = n(bD, an())
632- let cs = if ((height > eb))
633- then eb
634- else height
635- let ec = {
636- let r = dZ
637- if ($isInstanceOf(r, "Int"))
638- then {
639- let ed = r
640- max([(cs - ed), 0])
641- }
642- else if ($isInstanceOf(r, "Unit"))
643- then 0
644- else throw("Match error")
645- }
646- let ee = ((dY * (bJ - 1)) / bJ)
647- let ef = valueOrElse(ea, 0)
648- let eg = ((ee * ec) + ef)
649- $Tuple2([IntegerEntry(al(), eg), IntegerEntry(ak(), height)], eg)
650- }
651-
652-
653-func eh (cS,dh,ei) = {
654- let ej = getString(this, aR(dh))
655- if ((ej == unit))
417+func cH (cI,cJ,cK) = {
418+ let cD = "EMPTY"
419+ let cL = valueOrElse(getString(this, aP(cJ)), cD)
420+ if ((cL == cD))
656421 then $Tuple3(0, nil, "userRecord::is::empty")
657422 else {
658- let ek = split(value(ej), a)
659- let el = ek[aL]
660- let em = "empty"
661- let en = if ((cS != em))
423+ let cM = split(cL, a)
424+ let cN = cM[aJ]
425+ let cO = valueOrElse(getInteger(bD, an()), 0)
426+ let cP = "empty"
427+ let cQ = if ((cI != cP))
662428 then {
663- let eo = valueOrErrorMessage(getString(bC, N(cS)), ("unsupported lp asset " + cS))
664- getIntegerValue(bC, R(eo))
429+ let cR = valueOrErrorMessage(getString(bA, N(cI)), ("unsupported lp asset " + cI))
430+ let cS = getIntegerValue(bA, R(cR))
431+ let cT = valueOrElse(getInteger(bA, T(cR, 0)), cS)
432+ $Tuple2(cT, cS)
665433 }
666- else if (ei)
667- then 0
668- else throw(("not readonly mode: unsupported lp asset " + cS))
669- let ep = bu(el, cS)
670- let eq = bt(el)
671- let er = valueOrElse(getInteger(this, ep), k(this, eq))
672- let eg = dX()._2
673- let es = (eg - er)
674- if ((0 > es))
675- then throw("wrong calculations")
676- else {
677- let et = dR(cS, dh)
678- let eu = et._1
679- let ev = et._2
680- let ew = et._3
681- let ex = fraction(es, en, d)
682- let ey = if ((ew == 0))
683- then 0
684- else fraction(ex, ev, ew)
685- let ez = ([IntegerEntry(ep, eg)] ++ eu)
686- let eA = makeString([toString(er), toString(es), toString(en), toString(ev), toString(ew)], ":")
687- $Tuple3(ey, ez, eA)
688- }
434+ else if (cK)
435+ then $Tuple2(0, 0)
436+ else throw(("not readonly mode: unsupported lp asset " + cI))
437+ let cU = cQ._1
438+ let cV = cQ._2
439+ let cW = n(bB, ah())
440+ let cX = n(bB, aj())
441+ let cY = n(bB, al())
442+ let co = if ((height > cY))
443+ then cY
444+ else height
445+ let cZ = max([(co - cX), 0])
446+ let da = bs(cN, cI)
447+ let db = br(cN)
448+ let dc = valueOrElse(getInteger(this, da), k(this, db))
449+ let dd = (((cW * cZ) * 2) / 3)
450+ let de = (dd - dc)
451+ let df = fraction(de, 3, (2 * cW))
452+ let dg = (co - df)
453+ let dh = max([(cO - dg), 0])
454+ let di = ((co - dg) - dh)
455+ if (if (if ((0 > dg))
456+ then true
457+ else (0 > di))
458+ then true
459+ else (o(((dh + di) - df)) >= 1))
460+ then throw(((((((((((("invalid udh calc: udh=" + toString(df)) + " uLastH=") + toString(dg)) + " udh0=") + toString(dh)) + " udh1=") + toString(di)) + " lpAssetId=") + cI) + " userAddress=") + cJ))
461+ else if ((0 > de))
462+ then throw("wrong calculations")
463+ else {
464+ let dj = bu(cN)
465+ let dk = bv()
466+ let dl = k(this, dj)
467+ let dm = k(this, dk)
468+ let dn = bF(true)
469+ let do = cG(cJ)
470+ let dp = bw(cN)
471+ let dq = k(this, dp)
472+ let dr = if ((df == 0))
473+ then 0
474+ else fraction(de, dh, df)
475+ let ds = if ((df == 0))
476+ then 0
477+ else fraction(de, di, df)
478+ let dt = fraction(dr, cU, d)
479+ let du = fraction(ds, cV, d)
480+ let dv = if ((dn == 0))
481+ then 0
482+ else fraction(dt, do, dn)
483+ let dw = if ((dn == 0))
484+ then 0
485+ else fraction(du, do, dn)
486+ let dx = (dv + dw)
487+ let dy = bx(cN)
488+ let dz = k(this, dy)
489+ let dA = (dx - dz)
490+ let dB = [IntegerEntry(da, dd)]
491+ let dC = makeString([toString(dc), toString(de), toString(dz), toString(dA), toString(cU), toString(cV), toString(co), toString(df), toString(dg), toString(dh), toString(di), toString(do), toString(dn)], ":")
492+ $Tuple3(dx, dB, dC)
493+ }
689494 }
690495 }
691496
692497
693-func eB (aI,aY) = {
694- let eC = aw()
695- let eD = eC[aq]
696- let az = fromBase58String(eD)
697- let aA = parseIntValue(eC[ar])
698- let aB = parseIntValue(eC[as])
699- let aC = parseIntValue(eC[at])
700- if ((size(aI.payments) != 1))
498+func dD (aG,aW) = {
499+ let dE = au()
500+ let dF = dE[ao]
501+ let ax = fromBase58String(dF)
502+ let ay = parseIntValue(dE[ap])
503+ let az = parseIntValue(dE[aq])
504+ let aA = parseIntValue(dE[ar])
505+ if ((size(aG.payments) != 1))
701506 then throw("invalid payment - exact one payment must be attached")
702507 else {
703- let cE = aI.payments[0]
704- let eE = cE.amount
705- if ((az != value(cE.assetId)))
706- then throw((("invalid asset is in payment - " + eD) + " is expected"))
508+ let cA = aG.payments[0]
509+ let dG = cA.amount
510+ if ((ax != value(cA.assetId)))
511+ then throw((("invalid asset is in payment - " + dF) + " is expected"))
707512 else {
708- let eF = be()
709- let dh = toString(aI.caller)
710- let eG = isDefined(getString(bf(dh)))
711- let el = if (eG)
712- then value(getString(bf(dh)))
713- else toString(n(this, eF))
714- let aV = parseIntValue(el)
715- let bX = height
716- let cw = bi(el)
717- let cx = bj(el)
718- let cv = bh(el)
719- if (if ((aA > eE))
720- then (aI.caller != bG)
513+ let dH = bc()
514+ let cJ = toString(aG.caller)
515+ let dI = isDefined(getString(bd(cJ)))
516+ let cN = if (dI)
517+ then value(getString(bd(cJ)))
518+ else toString(n(this, dH))
519+ let aT = parseIntValue(cN)
520+ let bT = height
521+ let cs = bg(cN)
522+ let ct = bh(cN)
523+ let cr = bf(cN)
524+ if (if ((ay > dG))
525+ then (aG.caller != bE)
721526 else false)
722- then throw(("amount is less then minLockAmount=" + toString(aA)))
723- else if ((aB > aY))
724- then throw(("passed duration is less then minLockDuration=" + toString(aB)))
725- else if ((aY > aC))
726- then throw(("passed duration is greater then maxLockDuration=" + toString(aC)))
727- else if (if (eG)
728- then ((n(this, cw) + n(this, cx)) >= bX)
527+ then throw(("amount is less then minLockAmount=" + toString(ay)))
528+ else if ((az > aW))
529+ then throw(("passed duration is less then minLockDuration=" + toString(az)))
530+ else if ((aW > aA))
531+ then throw(("passed duration is greater then maxLockDuration=" + toString(aA)))
532+ else if (if (dI)
533+ then ((n(this, cs) + n(this, ct)) >= bT)
729534 else false)
730535 then throw("there is an active lock - consider to use increaseLock")
731- else if ((k(this, cv) > 0))
732- then throw(("there are locked WXs - consider to use increaseLock " + cv))
536+ else if ((k(this, cr) > 0))
537+ then throw(("there are locked WXs - consider to use increaseLock " + cr))
733538 else {
734- let eH = fraction(aY, c, aC)
735- let eI = fraction(eE, eH, c)
736- let eJ = q(invoke(ax, "calcGwxParamsREADONLY", [eI, bX, aY], nil))
737- let bY = t(eJ[0])
738- let bZ = t(eJ[1])
739- let bn = toString(t(eJ[2]))
740- let bR = bL(false)
741- let eq = bt(el)
742- let eg = dX()._2
743- let eK = if (eG)
539+ let dJ = fraction(aW, c, aA)
540+ let dK = fraction(dG, dJ, c)
541+ let dL = q(invoke(av, "calcGwxParamsREADONLY", [dK, bT, aW], nil))
542+ let bU = t(dL[0])
543+ let bV = t(dL[1])
544+ let bl = toString(t(dL[2]))
545+ let cW = n(bB, ah())
546+ let cX = n(bB, aj())
547+ let cY = n(bB, al())
548+ let co = if ((height > cY))
549+ then cY
550+ else height
551+ let cZ = max([(co - cX), 0])
552+ let db = br(cN)
553+ let dd = (((cW * cZ) * 2) / 3)
554+ let dj = bu(cN)
555+ let dk = bv()
556+ let dl = ((dK * aW) / 2)
557+ let dm = k(this, dk)
558+ let bN = bF(false)
559+ let dM = if (dI)
744560 then nil
745- else [IntegerEntry(eF, (aV + 1)), StringEntry(bf(dh), el), StringEntry(bg(el), dh)]
746- $Tuple2(((((eK ++ cu(dh, el, eE, bX, aY, bY, bZ, bn)) ++ cc(eE, aY, 1, if (eG)
561+ else [IntegerEntry(dH, (aT + 1)), StringEntry(bd(cJ), cN), StringEntry(be(cN), cJ)]
562+ $Tuple2(((((dM ++ cq(cJ, cN, dG, bT, aW, bU, bV, bl)) ++ bY(dG, aW, 1, if (dI)
747563 then 0
748- else 1)) :+ bU("lock", dh, eE, bX, aY, bY, bZ, aI)) ++ [IntegerEntry(eq, eg), IntegerEntry(bA(), (bR + eI))]), eI)
564+ else 1)) :+ bQ("lock", cJ, dG, bT, aW, bU, bV, aG)) ++ [IntegerEntry(db, dd), IntegerEntry(by(), (bN + dK))]), dK)
749565 }
750566 }
751567 }
752568 }
753569
754570
755-@Callable(aI)
756-func constructor (eL,eM,aA,eN,eO,ax) = {
757- let eP = aH(aI)
758- if ((eP == eP))
759- then ([IntegerEntry(be(), 0), StringEntry(av(), aD(eM, aA, eN, eO, ax)), StringEntry(A(), eL)] ++ cc(0, 0, 0, 0))
571+@Callable(aG)
572+func constructor (dN,dO,ay,dP,dQ,av) = {
573+ let dR = aF(aG)
574+ if ((dR == dR))
575+ then ([IntegerEntry(bc(), 0), StringEntry(at(), aB(dO, ay, dP, dQ, av)), StringEntry(A(), dN)] ++ bY(0, 0, 0, 0))
760576 else throw("Strict value is not equal to itself.")
761577 }
762578
763579
764580
765-@Callable(aI)
766-func lockRef (aY,eQ,eR) = {
767- let eS = eB(aI, aY)
768- let eT = eS._1
769- let eI = eS._2
770- let eU = toString(aI.caller)
771- let eV = if (if ((eQ == ""))
581+@Callable(aG)
582+func lockRef (aW,dS,dT) = {
583+ let dU = dD(aG, aW)
584+ let dV = dU._1
585+ let dK = dU._2
586+ let dW = toString(aG.caller)
587+ let dX = if (if ((dS == ""))
772588 then true
773- else (eR == base58''))
589+ else (dT == base58''))
774590 then unit
775- else invoke(w, "createPair", [z, eQ, eU, eR], nil)
776- if ((eV == eV))
591+ else invoke(w, "createPair", [z, dS, dW, dT], nil)
592+ if ((dX == dX))
777593 then {
778- let eW = invoke(ax, "updateReferralActivity", [toString(aI.caller), eI], nil)
779- if ((eW == eW))
780- then $Tuple2(eT, unit)
594+ let dY = invoke(av, "updateReferralActivity", [toString(aG.caller), dK], nil)
595+ if ((dY == dY))
596+ then $Tuple2(dV, unit)
781597 else throw("Strict value is not equal to itself.")
782598 }
783599 else throw("Strict value is not equal to itself.")
785601
786602
787603
788-@Callable(aI)
789-func lock (aY) = {
790- let eX = eB(aI, aY)
791- let eT = eX._1
792- let eI = eX._2
793- let eW = invoke(ax, "updateReferralActivity", [toString(aI.caller), eI], nil)
794- if ((eW == eW))
795- then $Tuple2(eT, unit)
604+@Callable(aG)
605+func lock (aW) = {
606+ let dZ = dD(aG, aW)
607+ let dV = dZ._1
608+ let dK = dZ._2
609+ let dY = invoke(av, "updateReferralActivity", [toString(aG.caller), dK], nil)
610+ if ((dY == dY))
611+ then $Tuple2(dV, unit)
796612 else throw("Strict value is not equal to itself.")
797613 }
798614
799615
800616
801-@Callable(aI)
802-func increaseLock (eY) = {
803- let eC = aw()
804- let eD = eC[aq]
805- let az = fromBase58String(eD)
806- let aB = parseIntValue(eC[as])
807- let aC = parseIntValue(eC[at])
808- let eE = cC(aI, az)
809- let dh = toString(aI.caller)
810- let ek = aT(dh)
811- let el = ek[aL]
812- let eZ = parseIntValue(ek[aM])
813- let bX = parseIntValue(ek[aN])
814- let fa = parseIntValue(ek[aO])
815- let fb = (bX + fa)
816- let fc = max([(fb - height), 0])
817- let fd = (eZ + eE)
818- let fe = (fc + eY)
819- if ((0 > eY))
617+@Callable(aG)
618+func increaseLock (ea) = {
619+ let dE = au()
620+ let dF = dE[ao]
621+ let ax = fromBase58String(dF)
622+ let az = parseIntValue(dE[aq])
623+ let aA = parseIntValue(dE[ar])
624+ let dG = cy(aG, ax)
625+ let cJ = toString(aG.caller)
626+ let cM = aR(cJ)
627+ let cN = cM[aJ]
628+ let eb = parseIntValue(cM[aK])
629+ let bT = parseIntValue(cM[aL])
630+ let ec = parseIntValue(cM[aM])
631+ let ed = (bT + ec)
632+ let ee = max([(ed - height), 0])
633+ let ef = (eb + dG)
634+ let eg = (ee + ea)
635+ if ((0 > ea))
820636 then throw("duration is less then zero")
821- else if ((aB > fe))
822- then throw(("lockDurationNew is less then minLockDuration=" + toString(aB)))
823- else if ((fe > aC))
824- then throw(("deltaDuration + existedLockDuration is greater then maxLockDuration=" + toString(aC)))
637+ else if ((az > eg))
638+ then throw(("lockDurationNew is less then minLockDuration=" + toString(az)))
639+ else if ((eg > aA))
640+ then throw(("deltaDuration + existedLockDuration is greater then maxLockDuration=" + toString(aA)))
825641 else {
826- let eH = fraction(fe, c, aC)
827- let eI = fraction(fd, eH, c)
828- let eW = invoke(ax, "updateReferralActivity", [toString(aI.caller), eI], nil)
829- if ((eW == eW))
642+ let dJ = fraction(eg, c, aA)
643+ let dK = fraction(ef, dJ, c)
644+ let dY = invoke(av, "updateReferralActivity", [toString(aG.caller), dK], nil)
645+ if ((dY == dY))
830646 then {
831- let ff = height
832- let eJ = q(invoke(ax, "calcGwxParamsREADONLY", [eI, ff, fe], nil))
833- let bY = t(eJ[0])
834- let bZ = t(eJ[1])
835- let bn = toString(t(eJ[2]))
836- let fg = cK(dh)
837- let fh = (eI - fg)
838- if ((0 > fh))
839- then throw(("gwxDiff is less then 0: " + toString(fh)))
647+ let eh = height
648+ let dL = q(invoke(av, "calcGwxParamsREADONLY", [dK, eh, eg], nil))
649+ let bU = t(dL[0])
650+ let bV = t(dL[1])
651+ let bl = toString(t(dL[2]))
652+ let cW = n(bB, ah())
653+ let cX = n(bB, aj())
654+ let cY = n(bB, al())
655+ let co = if ((height > cY))
656+ then cY
657+ else height
658+ let cZ = max([(co - cX), 0])
659+ let db = br(cN)
660+ let dc = k(this, db)
661+ let dd = (((cW * cZ) * 2) / 3)
662+ let de = (dd - dc)
663+ if ((0 > de))
664+ then throw("wrong calculations")
840665 else {
841- let bR = bL(false)
842- let fi = bL(true)
843- (((cu(dh, el, fd, ff, fe, bY, bZ, bn) ++ cc(eE, eY, 0, 0)) :+ bU("lock", dh, eE, bX, fe, bY, bZ, aI)) ++ [IntegerEntry(bA(), (bR + fh))])
666+ let dj = bu(cN)
667+ let dk = bv()
668+ let dl = k(this, dj)
669+ let dm = k(this, dk)
670+ let ei = cG(cJ)
671+ let ej = (dK - ei)
672+ if ((0 > ej))
673+ then throw(("gwxDiff is less then 0: " + toString(ej)))
674+ else {
675+ let bN = bF(false)
676+ let dn = bF(true)
677+ let dp = bw(cN)
678+ let dq = k(this, dp)
679+ let dx = fraction(de, ei, dn)
680+ let ek = ((dK * eg) / 2)
681+ let el = ((ei * ee) / 2)
682+ let em = (ek - el)
683+ (((cq(cJ, cN, ef, eh, eg, bU, bV, bl) ++ bY(dG, ea, 0, 0)) :+ bQ("lock", cJ, dG, bT, eg, bU, bV, aG)) ++ [IntegerEntry(by(), (bN + ej))])
684+ }
844685 }
845686 }
846687 else throw("Strict value is not equal to itself.")
849690
850691
851692
852-@Callable(aI)
853-func claimWxBoost (cS,dh) = if ((bE != aI.caller))
693+@Callable(aG)
694+func claimWxBoost (cI,cJ) = if ((bC != aG.caller))
854695 then throw("permissions denied")
855696 else {
856- let fj = eh(cS, dh, false)
857- let fk = fj._1
858- let ez = fj._2
859- let eA = fj._3
860- $Tuple2(ez, [fk])
697+ let en = cH(cI, cJ, false)
698+ let dA = en._1
699+ let dB = en._2
700+ let dC = en._3
701+ $Tuple2(dB, [dA])
861702 }
862703
863704
864705
865-@Callable(aI)
866-func claimWxBoostREADONLY (cS,dh) = {
867- let fl = eh(cS, dh, true)
868- let fk = fl._1
869- let ez = fl._2
870- let eA = fl._3
871- $Tuple2(nil, [fk, eA])
706+@Callable(aG)
707+func claimWxBoostREADONLY (cI,cJ) = {
708+ let eo = cH(cI, cJ, true)
709+ let dA = eo._1
710+ let dB = eo._2
711+ let dC = eo._3
712+ $Tuple2(nil, [dA, dC])
872713 }
873714
874715
875716
876-@Callable(aI)
877-func unlock (aS) = {
878- let ek = aT(aS)
879- let el = ek[aL]
880- let eZ = parseIntValue(ek[aM])
881- let bX = parseIntValue(ek[aN])
882- let fa = parseIntValue(ek[aO])
883- let fb = (bX + fa)
884- let eC = aw()
885- let az = fromBase58String(eC[aq])
886- if ((fb >= height))
887- then throw((("wait " + toString(fb)) + " to unlock"))
888- else if ((0 >= eZ))
717+@Callable(aG)
718+func unlock (aQ) = {
719+ let cM = aR(aQ)
720+ let cN = cM[aJ]
721+ let eb = parseIntValue(cM[aK])
722+ let bT = parseIntValue(cM[aL])
723+ let ec = parseIntValue(cM[aM])
724+ let ed = (bT + ec)
725+ let dE = au()
726+ let ax = fromBase58String(dE[ao])
727+ if ((ed >= height))
728+ then throw((("wait " + toString(ed)) + " to unlock"))
729+ else if ((0 >= eb))
889730 then throw("nothing to unlock")
890731 else {
891- let bn = valueOrElse(getInteger(ax, ao()), 0)
892- (((cu(aS, el, 0, bX, fa, 0, 0, toString(bn)) ++ cc(-(eZ), 0, 0, -1)) :+ bU("unlock", aS, eZ, bX, fa, 0, 0, aI)) :+ ScriptTransfer(addressFromStringValue(aS), eZ, az))
732+ let bl = valueOrElse(getInteger(av, am()), 0)
733+ (((cq(aQ, cN, 0, bT, ec, 0, 0, toString(bl)) ++ bY(-(eb), 0, 0, -1)) :+ bQ("unlock", aQ, eb, bT, ec, 0, 0, aG)) :+ ScriptTransfer(addressFromStringValue(aQ), eb, ax))
893734 }
894735 }
895736
896737
897738
898-@Callable(aI)
899-func gwxUserInfoREADONLY (aS) = {
900- let bc = cK(aS)
901- $Tuple2(nil, [bc])
739+@Callable(aG)
740+func gwxUserInfoREADONLY (aQ) = {
741+ let ba = cG(aQ)
742+ $Tuple2(nil, [ba])
902743 }
903744
904745
905746
906-@Callable(aI)
907-func userMaxDurationREADONLY (dh) = {
908- let eC = aw()
909- let aC = parseIntValue(eC[at])
910- let ej = getString(this, aR(dh))
911- if ((ej == unit))
912- then $Tuple2(nil, $Tuple2("lock", aC))
747+@Callable(aG)
748+func userMaxDurationREADONLY (cJ) = {
749+ let dE = au()
750+ let aA = parseIntValue(dE[ar])
751+ let ep = getString(this, aP(cJ))
752+ if ((ep == unit))
753+ then $Tuple2(nil, $Tuple2("lock", aA))
913754 else {
914- let ek = split(value(ej), a)
915- let bX = parseIntValue(ek[aN])
916- let fa = parseIntValue(ek[aO])
917- let fb = (bX + fa)
918- let fc = max([(fb - height), 0])
919- let fm = (aC - fc)
920- $Tuple2(nil, $Tuple2("increaseLock", fm))
755+ let cM = split(value(ep), a)
756+ let bT = parseIntValue(cM[aL])
757+ let ec = parseIntValue(cM[aM])
758+ let ed = (bT + ec)
759+ let ee = max([(ed - height), 0])
760+ let eq = (aA - ee)
761+ $Tuple2(nil, $Tuple2("increaseLock", eq))
921762 }
922763 }
923764
924765
925766
926-@Callable(aI)
927-func getUserGwxAmountAtHeightREADONLY (aS,cG) = {
928- let bc = cF(aS, cG)
929- $Tuple2(nil, bc)
767+@Callable(aG)
768+func getUserGwxAmountAtHeightREADONLY (aQ,cC) = {
769+ let ba = cB(aQ, cC)
770+ $Tuple2(nil, ba)
930771 }
931772
932773
933774
934-@Callable(aI)
935-func getTotalCachedGwxREADONLY () = $Tuple2(nil, bL(true))
775+@Callable(aG)
776+func getTotalCachedGwxREADONLY () = $Tuple2(nil, bF(true))
936777
937778
938779
939-@Callable(aI)
940-func onBoostEmissionUpdate () = {
941- let eP = if ((aI.caller == bD))
942- then true
943- else aH(aI)
944- if ((eP == eP))
945- then dX()
946- else throw("Strict value is not equal to itself.")
947- }
948-
949-
950-
951-@Callable(aI)
952-func onStakedVoteUpdate (cS,dh,dE) = {
953- let eP = if ((aI.caller == bE))
954- then true
955- else aH(aI)
956- if ((eP == eP))
780+@Callable(aG)
781+func setManager (er) = {
782+ let dR = aF(aG)
783+ if ((dR == dR))
957784 then {
958- let dG = dD(cS, dh, dE)
959- $Tuple2(dG, unit)
960- }
961- else throw("Strict value is not equal to itself.")
962- }
963-
964-
965-
966-@Callable(aI)
967-func getVotingResultStakedREADONLY (cS) = $Tuple2(nil, dp(cS))
968-
969-
970-
971-@Callable(aI)
972-func getUserVoteFinalizedREADONLY (cS,dh) = $Tuple2(nil, di(cS, dh))
973-
974-
975-
976-@Callable(aI)
977-func setManager (fn) = {
978- let eP = aH(aI)
979- if ((eP == eP))
980- then {
981- let fo = fromBase58String(fn)
982- if ((fo == fo))
983- then [StringEntry(ag(), fn)]
785+ let es = fromBase58String(er)
786+ if ((es == es))
787+ then [StringEntry(ag(), er)]
984788 else throw("Strict value is not equal to itself.")
985789 }
986790 else throw("Strict value is not equal to itself.")
988792
989793
990794
991-@Callable(aI)
795+@Callable(aG)
992796 func confirmManager () = {
993- let fp = aG()
994- let fq = if (isDefined(fp))
797+ let et = aE()
798+ let eu = if (isDefined(et))
995799 then true
996800 else throw("No pending manager")
997- if ((fq == fq))
801+ if ((eu == eu))
998802 then {
999- let fr = if ((aI.callerPublicKey == value(fp)))
803+ let ev = if ((aG.callerPublicKey == value(et)))
1000804 then true
1001805 else throw("You are not pending manager")
1002- if ((fr == fr))
1003- then [StringEntry(af(), toBase58String(value(fp))), DeleteEntry(ag())]
806+ if ((ev == ev))
807+ then [StringEntry(af(), toBase58String(value(et))), DeleteEntry(ag())]
1004808 else throw("Strict value is not equal to itself.")
1005809 }
1006810 else throw("Strict value is not equal to itself.")
1007811 }
1008812
1009813
1010-@Verifier(fs)
1011-func ft () = {
1012- let fu = {
1013- let r = aE()
814+@Verifier(ew)
815+func ex () = {
816+ let ey = {
817+ let r = aC()
1014818 if ($isInstanceOf(r, "ByteVector"))
1015819 then {
1016- let aK = r
1017- aK
820+ let aI = r
821+ aI
1018822 }
1019823 else if ($isInstanceOf(r, "Unit"))
1020- then fs.senderPublicKey
824+ then ew.senderPublicKey
1021825 else throw("Match error")
1022826 }
1023- sigVerify(fs.bodyBytes, fs.proofs[0], fu)
827+ sigVerify(ew.bodyBytes, ew.proofs[0], ey)
1024828 }
1025829
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "__"
55
66 let b = 8
77
88 let c = 100000000
99
1010 let d = c
1111
1212 func e (f) = makeString(["boosting.ride:", f], " ")
1313
1414
1515 func g (f) = throw(e(f))
1616
1717
1818 func h (i,j) = valueOrErrorMessage(getString(i, j), (("mandatory this." + j) + " is not defined"))
1919
2020
2121 func k (i,j) = valueOrElse(getInteger(i, j), 0)
2222
2323
2424 func l (i,j,m) = valueOrElse(getInteger(i, j), m)
2525
2626
2727 func n (i,j) = valueOrErrorMessage(getInteger(i, j), (("mandatory this." + j) + " is not defined"))
2828
2929
3030 func o (p) = if ((0 > p))
3131 then -(p)
3232 else p
3333
3434
3535 func q (p) = {
3636 let r = p
3737 if ($isInstanceOf(r, "List[Any]"))
3838 then {
3939 let s = r
4040 s
4141 }
4242 else throw("fail to cast into List[Any]")
4343 }
4444
4545
4646 func t (p) = {
4747 let r = p
4848 if ($isInstanceOf(r, "Int"))
4949 then {
5050 let u = r
5151 u
5252 }
5353 else throw("fail to cast into Int")
5454 }
5555
5656
5757 func v () = makeString(["%s%s", "config", "referralsContractAddress"], a)
5858
5959
6060 let w = addressFromStringValue(h(this, v()))
6161
6262 let x = makeString(["%s%s", "referral", "programName"], a)
6363
6464 let y = "wxlock"
6565
6666 let z = valueOrElse(getString(this, x), y)
6767
6868 func A () = "%s%s__config__factoryAddress"
6969
7070
7171 let B = 1
7272
7373 let C = 2
7474
7575 let D = 3
7676
7777 let E = 4
7878
7979 let F = 5
8080
8181 let G = 6
8282
8383 let H = 7
8484
8585 let I = 8
8686
8787 let J = 9
8888
8989 let K = 10
9090
9191 let L = 11
9292
9393 func M () = "%s__factoryConfig"
9494
9595
9696 func N (O) = makeString(["%s%s%s", O, "mappings__lpAsset2PoolContract"], a)
9797
9898
9999 func P () = "%s__lpTokensList"
100100
101101
102102 func Q (O) = makeString(["%s%s%s", O, "mappings__lpAsset2PoolContract"], a)
103103
104104
105105 func R (S) = makeString(["%s%s", "poolWeight", S], a)
106106
107107
108108 func T (U,V) = ((("%s%s__poolWeight__" + U) + "__") + toString(V))
109109
110110
111111 func W () = addressFromStringValue(h(this, A()))
112112
113113
114114 func X () = split(valueOrElse(getString(W(), P()), ""), a)
115115
116116
117117 func Y (Z) = split(h(Z, M()), a)
118118
119119
120120 func aa (ab) = addressFromStringValue(ab[C])
121121
122122
123123 func ac (ab) = addressFromStringValue(ab[F])
124124
125125
126126 func ad (ab) = addressFromStringValue(ab[B])
127127
128128
129129 func ae (ab) = addressFromStringValue(ab[K])
130130
131131
132132 func af () = "%s__managerPublicKey"
133133
134134
135135 func ag () = "%s__pendingManagerPublicKey"
136136
137137
138138 func ah () = "%s%s__ratePerBlock__current"
139139
140140
141141 func ai () = "%s%s__ratePerBlockMax__current"
142142
143143
144144 func aj () = "%s%s__emission__startBlock"
145145
146146
147-func ak () = "%s%s__boostingV2__startBlock"
147+func ak () = "%s%s__emission__duration"
148148
149149
150-func al () = "%s%s__boostingV2__integral"
150+func al () = "%s%s__emission__endBlock"
151151
152152
153-func am () = "%s%s__emission__duration"
153+func am () = "%s__nextPeriod"
154154
155155
156-func an () = "%s%s__emission__endBlock"
156+func an () = "%s%s__gwxRewardEmissionPart__startHeight"
157157
158158
159-func ao () = "%s__nextPeriod"
159+let ao = 1
160+
161+let ap = 2
162+
163+let aq = 3
164+
165+let ar = 4
166+
167+let as = 5
168+
169+func at () = "%s__config"
160170
161171
162-func ap () = "%s%s__gwxRewardEmissionPart__startHeight"
172+func au () = split(h(this, at()), a)
163173
164174
165-let aq = 1
175+let av = addressFromStringValue(au()[as])
166176
167-let ar = 2
168-
169-let as = 3
170-
171-let at = 4
172-
173-let au = 5
174-
175-func av () = "%s__config"
177+func aw (ax,ay,az,aA,av) = makeString(["%s%d%d%d", ax, ay, az, aA, av], a)
176178
177179
178-func aw () = split(h(this, av()), a)
180+func aB (ax,ay,az,aA,av) = aw(ax, toString(ay), toString(az), toString(aA), av)
179181
180182
181-let ax = addressFromStringValue(aw()[au])
182-
183-func ay (az,aA,aB,aC,ax) = makeString(["%s%d%d%d", az, aA, aB, aC, ax], a)
184-
185-
186-func aD (az,aA,aB,aC,ax) = ay(az, toString(aA), toString(aB), toString(aC), ax)
187-
188-
189-func aE () = {
183+func aC () = {
190184 let r = getString(af())
191185 if ($isInstanceOf(r, "String"))
192186 then {
193- let aF = r
194- fromBase58String(aF)
187+ let aD = r
188+ fromBase58String(aD)
195189 }
196190 else if ($isInstanceOf(r, "Unit"))
197191 then unit
198192 else throw("Match error")
199193 }
200194
201195
202-func aG () = {
196+func aE () = {
203197 let r = getString(ag())
204198 if ($isInstanceOf(r, "String"))
205199 then {
206- let aF = r
207- fromBase58String(aF)
200+ let aD = r
201+ fromBase58String(aD)
208202 }
209203 else if ($isInstanceOf(r, "Unit"))
210204 then unit
211205 else throw("Match error")
212206 }
213207
214208
215-func aH (aI) = {
216- let aJ = throw("Permission denied")
217- let r = aE()
209+func aF (aG) = {
210+ let aH = throw("Permission denied")
211+ let r = aC()
218212 if ($isInstanceOf(r, "ByteVector"))
219213 then {
220- let aK = r
221- if ((aI.callerPublicKey == aK))
214+ let aI = r
215+ if ((aG.callerPublicKey == aI))
222216 then true
223- else aJ
217+ else aH
224218 }
225219 else if ($isInstanceOf(r, "Unit"))
226- then if ((aI.caller == this))
220+ then if ((aG.caller == this))
227221 then true
228- else aJ
222+ else aH
229223 else throw("Match error")
230224 }
231225
232226
233-let aL = 1
227+let aJ = 1
234228
235-let aM = 2
229+let aK = 2
236230
237-let aN = 3
231+let aL = 3
238232
239-let aO = 4
233+let aM = 4
240234
241-let aP = 5
235+let aN = 5
242236
243-let aQ = 6
237+let aO = 6
244238
245-func aR (aS) = makeString(["%s%s__lock", aS], a)
239+func aP (aQ) = makeString(["%s%s__lock", aQ], a)
246240
247241
248-func aT (aS) = split(h(this, aR(aS)), a)
242+func aR (aQ) = split(h(this, aP(aQ)), a)
249243
250244
251-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)
245+func aS (aT,aU,aV,aW,aX,aY,aZ,ba) = makeString(["%d%d%d%d%d%d%d%d", aT, aU, aV, aW, aX, aY, aZ, ba], a)
252246
253247
254-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))
248+func bb (aT,aU,aV,aW,aX,aY,ba) = aS(aT, toString(aU), toString(aV), toString(aW), toString(aX), toString(aY), toString(lastBlock.timestamp), toString(ba))
255249
256250
257-func be () = "%s__nextUserNum"
251+func bc () = "%s__nextUserNum"
258252
259253
260-func bf (aS) = makeString(["%s%s%s__mapping__user2num", aS], a)
254+func bd (aQ) = makeString(["%s%s%s__mapping__user2num", aQ], a)
261255
262256
263-func bg (V) = makeString(["%s%s%s__mapping__num2user", V], a)
257+func be (V) = makeString(["%s%s%s__mapping__num2user", V], a)
264258
265259
266-func bh (aV) = makeString(["%s%d%s__paramByUserNum", aV, "amount"], a)
260+func bf (aT) = makeString(["%s%d%s__paramByUserNum", aT, "amount"], a)
267261
268262
269-func bi (aV) = makeString(["%s%d%s__paramByUserNum", aV, "start"], a)
263+func bg (aT) = makeString(["%s%d%s__paramByUserNum", aT, "start"], a)
270264
271265
272-func bj (aV) = makeString(["%s%d%s__paramByUserNum", aV, "duration"], a)
266+func bh (aT) = makeString(["%s%d%s__paramByUserNum", aT, "duration"], a)
273267
274268
275-func bk (aV) = makeString(["%s%d%s__paramByUserNum", aV, "k"], a)
269+func bi (aT) = makeString(["%s%d%s__paramByUserNum", aT, "k"], a)
276270
277271
278-func bl (aV) = makeString(["%s%d%s__paramByUserNum", aV, "b"], a)
272+func bj (aT) = makeString(["%s%d%s__paramByUserNum", aT, "b"], a)
279273
280274
281-func bm (aV,bn) = makeString(["%s%d%s%d__paramByPeriod", aV, "k", bn], a)
275+func bk (aT,bl) = makeString(["%s%d%s%d__paramByPeriod", aT, "k", bl], a)
282276
283277
284-func bo (aV,bn) = makeString(["%s%d%s%d__paramByPeriod", aV, "b", bn], a)
278+func bm (aT,bl) = makeString(["%s%d%s%d__paramByPeriod", aT, "b", bl], a)
285279
286280
287-func bp () = "%s%s__stats__activeTotalLocked"
281+func bn () = "%s%s__stats__activeTotalLocked"
288282
289283
290-func bq () = "%s%s__stats__locksDurationSumInBlocks"
284+func bo () = "%s%s__stats__locksDurationSumInBlocks"
291285
292286
293-func br () = "%s%s__stats__locksCount"
287+func bp () = "%s%s__stats__locksCount"
294288
295289
296-func bs () = "%s%s__stats__activeUsersCount"
290+func bq () = "%s%s__stats__activeUsersCount"
297291
298292
299-func bt (aV) = makeString(["%s%d__userBoostEmissionLastIntV2", aV], a)
293+func br (aT) = makeString(["%s%d__userBoostEmissionLastInt", aT], a)
300294
301295
302-func bu (aV,bv) = makeString(["%s%d__userBoostEmissionLastIntV2", aV, bv], a)
296+func bs (aT,bt) = makeString(["%s%d__userBoostEmissionLastInt", aT, bt], a)
303297
304298
305-func bw (aV) = makeString(["%s%d__maxBoostInt", aV], a)
299+func bu (aT) = makeString(["%s%d__maxBoostInt", aT], a)
306300
307301
308-func bx () = "%s%s__maxBoostInt__total"
302+func bv () = "%s%s__maxBoostInt__total"
309303
310304
311-func by (aV) = makeString(["%s%d__userBoostAvaliableToClaimTotal", aV], a)
305+func bw (aT) = makeString(["%s%d__userBoostAvaliableToClaimTotal", aT], a)
312306
313307
314-func bz (aV) = makeString(["%s%d__userBoostClaimed", aV], a)
308+func bx (aT) = makeString(["%s%d__userBoostClaimed", aT], a)
315309
316310
317-func bA () = "%s%s__gwxCached__total"
311+func by () = "%s%s__gwxCached__total"
318312
319313
320-func bB () = "%s__gwxCachedTotalCorrective"
314+func bz () = "%s__gwxCachedTotalCorrective"
321315
322316
323-let bC = W()
317+let bA = W()
324318
325-let ab = Y(bC)
319+let ab = Y(bA)
326320
327-let bD = ac(ab)
321+let bB = ac(ab)
328322
329-let bE = ad(ab)
323+let bC = ad(ab)
330324
331-let bF = ae(ab)
325+let bD = ae(ab)
332326
333-let bG = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(makeString(["%s", "lpStakingPoolsContract"], a)), e("lp_staking_pools contract address is undefined"))), e("invalid lp_staking_pools contract address"))
327+let bE = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(makeString(["%s", "lpStakingPoolsContract"], a)), e("lp_staking_pools contract address is undefined"))), e("invalid lp_staking_pools contract address"))
334328
335-let bH = makeString(["%s", "votingEmissionContract"], a)
336-
337-let bI = addressFromStringValue(getStringValue(bC, bH))
338-
339-let bJ = {
340- let bK = invoke(bD, "getBoostCoeffREADONLY", nil, nil)
341- if ($isInstanceOf(bK, "Int"))
342- then bK
343- else throw(($getType(bK) + " couldn't be cast to Int"))
344- }
345-
346-func bL (bM) = {
347- let bN = makeString(["%s", "currentEpochUi"], a)
348- let bO = getIntegerValue(bI, bN)
349- let bP = makeString(["%s%s", "totalCachedGwxCorrection__activationEpoch"], a)
350- let bQ = getInteger(this, bP)
351- let bR = valueOrElse(getInteger(this, bA()), 0)
352- let bS = if (isDefined(bQ))
353- then (bO >= value(bQ))
329+func bF (bG) = {
330+ let bH = makeString(["%s", "votingEmissionContract"], a)
331+ let bI = addressFromStringValue(getStringValue(bA, bH))
332+ let bJ = makeString(["%s", "currentEpochUi"], a)
333+ let bK = getIntegerValue(bI, bJ)
334+ let bL = makeString(["%s%s", "totalCachedGwxCorrection__activationEpoch"], a)
335+ let bM = getInteger(this, bL)
336+ let bN = valueOrElse(getInteger(this, by()), 0)
337+ let bO = if (isDefined(bM))
338+ then (bK >= value(bM))
354339 else false
355- let bT = if (if (bS)
356- then bM
340+ let bP = if (if (bO)
341+ then bG
357342 else false)
358- then valueOrElse(getInteger(this, bB()), 0)
343+ then valueOrElse(getInteger(this, bz()), 0)
359344 else 0
360- max([0, (bR + bT)])
345+ max([0, (bN + bP)])
361346 }
362347
363348
364-func bU (bV,bW,aW,bX,aY,bY,bZ,aI) = {
365- let ca = makeString(["%s%s%s%s__history", bV, bW, toBase58String(aI.transactionId)], a)
366- let cb = makeString(["%d%d%d%d%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(aW), toString(bX), toString(aY), toString(bY), toString(bZ)], a)
367- StringEntry(ca, cb)
349+func bQ (bR,bS,aU,bT,aW,bU,bV,aG) = {
350+ let bW = makeString(["%s%s%s%s__history", bR, bS, toBase58String(aG.transactionId)], a)
351+ let bX = makeString(["%d%d%d%d%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(aU), toString(bT), toString(aW), toString(bU), toString(bV)], a)
352+ StringEntry(bW, bX)
368353 }
369354
370355
371-func cc (cd,ce,cf,cg) = {
372- let ch = bq()
373- let ci = br()
374- let cj = bs()
375- let ck = bp()
376- let cl = k(this, ch)
377- let cm = k(this, ci)
378- let cn = k(this, cj)
379- let co = k(this, ck)
380-[IntegerEntry(ch, (cl + ce)), IntegerEntry(ci, (cm + cf)), IntegerEntry(cj, (cn + cg)), IntegerEntry(ck, (co + cd))]
356+func bY (bZ,ca,cb,cc) = {
357+ let cd = bo()
358+ let ce = bp()
359+ let cf = bq()
360+ let cg = bn()
361+ let ch = k(this, cd)
362+ let ci = k(this, ce)
363+ let cj = k(this, cf)
364+ let ck = k(this, cg)
365+[IntegerEntry(cd, (ch + ca)), IntegerEntry(ce, (ci + cb)), IntegerEntry(cf, (cj + cc)), IntegerEntry(cg, (ck + bZ))]
381366 }
382367
383368
384-func cp (cq,cr,cs) = {
385- let ct = 1000
386- (((cq * cs) + cr) / ct)
369+func cl (cm,cn,co) = {
370+ let cp = 1000
371+ (((cm * co) + cn) / cp)
387372 }
388373
389374
390-func cu (aS,aV,aW,aX,aY,bY,bZ,bn) = {
391- let cv = bh(aV)
392- let cw = bi(aV)
393- let cx = bj(aV)
394- let cy = bk(aV)
395- let cz = bl(aV)
396- let cA = bm(aV, bn)
397- let cB = bo(aV, bn)
398- let bc = cp(bY, bZ, height)
399-[IntegerEntry(cv, aW), IntegerEntry(cw, aX), IntegerEntry(cx, aY), IntegerEntry(cy, bY), IntegerEntry(cz, bZ), IntegerEntry(cA, bY), IntegerEntry(cB, bZ), StringEntry(aR(aS), bd(aV, aW, aX, aY, bY, bZ, bc))]
375+func cq (aQ,aT,aU,aV,aW,bU,bV,bl) = {
376+ let cr = bf(aT)
377+ let cs = bg(aT)
378+ let ct = bh(aT)
379+ let cu = bi(aT)
380+ let cv = bj(aT)
381+ let cw = bk(aT, bl)
382+ let cx = bm(aT, bl)
383+ let ba = cl(bU, bV, height)
384+[IntegerEntry(cr, aU), IntegerEntry(cs, aV), IntegerEntry(ct, aW), IntegerEntry(cu, bU), IntegerEntry(cv, bV), IntegerEntry(cw, bU), IntegerEntry(cx, bV), StringEntry(aP(aQ), bb(aT, aU, aV, aW, bU, bV, ba))]
400385 }
401386
402387
403-func cC (aI,cD) = if ((size(aI.payments) > 1))
388+func cy (aG,cz) = if ((size(aG.payments) > 1))
404389 then throw("only one payment is allowed")
405- else if ((size(aI.payments) == 0))
390+ else if ((size(aG.payments) == 0))
406391 then 0
407392 else {
408- let cE = aI.payments[0]
409- if ((value(cE.assetId) != cD))
393+ let cA = aG.payments[0]
394+ if ((value(cA.assetId) != cz))
410395 then throw("invalid asset id in payment")
411- else cE.amount
396+ else cA.amount
412397 }
413398
414399
415-func cF (aS,cG) = {
416- let cH = "empty"
417- let cI = bf(aS)
418- let aV = valueOrElse(getString(cI), cH)
419- let bY = valueOrElse(getInteger(bk(aV)), 0)
420- let bZ = valueOrElse(getInteger(bl(aV)), 0)
421- let cJ = cp(bY, bZ, cG)
422- let bc = if ((0 > cJ))
400+func cB (aQ,cC) = {
401+ let cD = "empty"
402+ let cE = bd(aQ)
403+ let aT = valueOrElse(getString(cE), cD)
404+ let bU = valueOrElse(getInteger(bi(aT)), 0)
405+ let bV = valueOrElse(getInteger(bj(aT)), 0)
406+ let cF = cl(bU, bV, cC)
407+ let ba = if ((0 > cF))
423408 then 0
424- else cJ
425- bc
409+ else cF
410+ ba
426411 }
427412
428413
429-func cK (aS) = cF(aS, height)
414+func cG (aQ) = cB(aQ, height)
430415
431416
432-func cL () = {
433- let bN = makeString(["%s", "currentEpochUi"], a)
434- let cM = {
435- let bO = value(getInteger(bI, bN))
436- let cN = (bO - 1)
437- if ((0 > cN))
438- then g("invalid epoch")
439- else $Tuple2(bO, cN)
440- }
441- let bO = cM._1
442- let cN = cM._2
443- func cO (cP) = makeString(["%s%d", "startHeight", toString(cP)], a)
444-
445- let cQ = value(getInteger(bI, cO(bO)))
446- $Tuple2(cN, cQ)
447- }
448-
449-
450-func cR (cS) = {
451- let cT = 4
452- let cU = 5
453- let cV = {
454- let bK = invoke(bC, "getPoolConfigByLpAssetId", [cS], nil)
455- if ($isInstanceOf(bK, "List[Any]"))
456- then bK
457- else throw(($getType(bK) + " couldn't be cast to List[Any]"))
458- }
459- let cW = {
460- let bK = cV[cT]
461- if ($isInstanceOf(bK, "String"))
462- then bK
463- else throw(($getType(bK) + " couldn't be cast to String"))
464- }
465- let cX = {
466- let bK = cV[cU]
467- if ($isInstanceOf(bK, "String"))
468- then bK
469- else throw(($getType(bK) + " couldn't be cast to String"))
470- }
471- $Tuple2(cW, cX)
472- }
473-
474-
475-func cY (cW,cX,i,cP) = makeString(["%s%s%s%s%d", "vote", cW, cX, toString(i), toString(cP)], a)
476-
477-
478-func cZ (cS,cP) = makeString(["%s%s%d", "votingResultStaked", cS, toString(cP)], a)
479-
480-
481-func da (cS,cP) = makeString(["%s%s%d", "votingResultStakedIntegral", cS, toString(cP)], a)
482-
483-
484-func db (cS,cP) = makeString(["%s%s%d", "votingResultStakedIntegralLastUpdateHeight", cS, toString(cP)], a)
485-
486-
487-func dc (cS,i,cP) = makeString(["%s%s%s%d", "votingResultStakedIntegralLast", cS, toString(i), toString(cP)], a)
488-
489-
490-func dd (cS,i,cP) = makeString(["%s%s%s%d", "voteStakedIntegral", cS, toString(i), toString(cP)], a)
491-
492-
493-func de (cS,i,cP) = makeString(["%s%s%s%d", "voteStakedIntegralLastUpdateHeight", cS, toString(i), toString(cP)], a)
494-
495-
496-func df (cS,i,cP) = makeString(["%s%s%s%d", "voteStakedIntegralLast", cS, toString(i), toString(cP)], a)
497-
498-
499-func dg (dh,cS) = makeString(["%s%s%s", "staked", dh, cS], a)
500-
501-
502-func di (cS,dh) = {
503- let aS = addressFromStringValue(dh)
504- let dj = cL()
505- let cN = dj._1
506- let cQ = dj._2
507- let dk = cR(cS)
508- let cW = dk._1
509- let cX = dk._2
510- let dl = cY(cW, cX, aS, cN)
511- let dm = valueOrElse(getInteger(bI, dl), 0)
512- dm
513- }
514-
515-
516-func dn (cS,dh) = {
517- let do = valueOrElse(getInteger(bE, dg(dh, cS)), 0)
518- let dm = di(cS, dh)
519- if ((do == 0))
520- then 0
521- else dm
522- }
523-
524-
525-func dp (cS) = {
526- let dq = cL()
527- let cN = dq._1
528- let cQ = dq._2
529- let dr = valueOrElse(getInteger(bI, cZ(cS, cN)), 0)
530- let ds = valueOrElse(getInteger(this, cZ(cS, cN)), dr)
531- ds
532- }
533-
534-
535-func dt (cS,du) = {
536- let dv = cL()
537- let cN = dv._1
538- let cQ = dv._2
539- let ds = dp(cS)
540- let dw = (ds + du)
541- let dx = da(cS, cN)
542- let dy = valueOrElse(getInteger(this, dx), 0)
543- let dz = db(cS, cN)
544- let dA = valueOrElse(getInteger(this, dz), cQ)
545- let dB = (height - dA)
546- let dC = ((dB * ds) + dy)
547- $Tuple2([IntegerEntry(cZ(cS, cN), dw), IntegerEntry(dz, height), IntegerEntry(dx, dC)], dC)
548- }
549-
550-
551-func dD (cS,dh,dE) = {
552- let dF = cL()
553- let cN = dF._1
554- let cQ = dF._2
555- let aS = addressFromStringValue(dh)
556- let cT = 4
557- let cU = 5
558- let cV = {
559- let bK = invoke(bC, "getPoolConfigByLpAssetId", [cS], nil)
560- if ($isInstanceOf(bK, "List[Any]"))
561- then bK
562- else throw(($getType(bK) + " couldn't be cast to List[Any]"))
563- }
564- let cW = {
565- let bK = cV[cT]
566- if ($isInstanceOf(bK, "String"))
567- then bK
568- else throw(($getType(bK) + " couldn't be cast to String"))
569- }
570- let cX = {
571- let bK = cV[cU]
572- if ($isInstanceOf(bK, "String"))
573- then bK
574- else throw(($getType(bK) + " couldn't be cast to String"))
575- }
576- let dm = valueOrElse(getInteger(bI, cY(cW, cX, aS, cN)), 0)
577- let dG = if ((dm == 0))
578- then nil
579- else {
580- let du = if (dE)
581- then dm
582- else -(dm)
583- let dH = dt(cS, du)
584- let dI = dH._1
585- let dC = dH._2
586- let dJ = if (dE)
587- then 0
588- else dm
589- let dK = dd(cS, aS, cN)
590- let dL = valueOrElse(getInteger(this, dK), 0)
591- let dM = de(cS, aS, cN)
592- let dN = valueOrElse(getInteger(this, dM), cQ)
593- let dO = (height - dN)
594- let dP = ((dO * dJ) + dL)
595- let dQ = [IntegerEntry(dM, height), IntegerEntry(dK, dP)]
596- (dI ++ dQ)
597- }
598- dG
599- }
600-
601-
602-func dR (cS,dh) = {
603- let dS = cL()
604- let cN = dS._1
605- let cQ = dS._2
606- let aS = addressFromStringValue(dh)
607- let dJ = dn(cS, dh)
608- let ds = dp(cS)
609- let dL = valueOrElse(getInteger(this, dd(cS, aS, cN)), 0)
610- let dy = valueOrElse(getInteger(this, da(cS, cN)), 0)
611- let dN = valueOrElse(getInteger(this, de(cS, aS, cN)), cQ)
612- let dA = valueOrElse(getInteger(this, db(cS, cN)), cQ)
613- let dK = df(cS, aS, cN)
614- let dT = valueOrElse(getInteger(this, dK), 0)
615- let dx = dc(cS, aS, cN)
616- let dU = valueOrElse(getInteger(this, dx), 0)
617- let dO = (height - dN)
618- let dB = (height - dA)
619- let dP = ((dO * dJ) + dL)
620- let dC = ((dB * ds) + dy)
621- let dV = (dP - dT)
622- let dW = (dC - dU)
623- $Tuple3([IntegerEntry(dK, dP), IntegerEntry(dx, dC)], dV, dW)
624- }
625-
626-
627-func dX () = {
628- let dY = n(bD, ah())
629- let dZ = getInteger(bD, ak())
630- let ea = getInteger(this, al())
631- let eb = n(bD, an())
632- let cs = if ((height > eb))
633- then eb
634- else height
635- let ec = {
636- let r = dZ
637- if ($isInstanceOf(r, "Int"))
638- then {
639- let ed = r
640- max([(cs - ed), 0])
641- }
642- else if ($isInstanceOf(r, "Unit"))
643- then 0
644- else throw("Match error")
645- }
646- let ee = ((dY * (bJ - 1)) / bJ)
647- let ef = valueOrElse(ea, 0)
648- let eg = ((ee * ec) + ef)
649- $Tuple2([IntegerEntry(al(), eg), IntegerEntry(ak(), height)], eg)
650- }
651-
652-
653-func eh (cS,dh,ei) = {
654- let ej = getString(this, aR(dh))
655- if ((ej == unit))
417+func cH (cI,cJ,cK) = {
418+ let cD = "EMPTY"
419+ let cL = valueOrElse(getString(this, aP(cJ)), cD)
420+ if ((cL == cD))
656421 then $Tuple3(0, nil, "userRecord::is::empty")
657422 else {
658- let ek = split(value(ej), a)
659- let el = ek[aL]
660- let em = "empty"
661- let en = if ((cS != em))
423+ let cM = split(cL, a)
424+ let cN = cM[aJ]
425+ let cO = valueOrElse(getInteger(bD, an()), 0)
426+ let cP = "empty"
427+ let cQ = if ((cI != cP))
662428 then {
663- let eo = valueOrErrorMessage(getString(bC, N(cS)), ("unsupported lp asset " + cS))
664- getIntegerValue(bC, R(eo))
429+ let cR = valueOrErrorMessage(getString(bA, N(cI)), ("unsupported lp asset " + cI))
430+ let cS = getIntegerValue(bA, R(cR))
431+ let cT = valueOrElse(getInteger(bA, T(cR, 0)), cS)
432+ $Tuple2(cT, cS)
665433 }
666- else if (ei)
667- then 0
668- else throw(("not readonly mode: unsupported lp asset " + cS))
669- let ep = bu(el, cS)
670- let eq = bt(el)
671- let er = valueOrElse(getInteger(this, ep), k(this, eq))
672- let eg = dX()._2
673- let es = (eg - er)
674- if ((0 > es))
675- then throw("wrong calculations")
676- else {
677- let et = dR(cS, dh)
678- let eu = et._1
679- let ev = et._2
680- let ew = et._3
681- let ex = fraction(es, en, d)
682- let ey = if ((ew == 0))
683- then 0
684- else fraction(ex, ev, ew)
685- let ez = ([IntegerEntry(ep, eg)] ++ eu)
686- let eA = makeString([toString(er), toString(es), toString(en), toString(ev), toString(ew)], ":")
687- $Tuple3(ey, ez, eA)
688- }
434+ else if (cK)
435+ then $Tuple2(0, 0)
436+ else throw(("not readonly mode: unsupported lp asset " + cI))
437+ let cU = cQ._1
438+ let cV = cQ._2
439+ let cW = n(bB, ah())
440+ let cX = n(bB, aj())
441+ let cY = n(bB, al())
442+ let co = if ((height > cY))
443+ then cY
444+ else height
445+ let cZ = max([(co - cX), 0])
446+ let da = bs(cN, cI)
447+ let db = br(cN)
448+ let dc = valueOrElse(getInteger(this, da), k(this, db))
449+ let dd = (((cW * cZ) * 2) / 3)
450+ let de = (dd - dc)
451+ let df = fraction(de, 3, (2 * cW))
452+ let dg = (co - df)
453+ let dh = max([(cO - dg), 0])
454+ let di = ((co - dg) - dh)
455+ if (if (if ((0 > dg))
456+ then true
457+ else (0 > di))
458+ then true
459+ else (o(((dh + di) - df)) >= 1))
460+ then throw(((((((((((("invalid udh calc: udh=" + toString(df)) + " uLastH=") + toString(dg)) + " udh0=") + toString(dh)) + " udh1=") + toString(di)) + " lpAssetId=") + cI) + " userAddress=") + cJ))
461+ else if ((0 > de))
462+ then throw("wrong calculations")
463+ else {
464+ let dj = bu(cN)
465+ let dk = bv()
466+ let dl = k(this, dj)
467+ let dm = k(this, dk)
468+ let dn = bF(true)
469+ let do = cG(cJ)
470+ let dp = bw(cN)
471+ let dq = k(this, dp)
472+ let dr = if ((df == 0))
473+ then 0
474+ else fraction(de, dh, df)
475+ let ds = if ((df == 0))
476+ then 0
477+ else fraction(de, di, df)
478+ let dt = fraction(dr, cU, d)
479+ let du = fraction(ds, cV, d)
480+ let dv = if ((dn == 0))
481+ then 0
482+ else fraction(dt, do, dn)
483+ let dw = if ((dn == 0))
484+ then 0
485+ else fraction(du, do, dn)
486+ let dx = (dv + dw)
487+ let dy = bx(cN)
488+ let dz = k(this, dy)
489+ let dA = (dx - dz)
490+ let dB = [IntegerEntry(da, dd)]
491+ let dC = makeString([toString(dc), toString(de), toString(dz), toString(dA), toString(cU), toString(cV), toString(co), toString(df), toString(dg), toString(dh), toString(di), toString(do), toString(dn)], ":")
492+ $Tuple3(dx, dB, dC)
493+ }
689494 }
690495 }
691496
692497
693-func eB (aI,aY) = {
694- let eC = aw()
695- let eD = eC[aq]
696- let az = fromBase58String(eD)
697- let aA = parseIntValue(eC[ar])
698- let aB = parseIntValue(eC[as])
699- let aC = parseIntValue(eC[at])
700- if ((size(aI.payments) != 1))
498+func dD (aG,aW) = {
499+ let dE = au()
500+ let dF = dE[ao]
501+ let ax = fromBase58String(dF)
502+ let ay = parseIntValue(dE[ap])
503+ let az = parseIntValue(dE[aq])
504+ let aA = parseIntValue(dE[ar])
505+ if ((size(aG.payments) != 1))
701506 then throw("invalid payment - exact one payment must be attached")
702507 else {
703- let cE = aI.payments[0]
704- let eE = cE.amount
705- if ((az != value(cE.assetId)))
706- then throw((("invalid asset is in payment - " + eD) + " is expected"))
508+ let cA = aG.payments[0]
509+ let dG = cA.amount
510+ if ((ax != value(cA.assetId)))
511+ then throw((("invalid asset is in payment - " + dF) + " is expected"))
707512 else {
708- let eF = be()
709- let dh = toString(aI.caller)
710- let eG = isDefined(getString(bf(dh)))
711- let el = if (eG)
712- then value(getString(bf(dh)))
713- else toString(n(this, eF))
714- let aV = parseIntValue(el)
715- let bX = height
716- let cw = bi(el)
717- let cx = bj(el)
718- let cv = bh(el)
719- if (if ((aA > eE))
720- then (aI.caller != bG)
513+ let dH = bc()
514+ let cJ = toString(aG.caller)
515+ let dI = isDefined(getString(bd(cJ)))
516+ let cN = if (dI)
517+ then value(getString(bd(cJ)))
518+ else toString(n(this, dH))
519+ let aT = parseIntValue(cN)
520+ let bT = height
521+ let cs = bg(cN)
522+ let ct = bh(cN)
523+ let cr = bf(cN)
524+ if (if ((ay > dG))
525+ then (aG.caller != bE)
721526 else false)
722- then throw(("amount is less then minLockAmount=" + toString(aA)))
723- else if ((aB > aY))
724- then throw(("passed duration is less then minLockDuration=" + toString(aB)))
725- else if ((aY > aC))
726- then throw(("passed duration is greater then maxLockDuration=" + toString(aC)))
727- else if (if (eG)
728- then ((n(this, cw) + n(this, cx)) >= bX)
527+ then throw(("amount is less then minLockAmount=" + toString(ay)))
528+ else if ((az > aW))
529+ then throw(("passed duration is less then minLockDuration=" + toString(az)))
530+ else if ((aW > aA))
531+ then throw(("passed duration is greater then maxLockDuration=" + toString(aA)))
532+ else if (if (dI)
533+ then ((n(this, cs) + n(this, ct)) >= bT)
729534 else false)
730535 then throw("there is an active lock - consider to use increaseLock")
731- else if ((k(this, cv) > 0))
732- then throw(("there are locked WXs - consider to use increaseLock " + cv))
536+ else if ((k(this, cr) > 0))
537+ then throw(("there are locked WXs - consider to use increaseLock " + cr))
733538 else {
734- let eH = fraction(aY, c, aC)
735- let eI = fraction(eE, eH, c)
736- let eJ = q(invoke(ax, "calcGwxParamsREADONLY", [eI, bX, aY], nil))
737- let bY = t(eJ[0])
738- let bZ = t(eJ[1])
739- let bn = toString(t(eJ[2]))
740- let bR = bL(false)
741- let eq = bt(el)
742- let eg = dX()._2
743- let eK = if (eG)
539+ let dJ = fraction(aW, c, aA)
540+ let dK = fraction(dG, dJ, c)
541+ let dL = q(invoke(av, "calcGwxParamsREADONLY", [dK, bT, aW], nil))
542+ let bU = t(dL[0])
543+ let bV = t(dL[1])
544+ let bl = toString(t(dL[2]))
545+ let cW = n(bB, ah())
546+ let cX = n(bB, aj())
547+ let cY = n(bB, al())
548+ let co = if ((height > cY))
549+ then cY
550+ else height
551+ let cZ = max([(co - cX), 0])
552+ let db = br(cN)
553+ let dd = (((cW * cZ) * 2) / 3)
554+ let dj = bu(cN)
555+ let dk = bv()
556+ let dl = ((dK * aW) / 2)
557+ let dm = k(this, dk)
558+ let bN = bF(false)
559+ let dM = if (dI)
744560 then nil
745- else [IntegerEntry(eF, (aV + 1)), StringEntry(bf(dh), el), StringEntry(bg(el), dh)]
746- $Tuple2(((((eK ++ cu(dh, el, eE, bX, aY, bY, bZ, bn)) ++ cc(eE, aY, 1, if (eG)
561+ else [IntegerEntry(dH, (aT + 1)), StringEntry(bd(cJ), cN), StringEntry(be(cN), cJ)]
562+ $Tuple2(((((dM ++ cq(cJ, cN, dG, bT, aW, bU, bV, bl)) ++ bY(dG, aW, 1, if (dI)
747563 then 0
748- else 1)) :+ bU("lock", dh, eE, bX, aY, bY, bZ, aI)) ++ [IntegerEntry(eq, eg), IntegerEntry(bA(), (bR + eI))]), eI)
564+ else 1)) :+ bQ("lock", cJ, dG, bT, aW, bU, bV, aG)) ++ [IntegerEntry(db, dd), IntegerEntry(by(), (bN + dK))]), dK)
749565 }
750566 }
751567 }
752568 }
753569
754570
755-@Callable(aI)
756-func constructor (eL,eM,aA,eN,eO,ax) = {
757- let eP = aH(aI)
758- if ((eP == eP))
759- then ([IntegerEntry(be(), 0), StringEntry(av(), aD(eM, aA, eN, eO, ax)), StringEntry(A(), eL)] ++ cc(0, 0, 0, 0))
571+@Callable(aG)
572+func constructor (dN,dO,ay,dP,dQ,av) = {
573+ let dR = aF(aG)
574+ if ((dR == dR))
575+ then ([IntegerEntry(bc(), 0), StringEntry(at(), aB(dO, ay, dP, dQ, av)), StringEntry(A(), dN)] ++ bY(0, 0, 0, 0))
760576 else throw("Strict value is not equal to itself.")
761577 }
762578
763579
764580
765-@Callable(aI)
766-func lockRef (aY,eQ,eR) = {
767- let eS = eB(aI, aY)
768- let eT = eS._1
769- let eI = eS._2
770- let eU = toString(aI.caller)
771- let eV = if (if ((eQ == ""))
581+@Callable(aG)
582+func lockRef (aW,dS,dT) = {
583+ let dU = dD(aG, aW)
584+ let dV = dU._1
585+ let dK = dU._2
586+ let dW = toString(aG.caller)
587+ let dX = if (if ((dS == ""))
772588 then true
773- else (eR == base58''))
589+ else (dT == base58''))
774590 then unit
775- else invoke(w, "createPair", [z, eQ, eU, eR], nil)
776- if ((eV == eV))
591+ else invoke(w, "createPair", [z, dS, dW, dT], nil)
592+ if ((dX == dX))
777593 then {
778- let eW = invoke(ax, "updateReferralActivity", [toString(aI.caller), eI], nil)
779- if ((eW == eW))
780- then $Tuple2(eT, unit)
594+ let dY = invoke(av, "updateReferralActivity", [toString(aG.caller), dK], nil)
595+ if ((dY == dY))
596+ then $Tuple2(dV, unit)
781597 else throw("Strict value is not equal to itself.")
782598 }
783599 else throw("Strict value is not equal to itself.")
784600 }
785601
786602
787603
788-@Callable(aI)
789-func lock (aY) = {
790- let eX = eB(aI, aY)
791- let eT = eX._1
792- let eI = eX._2
793- let eW = invoke(ax, "updateReferralActivity", [toString(aI.caller), eI], nil)
794- if ((eW == eW))
795- then $Tuple2(eT, unit)
604+@Callable(aG)
605+func lock (aW) = {
606+ let dZ = dD(aG, aW)
607+ let dV = dZ._1
608+ let dK = dZ._2
609+ let dY = invoke(av, "updateReferralActivity", [toString(aG.caller), dK], nil)
610+ if ((dY == dY))
611+ then $Tuple2(dV, unit)
796612 else throw("Strict value is not equal to itself.")
797613 }
798614
799615
800616
801-@Callable(aI)
802-func increaseLock (eY) = {
803- let eC = aw()
804- let eD = eC[aq]
805- let az = fromBase58String(eD)
806- let aB = parseIntValue(eC[as])
807- let aC = parseIntValue(eC[at])
808- let eE = cC(aI, az)
809- let dh = toString(aI.caller)
810- let ek = aT(dh)
811- let el = ek[aL]
812- let eZ = parseIntValue(ek[aM])
813- let bX = parseIntValue(ek[aN])
814- let fa = parseIntValue(ek[aO])
815- let fb = (bX + fa)
816- let fc = max([(fb - height), 0])
817- let fd = (eZ + eE)
818- let fe = (fc + eY)
819- if ((0 > eY))
617+@Callable(aG)
618+func increaseLock (ea) = {
619+ let dE = au()
620+ let dF = dE[ao]
621+ let ax = fromBase58String(dF)
622+ let az = parseIntValue(dE[aq])
623+ let aA = parseIntValue(dE[ar])
624+ let dG = cy(aG, ax)
625+ let cJ = toString(aG.caller)
626+ let cM = aR(cJ)
627+ let cN = cM[aJ]
628+ let eb = parseIntValue(cM[aK])
629+ let bT = parseIntValue(cM[aL])
630+ let ec = parseIntValue(cM[aM])
631+ let ed = (bT + ec)
632+ let ee = max([(ed - height), 0])
633+ let ef = (eb + dG)
634+ let eg = (ee + ea)
635+ if ((0 > ea))
820636 then throw("duration is less then zero")
821- else if ((aB > fe))
822- then throw(("lockDurationNew is less then minLockDuration=" + toString(aB)))
823- else if ((fe > aC))
824- then throw(("deltaDuration + existedLockDuration is greater then maxLockDuration=" + toString(aC)))
637+ else if ((az > eg))
638+ then throw(("lockDurationNew is less then minLockDuration=" + toString(az)))
639+ else if ((eg > aA))
640+ then throw(("deltaDuration + existedLockDuration is greater then maxLockDuration=" + toString(aA)))
825641 else {
826- let eH = fraction(fe, c, aC)
827- let eI = fraction(fd, eH, c)
828- let eW = invoke(ax, "updateReferralActivity", [toString(aI.caller), eI], nil)
829- if ((eW == eW))
642+ let dJ = fraction(eg, c, aA)
643+ let dK = fraction(ef, dJ, c)
644+ let dY = invoke(av, "updateReferralActivity", [toString(aG.caller), dK], nil)
645+ if ((dY == dY))
830646 then {
831- let ff = height
832- let eJ = q(invoke(ax, "calcGwxParamsREADONLY", [eI, ff, fe], nil))
833- let bY = t(eJ[0])
834- let bZ = t(eJ[1])
835- let bn = toString(t(eJ[2]))
836- let fg = cK(dh)
837- let fh = (eI - fg)
838- if ((0 > fh))
839- then throw(("gwxDiff is less then 0: " + toString(fh)))
647+ let eh = height
648+ let dL = q(invoke(av, "calcGwxParamsREADONLY", [dK, eh, eg], nil))
649+ let bU = t(dL[0])
650+ let bV = t(dL[1])
651+ let bl = toString(t(dL[2]))
652+ let cW = n(bB, ah())
653+ let cX = n(bB, aj())
654+ let cY = n(bB, al())
655+ let co = if ((height > cY))
656+ then cY
657+ else height
658+ let cZ = max([(co - cX), 0])
659+ let db = br(cN)
660+ let dc = k(this, db)
661+ let dd = (((cW * cZ) * 2) / 3)
662+ let de = (dd - dc)
663+ if ((0 > de))
664+ then throw("wrong calculations")
840665 else {
841- let bR = bL(false)
842- let fi = bL(true)
843- (((cu(dh, el, fd, ff, fe, bY, bZ, bn) ++ cc(eE, eY, 0, 0)) :+ bU("lock", dh, eE, bX, fe, bY, bZ, aI)) ++ [IntegerEntry(bA(), (bR + fh))])
666+ let dj = bu(cN)
667+ let dk = bv()
668+ let dl = k(this, dj)
669+ let dm = k(this, dk)
670+ let ei = cG(cJ)
671+ let ej = (dK - ei)
672+ if ((0 > ej))
673+ then throw(("gwxDiff is less then 0: " + toString(ej)))
674+ else {
675+ let bN = bF(false)
676+ let dn = bF(true)
677+ let dp = bw(cN)
678+ let dq = k(this, dp)
679+ let dx = fraction(de, ei, dn)
680+ let ek = ((dK * eg) / 2)
681+ let el = ((ei * ee) / 2)
682+ let em = (ek - el)
683+ (((cq(cJ, cN, ef, eh, eg, bU, bV, bl) ++ bY(dG, ea, 0, 0)) :+ bQ("lock", cJ, dG, bT, eg, bU, bV, aG)) ++ [IntegerEntry(by(), (bN + ej))])
684+ }
844685 }
845686 }
846687 else throw("Strict value is not equal to itself.")
847688 }
848689 }
849690
850691
851692
852-@Callable(aI)
853-func claimWxBoost (cS,dh) = if ((bE != aI.caller))
693+@Callable(aG)
694+func claimWxBoost (cI,cJ) = if ((bC != aG.caller))
854695 then throw("permissions denied")
855696 else {
856- let fj = eh(cS, dh, false)
857- let fk = fj._1
858- let ez = fj._2
859- let eA = fj._3
860- $Tuple2(ez, [fk])
697+ let en = cH(cI, cJ, false)
698+ let dA = en._1
699+ let dB = en._2
700+ let dC = en._3
701+ $Tuple2(dB, [dA])
861702 }
862703
863704
864705
865-@Callable(aI)
866-func claimWxBoostREADONLY (cS,dh) = {
867- let fl = eh(cS, dh, true)
868- let fk = fl._1
869- let ez = fl._2
870- let eA = fl._3
871- $Tuple2(nil, [fk, eA])
706+@Callable(aG)
707+func claimWxBoostREADONLY (cI,cJ) = {
708+ let eo = cH(cI, cJ, true)
709+ let dA = eo._1
710+ let dB = eo._2
711+ let dC = eo._3
712+ $Tuple2(nil, [dA, dC])
872713 }
873714
874715
875716
876-@Callable(aI)
877-func unlock (aS) = {
878- let ek = aT(aS)
879- let el = ek[aL]
880- let eZ = parseIntValue(ek[aM])
881- let bX = parseIntValue(ek[aN])
882- let fa = parseIntValue(ek[aO])
883- let fb = (bX + fa)
884- let eC = aw()
885- let az = fromBase58String(eC[aq])
886- if ((fb >= height))
887- then throw((("wait " + toString(fb)) + " to unlock"))
888- else if ((0 >= eZ))
717+@Callable(aG)
718+func unlock (aQ) = {
719+ let cM = aR(aQ)
720+ let cN = cM[aJ]
721+ let eb = parseIntValue(cM[aK])
722+ let bT = parseIntValue(cM[aL])
723+ let ec = parseIntValue(cM[aM])
724+ let ed = (bT + ec)
725+ let dE = au()
726+ let ax = fromBase58String(dE[ao])
727+ if ((ed >= height))
728+ then throw((("wait " + toString(ed)) + " to unlock"))
729+ else if ((0 >= eb))
889730 then throw("nothing to unlock")
890731 else {
891- let bn = valueOrElse(getInteger(ax, ao()), 0)
892- (((cu(aS, el, 0, bX, fa, 0, 0, toString(bn)) ++ cc(-(eZ), 0, 0, -1)) :+ bU("unlock", aS, eZ, bX, fa, 0, 0, aI)) :+ ScriptTransfer(addressFromStringValue(aS), eZ, az))
732+ let bl = valueOrElse(getInteger(av, am()), 0)
733+ (((cq(aQ, cN, 0, bT, ec, 0, 0, toString(bl)) ++ bY(-(eb), 0, 0, -1)) :+ bQ("unlock", aQ, eb, bT, ec, 0, 0, aG)) :+ ScriptTransfer(addressFromStringValue(aQ), eb, ax))
893734 }
894735 }
895736
896737
897738
898-@Callable(aI)
899-func gwxUserInfoREADONLY (aS) = {
900- let bc = cK(aS)
901- $Tuple2(nil, [bc])
739+@Callable(aG)
740+func gwxUserInfoREADONLY (aQ) = {
741+ let ba = cG(aQ)
742+ $Tuple2(nil, [ba])
902743 }
903744
904745
905746
906-@Callable(aI)
907-func userMaxDurationREADONLY (dh) = {
908- let eC = aw()
909- let aC = parseIntValue(eC[at])
910- let ej = getString(this, aR(dh))
911- if ((ej == unit))
912- then $Tuple2(nil, $Tuple2("lock", aC))
747+@Callable(aG)
748+func userMaxDurationREADONLY (cJ) = {
749+ let dE = au()
750+ let aA = parseIntValue(dE[ar])
751+ let ep = getString(this, aP(cJ))
752+ if ((ep == unit))
753+ then $Tuple2(nil, $Tuple2("lock", aA))
913754 else {
914- let ek = split(value(ej), a)
915- let bX = parseIntValue(ek[aN])
916- let fa = parseIntValue(ek[aO])
917- let fb = (bX + fa)
918- let fc = max([(fb - height), 0])
919- let fm = (aC - fc)
920- $Tuple2(nil, $Tuple2("increaseLock", fm))
755+ let cM = split(value(ep), a)
756+ let bT = parseIntValue(cM[aL])
757+ let ec = parseIntValue(cM[aM])
758+ let ed = (bT + ec)
759+ let ee = max([(ed - height), 0])
760+ let eq = (aA - ee)
761+ $Tuple2(nil, $Tuple2("increaseLock", eq))
921762 }
922763 }
923764
924765
925766
926-@Callable(aI)
927-func getUserGwxAmountAtHeightREADONLY (aS,cG) = {
928- let bc = cF(aS, cG)
929- $Tuple2(nil, bc)
767+@Callable(aG)
768+func getUserGwxAmountAtHeightREADONLY (aQ,cC) = {
769+ let ba = cB(aQ, cC)
770+ $Tuple2(nil, ba)
930771 }
931772
932773
933774
934-@Callable(aI)
935-func getTotalCachedGwxREADONLY () = $Tuple2(nil, bL(true))
775+@Callable(aG)
776+func getTotalCachedGwxREADONLY () = $Tuple2(nil, bF(true))
936777
937778
938779
939-@Callable(aI)
940-func onBoostEmissionUpdate () = {
941- let eP = if ((aI.caller == bD))
942- then true
943- else aH(aI)
944- if ((eP == eP))
945- then dX()
946- else throw("Strict value is not equal to itself.")
947- }
948-
949-
950-
951-@Callable(aI)
952-func onStakedVoteUpdate (cS,dh,dE) = {
953- let eP = if ((aI.caller == bE))
954- then true
955- else aH(aI)
956- if ((eP == eP))
780+@Callable(aG)
781+func setManager (er) = {
782+ let dR = aF(aG)
783+ if ((dR == dR))
957784 then {
958- let dG = dD(cS, dh, dE)
959- $Tuple2(dG, unit)
960- }
961- else throw("Strict value is not equal to itself.")
962- }
963-
964-
965-
966-@Callable(aI)
967-func getVotingResultStakedREADONLY (cS) = $Tuple2(nil, dp(cS))
968-
969-
970-
971-@Callable(aI)
972-func getUserVoteFinalizedREADONLY (cS,dh) = $Tuple2(nil, di(cS, dh))
973-
974-
975-
976-@Callable(aI)
977-func setManager (fn) = {
978- let eP = aH(aI)
979- if ((eP == eP))
980- then {
981- let fo = fromBase58String(fn)
982- if ((fo == fo))
983- then [StringEntry(ag(), fn)]
785+ let es = fromBase58String(er)
786+ if ((es == es))
787+ then [StringEntry(ag(), er)]
984788 else throw("Strict value is not equal to itself.")
985789 }
986790 else throw("Strict value is not equal to itself.")
987791 }
988792
989793
990794
991-@Callable(aI)
795+@Callable(aG)
992796 func confirmManager () = {
993- let fp = aG()
994- let fq = if (isDefined(fp))
797+ let et = aE()
798+ let eu = if (isDefined(et))
995799 then true
996800 else throw("No pending manager")
997- if ((fq == fq))
801+ if ((eu == eu))
998802 then {
999- let fr = if ((aI.callerPublicKey == value(fp)))
803+ let ev = if ((aG.callerPublicKey == value(et)))
1000804 then true
1001805 else throw("You are not pending manager")
1002- if ((fr == fr))
1003- then [StringEntry(af(), toBase58String(value(fp))), DeleteEntry(ag())]
806+ if ((ev == ev))
807+ then [StringEntry(af(), toBase58String(value(et))), DeleteEntry(ag())]
1004808 else throw("Strict value is not equal to itself.")
1005809 }
1006810 else throw("Strict value is not equal to itself.")
1007811 }
1008812
1009813
1010-@Verifier(fs)
1011-func ft () = {
1012- let fu = {
1013- let r = aE()
814+@Verifier(ew)
815+func ex () = {
816+ let ey = {
817+ let r = aC()
1014818 if ($isInstanceOf(r, "ByteVector"))
1015819 then {
1016- let aK = r
1017- aK
820+ let aI = r
821+ aI
1018822 }
1019823 else if ($isInstanceOf(r, "Unit"))
1020- then fs.senderPublicKey
824+ then ew.senderPublicKey
1021825 else throw("Match error")
1022826 }
1023- sigVerify(fs.bodyBytes, fs.proofs[0], fu)
827+ sigVerify(ew.bodyBytes, ew.proofs[0], ey)
1024828 }
1025829

github/deemru/w8io/169f3d6 
263.96 ms