tx · EhLahnhRAZ4g4PS9GUxs3p4vafZ89q8j6Q1rkR5PjEA

3Mp5kisFrqESzrXxAMEPk2k69zpeF41czEE:  -0.01600000 Waves

2023.08.31 11:56 [2734645] smart account 3Mp5kisFrqESzrXxAMEPk2k69zpeF41czEE > SELF 0.00000000 Waves

{ "type": 13, "id": "EhLahnhRAZ4g4PS9GUxs3p4vafZ89q8j6Q1rkR5PjEA", "fee": 1600000, "feeAssetId": null, "timestamp": 1693472237591, "version": 2, "chainId": 84, "sender": "3Mp5kisFrqESzrXxAMEPk2k69zpeF41czEE", "senderPublicKey": "G349Uq3FTox7dRNLeAfAQeoACvwZ9iEnVSaHcEYn6j8J", "proofs": [ "4tKaMVp6fkJBjJPjgDoRgjt1fJHZjJoWERRc19HVDPTVe5TxZaEMPeMYwdZ61xin71545oPcqdYjpoqEudWWJYEV" ], "script": "base64:BgLZFggCEgQKAgIBEgYKBAEYEQESBAoCCAESABIAEgMKAQgSABIECgIYERIAEgMKAQgSAwoBBCIDU0VQIgVTQ0FMRSIFTVVMVDgiB01VTFQ4QkkiCnplcm9CaWdJbnQiFHByb2Nlc3NpbmdTdGFnZVRvdGFsIhVwcm9jZXNzaW5nU3RhZ2VTaGFyZXMiBk1VTFQxOCIITVVMVDE4QkkiC3dhdmVzU3RyaW5nIgd3cmFwRXJyIgNtc2ciCHRocm93RXJyIg5nZXROdW1iZXJCeUtleSIDa2V5Ig9nZXROdW1iZXJPckZhaWwiDmdldFN0cmluZ0J5S2V5Ig9nZXRTdHJpbmdPckZhaWwiDHBhcnNlQXNzZXRJZCIFaW5wdXQiA2FicyIDdmFsIglhYnNCaWdJbnQiC2tleU1heERlcHRoIg9tYXhEZXB0aERlZmF1bHQiCG1heERlcHRoIhFrZXlGYWN0b3J5QWRkcmVzcyIRZmFjdG9yeUFkZHJlc3NTdHIiD2ZhY3RvcnlDb250cmFjdCISa2V5RW1pc3Npb25BZGRyZXNzIhlrZXlWb3RpbmdFbWlzc2lvbkNvbnRyYWN0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aXRzZWxmLgECY2wBAmNtAAQCY24EAmFTCQECYVUAAwkAAQIFAmFTAgpCeXRlVmVjdG9yBAJhWQUCYVMFAmFZAwkAAQIFAmFTAgRVbml0CAUCY2wPc2VuZGVyUHVibGljS2V5CQACAQILTWF0Y2ggZXJyb3IJAPQDAwgFAmNsCWJvZHlCeXRlcwkAkQMCCAUCY2wGcHJvb2ZzAAAFAmNuZJQbEQ==", "height": 2734645, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: G6fZHDhXeatGFoj34kPv9VhdwkiimeX6CM7cG5843yyL Next: 7NvuJ4KAwoJojGajdTuS9iD8jBXST7tKbdzaxaDqENZV Diff:
OldNewDifferences
144144 }
145145
146146
147-func aq () = "%s%s__gwxRewardEmissionPart__startHeight"
147+let aq = "%s__suspension"
148+
149+let ar = valueOrElse(getBoolean(this, aq), false)
150+
151+func as () = if (!(ar))
152+ then true
153+ else m("suspended")
148154
149155
150-func ar () = "%s__nextUserNum"
156+func at () = "%s%s__gwxRewardEmissionPart__startHeight"
151157
152158
153-func as (at) = makeString(["%s%s%s__mapping__user2num", toString(at)], a)
159+func au () = "%s__nextUserNum"
154160
155161
156-func au () = "%s%s__ratePerBlock__current"
162+func av (aw) = makeString(["%s%s%s__mapping__user2num", toString(aw)], a)
157163
158164
159-func av () = "%s%s__gwxHoldersReward__current"
165+func ax () = "%s%s__ratePerBlock__current"
160166
161167
162-func aw () = "%s%s__gwxHoldersReward__next"
168+func ay () = "%s%s__gwxHoldersReward__current"
163169
164170
165-func ax () = "%s%s__poolWeight__GWXvirtualPOOL"
171+func az () = "%s%s__gwxHoldersReward__next"
166172
167173
168-func ay (az) = makeString(["%s%d", "userUnclaimed", toString(az)], a)
174+func aA () = "%s%s__poolWeight__GWXvirtualPOOL"
169175
170176
171-func aA () = makeString(["%s%s", "config", "referralsContractAddress"], a)
177+func aB (aC) = makeString(["%s%d", "userUnclaimed", toString(aC)], a)
172178
173179
174-let aB = addressFromStringValue(r(aA()))
175-
176-func aC (aD,aE) = makeString(["%s%s%s%s", "tradingReward", "history", aD, toBase58String(aE.transactionId)], a)
180+func aD () = makeString(["%s%s", "config", "referralsContractAddress"], a)
177181
178182
179-func aF (at) = makeString(["%s%s", "tradingReward", at], a)
183+let aE = addressFromStringValue(r(aD()))
184+
185+func aF (aG,aH) = makeString(["%s%s%s%s", "tradingReward", "history", aG, toBase58String(aH.transactionId)], a)
180186
181187
182-func aG () = makeString(["%s", "maxRecipients"], a)
188+func aI (aw) = makeString(["%s%s", "tradingReward", aw], a)
183189
184190
185-func aH (aI,aD,aJ,aE) = {
186- let aK = makeString(["%s%s%s%s__history", aI, aD, toBase58String(aE.transactionId)], a)
187- let aL = makeString(["%d%d%d%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(aJ)], a)
188- StringEntry(aK, aL)
191+func aJ () = makeString(["%s", "maxRecipients"], a)
192+
193+
194+func aK (aL,aG,aM,aH) = {
195+ let aN = makeString(["%s%s%s%s__history", aL, aG, toBase58String(aH.transactionId)], a)
196+ let aO = makeString(["%d%d%d%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(aM)], a)
197+ StringEntry(aN, aO)
189198 }
190199
191200
192-func aM () = "%s__managerPublicKey"
201+func aP () = "%s__managerPublicKey"
193202
194203
195-func aN () = "%s__managerVaultAddress"
204+func aQ () = "%s__managerVaultAddress"
196205
197206
198-func aO () = {
199- let aP = getString(aN())
200- if ($isInstanceOf(aP, "String"))
207+func aR () = {
208+ let aS = getString(aQ())
209+ if ($isInstanceOf(aS, "String"))
201210 then {
202- let aQ = aP
203- addressFromStringValue(aQ)
211+ let aT = aS
212+ addressFromStringValue(aT)
204213 }
205214 else this
206215 }
207216
208217
209-func aR () = {
210- let aS = aO()
211- let aP = getString(aS, aM())
212- if ($isInstanceOf(aP, "String"))
218+func aU () = {
219+ let aV = aR()
220+ let aS = getString(aV, aP())
221+ if ($isInstanceOf(aS, "String"))
213222 then {
214- let aQ = aP
215- fromBase58String(aQ)
223+ let aT = aS
224+ fromBase58String(aT)
216225 }
217- else if ($isInstanceOf(aP, "Unit"))
226+ else if ($isInstanceOf(aS, "Unit"))
218227 then unit
219228 else throw("Match error")
220229 }
221230
222231
223-func aT (aE) = {
224- let aU = throw("Permission denied")
225- let aP = aR()
226- if ($isInstanceOf(aP, "ByteVector"))
232+func aW (aH) = {
233+ let aX = throw("Permission denied")
234+ let aS = aU()
235+ if ($isInstanceOf(aS, "ByteVector"))
227236 then {
228- let aV = aP
229- if ((aE.callerPublicKey == aV))
237+ let aY = aS
238+ if ((aH.callerPublicKey == aY))
230239 then true
231- else aU
240+ else aX
232241 }
233- else if ($isInstanceOf(aP, "Unit"))
234- then if ((aE.caller == this))
242+ else if ($isInstanceOf(aS, "Unit"))
243+ then if ((aH.caller == this))
235244 then true
236- else aU
245+ else aX
237246 else throw("Match error")
238247 }
239248
240249
241-func aW (an,at) = {
242- let o = makeString(["%s%s%s", "mapping", "user2num", at], a)
243- parseIntValue(valueOrErrorMessage(getString(Address(fromBase58String(an)), o), ((("User address " + at) + " is not found in boosting contract data, key=") + o)))
250+func aZ (an,aw) = {
251+ let o = makeString(["%s%s%s", "mapping", "user2num", aw], a)
252+ parseIntValue(valueOrErrorMessage(getString(Address(fromBase58String(an)), o), ((("User address " + aw) + " is not found in boosting contract data, key=") + o)))
244253 }
245254
246255
247-func aX (at) = valueOrElse(getInteger(this, aF(at)), 0)
256+func ba (aw) = valueOrElse(getInteger(this, aI(aw)), 0)
248257
249258
250-func aY () = makeString(["%s", "rewardPerGwxIntegral"], a)
259+func bb () = makeString(["%s", "rewardPerGwxIntegral"], a)
251260
252261
253-func aZ () = {
254- let ba = "%s%s__gwx__total"
255- getInteger(ao(), ba)
262+func bc () = {
263+ let bd = "%s%s__gwx__total"
264+ getInteger(ao(), bd)
256265 }
257266
258267
259-func bb (at) = {
260- func bc (at) = makeString(["%s%s__gwxAmountTotal", toString(at)], a)
268+func be (aw) = {
269+ func bf (aw) = makeString(["%s%s__gwxAmountTotal", toString(aw)], a)
261270
262- getInteger(ao(), bc(at))
271+ getInteger(ao(), bf(aw))
263272 }
264273
265274
266-func bd () = {
267- let be = valueOrElse({
268- let aP = getString(this, aY())
269- if ($isInstanceOf(aP, "String"))
275+func bg () = {
276+ let bh = valueOrElse({
277+ let aS = getString(this, bb())
278+ if ($isInstanceOf(aS, "String"))
270279 then {
271- let aQ = aP
272- parseBigInt(aQ)
280+ let aT = aS
281+ parseBigInt(aT)
273282 }
274- else if ($isInstanceOf(aP, "Unit"))
283+ else if ($isInstanceOf(aS, "Unit"))
275284 then unit
276285 else throw("Match error")
277286 }, e)
278- let bf = valueOrErrorMessage(getInteger(this, aq()), k(("invalid " + aq())))
279- let bg = valueOrErrorMessage(getInteger(aa, au()), k(("invalid " + au())))
280- let bh = valueOrElse(getInteger(aa, av()), 0)
281- let bi = valueOrElse(aZ(), 0)
282- let bj = toBigInt((height - bf))
283- let bk = toBigInt(bi)
284- let bl = (be + (if ((bk == e))
287+ let bi = valueOrErrorMessage(getInteger(this, at()), k(("invalid " + at())))
288+ let bj = valueOrErrorMessage(getInteger(aa, ax()), k(("invalid " + ax())))
289+ let bk = valueOrElse(getInteger(aa, ay()), 0)
290+ let bl = valueOrElse(bc(), 0)
291+ let bm = toBigInt((height - bi))
292+ let bn = toBigInt(bl)
293+ let bo = (bh + (if ((bn == e))
285294 then e
286- else fraction(bj, ((toBigInt(bg) * toBigInt(bh)) * i), (bk * d))))
287- $Tuple2([IntegerEntry(aq(), height), StringEntry(aY(), toString(bl))], bl)
295+ else fraction(bm, ((toBigInt(bj) * toBigInt(bk)) * i), (bn * d))))
296+ $Tuple2([IntegerEntry(at(), height), StringEntry(bb(), toString(bo))], bo)
288297 }
289298
290299
291-func bm (at) = makeString(["%s%s", "rewardPerGwxIntegralUserLast", toString(at)], a)
300+func bp (aw) = makeString(["%s%s", "rewardPerGwxIntegralUserLast", toString(aw)], a)
292301
293302
294-func bn (at,bo) = {
295- let bp = bd()
296- let bq = bp._1
297- let bl = bp._2
298- let br = {
299- let aP = getString(this, bm(at))
300- if ($isInstanceOf(aP, "String"))
303+func bq (aw,br) = {
304+ let bs = bg()
305+ let bt = bs._1
306+ let bo = bs._2
307+ let bu = {
308+ let aS = getString(this, bp(aw))
309+ if ($isInstanceOf(aS, "String"))
301310 then {
302- let aQ = aP
303- valueOrErrorMessage(parseBigInt(aQ), k("invalid user last integral"))
311+ let aT = aS
312+ valueOrErrorMessage(parseBigInt(aT), k("invalid user last integral"))
304313 }
305- else if ($isInstanceOf(aP, "Unit"))
306- then bl
314+ else if ($isInstanceOf(aS, "Unit"))
315+ then bo
307316 else throw("Match error")
308317 }
309- let bs = getString(ao(), as(at))
310- let bt = valueOrElse(getInteger(ay(bo)), 0)
311- let bu = valueOrElse(bb(at), 0)
312- let bv = (toInt(fraction(toBigInt(bu), (bl - br), i)) + bt)
313- $Tuple2(([StringEntry(bm(at), toString(bl))] ++ bq), bv)
318+ let bv = getString(ao(), av(aw))
319+ let bw = valueOrElse(getInteger(aB(br)), 0)
320+ let bx = valueOrElse(be(aw), 0)
321+ let by = (toInt(fraction(toBigInt(bx), (bo - bu), i)) + bw)
322+ $Tuple2(([StringEntry(bp(aw), toString(bo))] ++ bt), by)
314323 }
315324
316325
317-func bw (bx) = {
318- let at = valueOrErrorMessage(addressFromString(bx), k("invalid user address"))
326+func bz (bA) = {
327+ let aw = valueOrErrorMessage(addressFromString(bA), k("invalid user address"))
319328 let ap = ak()
320- let bo = aW(ap[ad], bx)
321- let by = bn(at, bo)
322- let bz = by._1
323- let bA = by._2
324- $Tuple2(bA, ([IntegerEntry(ay(bo), 0)] ++ bz))
329+ let br = aZ(ap[ad], bA)
330+ let bB = bq(aw, br)
331+ let bC = bB._1
332+ let bD = bB._2
333+ $Tuple2(bD, ([IntegerEntry(aB(br), 0)] ++ bC))
325334 }
326335
327336
328-@Callable(aE)
329-func refreshUserReward (bB,bo) = {
330- let bC = if ((aE.caller == ao()))
331- then true
332- else m("permission denied")
333- if ((bC == bC))
337+@Callable(aH)
338+func refreshUserReward (bE,br) = {
339+ let bF = as()
340+ if ((bF == bF))
334341 then {
335- let bD = bn(Address(bB), bo)
336- let bz = bD._1
337- let bA = bD._2
338- $Tuple2(([IntegerEntry(ay(bo), bA)] ++ bz), bA)
342+ let bG = if ((aH.caller == ao()))
343+ then true
344+ else m("permission denied")
345+ if ((bG == bG))
346+ then {
347+ let bH = bq(Address(bE), br)
348+ let bC = bH._1
349+ let bD = bH._2
350+ $Tuple2(([IntegerEntry(aB(br), bD)] ++ bC), bD)
351+ }
352+ else throw("Strict value is not equal to itself.")
339353 }
340354 else throw("Strict value is not equal to itself.")
341355 }
342356
343357
344358
345-@Callable(aE)
346-func tradeRewardInternal (bE,bF,bG,bH) = if ((bH == size(bF)))
347- then nil
348- else {
349- let bI = [if ((aE.caller == this))
350- then true
351- else m("Permission denied"), if ((bE >= bG[bH]))
352- then true
353- else m("insufficient payment assetId")]
354- if ((bI == bI))
355- then {
356- let bJ = invoke(this, "tradeRewardInternal", [(bE - bG[bH]), bF, bG, (bH + 1)], nil)
357- if ((bJ == bJ))
359+@Callable(aH)
360+func tradeRewardInternal (bI,bJ,bK,bL) = {
361+ let bF = as()
362+ if ((bF == bF))
363+ then if ((bL == size(bJ)))
364+ then nil
365+ else {
366+ let bM = [if ((aH.caller == this))
367+ then true
368+ else m("Permission denied"), if ((bI >= bK[bL]))
369+ then true
370+ else m("insufficient payment assetId")]
371+ if ((bM == bM))
358372 then {
359- let bK = aC(bF[bH], aE)
360- let at = addressFromStringValue(bF[bH])
361- $Tuple2([IntegerEntry(bK, bG[bH]), IntegerEntry(aF(bF[bH]), bG[bH])], bJ)
373+ let bN = invoke(this, "tradeRewardInternal", [(bI - bK[bL]), bJ, bK, (bL + 1)], nil)
374+ if ((bN == bN))
375+ then {
376+ let bO = aF(bJ[bL], aH)
377+ let aw = addressFromStringValue(bJ[bL])
378+ $Tuple2([IntegerEntry(bO, bK[bL]), IntegerEntry(aI(bJ[bL]), bK[bL])], bN)
379+ }
380+ else throw("Strict value is not equal to itself.")
362381 }
363382 else throw("Strict value is not equal to itself.")
364383 }
365- else throw("Strict value is not equal to itself.")
366- }
367-
368-
369-
370-@Callable(aE)
371-func updateReferralActivity (at,bL) = {
372- let bM = getString(aB, U(at))
373- let bN = if ((bM == unit))
374- then unit
375- else invoke(aB, "updateReferralActivity", [K, at, (bL >= N)], nil)
376- if ((bN == bN))
377- then $Tuple2(nil, unit)
378384 else throw("Strict value is not equal to itself.")
379385 }
380386
381387
382388
383-@Callable(aE)
389+@Callable(aH)
390+func updateReferralActivity (aw,bP) = {
391+ let bF = as()
392+ if ((bF == bF))
393+ then {
394+ let bQ = getString(aE, U(aw))
395+ let bR = if ((bQ == unit))
396+ then unit
397+ else invoke(aE, "updateReferralActivity", [K, aw, (bP >= N)], nil)
398+ if ((bR == bR))
399+ then $Tuple2(nil, unit)
400+ else throw("Strict value is not equal to itself.")
401+ }
402+ else throw("Strict value is not equal to itself.")
403+ }
404+
405+
406+
407+@Callable(aH)
384408 func processPendingPeriodsAndUsers () = $Tuple2(nil, m("deprecated"))
385409
386410
387411
388-@Callable(aE)
412+@Callable(aH)
389413 func claimReward () = {
390- let ap = ak()
391- let at = aE.caller
392- let bx = toString(at)
393- let bO = bw(bx)
394- let aJ = bO._1
395- let bz = bO._2
396- let bP = if ((aJ > 0))
397- then true
398- else throw("nothing to claim")
399- if ((bP == bP))
414+ let bF = as()
415+ if ((bF == bF))
400416 then {
401- let bu = {
402- let bQ = invoke(ao(), "getUserGwxAmount", [bx], nil)
403- if ($isInstanceOf(bQ, "Int"))
404- then bQ
405- else throw(($getType(bQ) + " couldn't be cast to Int"))
406- }
407- let bM = getString(aB, U(bx))
408- let bN = if ((bM == unit))
409- then unit
410- else invoke(aB, "updateReferralActivity", [K, at, (bu >= N)], nil)
411- if ((bN == bN))
417+ let ap = ak()
418+ let aw = aH.caller
419+ let bA = toString(aw)
420+ let bS = bz(bA)
421+ let aM = bS._1
422+ let bC = bS._2
423+ let bT = if ((aM > 0))
424+ then true
425+ else throw("nothing to claim")
426+ if ((bT == bT))
412427 then {
413- let bR = if (if ((bM == unit))
414- then true
415- else (N > bu))
428+ let bx = {
429+ let bU = invoke(ao(), "getUserGwxAmount", [bA], nil)
430+ if ($isInstanceOf(bU, "Int"))
431+ then bU
432+ else throw(($getType(bU) + " couldn't be cast to Int"))
433+ }
434+ let bQ = getString(aE, U(bA))
435+ let bR = if ((bQ == unit))
416436 then unit
417- else {
418- let bS = fraction(aJ, Q, b)
419- let bT = fraction(aJ, T, b)
420- invoke(aB, "incUnclaimed", [K, at, bS, bT], nil)
421- }
437+ else invoke(aE, "updateReferralActivity", [K, aw, (bx >= N)], nil)
422438 if ((bR == bR))
423439 then {
424- let bU = invoke(aa, "emit", [aJ], nil)
425- if ((bU == bU))
440+ let bV = if (if ((bQ == unit))
441+ then true
442+ else (N > bx))
443+ then unit
444+ else {
445+ let bW = fraction(aM, Q, b)
446+ let bX = fraction(aM, T, b)
447+ invoke(aE, "incUnclaimed", [K, aw, bW, bX], nil)
448+ }
449+ if ((bV == bV))
426450 then {
427- let bV = {
428- let bQ = invoke(aB, "claim", [K], nil)
429- if ($isInstanceOf(bQ, "Int"))
430- then bQ
431- else throw(($getType(bQ) + " couldn't be cast to Int"))
432- }
433- if ((bV == bV))
451+ let bY = invoke(aa, "emit", [aM], nil)
452+ if ((bY == bY))
434453 then {
435- let bW = (aJ + bV)
436- $Tuple2(([ScriptTransfer(aE.caller, aJ, aj), aH("claim", bx, bW, aE)] ++ bz), bW)
454+ let bZ = {
455+ let bU = invoke(aE, "claim", [K], nil)
456+ if ($isInstanceOf(bU, "Int"))
457+ then bU
458+ else throw(($getType(bU) + " couldn't be cast to Int"))
459+ }
460+ if ((bZ == bZ))
461+ then {
462+ let ca = (aM + bZ)
463+ $Tuple2(([ScriptTransfer(aH.caller, aM, aj), aK("claim", bA, ca, aH)] ++ bC), ca)
464+ }
465+ else throw("Strict value is not equal to itself.")
437466 }
438467 else throw("Strict value is not equal to itself.")
439468 }
448477
449478
450479
451-@Callable(aE)
452-func claimRewardREADONLY (bX) = {
453- let bY = bw(bX)
454- let aJ = bY._1
455- let bz = bY._2
456- let bZ = valueOrElse(getInteger(aB, W(K, bX)), 0)
457- let bW = (aJ + bZ)
458- $Tuple2(nil, bW)
480+@Callable(aH)
481+func claimRewardREADONLY (cb) = {
482+ let cc = bz(cb)
483+ let aM = cc._1
484+ let bC = cc._2
485+ let cd = valueOrElse(getInteger(aE, W(K, cb)), 0)
486+ let ca = (aM + cd)
487+ $Tuple2(nil, ca)
459488 }
460489
461490
462491
463-@Callable(aE)
464-func onEmissionForGwxStart () = if ((aE.caller != C))
465- then throw("permissions denied")
466- else [IntegerEntry(aq(), height)]
492+@Callable(aH)
493+func onEmissionForGwxStart () = {
494+ let bF = as()
495+ if ((bF == bF))
496+ then if ((aH.caller != C))
497+ then throw("permissions denied")
498+ else [IntegerEntry(at(), height)]
499+ else throw("Strict value is not equal to itself.")
500+ }
467501
468502
469503
470-@Callable(aE)
471-func tradeReward (bF,bG) = {
472- let ca = (size(bF) == size(bG))
473- let cb = valueOrElse(getInteger(aG()), 0)
474- let cc = aE.payments[0]
475- let cd = cc.assetId
476- let ce = cc.amount
477- let bI = [if ((cb >= size(bF)))
478- then true
479- else m("Too many recipients"), if (ca)
480- then true
481- else m("Arguments size mismatch"), if ((cd == aj))
482- then true
483- else m("Wrong asset payment")]
484- if ((bI == bI))
504+@Callable(aH)
505+func tradeReward (bJ,bK) = {
506+ let bF = as()
507+ if ((bF == bF))
485508 then {
486- let bJ = invoke(this, "tradeRewardInternal", [ce, bF, bG, 0], nil)
487- if ((bJ == bJ))
488- then $Tuple2(nil, bJ)
509+ let ce = (size(bJ) == size(bK))
510+ let cf = valueOrElse(getInteger(aJ()), 0)
511+ let cg = aH.payments[0]
512+ let ch = cg.assetId
513+ let ci = cg.amount
514+ let bM = [if ((cf >= size(bJ)))
515+ then true
516+ else m("Too many recipients"), if (ce)
517+ then true
518+ else m("Arguments size mismatch"), if ((ch == aj))
519+ then true
520+ else m("Wrong asset payment")]
521+ if ((bM == bM))
522+ then {
523+ let bN = invoke(this, "tradeRewardInternal", [ci, bJ, bK, 0], nil)
524+ if ((bN == bN))
525+ then $Tuple2(nil, bN)
526+ else throw("Strict value is not equal to itself.")
527+ }
489528 else throw("Strict value is not equal to itself.")
490529 }
491530 else throw("Strict value is not equal to itself.")
493532
494533
495534
496-@Callable(aE)
535+@Callable(aH)
497536 func claimTradingReward () = {
498- let at = aE.caller
499- let cf = toString(at)
500- let bA = aX(cf)
501- if ((bA > 0))
502- then $Tuple2([ScriptTransfer(at, bA, aj), IntegerEntry(aF(cf), 0)], bA)
503- else m("nothing to claim")
537+ let bF = as()
538+ if ((bF == bF))
539+ then {
540+ let aw = aH.caller
541+ let cj = toString(aw)
542+ let bD = ba(cj)
543+ if ((bD > 0))
544+ then $Tuple2([ScriptTransfer(aw, bD, aj), IntegerEntry(aI(cj), 0)], bD)
545+ else m("nothing to claim")
546+ }
547+ else throw("Strict value is not equal to itself.")
504548 }
505549
506550
507551
508-@Callable(aE)
509-func claimTradingRewardREADONLY (at) = $Tuple2(nil, aX(at))
552+@Callable(aH)
553+func claimTradingRewardREADONLY (aw) = $Tuple2(nil, ba(aw))
510554
511555
512-@Verifier(cg)
513-func ch () = {
514- let ci = {
515- let aP = aR()
516- if ($isInstanceOf(aP, "ByteVector"))
556+
557+@Callable(aH)
558+func suspend (ck) = {
559+ let bG = aW(aH)
560+ if ((bG == bG))
561+ then $Tuple2([BooleanEntry(aq, ck)], ck)
562+ else throw("Strict value is not equal to itself.")
563+ }
564+
565+
566+@Verifier(cl)
567+func cm () = {
568+ let cn = {
569+ let aS = aU()
570+ if ($isInstanceOf(aS, "ByteVector"))
517571 then {
518- let aV = aP
519- aV
572+ let aY = aS
573+ aY
520574 }
521- else if ($isInstanceOf(aP, "Unit"))
522- then cg.senderPublicKey
575+ else if ($isInstanceOf(aS, "Unit"))
576+ then cl.senderPublicKey
523577 else throw("Match error")
524578 }
525- sigVerify(cg.bodyBytes, cg.proofs[0], ci)
579+ sigVerify(cl.bodyBytes, cl.proofs[0], cn)
526580 }
527581
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "__"
55
66 let b = 1000
77
88 let c = 100000000
99
1010 let d = toBigInt(c)
1111
1212 let e = toBigInt(0)
1313
1414 let f = 0
1515
1616 let g = 1
1717
1818 let h = 1000000000000000000
1919
2020 let i = toBigInt(h)
2121
2222 let j = "WAVES"
2323
2424 func k (l) = makeString(["gwx_reward.ride:", l], " ")
2525
2626
2727 func m (l) = throw(k(l))
2828
2929
3030 func n (o) = valueOrElse(getInteger(this, o), 0)
3131
3232
3333 func p (o) = valueOrErrorMessage(getInteger(this, o), k((("mandatory this." + o) + " is not defined")))
3434
3535
3636 func q (o) = valueOrElse(getString(this, o), "")
3737
3838
3939 func r (o) = valueOrErrorMessage(getString(this, o), k((("mandatory this." + o) + " is not defined")))
4040
4141
4242 func s (t) = if ((t == j))
4343 then unit
4444 else fromBase58String(t)
4545
4646
4747 func u (v) = if ((0 > v))
4848 then -(v)
4949 else v
5050
5151
5252 func w (v) = if ((e > v))
5353 then -(v)
5454 else v
5555
5656
5757 let x = "%s__maxDepth"
5858
5959 let y = 30
6060
6161 let z = valueOrElse(getInteger(this, x), y)
6262
6363 func A () = "%s%s__config__factoryAddress"
6464
6565
6666 let B = r(A())
6767
6868 let C = addressFromStringValue(B)
6969
7070 func D () = "%s%s__config__emissionAddress"
7171
7272
7373 func E () = makeString(["%s", "votingEmissionContract"], a)
7474
7575
7676 let F = addressFromStringValue(getStringValue(C, E()))
7777
7878 func G (H) = makeString(["%s%s%s", "mapping", "num2user", toString(H)], a)
7979
8080
8181 let I = makeString(["%s%s", "referral", "programName"], a)
8282
8383 let J = "wxlock"
8484
8585 let K = valueOrElse(getString(this, I), J)
8686
8787 let L = makeString(["%s%s", "referral", "minGWxAmount"], a)
8888
8989 let M = (500 * c)
9090
9191 let N = valueOrElse(getInteger(this, L), M)
9292
9393 let O = makeString(["%s%s", "referral", "referrerRewardPermille"], a)
9494
9595 let P = 50
9696
9797 let Q = valueOrElse(getInteger(this, O), P)
9898
9999 let R = makeString(["%s%s", "referral", "referralRewardPermille"], a)
100100
101101 let S = 50
102102
103103 let T = valueOrElse(getInteger(this, R), S)
104104
105105 func U (V) = makeString(["%s%s%s", "referrer", K, V], a)
106106
107107
108108 func W (X,Y) = makeString(["%s%s%s", "unclaimedReferral", X, Y], a)
109109
110110
111111 let Z = r(D())
112112
113113 let aa = addressFromStringValue(Z)
114114
115115 let ab = 1
116116
117117 let ac = 2
118118
119119 let ad = 3
120120
121121 let ae = 4
122122
123123 func af () = "%s__config"
124124
125125
126126 func ag () = addressFromStringValue(valueOrErrorMessage(getString(this, D()), (("mandatory this." + D()) + " is not defined")))
127127
128128
129129 let ah = ag()
130130
131131 let ai = split(value(getString(ah, af())), a)[1]
132132
133133 let aj = fromBase58String(ai)
134134
135135 func ak () = split(r(af()), a)
136136
137137
138138 func al (ai,am,an,z) = makeString(["%s%s%s%d", ai, am, an, toString(z)], a)
139139
140140
141141 func ao () = {
142142 let ap = ak()
143143 valueOrErrorMessage(addressFromString(ap[ad]), "boosting contract address is not defined")
144144 }
145145
146146
147-func aq () = "%s%s__gwxRewardEmissionPart__startHeight"
147+let aq = "%s__suspension"
148+
149+let ar = valueOrElse(getBoolean(this, aq), false)
150+
151+func as () = if (!(ar))
152+ then true
153+ else m("suspended")
148154
149155
150-func ar () = "%s__nextUserNum"
156+func at () = "%s%s__gwxRewardEmissionPart__startHeight"
151157
152158
153-func as (at) = makeString(["%s%s%s__mapping__user2num", toString(at)], a)
159+func au () = "%s__nextUserNum"
154160
155161
156-func au () = "%s%s__ratePerBlock__current"
162+func av (aw) = makeString(["%s%s%s__mapping__user2num", toString(aw)], a)
157163
158164
159-func av () = "%s%s__gwxHoldersReward__current"
165+func ax () = "%s%s__ratePerBlock__current"
160166
161167
162-func aw () = "%s%s__gwxHoldersReward__next"
168+func ay () = "%s%s__gwxHoldersReward__current"
163169
164170
165-func ax () = "%s%s__poolWeight__GWXvirtualPOOL"
171+func az () = "%s%s__gwxHoldersReward__next"
166172
167173
168-func ay (az) = makeString(["%s%d", "userUnclaimed", toString(az)], a)
174+func aA () = "%s%s__poolWeight__GWXvirtualPOOL"
169175
170176
171-func aA () = makeString(["%s%s", "config", "referralsContractAddress"], a)
177+func aB (aC) = makeString(["%s%d", "userUnclaimed", toString(aC)], a)
172178
173179
174-let aB = addressFromStringValue(r(aA()))
175-
176-func aC (aD,aE) = makeString(["%s%s%s%s", "tradingReward", "history", aD, toBase58String(aE.transactionId)], a)
180+func aD () = makeString(["%s%s", "config", "referralsContractAddress"], a)
177181
178182
179-func aF (at) = makeString(["%s%s", "tradingReward", at], a)
183+let aE = addressFromStringValue(r(aD()))
184+
185+func aF (aG,aH) = makeString(["%s%s%s%s", "tradingReward", "history", aG, toBase58String(aH.transactionId)], a)
180186
181187
182-func aG () = makeString(["%s", "maxRecipients"], a)
188+func aI (aw) = makeString(["%s%s", "tradingReward", aw], a)
183189
184190
185-func aH (aI,aD,aJ,aE) = {
186- let aK = makeString(["%s%s%s%s__history", aI, aD, toBase58String(aE.transactionId)], a)
187- let aL = makeString(["%d%d%d%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(aJ)], a)
188- StringEntry(aK, aL)
191+func aJ () = makeString(["%s", "maxRecipients"], a)
192+
193+
194+func aK (aL,aG,aM,aH) = {
195+ let aN = makeString(["%s%s%s%s__history", aL, aG, toBase58String(aH.transactionId)], a)
196+ let aO = makeString(["%d%d%d%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(aM)], a)
197+ StringEntry(aN, aO)
189198 }
190199
191200
192-func aM () = "%s__managerPublicKey"
201+func aP () = "%s__managerPublicKey"
193202
194203
195-func aN () = "%s__managerVaultAddress"
204+func aQ () = "%s__managerVaultAddress"
196205
197206
198-func aO () = {
199- let aP = getString(aN())
200- if ($isInstanceOf(aP, "String"))
207+func aR () = {
208+ let aS = getString(aQ())
209+ if ($isInstanceOf(aS, "String"))
201210 then {
202- let aQ = aP
203- addressFromStringValue(aQ)
211+ let aT = aS
212+ addressFromStringValue(aT)
204213 }
205214 else this
206215 }
207216
208217
209-func aR () = {
210- let aS = aO()
211- let aP = getString(aS, aM())
212- if ($isInstanceOf(aP, "String"))
218+func aU () = {
219+ let aV = aR()
220+ let aS = getString(aV, aP())
221+ if ($isInstanceOf(aS, "String"))
213222 then {
214- let aQ = aP
215- fromBase58String(aQ)
223+ let aT = aS
224+ fromBase58String(aT)
216225 }
217- else if ($isInstanceOf(aP, "Unit"))
226+ else if ($isInstanceOf(aS, "Unit"))
218227 then unit
219228 else throw("Match error")
220229 }
221230
222231
223-func aT (aE) = {
224- let aU = throw("Permission denied")
225- let aP = aR()
226- if ($isInstanceOf(aP, "ByteVector"))
232+func aW (aH) = {
233+ let aX = throw("Permission denied")
234+ let aS = aU()
235+ if ($isInstanceOf(aS, "ByteVector"))
227236 then {
228- let aV = aP
229- if ((aE.callerPublicKey == aV))
237+ let aY = aS
238+ if ((aH.callerPublicKey == aY))
230239 then true
231- else aU
240+ else aX
232241 }
233- else if ($isInstanceOf(aP, "Unit"))
234- then if ((aE.caller == this))
242+ else if ($isInstanceOf(aS, "Unit"))
243+ then if ((aH.caller == this))
235244 then true
236- else aU
245+ else aX
237246 else throw("Match error")
238247 }
239248
240249
241-func aW (an,at) = {
242- let o = makeString(["%s%s%s", "mapping", "user2num", at], a)
243- parseIntValue(valueOrErrorMessage(getString(Address(fromBase58String(an)), o), ((("User address " + at) + " is not found in boosting contract data, key=") + o)))
250+func aZ (an,aw) = {
251+ let o = makeString(["%s%s%s", "mapping", "user2num", aw], a)
252+ parseIntValue(valueOrErrorMessage(getString(Address(fromBase58String(an)), o), ((("User address " + aw) + " is not found in boosting contract data, key=") + o)))
244253 }
245254
246255
247-func aX (at) = valueOrElse(getInteger(this, aF(at)), 0)
256+func ba (aw) = valueOrElse(getInteger(this, aI(aw)), 0)
248257
249258
250-func aY () = makeString(["%s", "rewardPerGwxIntegral"], a)
259+func bb () = makeString(["%s", "rewardPerGwxIntegral"], a)
251260
252261
253-func aZ () = {
254- let ba = "%s%s__gwx__total"
255- getInteger(ao(), ba)
262+func bc () = {
263+ let bd = "%s%s__gwx__total"
264+ getInteger(ao(), bd)
256265 }
257266
258267
259-func bb (at) = {
260- func bc (at) = makeString(["%s%s__gwxAmountTotal", toString(at)], a)
268+func be (aw) = {
269+ func bf (aw) = makeString(["%s%s__gwxAmountTotal", toString(aw)], a)
261270
262- getInteger(ao(), bc(at))
271+ getInteger(ao(), bf(aw))
263272 }
264273
265274
266-func bd () = {
267- let be = valueOrElse({
268- let aP = getString(this, aY())
269- if ($isInstanceOf(aP, "String"))
275+func bg () = {
276+ let bh = valueOrElse({
277+ let aS = getString(this, bb())
278+ if ($isInstanceOf(aS, "String"))
270279 then {
271- let aQ = aP
272- parseBigInt(aQ)
280+ let aT = aS
281+ parseBigInt(aT)
273282 }
274- else if ($isInstanceOf(aP, "Unit"))
283+ else if ($isInstanceOf(aS, "Unit"))
275284 then unit
276285 else throw("Match error")
277286 }, e)
278- let bf = valueOrErrorMessage(getInteger(this, aq()), k(("invalid " + aq())))
279- let bg = valueOrErrorMessage(getInteger(aa, au()), k(("invalid " + au())))
280- let bh = valueOrElse(getInteger(aa, av()), 0)
281- let bi = valueOrElse(aZ(), 0)
282- let bj = toBigInt((height - bf))
283- let bk = toBigInt(bi)
284- let bl = (be + (if ((bk == e))
287+ let bi = valueOrErrorMessage(getInteger(this, at()), k(("invalid " + at())))
288+ let bj = valueOrErrorMessage(getInteger(aa, ax()), k(("invalid " + ax())))
289+ let bk = valueOrElse(getInteger(aa, ay()), 0)
290+ let bl = valueOrElse(bc(), 0)
291+ let bm = toBigInt((height - bi))
292+ let bn = toBigInt(bl)
293+ let bo = (bh + (if ((bn == e))
285294 then e
286- else fraction(bj, ((toBigInt(bg) * toBigInt(bh)) * i), (bk * d))))
287- $Tuple2([IntegerEntry(aq(), height), StringEntry(aY(), toString(bl))], bl)
295+ else fraction(bm, ((toBigInt(bj) * toBigInt(bk)) * i), (bn * d))))
296+ $Tuple2([IntegerEntry(at(), height), StringEntry(bb(), toString(bo))], bo)
288297 }
289298
290299
291-func bm (at) = makeString(["%s%s", "rewardPerGwxIntegralUserLast", toString(at)], a)
300+func bp (aw) = makeString(["%s%s", "rewardPerGwxIntegralUserLast", toString(aw)], a)
292301
293302
294-func bn (at,bo) = {
295- let bp = bd()
296- let bq = bp._1
297- let bl = bp._2
298- let br = {
299- let aP = getString(this, bm(at))
300- if ($isInstanceOf(aP, "String"))
303+func bq (aw,br) = {
304+ let bs = bg()
305+ let bt = bs._1
306+ let bo = bs._2
307+ let bu = {
308+ let aS = getString(this, bp(aw))
309+ if ($isInstanceOf(aS, "String"))
301310 then {
302- let aQ = aP
303- valueOrErrorMessage(parseBigInt(aQ), k("invalid user last integral"))
311+ let aT = aS
312+ valueOrErrorMessage(parseBigInt(aT), k("invalid user last integral"))
304313 }
305- else if ($isInstanceOf(aP, "Unit"))
306- then bl
314+ else if ($isInstanceOf(aS, "Unit"))
315+ then bo
307316 else throw("Match error")
308317 }
309- let bs = getString(ao(), as(at))
310- let bt = valueOrElse(getInteger(ay(bo)), 0)
311- let bu = valueOrElse(bb(at), 0)
312- let bv = (toInt(fraction(toBigInt(bu), (bl - br), i)) + bt)
313- $Tuple2(([StringEntry(bm(at), toString(bl))] ++ bq), bv)
318+ let bv = getString(ao(), av(aw))
319+ let bw = valueOrElse(getInteger(aB(br)), 0)
320+ let bx = valueOrElse(be(aw), 0)
321+ let by = (toInt(fraction(toBigInt(bx), (bo - bu), i)) + bw)
322+ $Tuple2(([StringEntry(bp(aw), toString(bo))] ++ bt), by)
314323 }
315324
316325
317-func bw (bx) = {
318- let at = valueOrErrorMessage(addressFromString(bx), k("invalid user address"))
326+func bz (bA) = {
327+ let aw = valueOrErrorMessage(addressFromString(bA), k("invalid user address"))
319328 let ap = ak()
320- let bo = aW(ap[ad], bx)
321- let by = bn(at, bo)
322- let bz = by._1
323- let bA = by._2
324- $Tuple2(bA, ([IntegerEntry(ay(bo), 0)] ++ bz))
329+ let br = aZ(ap[ad], bA)
330+ let bB = bq(aw, br)
331+ let bC = bB._1
332+ let bD = bB._2
333+ $Tuple2(bD, ([IntegerEntry(aB(br), 0)] ++ bC))
325334 }
326335
327336
328-@Callable(aE)
329-func refreshUserReward (bB,bo) = {
330- let bC = if ((aE.caller == ao()))
331- then true
332- else m("permission denied")
333- if ((bC == bC))
337+@Callable(aH)
338+func refreshUserReward (bE,br) = {
339+ let bF = as()
340+ if ((bF == bF))
334341 then {
335- let bD = bn(Address(bB), bo)
336- let bz = bD._1
337- let bA = bD._2
338- $Tuple2(([IntegerEntry(ay(bo), bA)] ++ bz), bA)
342+ let bG = if ((aH.caller == ao()))
343+ then true
344+ else m("permission denied")
345+ if ((bG == bG))
346+ then {
347+ let bH = bq(Address(bE), br)
348+ let bC = bH._1
349+ let bD = bH._2
350+ $Tuple2(([IntegerEntry(aB(br), bD)] ++ bC), bD)
351+ }
352+ else throw("Strict value is not equal to itself.")
339353 }
340354 else throw("Strict value is not equal to itself.")
341355 }
342356
343357
344358
345-@Callable(aE)
346-func tradeRewardInternal (bE,bF,bG,bH) = if ((bH == size(bF)))
347- then nil
348- else {
349- let bI = [if ((aE.caller == this))
350- then true
351- else m("Permission denied"), if ((bE >= bG[bH]))
352- then true
353- else m("insufficient payment assetId")]
354- if ((bI == bI))
355- then {
356- let bJ = invoke(this, "tradeRewardInternal", [(bE - bG[bH]), bF, bG, (bH + 1)], nil)
357- if ((bJ == bJ))
359+@Callable(aH)
360+func tradeRewardInternal (bI,bJ,bK,bL) = {
361+ let bF = as()
362+ if ((bF == bF))
363+ then if ((bL == size(bJ)))
364+ then nil
365+ else {
366+ let bM = [if ((aH.caller == this))
367+ then true
368+ else m("Permission denied"), if ((bI >= bK[bL]))
369+ then true
370+ else m("insufficient payment assetId")]
371+ if ((bM == bM))
358372 then {
359- let bK = aC(bF[bH], aE)
360- let at = addressFromStringValue(bF[bH])
361- $Tuple2([IntegerEntry(bK, bG[bH]), IntegerEntry(aF(bF[bH]), bG[bH])], bJ)
373+ let bN = invoke(this, "tradeRewardInternal", [(bI - bK[bL]), bJ, bK, (bL + 1)], nil)
374+ if ((bN == bN))
375+ then {
376+ let bO = aF(bJ[bL], aH)
377+ let aw = addressFromStringValue(bJ[bL])
378+ $Tuple2([IntegerEntry(bO, bK[bL]), IntegerEntry(aI(bJ[bL]), bK[bL])], bN)
379+ }
380+ else throw("Strict value is not equal to itself.")
362381 }
363382 else throw("Strict value is not equal to itself.")
364383 }
365- else throw("Strict value is not equal to itself.")
366- }
367-
368-
369-
370-@Callable(aE)
371-func updateReferralActivity (at,bL) = {
372- let bM = getString(aB, U(at))
373- let bN = if ((bM == unit))
374- then unit
375- else invoke(aB, "updateReferralActivity", [K, at, (bL >= N)], nil)
376- if ((bN == bN))
377- then $Tuple2(nil, unit)
378384 else throw("Strict value is not equal to itself.")
379385 }
380386
381387
382388
383-@Callable(aE)
389+@Callable(aH)
390+func updateReferralActivity (aw,bP) = {
391+ let bF = as()
392+ if ((bF == bF))
393+ then {
394+ let bQ = getString(aE, U(aw))
395+ let bR = if ((bQ == unit))
396+ then unit
397+ else invoke(aE, "updateReferralActivity", [K, aw, (bP >= N)], nil)
398+ if ((bR == bR))
399+ then $Tuple2(nil, unit)
400+ else throw("Strict value is not equal to itself.")
401+ }
402+ else throw("Strict value is not equal to itself.")
403+ }
404+
405+
406+
407+@Callable(aH)
384408 func processPendingPeriodsAndUsers () = $Tuple2(nil, m("deprecated"))
385409
386410
387411
388-@Callable(aE)
412+@Callable(aH)
389413 func claimReward () = {
390- let ap = ak()
391- let at = aE.caller
392- let bx = toString(at)
393- let bO = bw(bx)
394- let aJ = bO._1
395- let bz = bO._2
396- let bP = if ((aJ > 0))
397- then true
398- else throw("nothing to claim")
399- if ((bP == bP))
414+ let bF = as()
415+ if ((bF == bF))
400416 then {
401- let bu = {
402- let bQ = invoke(ao(), "getUserGwxAmount", [bx], nil)
403- if ($isInstanceOf(bQ, "Int"))
404- then bQ
405- else throw(($getType(bQ) + " couldn't be cast to Int"))
406- }
407- let bM = getString(aB, U(bx))
408- let bN = if ((bM == unit))
409- then unit
410- else invoke(aB, "updateReferralActivity", [K, at, (bu >= N)], nil)
411- if ((bN == bN))
417+ let ap = ak()
418+ let aw = aH.caller
419+ let bA = toString(aw)
420+ let bS = bz(bA)
421+ let aM = bS._1
422+ let bC = bS._2
423+ let bT = if ((aM > 0))
424+ then true
425+ else throw("nothing to claim")
426+ if ((bT == bT))
412427 then {
413- let bR = if (if ((bM == unit))
414- then true
415- else (N > bu))
428+ let bx = {
429+ let bU = invoke(ao(), "getUserGwxAmount", [bA], nil)
430+ if ($isInstanceOf(bU, "Int"))
431+ then bU
432+ else throw(($getType(bU) + " couldn't be cast to Int"))
433+ }
434+ let bQ = getString(aE, U(bA))
435+ let bR = if ((bQ == unit))
416436 then unit
417- else {
418- let bS = fraction(aJ, Q, b)
419- let bT = fraction(aJ, T, b)
420- invoke(aB, "incUnclaimed", [K, at, bS, bT], nil)
421- }
437+ else invoke(aE, "updateReferralActivity", [K, aw, (bx >= N)], nil)
422438 if ((bR == bR))
423439 then {
424- let bU = invoke(aa, "emit", [aJ], nil)
425- if ((bU == bU))
440+ let bV = if (if ((bQ == unit))
441+ then true
442+ else (N > bx))
443+ then unit
444+ else {
445+ let bW = fraction(aM, Q, b)
446+ let bX = fraction(aM, T, b)
447+ invoke(aE, "incUnclaimed", [K, aw, bW, bX], nil)
448+ }
449+ if ((bV == bV))
426450 then {
427- let bV = {
428- let bQ = invoke(aB, "claim", [K], nil)
429- if ($isInstanceOf(bQ, "Int"))
430- then bQ
431- else throw(($getType(bQ) + " couldn't be cast to Int"))
432- }
433- if ((bV == bV))
451+ let bY = invoke(aa, "emit", [aM], nil)
452+ if ((bY == bY))
434453 then {
435- let bW = (aJ + bV)
436- $Tuple2(([ScriptTransfer(aE.caller, aJ, aj), aH("claim", bx, bW, aE)] ++ bz), bW)
454+ let bZ = {
455+ let bU = invoke(aE, "claim", [K], nil)
456+ if ($isInstanceOf(bU, "Int"))
457+ then bU
458+ else throw(($getType(bU) + " couldn't be cast to Int"))
459+ }
460+ if ((bZ == bZ))
461+ then {
462+ let ca = (aM + bZ)
463+ $Tuple2(([ScriptTransfer(aH.caller, aM, aj), aK("claim", bA, ca, aH)] ++ bC), ca)
464+ }
465+ else throw("Strict value is not equal to itself.")
437466 }
438467 else throw("Strict value is not equal to itself.")
439468 }
440469 else throw("Strict value is not equal to itself.")
441470 }
442471 else throw("Strict value is not equal to itself.")
443472 }
444473 else throw("Strict value is not equal to itself.")
445474 }
446475 else throw("Strict value is not equal to itself.")
447476 }
448477
449478
450479
451-@Callable(aE)
452-func claimRewardREADONLY (bX) = {
453- let bY = bw(bX)
454- let aJ = bY._1
455- let bz = bY._2
456- let bZ = valueOrElse(getInteger(aB, W(K, bX)), 0)
457- let bW = (aJ + bZ)
458- $Tuple2(nil, bW)
480+@Callable(aH)
481+func claimRewardREADONLY (cb) = {
482+ let cc = bz(cb)
483+ let aM = cc._1
484+ let bC = cc._2
485+ let cd = valueOrElse(getInteger(aE, W(K, cb)), 0)
486+ let ca = (aM + cd)
487+ $Tuple2(nil, ca)
459488 }
460489
461490
462491
463-@Callable(aE)
464-func onEmissionForGwxStart () = if ((aE.caller != C))
465- then throw("permissions denied")
466- else [IntegerEntry(aq(), height)]
492+@Callable(aH)
493+func onEmissionForGwxStart () = {
494+ let bF = as()
495+ if ((bF == bF))
496+ then if ((aH.caller != C))
497+ then throw("permissions denied")
498+ else [IntegerEntry(at(), height)]
499+ else throw("Strict value is not equal to itself.")
500+ }
467501
468502
469503
470-@Callable(aE)
471-func tradeReward (bF,bG) = {
472- let ca = (size(bF) == size(bG))
473- let cb = valueOrElse(getInteger(aG()), 0)
474- let cc = aE.payments[0]
475- let cd = cc.assetId
476- let ce = cc.amount
477- let bI = [if ((cb >= size(bF)))
478- then true
479- else m("Too many recipients"), if (ca)
480- then true
481- else m("Arguments size mismatch"), if ((cd == aj))
482- then true
483- else m("Wrong asset payment")]
484- if ((bI == bI))
504+@Callable(aH)
505+func tradeReward (bJ,bK) = {
506+ let bF = as()
507+ if ((bF == bF))
485508 then {
486- let bJ = invoke(this, "tradeRewardInternal", [ce, bF, bG, 0], nil)
487- if ((bJ == bJ))
488- then $Tuple2(nil, bJ)
509+ let ce = (size(bJ) == size(bK))
510+ let cf = valueOrElse(getInteger(aJ()), 0)
511+ let cg = aH.payments[0]
512+ let ch = cg.assetId
513+ let ci = cg.amount
514+ let bM = [if ((cf >= size(bJ)))
515+ then true
516+ else m("Too many recipients"), if (ce)
517+ then true
518+ else m("Arguments size mismatch"), if ((ch == aj))
519+ then true
520+ else m("Wrong asset payment")]
521+ if ((bM == bM))
522+ then {
523+ let bN = invoke(this, "tradeRewardInternal", [ci, bJ, bK, 0], nil)
524+ if ((bN == bN))
525+ then $Tuple2(nil, bN)
526+ else throw("Strict value is not equal to itself.")
527+ }
489528 else throw("Strict value is not equal to itself.")
490529 }
491530 else throw("Strict value is not equal to itself.")
492531 }
493532
494533
495534
496-@Callable(aE)
535+@Callable(aH)
497536 func claimTradingReward () = {
498- let at = aE.caller
499- let cf = toString(at)
500- let bA = aX(cf)
501- if ((bA > 0))
502- then $Tuple2([ScriptTransfer(at, bA, aj), IntegerEntry(aF(cf), 0)], bA)
503- else m("nothing to claim")
537+ let bF = as()
538+ if ((bF == bF))
539+ then {
540+ let aw = aH.caller
541+ let cj = toString(aw)
542+ let bD = ba(cj)
543+ if ((bD > 0))
544+ then $Tuple2([ScriptTransfer(aw, bD, aj), IntegerEntry(aI(cj), 0)], bD)
545+ else m("nothing to claim")
546+ }
547+ else throw("Strict value is not equal to itself.")
504548 }
505549
506550
507551
508-@Callable(aE)
509-func claimTradingRewardREADONLY (at) = $Tuple2(nil, aX(at))
552+@Callable(aH)
553+func claimTradingRewardREADONLY (aw) = $Tuple2(nil, ba(aw))
510554
511555
512-@Verifier(cg)
513-func ch () = {
514- let ci = {
515- let aP = aR()
516- if ($isInstanceOf(aP, "ByteVector"))
556+
557+@Callable(aH)
558+func suspend (ck) = {
559+ let bG = aW(aH)
560+ if ((bG == bG))
561+ then $Tuple2([BooleanEntry(aq, ck)], ck)
562+ else throw("Strict value is not equal to itself.")
563+ }
564+
565+
566+@Verifier(cl)
567+func cm () = {
568+ let cn = {
569+ let aS = aU()
570+ if ($isInstanceOf(aS, "ByteVector"))
517571 then {
518- let aV = aP
519- aV
572+ let aY = aS
573+ aY
520574 }
521- else if ($isInstanceOf(aP, "Unit"))
522- then cg.senderPublicKey
575+ else if ($isInstanceOf(aS, "Unit"))
576+ then cl.senderPublicKey
523577 else throw("Match error")
524578 }
525- sigVerify(cg.bodyBytes, cg.proofs[0], ci)
579+ sigVerify(cl.bodyBytes, cl.proofs[0], cn)
526580 }
527581

github/deemru/w8io/169f3d6 
101.79 ms