tx · EbsRBQWZa8sJRpSdEuAtvhhzAdcEMshah6YSyeDUYVwo

3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz:  -0.02400000 Waves

2023.03.27 18:11 [2508531] smart account 3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz > SELF 0.00000000 Waves

{ "type": 13, "id": "EbsRBQWZa8sJRpSdEuAtvhhzAdcEMshah6YSyeDUYVwo", "fee": 2400000, "feeAssetId": null, "timestamp": 1679929986663, "version": 2, "chainId": 84, "sender": "3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz", "senderPublicKey": "D28XoueZWsMfm8Y5pa6C5ZFuYoWgre2Wm8tzJANJgMnq", "proofs": [ "2j2xzJQvowKs6LZ7DhKsT4H5ri3oR5TjGS4r4Dj8bv54hrEoEqHGdzxw8V2JpiTErPtzLb7Vms9QkurpV6putD36" ], "script": "base64:BgK+IAgCEgMKAQgSAwoBCBIDCgEIEgASABIDCgEIEgQKAggBEgYKBAIBAgISAwoBCBIDCgEIEgUKAwgIBBIGCgQBGAgYEgQKAhgIEgQKAggIEgQKAggIEgMKAQgSBAoCCAgiBlNDQUxFOCIFTVVMVDMiBU1VTFQ4IgdTQ0FMRTE4IgZNVUxUMTgiA1NFUCIOUE9PTFdFSUdIVE1VTFQiCnplcm9CaWdJbnQiCW9uZUJpZ0ludCIHd3JhcEVyciIDbXNnIgh0aHJvd0VyciIJYXNBbnlMaXN0IgN2YWwiByRtYXRjaDAiCnZhbEFueUx5c3QiBWFzSW50IgZ2YWxJbnQiCGFzU3RyaW5nIgZ2YWxTdHIiDGFzQnl0ZVZlY3RvciIGdmFsQmluIg9nZXRTdHJpbmdPckZhaWwiB2FkZHJlc3MiA2tleSIYZ2V0U3RyaW5nQnlBZGRyZXNzT3JGYWlsIgxnZXRJbnRPclplcm8iD2dldEludE9yRGVmYXVsdCIKZGVmYXVsdFZhbCIMZ2V0SW50T3JGYWlsIhlnZXRCaWdJbnRGcm9tU3RyaW5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QJiVwQFAmFDBQJhRQUCY3IAAAJfMQQCY3oJALgCAgUCY2cFAmN5BAJjQQYEAmNCAwkAvwICBQJjegUBaAkA/AcEBQR0aGlzAg9jbGFpbVd4SU5URVJOQUwJAMwIAgUCYUMJAMwIAgUCYUUJAMwIAgUCY0EFA25pbAUDbmlsBQR1bml0AwkAAAIFAmNCBQJjQgQCZEEJAKIIAQkBAmJsAgUCYmgFAmFFBAJkeQUCZEEDCQABAgUCZHkCBFVuaXQJAJQKAgkAzAgCCQELRGVsZXRlRW50cnkBCQECYmUBBQJhQwUDbmlsBwMJAAECBQJkeQIGU3RyaW5nBAJkQgUCZHkJAJQKAgkAzAgCCQELU3RyaW5nRW50cnkCCQECYmUBBQJhQwUCZEIFA25pbAYJAAIBAgtNYXRjaCBlcnJvcgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECC01hdGNoIGVycm9yCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAmNuAQ5vbk1vZGlmeVdlaWdodAICYXUCYkEDCQECIT0CCAUCY24GY2FsbGVyBQJhWQkBAWwBAhJwZXJtaXNzaW9ucyBkZW5pZWQEAmRDCQECYnoDBQJhdQUCYkEAAAQCYngIBQJkQwJfMQQCYlkIBQJkQwJfMgQCYloIBQJkQwJfMwUCYlkBAmREAQJkRQAEAmRGBAFvCQECY2oAAwkAAQIFAW8CCkJ5dGVWZWN0b3IEAmNwBQFvBQJjcAMJAAECBQFvAgRVbml0CAUCZEQPc2VuZGVyUHVibGljS2V5CQACAQILTWF0Y2ggZXJyb3IJAPQDAwgFAmRECWJvZHlCeXRlcwkAkQMCCAUCZEQGcHJvb2ZzAAAFAmRGXXHy5A==", "height": 2508531, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6ST3R7oAds1sqwyPD7hgcnwuz3VwoQXYE2fdK8tegr8p Next: Fxy6e2QGkatqZU7QT6sx8HAKTopY12XGXkVVoVtvm2Lm Diff:
OldNewDifferences
2929 case valAnyLyst: List[Any] =>
3030 valAnyLyst
3131 case _ =>
32- throw("fail to cast into List[Any]")
32+ throwErr("fail to cast into List[Any]")
3333 }
3434
3535
3737 case valInt: Int =>
3838 valInt
3939 case _ =>
40- throw("fail to cast into Int")
40+ throwErr("fail to cast into Int")
4141 }
4242
4343
4545 case valStr: String =>
4646 valStr
4747 case _ =>
48- throw("fail to cast into Int")
48+ throwErr("fail to cast into Int")
4949 }
5050
5151
5353 case valBin: ByteVector =>
5454 valBin
5555 case _ =>
56- throw("fail to cast into Int")
56+ throwErr("fail to cast into Int")
5757 }
5858
5959
60-func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), (("mandatory this." + key) + " is not defined"))
60+func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), wrapErr((("mandatory this." + key) + " is not defined")))
6161
6262
63-func getStringByAddressOrFail (address,key) = valueOrErrorMessage(getString(address, key), (((("mandatory " + toString(address)) + ".") + key) + " is not defined"))
63+func getStringByAddressOrFail (address,key) = valueOrErrorMessage(getString(address, key), wrapErr((((("mandatory " + toString(address)) + ".") + key) + " is not defined")))
6464
6565
6666 func getIntOrZero (address,key) = valueOrElse(getInteger(address, key), 0)
6969 func getIntOrDefault (address,key,defaultVal) = valueOrElse(getInteger(address, key), defaultVal)
7070
7171
72-func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), (("mandatory this." + key) + " is not defined"))
72+func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), wrapErr((("mandatory this." + key) + " is not defined")))
7373
7474
7575 func getBigIntFromStringOrZero (address,key) = value(parseBigInt(valueOrElse(getString(address, key), "0")))
291291 let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0)
292292 let checkNode = if (!(containsNode(listName, id)))
293293 then true
294- else throw("Node exists")
294+ else throwErr("Node exists")
295295 if ((checkNode == checkNode))
296296 then (([IntegerEntry(keyListSize(listName), (listSize + 1))] ++ (if ((headOrUnit != unit))
297297 then [StringEntry(keyListNext(listName, id), value(headOrUnit)), StringEntry(keyListPrev(listName, value(headOrUnit)), id)]
315315 then [DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, value(prevOrUnit)))]
316316 else if ((id == valueOrElse(headOrUnit, "")))
317317 then [DeleteEntry(keyListHead(listName))]
318- else throw(((("invalid node: " + listName) + ".") + id))))
318+ else throwErr(((("invalid node: " + listName) + ".") + id))))
319319 }
320320
321321
329329 then (stakedByUser > zeroBigInt)
330330 else false)
331331 then value(parseBigInt(getStringOrFail(this, wxPerLpIntegralUserLastKEY)))
332- else throw("calcWxPerLpIntegralUserLast: unexpected state")
332+ else throwErr("calcWxPerLpIntegralUserLast: unexpected state")
333333
334334
335335 func refreshPoolINTEGRALS (lpAssetIdStr,poolAddressStr,lpDeltaAmount) = {
365365
366366
367367 func refreshINTEGRALS (lpAssetIdStr,userAddressStr,poolAddressStr,lpDeltaAmount) = {
368- let $t01476214884 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, lpDeltaAmount)
369- let wxPerLpIntegralNew = $t01476214884._1
370- let poolIntegralSTATE = $t01476214884._2
371- let poolDEBUG = $t01476214884._3
368+ let $t01481914941 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, lpDeltaAmount)
369+ let wxPerLpIntegralNew = $t01481914941._1
370+ let poolIntegralSTATE = $t01481914941._2
371+ let poolDEBUG = $t01481914941._3
372372 let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
373373 let stakedByUser = readStaked(stakedByUserKEY)
374374 let wxToClaimUserKEY = keyWxToClaimUser(lpAssetIdStr, userAddressStr)
406406 }
407407
408408
409-let permissionDeniedError = throw("Permission denied")
409+let permissionDeniedError = throwErr("Permission denied")
410410
411411 func mustThis (i) = if ((i.caller == this))
412412 then true
440440 if ((refreshStakedVote == refreshStakedVote))
441441 then {
442442 let stakedTotal = readStaked(stakedTotalKEY)
443- let $t01810018217 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, amount)
444- let wxToClaimUserNew = $t01810018217._1
445- let integralSTATE = $t01810018217._2
446- let debug = $t01810018217._3
443+ let $t01816018277 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, amount)
444+ let wxToClaimUserNew = $t01816018277._1
445+ let integralSTATE = $t01816018277._2
446+ let debug = $t01816018277._3
447447 let listName = getUsersListName(lpAssetIdStr)
448448 let listActions = if (containsNode(listName, userAddressStr))
449449 then nil
483483 else unit
484484 if ((r == r))
485485 then if ((amount > stakedByUser))
486- then throw(((((((("passed amount=" + toString(amount)) + " is greater than available=") + toString(stakedByUser)) + ". lpAssetId=") + lpAssetIdStr) + ". stakedByUserKEY=") + stakedByUserKEY))
486+ then throwErr(((((((("passed amount=" + toString(amount)) + " is greater than available=") + toString(stakedByUser)) + ". lpAssetId=") + lpAssetIdStr) + ". stakedByUserKEY=") + stakedByUserKEY))
487487 else (([IntegerEntry(stakedByUserKEY, (stakedByUser - amount)), IntegerEntry(stakedTotalKEY, (stakedTotal - amount)), ScriptTransfer(lpAssetRecipientAddress, amount, lpAssetId), OperationHistoryEntry("unstake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) ++ listActions)
488488 else throw("Strict value is not equal to itself.")
489489 }
533533 let pm = pendingManagerPublicKeyOrUnit()
534534 let hasPM = if (isDefined(pm))
535535 then true
536- else throw("No pending manager")
536+ else throwErr("No pending manager")
537537 if ((hasPM == hasPM))
538538 then {
539539 let checkPM = if ((i.callerPublicKey == value(pm)))
540540 then true
541- else throw("You are not pending manager")
541+ else throwErr("You are not pending manager")
542542 if ((checkPM == checkPM))
543543 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
544544 else throw("Strict value is not equal to itself.")
550550
551551 @Callable(i)
552552 func stake () = if ((size(i.payments) != 1))
553- then throw("invalid payment - exact one payment must be attached")
553+ then throwErr("invalid payment - exact one payment must be attached")
554554 else {
555555 let pmt = i.payments[0]
556556 let lpAssetId = value(pmt.assetId)
557557 let lpAssetIdStr = toBase58String(lpAssetId)
558558 let amount = pmt.amount
559- let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr))
559+ let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), wrapErr(("unsupported lp asset " + lpAssetIdStr)))
560560 let poolAddress = addressFromStringValue(poolAddressStr)
561561 let userAddress = if ((i.caller == poolAddress))
562562 then i.originCaller
568568
569569 @Callable(i)
570570 func stakeFor (userAddressStr) = if ((size(i.payments) != 1))
571- then throw("invalid payment - exact one payment must be attached")
571+ then throwErr("invalid payment - exact one payment must be attached")
572572 else {
573573 let pmt = i.payments[0]
574574 let lpAssetId = value(pmt.assetId)
575575 let lpAssetIdStr = toBase58String(lpAssetId)
576576 let amount = pmt.amount
577- let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr))
577+ let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), wrapErr(("unsupported lp asset " + lpAssetIdStr)))
578578 let poolAddress = addressFromStringValue(poolAddressStr)
579579 let userAddress = valueOrErrorMessage(addressFromString(userAddressStr), wrapErr("invalid user address"))
580580 stakeActions(i, lpAssetId, poolAddress, userAddress, amount)
585585 @Callable(i)
586586 func unstake (lpAssetIdStr,amount) = {
587587 let lpAssetId = fromBase58String(lpAssetIdStr)
588- let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr))
588+ let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), wrapErr(("unsupported lp asset " + lpAssetIdStr)))
589589 let poolAddress = addressFromStringValue(poolAddressStr)
590590 let poolAddon = valueOrElse(getString(poolAddress, keyAddonAddr()), poolAddressStr)
591591 let callerStr = toString(i.caller)
603603 @Callable(i)
604604 func unstakeINTERNAL (lpAssetId,amount,userAddress,lpAssetRecipientAddress) = {
605605 let lpAssetIdStr = toBase58String(lpAssetId)
606- let poolAddress = addressFromStringValue(valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr)))
606+ let poolAddress = addressFromStringValue(valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), wrapErr(("unsupported lp asset " + lpAssetIdStr))))
607607 let checkCaller = if ((i.caller == poolAddress))
608608 then true
609609 else permissionDeniedError
639639 let checkCaller = mustThis(i)
640640 if ((checkCaller == checkCaller))
641641 then {
642- let userAddress = valueOrErrorMessage(addressFromString(userAddressStr), "claimWxINTERNAL: invalid user address")
642+ let userAddress = valueOrErrorMessage(addressFromString(userAddressStr), wrapErr("claimWxINTERNAL: invalid user address"))
643643 let poolAddressStr = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr))
644644 let claimedByUserKEY = keyClaimedByUser(lpAssetIdStr, userAddressStr)
645645 let claimedTotalKEY = keyClaimedTotal(lpAssetIdStr)
649649 let claimedByUserMinReward = getBigIntFromStringOrZero(this, claimedByUserMinRewardKEY)
650650 let claimedByUserBoostReward = getBigIntFromStringOrZero(this, claimedByUserBoostRewardKEY)
651651 let claimedTotal = getBigIntFromStringOrZero(this, claimedTotalKEY)
652- let $t02617926291 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
653- let wxToClaimUserNew = $t02617926291._1
654- let integralSTATE = $t02617926291._2
655- let debug = $t02617926291._3
652+ let $t02631426426 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
653+ let wxToClaimUserNew = $t02631426426._1
654+ let integralSTATE = $t02631426426._2
655+ let debug = $t02631426426._3
656656 let availableToClaim = max([(wxToClaimUserNew - claimedByUserMinReward), zeroBigInt])
657657 if ((zeroBigInt >= availableToClaim))
658658 then if (throwIfNothingToClaim)
659- then throw("nothing to claim")
659+ then throwErr("nothing to claim")
660660 else $Tuple2(nil, 0)
661661 else {
662662 let wxAmountBoostTotal = max([asInt(asAnyList(invoke(boostingContract, "claimWxBoost", [lpAssetIdStr, userAddressStr], nil))[0]), 0])
741741 else (height - emissionStartBlock)
742742 let poolWxEmission = fraction((wxEmissionPerBlock * passedBlocks), poolWeight, POOLWEIGHTMULT)
743743 let userWxReward = fraction(poolWxEmission, stakedByUser, stakedTotal)
744- let $t03033930451 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
745- let wxToClaimUserNew = $t03033930451._1
746- let integralSTATE = $t03033930451._2
747- let debug = $t03033930451._3
744+ let $t03047730589 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
745+ let wxToClaimUserNew = $t03047730589._1
746+ let integralSTATE = $t03047730589._2
747+ let debug = $t03047730589._3
748748 let availableToClaim = max([(wxToClaimUserNew - claimedByUserMinReward), zeroBigInt])
749749 let boostInvResult = asAnyList(invoke(boostingContract, "claimWxBoostREADONLY", [lpAssetIdStr, userAddressStr], nil))
750750 let wxAmountBoostTotal = max([asInt(boostInvResult[0]), 0])
818818
819819 @Callable(i)
820820 func onModifyWeight (lpAssetIdStr,poolAddressStr) = if ((i.caller != factoryContract))
821- then throw("permissions denied")
821+ then throwErr("permissions denied")
822822 else {
823- let $t03307233182 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, 0)
824- let wxPerLpIntegralNew = $t03307233182._1
825- let poolIntegralSTATE = $t03307233182._2
826- let poolDEBUG = $t03307233182._3
823+ let $t03321333323 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, 0)
824+ let wxPerLpIntegralNew = $t03321333323._1
825+ let poolIntegralSTATE = $t03321333323._2
826+ let poolDEBUG = $t03321333323._3
827827 poolIntegralSTATE
828828 }
829829
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SCALE8 = 8
55
66 let MULT3 = 1000
77
88 let MULT8 = 100000000
99
1010 let SCALE18 = 18
1111
1212 let MULT18 = toBigInt(1000000000000000000)
1313
1414 let SEP = "__"
1515
1616 let POOLWEIGHTMULT = MULT8
1717
1818 let zeroBigInt = toBigInt(0)
1919
2020 let oneBigInt = toBigInt(1)
2121
2222 func wrapErr (msg) = makeString(["staking.ride:", toString(this), msg], " ")
2323
2424
2525 func throwErr (msg) = throw(wrapErr(msg))
2626
2727
2828 func asAnyList (val) = match val {
2929 case valAnyLyst: List[Any] =>
3030 valAnyLyst
3131 case _ =>
32- throw("fail to cast into List[Any]")
32+ throwErr("fail to cast into List[Any]")
3333 }
3434
3535
3636 func asInt (val) = match val {
3737 case valInt: Int =>
3838 valInt
3939 case _ =>
40- throw("fail to cast into Int")
40+ throwErr("fail to cast into Int")
4141 }
4242
4343
4444 func asString (val) = match val {
4545 case valStr: String =>
4646 valStr
4747 case _ =>
48- throw("fail to cast into Int")
48+ throwErr("fail to cast into Int")
4949 }
5050
5151
5252 func asByteVector (val) = match val {
5353 case valBin: ByteVector =>
5454 valBin
5555 case _ =>
56- throw("fail to cast into Int")
56+ throwErr("fail to cast into Int")
5757 }
5858
5959
60-func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), (("mandatory this." + key) + " is not defined"))
60+func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), wrapErr((("mandatory this." + key) + " is not defined")))
6161
6262
63-func getStringByAddressOrFail (address,key) = valueOrErrorMessage(getString(address, key), (((("mandatory " + toString(address)) + ".") + key) + " is not defined"))
63+func getStringByAddressOrFail (address,key) = valueOrErrorMessage(getString(address, key), wrapErr((((("mandatory " + toString(address)) + ".") + key) + " is not defined")))
6464
6565
6666 func getIntOrZero (address,key) = valueOrElse(getInteger(address, key), 0)
6767
6868
6969 func getIntOrDefault (address,key,defaultVal) = valueOrElse(getInteger(address, key), defaultVal)
7070
7171
72-func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), (("mandatory this." + key) + " is not defined"))
72+func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), wrapErr((("mandatory this." + key) + " is not defined")))
7373
7474
7575 func getBigIntFromStringOrZero (address,key) = value(parseBigInt(valueOrElse(getString(address, key), "0")))
7676
7777
7878 func getBigIntFromStringOrDefault (address,key,defaultVal) = match getString(address, key) {
7979 case s: String =>
8080 value(parseBigInt(s))
8181 case _: Unit =>
8282 defaultVal
8383 case _ =>
8484 throw("Match error")
8585 }
8686
8787
8888 func toX18 (origVal,origScaleMult) = fraction(toBigInt(origVal), MULT18, toBigInt(origScaleMult))
8989
9090
9191 func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), MULT18))
9292
9393
9494 func keyFactoryAddress () = "%s%s__config__factoryAddress"
9595
9696
9797 func keyVotingEmissionContract () = "%s__votingEmissionContract"
9898
9999
100100 let IdxFactoryCfgStakingDapp = 1
101101
102102 let IdxFactoryCfgBoostingDapp = 2
103103
104104 let IdxFactoryCfgIdoDapp = 3
105105
106106 let IdxFactoryCfgTeamDapp = 4
107107
108108 let IdxFactoryCfgEmissionDapp = 5
109109
110110 let IdxFactoryCfgRestDapp = 6
111111
112112 let IdxFactoryCfgSlippageDapp = 7
113113
114114 func keyFactoryCfg () = "%s__factoryConfig"
115115
116116
117117 func keyManagerPublicKey () = "%s__managerPublicKey"
118118
119119
120120 func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
121121
122122
123123 func keyStablePoolAddonAddr () = "%s__stablePoolAddonAddr"
124124
125125
126126 func keyAddonAddr () = "%s__addonAddr"
127127
128128
129129 func keyFactoryLp2AssetsMapping (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP)
130130
131131
132132 func keyFactoryLpList () = "%s__lpTokensList"
133133
134134
135135 func keyFactoryLpAssetToPoolContractAddress (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP)
136136
137137
138138 func keyFactoryPoolWeight (contractAddress) = makeString(["%s%s", "poolWeight", contractAddress], SEP)
139139
140140
141141 func readLpList (factory) = split(valueOrElse(getString(factory, keyFactoryLpList()), ""), SEP)
142142
143143
144144 func readFactoryCfgOrFail (factory) = split(getStringByAddressOrFail(factory, keyFactoryCfg()), SEP)
145145
146146
147147 func getBoostingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgBoostingDapp])
148148
149149
150150 func getEmissionAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgEmissionDapp])
151151
152152
153153 func getStakingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgStakingDapp])
154154
155155
156156 func keyEmissionRatePerBlockCurrent () = "%s%s__ratePerBlock__current"
157157
158158
159159 func keyEmissionRatePerBlockMaxCurrent () = "%s%s__ratePerBlockMax__current"
160160
161161
162162 func keyEmissionStartBlock () = "%s%s__emission__startBlock"
163163
164164
165165 func keyEmissionDurationInBlocks () = "%s%s__emission__duration"
166166
167167
168168 func keyEmissionEndBlock () = "%s%s__emission__endBlock"
169169
170170
171171 func keyStakedByUser (userAddressStr,lpAssetIdStr) = makeString(["%s%s%s__staked", userAddressStr, lpAssetIdStr], SEP)
172172
173173
174174 func keyStakedTotal (lpAssetIdStr) = ("%s%s%s__staked__total__" + lpAssetIdStr)
175175
176176
177177 func keyClaimedByUser (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimed", userAddressStr, lpAssetIdStr], SEP)
178178
179179
180180 func keyClaimedByUserMinReward (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimedMinReward", userAddressStr, lpAssetIdStr], SEP)
181181
182182
183183 func keyClaimedByUserBoostReward (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimedBoostReward", userAddressStr, lpAssetIdStr], SEP)
184184
185185
186186 func keyClaimedTotal (lpAssetIdStr) = makeString(["%s%s%s__claimed__total", lpAssetIdStr], SEP)
187187
188188
189189 func readStaked (key) = valueOrElse(getInteger(this, key), 0)
190190
191191
192192 func keyLastTotalLpBalance (lpAssetId) = makeString(["%s%s%s", lpAssetId, "total", "bal"], SEP)
193193
194194
195195 func keyLastUserLpBalance (lpAssetId,userAddress) = makeString(["%s%s%s", lpAssetId, userAddress, "bal"], SEP)
196196
197197
198198 func keyTotalLpBalanceIntegral (lpAssetId) = makeString(["%s%s%s", lpAssetId, "total", "balINT"], SEP)
199199
200200
201201 func keyUserLpBalanceIntegral (lpAssetId,userAddress) = makeString(["%s%s%s", lpAssetId, userAddress, "balINT"], SEP)
202202
203203
204204 func keyTotalLpBalanceIntegralLastUpdHeight (lpAssetId) = makeString(["%s%s%s", lpAssetId, "total", "lastUpd"], SEP)
205205
206206
207207 func keyUserLpBalanceIntegralLastUpdHeight (lpAssetId,userAddress) = makeString(["%s%s%s", lpAssetId, userAddress, "lastUpd"], SEP)
208208
209209
210210 func keyWxPerLpIntegral (lpAssetId) = makeString(["%s%s%s%s", lpAssetId, "common", "lpInt"], SEP)
211211
212212
213213 func keyWxPerLpIntegralLastUpdHeight (lpAssetId) = makeString(["%s%s%s%s", lpAssetId, "common", "lpIntH"], SEP)
214214
215215
216216 func keyWxToClaimUser (lpAssetId,userAddress) = makeString(["%s%s%s%s", lpAssetId, userAddress, "lpInt"], SEP)
217217
218218
219219 func keyWxPerLpIntegralUserLastUpdHeight (lpAssetId,userAddress) = makeString(["%s%s%s%s", lpAssetId, userAddress, "lpIntH"], SEP)
220220
221221
222222 func keyWxPerLp (lpAssetId) = makeString(["%s", lpAssetId, "wxPerLp"], SEP)
223223
224224
225225 func keyWxPerLpX18 (lpAssetId) = makeString(["%s", lpAssetId, "wxPerLpX18"], SEP)
226226
227227
228228 func keyWxPerLpIntegralUserLast (lpAssetId,userAddress) = makeString(["%s%s%s%s", lpAssetId, userAddress, "uIntL"], SEP)
229229
230230
231231 func keyOperationHistoryRecord (type,userAddress,txId58) = makeString(["%s%s%s%s__history", type, userAddress, txId58], SEP)
232232
233233
234234 func formatHistoryRecord (userAddress,lpAssetId,type,amount) = makeString(["%s%s%s%d%d%d", userAddress, lpAssetId, type, toString(height), toString(lastBlock.timestamp), toString(amount)], SEP)
235235
236236
237237 func OperationHistoryEntry (type,userAddress,lpAssetId,amount,txId) = StringEntry(keyOperationHistoryRecord(type, userAddress, toBase58String(txId)), formatHistoryRecord(userAddress, lpAssetId, type, amount))
238238
239239
240240 let factoryAddress = getStringOrFail(this, keyFactoryAddress())
241241
242242 let factoryContract = addressFromStringValue(factoryAddress)
243243
244244 let factoryCfg = readFactoryCfgOrFail(factoryContract)
245245
246246 let emissionContract = getEmissionAddressOrFail(factoryCfg)
247247
248248 let boostingContract = getBoostingAddressOrFail(factoryCfg)
249249
250250 let boostCoeff = {
251251 let @ = invoke(emissionContract, "getBoostCoeffREADONLY", nil, nil)
252252 if ($isInstanceOf(@, "Int"))
253253 then @
254254 else throw(($getType(@) + " couldn't be cast to Int"))
255255 }
256256
257257 let lpStakingPoolsContract = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(makeString(["%s", "lpStakingPoolsContract"], SEP)), wrapErr("lp_staking_pools contract address is undefined"))), wrapErr("invalid lp_staking_pools contract address"))
258258
259259 func keyNextUser (lpAssetId) = makeString(["%s%s", lpAssetId, "nextUser"], SEP)
260260
261261
262262 func getUsersListName (lpAssetId) = makeString(["users", lpAssetId], SEP)
263263
264264
265265 func keyListHead (listName) = makeString(["%s%s%s", listName, "head"], SEP)
266266
267267
268268 func keyListSize (listName) = makeString(["%s%s%s", listName, "size"], SEP)
269269
270270
271271 func keyListPrev (listName,id) = makeString(["%s%s%s%s", listName, id, "prev"], SEP)
272272
273273
274274 func keyListNext (listName,id) = makeString(["%s%s%s%s", listName, id, "next"], SEP)
275275
276276
277277 func containsNode (listName,id) = {
278278 let headOrUnit = getString(this, keyListHead(listName))
279279 let prevOrUnit = getString(this, keyListPrev(listName, id))
280280 let nextOrUnit = getString(this, keyListNext(listName, id))
281281 if (if ((id == valueOrElse(headOrUnit, "")))
282282 then true
283283 else (prevOrUnit != unit))
284284 then true
285285 else (nextOrUnit != unit)
286286 }
287287
288288
289289 func insertNodeActions (listName,id) = {
290290 let headOrUnit = getString(this, keyListHead(listName))
291291 let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0)
292292 let checkNode = if (!(containsNode(listName, id)))
293293 then true
294- else throw("Node exists")
294+ else throwErr("Node exists")
295295 if ((checkNode == checkNode))
296296 then (([IntegerEntry(keyListSize(listName), (listSize + 1))] ++ (if ((headOrUnit != unit))
297297 then [StringEntry(keyListNext(listName, id), value(headOrUnit)), StringEntry(keyListPrev(listName, value(headOrUnit)), id)]
298298 else nil)) ++ [StringEntry(keyListHead(listName), id)])
299299 else throw("Strict value is not equal to itself.")
300300 }
301301
302302
303303 func deleteNodeActions (listName,id) = {
304304 let headOrUnit = getString(this, keyListHead(listName))
305305 let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0)
306306 let prevOrUnit = getString(this, keyListPrev(listName, id))
307307 let nextOrUnit = getString(this, keyListNext(listName, id))
308308 ([IntegerEntry(keyListSize(listName), (listSize - 1))] ++ (if (if ((prevOrUnit != unit))
309309 then (nextOrUnit != unit)
310310 else false)
311311 then [StringEntry(keyListNext(listName, value(prevOrUnit)), value(nextOrUnit)), StringEntry(keyListPrev(listName, value(nextOrUnit)), value(prevOrUnit)), DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, id))]
312312 else if ((nextOrUnit != unit))
313313 then [StringEntry(keyListHead(listName), value(nextOrUnit)), DeleteEntry(keyListNext(listName, id)), DeleteEntry(keyListPrev(listName, value(nextOrUnit)))]
314314 else if ((prevOrUnit != unit))
315315 then [DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, value(prevOrUnit)))]
316316 else if ((id == valueOrElse(headOrUnit, "")))
317317 then [DeleteEntry(keyListHead(listName))]
318- else throw(((("invalid node: " + listName) + ".") + id))))
318+ else throwErr(((("invalid node: " + listName) + ".") + id))))
319319 }
320320
321321
322322 func calcWxPerLpIntegralUserLast (stakedByUser,wxPerLpIntegralUserLastUpdHeightOrZero,wxPerLpIntegralNew,wxPerLpIntegralUserLastKEY) = if (if ((wxPerLpIntegralUserLastUpdHeightOrZero == zeroBigInt))
323323 then (stakedByUser > zeroBigInt)
324324 else false)
325325 then zeroBigInt
326326 else if ((stakedByUser == zeroBigInt))
327327 then wxPerLpIntegralNew
328328 else if (if ((wxPerLpIntegralUserLastUpdHeightOrZero > zeroBigInt))
329329 then (stakedByUser > zeroBigInt)
330330 else false)
331331 then value(parseBigInt(getStringOrFail(this, wxPerLpIntegralUserLastKEY)))
332- else throw("calcWxPerLpIntegralUserLast: unexpected state")
332+ else throwErr("calcWxPerLpIntegralUserLast: unexpected state")
333333
334334
335335 func refreshPoolINTEGRALS (lpAssetIdStr,poolAddressStr,lpDeltaAmount) = {
336336 let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
337337 let stakedTotal = toBigInt(readStaked(stakedTotalKEY))
338338 let nonZeroStakedTotal = if ((stakedTotal == zeroBigInt))
339339 then oneBigInt
340340 else stakedTotal
341341 let poolWeight = getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr))
342342 let emissionStartBlock = getIntOrFail(emissionContract, keyEmissionStartBlock())
343343 let wxEmissionPerBlockX3 = (getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent()) * MULT3)
344344 let poolWxEmissionPerBlockX3 = fraction(wxEmissionPerBlockX3, poolWeight, (POOLWEIGHTMULT * boostCoeff))
345345 let wxPerLpIntegralKEY = keyWxPerLpIntegral(lpAssetIdStr)
346346 let wxPerLpIntegralLastUpdHeightKEY = keyWxPerLpIntegralLastUpdHeight(lpAssetIdStr)
347347 let wxPerLpKEY = keyWxPerLp(lpAssetIdStr)
348348 let wxPerLpIntegralLastUpdHeight = getIntOrDefault(this, wxPerLpIntegralLastUpdHeightKEY, emissionStartBlock)
349349 let wxPerLpIntegral = getBigIntFromStringOrZero(this, wxPerLpIntegralKEY)
350350 let wxPerLpOrZeroX3 = 0
351351 let dh = max([(height - wxPerLpIntegralLastUpdHeight), 0])
352352 let wxPerLpX3 = if ((wxPerLpOrZeroX3 != 0))
353353 then toBigInt(wxPerLpOrZeroX3)
354354 else fraction(toBigInt(poolWxEmissionPerBlockX3), toBigInt(MULT8), nonZeroStakedTotal)
355355 let stakedTotalNew = (stakedTotal + toBigInt(lpDeltaAmount))
356356 let nonZeroStakedTotalNew = if ((stakedTotalNew == zeroBigInt))
357357 then oneBigInt
358358 else stakedTotalNew
359359 let wxPerLpIntegralNew = (wxPerLpIntegral + (wxPerLpX3 * toBigInt(dh)))
360360 let wxPerLpX3New = (toBigInt(poolWxEmissionPerBlockX3) / nonZeroStakedTotalNew)
361361 let wxPerLpIntegralLastUpdHeightNew = height
362362 let debug = makeString([toString(wxPerLpIntegralNew), toString(dh), toString(wxPerLpX3), toString(stakedTotal), toString(poolWxEmissionPerBlockX3), toString(wxEmissionPerBlockX3), toString(poolWeight)], "::")
363363 $Tuple3(wxPerLpIntegralNew, [StringEntry(wxPerLpIntegralKEY, toString(wxPerLpIntegralNew)), IntegerEntry(wxPerLpIntegralLastUpdHeightKEY, wxPerLpIntegralLastUpdHeightNew), StringEntry(wxPerLpKEY, toString(wxPerLpX3New))], debug)
364364 }
365365
366366
367367 func refreshINTEGRALS (lpAssetIdStr,userAddressStr,poolAddressStr,lpDeltaAmount) = {
368- let $t01476214884 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, lpDeltaAmount)
369- let wxPerLpIntegralNew = $t01476214884._1
370- let poolIntegralSTATE = $t01476214884._2
371- let poolDEBUG = $t01476214884._3
368+ let $t01481914941 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, lpDeltaAmount)
369+ let wxPerLpIntegralNew = $t01481914941._1
370+ let poolIntegralSTATE = $t01481914941._2
371+ let poolDEBUG = $t01481914941._3
372372 let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
373373 let stakedByUser = readStaked(stakedByUserKEY)
374374 let wxToClaimUserKEY = keyWxToClaimUser(lpAssetIdStr, userAddressStr)
375375 let wxPerLpIntegralUserLastUpdHeightKEY = keyWxPerLpIntegralUserLastUpdHeight(lpAssetIdStr, userAddressStr)
376376 let wxPerLpIntegralUserLastKEY = keyWxPerLpIntegralUserLast(lpAssetIdStr, userAddressStr)
377377 let wxToClaimUser = getBigIntFromStringOrZero(this, wxToClaimUserKEY)
378378 let wxPerLpIntegralUserLastUpdHeightOrZero = getIntOrZero(this, wxPerLpIntegralUserLastUpdHeightKEY)
379379 let wxPerLpIntegralUserLast = calcWxPerLpIntegralUserLast(toBigInt(stakedByUser), toBigInt(wxPerLpIntegralUserLastUpdHeightOrZero), wxPerLpIntegralNew, wxPerLpIntegralUserLastKEY)
380380 let MULT11 = (MULT8 * MULT3)
381381 let wxToClaimUserNew = max([(wxToClaimUser + fraction((wxPerLpIntegralNew - wxPerLpIntegralUserLast), toBigInt(stakedByUser), toBigInt(MULT11))), zeroBigInt])
382382 let wxPerLpIntegralUserLastNew = wxPerLpIntegralNew
383383 let wxPerLpIntegralUserLastUpdHeightNew = height
384384 let debug = makeString([toString(wxToClaimUser), toString(wxPerLpIntegralUserLast), toString(stakedByUser), poolDEBUG, toString(height)], "::")
385385 $Tuple3(wxToClaimUserNew, (poolIntegralSTATE ++ [StringEntry(wxToClaimUserKEY, toString(wxToClaimUserNew)), IntegerEntry(wxPerLpIntegralUserLastUpdHeightKEY, wxPerLpIntegralUserLastUpdHeightNew), StringEntry(wxPerLpIntegralUserLastKEY, toString(wxPerLpIntegralUserLastNew))]), debug)
386386 }
387387
388388
389389 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
390390 case s: String =>
391391 fromBase58String(s)
392392 case _: Unit =>
393393 unit
394394 case _ =>
395395 throw("Match error")
396396 }
397397
398398
399399 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
400400 case s: String =>
401401 fromBase58String(s)
402402 case _: Unit =>
403403 unit
404404 case _ =>
405405 throw("Match error")
406406 }
407407
408408
409-let permissionDeniedError = throw("Permission denied")
409+let permissionDeniedError = throwErr("Permission denied")
410410
411411 func mustThis (i) = if ((i.caller == this))
412412 then true
413413 else permissionDeniedError
414414
415415
416416 func mustManager (i) = match managerPublicKeyOrUnit() {
417417 case pk: ByteVector =>
418418 if ((i.callerPublicKey == pk))
419419 then true
420420 else permissionDeniedError
421421 case _: Unit =>
422422 if ((i.caller == this))
423423 then true
424424 else permissionDeniedError
425425 case _ =>
426426 throw("Match error")
427427 }
428428
429429
430430 func stakeActions (i,lpAssetId,poolAddress,userAddress,amount) = {
431431 let userAddressStr = toString(userAddress)
432432 let lpAssetIdStr = toBase58String(lpAssetId)
433433 let poolAddressStr = toString(poolAddress)
434434 let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
435435 let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
436436 let stakedByUser = readStaked(stakedByUserKEY)
437437 let refreshStakedVote = if ((stakedByUser == 0))
438438 then invoke(boostingContract, "onStakedVoteUpdate", [lpAssetIdStr, userAddressStr, true], nil)
439439 else unit
440440 if ((refreshStakedVote == refreshStakedVote))
441441 then {
442442 let stakedTotal = readStaked(stakedTotalKEY)
443- let $t01810018217 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, amount)
444- let wxToClaimUserNew = $t01810018217._1
445- let integralSTATE = $t01810018217._2
446- let debug = $t01810018217._3
443+ let $t01816018277 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, amount)
444+ let wxToClaimUserNew = $t01816018277._1
445+ let integralSTATE = $t01816018277._2
446+ let debug = $t01816018277._3
447447 let listName = getUsersListName(lpAssetIdStr)
448448 let listActions = if (containsNode(listName, userAddressStr))
449449 then nil
450450 else insertNodeActions(listName, userAddressStr)
451451 (([IntegerEntry(stakedByUserKEY, (stakedByUser + amount)), IntegerEntry(stakedTotalKEY, (stakedTotal + amount)), OperationHistoryEntry("stake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) ++ listActions)
452452 }
453453 else throw("Strict value is not equal to itself.")
454454 }
455455
456456
457457 func unstakeActions (i,lpAssetId,poolAddress,userAddress,lpAssetRecipientAddress,amount) = {
458458 let userAddressStr = toString(userAddress)
459459 let lpAssetIdStr = toBase58String(lpAssetId)
460460 let poolAddressStr = toString(poolAddress)
461461 let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
462462 let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
463463 let stakedByUser = readStaked(stakedByUserKEY)
464464 let stakedTotal = readStaked(stakedTotalKEY)
465465 let integralSTATE = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, -(amount))._2
466466 let listName = getUsersListName(lpAssetIdStr)
467467 let listActions = if (if (containsNode(listName, userAddressStr))
468468 then (amount == stakedByUser)
469469 else false)
470470 then deleteNodeActions(listName, userAddressStr)
471471 else nil
472472 let refreshStakedVote = if ((amount == stakedByUser))
473473 then invoke(boostingContract, "onStakedVoteUpdate", [lpAssetIdStr, userAddressStr, false], nil)
474474 else unit
475475 if ((refreshStakedVote == refreshStakedVote))
476476 then {
477477 let claimedByUserMinReward = getBigIntFromStringOrZero(this, keyClaimedByUserMinReward(lpAssetIdStr, userAddressStr))
478478 let wxToClaimUserNew = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)._1
479479 let availableToClaim = (wxToClaimUserNew - claimedByUserMinReward)
480480 let throwIfNothingToClaim = true
481481 let r = if ((availableToClaim > zeroBigInt))
482482 then invoke(this, "claimWxINTERNAL", [lpAssetIdStr, userAddressStr, throwIfNothingToClaim], nil)
483483 else unit
484484 if ((r == r))
485485 then if ((amount > stakedByUser))
486- then throw(((((((("passed amount=" + toString(amount)) + " is greater than available=") + toString(stakedByUser)) + ". lpAssetId=") + lpAssetIdStr) + ". stakedByUserKEY=") + stakedByUserKEY))
486+ then throwErr(((((((("passed amount=" + toString(amount)) + " is greater than available=") + toString(stakedByUser)) + ". lpAssetId=") + lpAssetIdStr) + ". stakedByUserKEY=") + stakedByUserKEY))
487487 else (([IntegerEntry(stakedByUserKEY, (stakedByUser - amount)), IntegerEntry(stakedTotalKEY, (stakedTotal - amount)), ScriptTransfer(lpAssetRecipientAddress, amount, lpAssetId), OperationHistoryEntry("unstake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) ++ listActions)
488488 else throw("Strict value is not equal to itself.")
489489 }
490490 else throw("Strict value is not equal to itself.")
491491 }
492492
493493
494494 @Callable(i)
495495 func constructor (factoryAddressStr) = {
496496 let checkCaller = mustManager(i)
497497 if ((checkCaller == checkCaller))
498498 then [StringEntry(keyFactoryAddress(), factoryAddressStr)]
499499 else throw("Strict value is not equal to itself.")
500500 }
501501
502502
503503
504504 @Callable(i)
505505 func constructorV2 (votingEmissionContract) = {
506506 let cheks = [mustManager(i), if ((addressFromString(votingEmissionContract) != unit))
507507 then true
508508 else "invalid voting emission contract address"]
509509 if ((cheks == cheks))
510510 then [StringEntry(keyVotingEmissionContract(), votingEmissionContract)]
511511 else throw("Strict value is not equal to itself.")
512512 }
513513
514514
515515
516516 @Callable(i)
517517 func setManager (pendingManagerPublicKey) = {
518518 let checkCaller = mustManager(i)
519519 if ((checkCaller == checkCaller))
520520 then {
521521 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
522522 if ((checkManagerPublicKey == checkManagerPublicKey))
523523 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
524524 else throw("Strict value is not equal to itself.")
525525 }
526526 else throw("Strict value is not equal to itself.")
527527 }
528528
529529
530530
531531 @Callable(i)
532532 func confirmManager () = {
533533 let pm = pendingManagerPublicKeyOrUnit()
534534 let hasPM = if (isDefined(pm))
535535 then true
536- else throw("No pending manager")
536+ else throwErr("No pending manager")
537537 if ((hasPM == hasPM))
538538 then {
539539 let checkPM = if ((i.callerPublicKey == value(pm)))
540540 then true
541- else throw("You are not pending manager")
541+ else throwErr("You are not pending manager")
542542 if ((checkPM == checkPM))
543543 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
544544 else throw("Strict value is not equal to itself.")
545545 }
546546 else throw("Strict value is not equal to itself.")
547547 }
548548
549549
550550
551551 @Callable(i)
552552 func stake () = if ((size(i.payments) != 1))
553- then throw("invalid payment - exact one payment must be attached")
553+ then throwErr("invalid payment - exact one payment must be attached")
554554 else {
555555 let pmt = i.payments[0]
556556 let lpAssetId = value(pmt.assetId)
557557 let lpAssetIdStr = toBase58String(lpAssetId)
558558 let amount = pmt.amount
559- let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr))
559+ let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), wrapErr(("unsupported lp asset " + lpAssetIdStr)))
560560 let poolAddress = addressFromStringValue(poolAddressStr)
561561 let userAddress = if ((i.caller == poolAddress))
562562 then i.originCaller
563563 else i.caller
564564 stakeActions(i, lpAssetId, poolAddress, userAddress, amount)
565565 }
566566
567567
568568
569569 @Callable(i)
570570 func stakeFor (userAddressStr) = if ((size(i.payments) != 1))
571- then throw("invalid payment - exact one payment must be attached")
571+ then throwErr("invalid payment - exact one payment must be attached")
572572 else {
573573 let pmt = i.payments[0]
574574 let lpAssetId = value(pmt.assetId)
575575 let lpAssetIdStr = toBase58String(lpAssetId)
576576 let amount = pmt.amount
577- let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr))
577+ let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), wrapErr(("unsupported lp asset " + lpAssetIdStr)))
578578 let poolAddress = addressFromStringValue(poolAddressStr)
579579 let userAddress = valueOrErrorMessage(addressFromString(userAddressStr), wrapErr("invalid user address"))
580580 stakeActions(i, lpAssetId, poolAddress, userAddress, amount)
581581 }
582582
583583
584584
585585 @Callable(i)
586586 func unstake (lpAssetIdStr,amount) = {
587587 let lpAssetId = fromBase58String(lpAssetIdStr)
588- let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr))
588+ let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), wrapErr(("unsupported lp asset " + lpAssetIdStr)))
589589 let poolAddress = addressFromStringValue(poolAddressStr)
590590 let poolAddon = valueOrElse(getString(poolAddress, keyAddonAddr()), poolAddressStr)
591591 let callerStr = toString(i.caller)
592592 let userAddress = if (if ((callerStr == poolAddressStr))
593593 then true
594594 else (callerStr == poolAddon))
595595 then i.originCaller
596596 else i.caller
597597 let lpAssetRecipientAddress = i.caller
598598 unstakeActions(i, lpAssetId, poolAddress, userAddress, lpAssetRecipientAddress, amount)
599599 }
600600
601601
602602
603603 @Callable(i)
604604 func unstakeINTERNAL (lpAssetId,amount,userAddress,lpAssetRecipientAddress) = {
605605 let lpAssetIdStr = toBase58String(lpAssetId)
606- let poolAddress = addressFromStringValue(valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr)))
606+ let poolAddress = addressFromStringValue(valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), wrapErr(("unsupported lp asset " + lpAssetIdStr))))
607607 let checkCaller = if ((i.caller == poolAddress))
608608 then true
609609 else permissionDeniedError
610610 if ((checkCaller == checkCaller))
611611 then unstakeActions(i, lpAssetId, poolAddress, Address(userAddress), Address(lpAssetRecipientAddress), amount)
612612 else throw("Strict value is not equal to itself.")
613613 }
614614
615615
616616
617617 @Callable(i)
618618 func claimWx (lpAssetIdStr) = {
619619 let userAddressStr = toString(i.caller)
620620 let throwIfNothingToClaim = true
621621 let result = invoke(this, "claimWxINTERNAL", [lpAssetIdStr, userAddressStr, throwIfNothingToClaim], nil)
622622 $Tuple2(nil, result)
623623 }
624624
625625
626626
627627 @Callable(i)
628628 func claimWxDoNotThrow (lpAssetIdStr) = {
629629 let userAddressStr = toString(i.caller)
630630 let throwIfNothingToClaim = false
631631 let result = invoke(this, "claimWxINTERNAL", [lpAssetIdStr, userAddressStr, throwIfNothingToClaim], nil)
632632 $Tuple2(nil, result)
633633 }
634634
635635
636636
637637 @Callable(i)
638638 func claimWxINTERNAL (lpAssetIdStr,userAddressStr,throwIfNothingToClaim) = {
639639 let checkCaller = mustThis(i)
640640 if ((checkCaller == checkCaller))
641641 then {
642- let userAddress = valueOrErrorMessage(addressFromString(userAddressStr), "claimWxINTERNAL: invalid user address")
642+ let userAddress = valueOrErrorMessage(addressFromString(userAddressStr), wrapErr("claimWxINTERNAL: invalid user address"))
643643 let poolAddressStr = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr))
644644 let claimedByUserKEY = keyClaimedByUser(lpAssetIdStr, userAddressStr)
645645 let claimedTotalKEY = keyClaimedTotal(lpAssetIdStr)
646646 let claimedByUserMinRewardKEY = keyClaimedByUserMinReward(lpAssetIdStr, userAddressStr)
647647 let claimedByUserBoostRewardKEY = keyClaimedByUserBoostReward(lpAssetIdStr, userAddressStr)
648648 let claimedByUser = getBigIntFromStringOrZero(this, claimedByUserKEY)
649649 let claimedByUserMinReward = getBigIntFromStringOrZero(this, claimedByUserMinRewardKEY)
650650 let claimedByUserBoostReward = getBigIntFromStringOrZero(this, claimedByUserBoostRewardKEY)
651651 let claimedTotal = getBigIntFromStringOrZero(this, claimedTotalKEY)
652- let $t02617926291 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
653- let wxToClaimUserNew = $t02617926291._1
654- let integralSTATE = $t02617926291._2
655- let debug = $t02617926291._3
652+ let $t02631426426 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
653+ let wxToClaimUserNew = $t02631426426._1
654+ let integralSTATE = $t02631426426._2
655+ let debug = $t02631426426._3
656656 let availableToClaim = max([(wxToClaimUserNew - claimedByUserMinReward), zeroBigInt])
657657 if ((zeroBigInt >= availableToClaim))
658658 then if (throwIfNothingToClaim)
659- then throw("nothing to claim")
659+ then throwErr("nothing to claim")
660660 else $Tuple2(nil, 0)
661661 else {
662662 let wxAmountBoostTotal = max([asInt(asAnyList(invoke(boostingContract, "claimWxBoost", [lpAssetIdStr, userAddressStr], nil))[0]), 0])
663663 let minRewardPart = availableToClaim
664664 let boostRewardPart = min([(minRewardPart * toBigInt((boostCoeff - 1))), toBigInt(wxAmountBoostTotal)])
665665 let totalReward = (minRewardPart + boostRewardPart)
666666 let wxAssetId = asByteVector(asAnyList(invoke(emissionContract, "emit", [toInt(minRewardPart)], nil))[0])
667667 let emitBoost = asAnyList(invoke(emissionContract, "emit", [toInt(boostRewardPart)], nil))
668668 if ((emitBoost == emitBoost))
669669 then {
670670 let claimedByUserValue = ((claimedByUser + minRewardPart) + boostRewardPart)
671671 let claimedByUserMinRewardPlusPart = (claimedByUserMinReward + minRewardPart)
672672 let claimedByUserBoostRewardPlusBoostRewardPart = (claimedByUserBoostReward + boostRewardPart)
673673 let claimedTotalPlusAvailableToClaim = (claimedTotal + availableToClaim)
674674 $Tuple2([StringEntry(claimedByUserKEY, toString(claimedByUserValue)), StringEntry(claimedByUserMinRewardKEY, toString(claimedByUserMinRewardPlusPart)), StringEntry(claimedByUserBoostRewardKEY, toString(claimedByUserBoostRewardPlusBoostRewardPart)), StringEntry(claimedTotalKEY, toString(claimedTotalPlusAvailableToClaim)), ScriptTransfer(userAddress, toInt(minRewardPart), wxAssetId), ScriptTransfer(userAddress, toInt(boostRewardPart), wxAssetId), OperationHistoryEntry("claim", userAddressStr, lpAssetIdStr, toInt(availableToClaim), i.transactionId)], toInt(totalReward))
675675 }
676676 else throw("Strict value is not equal to itself.")
677677 }
678678 }
679679 else throw("Strict value is not equal to itself.")
680680 }
681681
682682
683683
684684 @Callable(i)
685685 func claimWxBulkInternalREADONLY (currentIter,lpAssetIds,userAddressStr,resAcc) = if ((currentIter == size(lpAssetIds)))
686686 then $Tuple2(nil, resAcc)
687687 else {
688688 let lpAssetId = lpAssetIds[currentIter]
689689 let info = split({
690690 let @ = invoke(this, "claimWxREADONLY", [lpAssetId, userAddressStr], nil)
691691 if ($isInstanceOf(@, "String"))
692692 then @
693693 else throw(($getType(@) + " couldn't be cast to String"))
694694 }, SEP)
695695 let unclaimed = info[3]
696696 let claimed = info[4]
697697 let userVoteFinalized = {
698698 let @ = invoke(boostingContract, "getUserVoteFinalizedREADONLY", [lpAssetId, userAddressStr], nil)
699699 if ($isInstanceOf(@, "Int"))
700700 then @
701701 else throw(($getType(@) + " couldn't be cast to Int"))
702702 }
703703 let res = (resAcc :+ makeString(["%d%d%d", unclaimed, claimed, toString(userVoteFinalized)], SEP))
704704 let inv = {
705705 let @ = invoke(this, "claimWxBulkInternalREADONLY", [(currentIter + 1), lpAssetIds, userAddressStr, res], nil)
706706 if ($isInstanceOf(@, "List[Any]"))
707707 then @
708708 else throw(($getType(@) + " couldn't be cast to List[Any]"))
709709 }
710710 if ((inv == inv))
711711 then $Tuple2(nil, inv)
712712 else throw("Strict value is not equal to itself.")
713713 }
714714
715715
716716
717717 @Callable(i)
718718 func claimWxBulkREADONLY (lpAssetIds,userAddressStr) = {
719719 let res = invoke(this, "claimWxBulkInternalREADONLY", [0, lpAssetIds, userAddressStr, nil], nil)
720720 $Tuple2(nil, res)
721721 }
722722
723723
724724
725725 @Callable(i)
726726 func claimWxREADONLY (lpAssetIdStr,userAddressStr) = {
727727 let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
728728 let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
729729 let claimedByUserKEY = keyClaimedByUser(lpAssetIdStr, userAddressStr)
730730 let claimedByUserMinRewardKEY = keyClaimedByUserMinReward(lpAssetIdStr, userAddressStr)
731731 let stakedByUser = readStaked(stakedByUserKEY)
732732 let stakedTotal = readStaked(stakedTotalKEY)
733733 let claimedByUser = getBigIntFromStringOrZero(this, claimedByUserKEY)
734734 let claimedByUserMinReward = getBigIntFromStringOrZero(this, claimedByUserMinRewardKEY)
735735 let poolAddressStr = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr))
736736 let poolWeight = getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr))
737737 let wxEmissionPerBlock = getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent())
738738 let emissionStartBlock = getIntOrFail(emissionContract, keyEmissionStartBlock())
739739 let passedBlocks = if ((emissionStartBlock > height))
740740 then 0
741741 else (height - emissionStartBlock)
742742 let poolWxEmission = fraction((wxEmissionPerBlock * passedBlocks), poolWeight, POOLWEIGHTMULT)
743743 let userWxReward = fraction(poolWxEmission, stakedByUser, stakedTotal)
744- let $t03033930451 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
745- let wxToClaimUserNew = $t03033930451._1
746- let integralSTATE = $t03033930451._2
747- let debug = $t03033930451._3
744+ let $t03047730589 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
745+ let wxToClaimUserNew = $t03047730589._1
746+ let integralSTATE = $t03047730589._2
747+ let debug = $t03047730589._3
748748 let availableToClaim = max([(wxToClaimUserNew - claimedByUserMinReward), zeroBigInt])
749749 let boostInvResult = asAnyList(invoke(boostingContract, "claimWxBoostREADONLY", [lpAssetIdStr, userAddressStr], nil))
750750 let wxAmountBoostTotal = max([asInt(boostInvResult[0]), 0])
751751 let boostDebug = asString(boostInvResult[1])
752752 let minRewardPart = availableToClaim
753753 let boostRewardPart = min([(minRewardPart * toBigInt((boostCoeff - 1))), toBigInt(wxAmountBoostTotal)])
754754 let totalReward = (minRewardPart + boostRewardPart)
755755 $Tuple2(nil, makeString(["%s%s%d%d%d%d%s", lpAssetIdStr, userAddressStr, toString(totalReward), toString(claimedByUser), toString(minRewardPart), toString(boostRewardPart), "soon"], SEP))
756756 }
757757
758758
759759
760760 @Callable(i)
761761 func stakedByUserREADONLY (lpAssetIdStr,userAddressStr) = {
762762 let stakedByUser = valueOrElse(getInteger(keyStakedByUser(userAddressStr, lpAssetIdStr)), 0)
763763 $Tuple2(nil, stakedByUser)
764764 }
765765
766766
767767
768768 @Callable(i)
769769 func usersListTraversal (lpAssetId) = {
770770 let checkCaller = if ((toBase58String(i.caller.bytes) == valueOrElse(getString(this, keyVotingEmissionContract()), "")))
771771 then true
772772 else mustManager(i)
773773 if ((checkCaller == checkCaller))
774774 then {
775775 let listName = getUsersListName(lpAssetId)
776776 let userOrUnit = getString(keyNextUser(lpAssetId))
777777 let headOrUnit = getString(keyListHead(listName))
778778 match userOrUnit {
779779 case _: Unit =>
780780 match headOrUnit {
781781 case _: Unit =>
782782 $Tuple2(nil, false)
783783 case head: String =>
784784 $Tuple2([StringEntry(keyNextUser(lpAssetId), head)], true)
785785 case _ =>
786786 throw("Match error")
787787 }
788788 case userAddress: String =>
789789 let claimedByUserMinReward = getBigIntFromStringOrZero(this, keyClaimedByUserMinReward(lpAssetId, userAddress))
790790 let poolAddress = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetId))
791791 let wxToClaimUserNew = refreshINTEGRALS(lpAssetId, userAddress, poolAddress, 0)._1
792792 let availableToClaim = (wxToClaimUserNew - claimedByUserMinReward)
793793 let throwIfNothingToClaim = true
794794 let r = if ((availableToClaim > zeroBigInt))
795795 then invoke(this, "claimWxINTERNAL", [lpAssetId, userAddress, throwIfNothingToClaim], nil)
796796 else unit
797797 if ((r == r))
798798 then {
799799 let nextUserOrUnit = getString(keyListNext(listName, userAddress))
800800 match nextUserOrUnit {
801801 case _: Unit =>
802802 $Tuple2([DeleteEntry(keyNextUser(lpAssetId))], false)
803803 case nextUser: String =>
804804 $Tuple2([StringEntry(keyNextUser(lpAssetId), nextUser)], true)
805805 case _ =>
806806 throw("Match error")
807807 }
808808 }
809809 else throw("Strict value is not equal to itself.")
810810 case _ =>
811811 throw("Match error")
812812 }
813813 }
814814 else throw("Strict value is not equal to itself.")
815815 }
816816
817817
818818
819819 @Callable(i)
820820 func onModifyWeight (lpAssetIdStr,poolAddressStr) = if ((i.caller != factoryContract))
821- then throw("permissions denied")
821+ then throwErr("permissions denied")
822822 else {
823- let $t03307233182 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, 0)
824- let wxPerLpIntegralNew = $t03307233182._1
825- let poolIntegralSTATE = $t03307233182._2
826- let poolDEBUG = $t03307233182._3
823+ let $t03321333323 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, 0)
824+ let wxPerLpIntegralNew = $t03321333323._1
825+ let poolIntegralSTATE = $t03321333323._2
826+ let poolDEBUG = $t03321333323._3
827827 poolIntegralSTATE
828828 }
829829
830830
831831 @Verifier(tx)
832832 func verify () = {
833833 let targetPublicKey = match managerPublicKeyOrUnit() {
834834 case pk: ByteVector =>
835835 pk
836836 case _: Unit =>
837837 tx.senderPublicKey
838838 case _ =>
839839 throw("Match error")
840840 }
841841 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
842842 }
843843

github/deemru/w8io/169f3d6 
119.34 ms