tx · HVd3EkU4EtN3uSgoEeaoGs9jwfyGoPzhTsBR5cR96Bf8

3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz:  -0.03000000 Waves

2022.07.01 13:52 [2120487] smart account 3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz > SELF 0.00000000 Waves

{ "type": 13, "id": "HVd3EkU4EtN3uSgoEeaoGs9jwfyGoPzhTsBR5cR96Bf8", "fee": 3000000, "feeAssetId": null, "timestamp": 1656672826050, "version": 1, "sender": "3Mx3zmXrMcLFCafMuPtXAzR4ZPVeZYb6qLz", "senderPublicKey": "D28XoueZWsMfm8Y5pa6C5ZFuYoWgre2Wm8tzJANJgMnq", "proofs": [ "4R49yFNDSzGfUgLvVRE7TNT4NCsKRyYv2oPDDnEaqctRaYJe96MmWoPdfPq2EQs9GeoR6qFzRvfiUgNwVcRwK723" ], "script": "base64:BgI8CAISAwoBCBIDCgEIEgMKAQgSABIAEgQKAggBEgMKAQgSBAoCCAgSBAoCCAgSAwoBCBIECgIICBIDCgEIXgAGU0NBTEU4AAgABU1VTFQ4AIDC1y8AB1NDQUxFMTgAEgAGTVVMVDE4CQC2AgEAgICQu7rWrfANAANTRVACAl9fAA5QT09MV0VJR0hUTVVMVAUFTVVMVDgACnplcm9CaWdJbnQJALYCAQAAAAlvbmVCaWdJbnQJALYCAQABAAtrZXlNaWdyYXRvcgIIbWlncmF0b3IBCWFzQW55TGlzdAEDdmFsBAckbWF0Y2gwBQN2YWwDCQABAgUHJG1hdGNoMAIJTGlzdFtBbnldBAp2YWxBbnlMeXN0BQckbWF0Y2gwBQp2YWxBbnlMeXN0CQACAQIbZmFpbCB0byBjYXN0IGludG8gTGlzdFtBbnldAQVhc0ludAEDdmFsBAckbWF0Y2gwBQN2YWwDCQABAgUHJG1hdGNoMAIDSW50BAZ2YWxJbnQFByRtYXRjaDAFBnZhbEludAkAAgECFWZhaWwgdG8gY2FzdCBpbnRvIEludAEIYXNTdHJpbmcBA3ZhbAQ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UPdGFyZ2V0UHVibGljS2V5BgkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAkBEUBleHRyTmF0aXZlKDEwNTIpAgUEdGhpcwULa2V5TWlncmF0b3Iv7tyB", "chainId": 84, "height": 2120487, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DuWdfqjBS2tWNXpTxnWLgVgaQZigUFUZZszydiTzAcTm Next: 7sPC7WGKDVesY1h9B7tEHeV5qT3UBWHx8kyCvNanpTE4 Diff:
OldNewDifferences
1616 let zeroBigInt = toBigInt(0)
1717
1818 let oneBigInt = toBigInt(1)
19+
20+let keyMigrator = "migrator"
1921
2022 func asAnyList (val) = match val {
2123 case valAnyLyst: List[Any] =>
346348
347349
348350 func refreshINTEGRALS (lpAssetIdStr,userAddressStr,poolAddressStr,lpDeltaAmount) = {
349- let $t01421714339 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, lpDeltaAmount)
350- let wxPerLpIntegralNew = $t01421714339._1
351- let poolIntegralSTATE = $t01421714339._2
352- let poolDEBUG = $t01421714339._3
351+ let $t01424614368 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, lpDeltaAmount)
352+ let wxPerLpIntegralNew = $t01424614368._1
353+ let poolIntegralSTATE = $t01424614368._2
354+ let poolDEBUG = $t01424614368._3
353355 let MULT3 = 1000
354356 let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
355357 let stakedByUser = readStaked(stakedByUserKEY)
467469
468470
469471 @Callable(i)
470-func stake () = if ((size(i.payments) != 1))
471- then throw("invalid payment - exact one payment must be attached")
472- else {
473- let pmt = i.payments[0]
474- let lpAssetId = value(pmt.assetId)
475- let lpAssetIdStr = toBase58String(lpAssetId)
476- let amount = pmt.amount
477- let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr))
478- let callerStr = toString(i.caller)
479- let userAddressStr = if ((callerStr == poolAddressStr))
480- then toString(i.originCaller)
481- else callerStr
482- let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
483- let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
484- let stakedByUser = readStaked(stakedByUserKEY)
485- let stakedTotal = readStaked(stakedTotalKEY)
486- let $t01877518892 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, amount)
487- let wxToClaimUserNew = $t01877518892._1
488- let integralSTATE = $t01877518892._2
489- let debug = $t01877518892._3
490- let listName = getUsersListName(lpAssetIdStr)
491- let listActions = if (containsNode(listName, userAddressStr))
492- then nil
493- else insertNodeActions(listName, userAddressStr)
494- (([IntegerEntry(stakedByUserKEY, (stakedByUser + amount)), IntegerEntry(stakedTotalKEY, (stakedTotal + amount)), OperationHistoryEntry("stake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) ++ listActions)
495- }
472+func stake () = {
473+ let migration = if ((getBinary(this, keyMigrator) != unit))
474+ then throw("maintenance")
475+ else unit
476+ if ((migration == migration))
477+ then if ((size(i.payments) != 1))
478+ then throw("invalid payment - exact one payment must be attached")
479+ else {
480+ let pmt = i.payments[0]
481+ let lpAssetId = value(pmt.assetId)
482+ let lpAssetIdStr = toBase58String(lpAssetId)
483+ let amount = pmt.amount
484+ let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr))
485+ let callerStr = toString(i.caller)
486+ let userAddressStr = if ((callerStr == poolAddressStr))
487+ then toString(i.originCaller)
488+ else callerStr
489+ let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
490+ let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
491+ let stakedByUser = readStaked(stakedByUserKEY)
492+ let stakedTotal = readStaked(stakedTotalKEY)
493+ let $t01893619053 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, amount)
494+ let wxToClaimUserNew = $t01893619053._1
495+ let integralSTATE = $t01893619053._2
496+ let debug = $t01893619053._3
497+ let listName = getUsersListName(lpAssetIdStr)
498+ let listActions = if (containsNode(listName, userAddressStr))
499+ then nil
500+ else insertNodeActions(listName, userAddressStr)
501+ (([IntegerEntry(stakedByUserKEY, (stakedByUser + amount)), IntegerEntry(stakedTotalKEY, (stakedTotal + amount)), OperationHistoryEntry("stake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) ++ listActions)
502+ }
503+ else throw("Strict value is not equal to itself.")
504+ }
496505
497506
498507
499508 @Callable(i)
500509 func unstake (lpAssetIdStr,amount) = {
501- let lpAssetId = fromBase58String(lpAssetIdStr)
502- let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr))
503- let poolAddon = valueOrElse(getString(this, keyStablePoolAddonAddr()), poolAddressStr)
504- let callerStr = toString(i.caller)
505- let userAddressStr = if (if ((callerStr == poolAddressStr))
506- then true
507- else (callerStr == poolAddon))
508- then toString(i.originCaller)
509- else callerStr
510- let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
511- let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
512- let stakedByUser = readStaked(stakedByUserKEY)
513- let stakedTotal = readStaked(stakedTotalKEY)
514- let integralSTATE = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, -(amount))._2
515- let listName = getUsersListName(lpAssetIdStr)
516- let listActions = if (if (containsNode(listName, userAddressStr))
517- then (amount == stakedByUser)
518- else false)
519- then deleteNodeActions(listName, userAddressStr)
520- else nil
521- let claimedByUser = getBigIntFromStringOrZero(this, keyClaimedByUser(lpAssetIdStr, userAddressStr))
522- let poolAddress = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr))
523- let wxToClaimUserNew = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddress, 0)._1
524- let availableToClaim = (wxToClaimUserNew - claimedByUser)
525- let r = if ((availableToClaim > zeroBigInt))
526- then invoke(this, "claimWxINTERNAL", [lpAssetIdStr, userAddressStr], nil)
510+ let migration = if ((getBinary(this, keyMigrator) != unit))
511+ then throw("maintenance")
527512 else unit
528- if ((r == r))
529- then if ((amount > stakedByUser))
530- then throw("passed amount is less then available")
531- else (([IntegerEntry(stakedByUserKEY, (stakedByUser - amount)), IntegerEntry(stakedTotalKEY, (stakedTotal - amount)), ScriptTransfer(i.caller, amount, lpAssetId), OperationHistoryEntry("unstake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) ++ listActions)
513+ if ((migration == migration))
514+ then {
515+ let lpAssetId = fromBase58String(lpAssetIdStr)
516+ let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr))
517+ let poolAddon = valueOrElse(getString(this, keyStablePoolAddonAddr()), poolAddressStr)
518+ let callerStr = toString(i.caller)
519+ let userAddressStr = if (if ((callerStr == poolAddressStr))
520+ then true
521+ else (callerStr == poolAddon))
522+ then toString(i.originCaller)
523+ else callerStr
524+ let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
525+ let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
526+ let stakedByUser = readStaked(stakedByUserKEY)
527+ let stakedTotal = readStaked(stakedTotalKEY)
528+ let integralSTATE = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, -(amount))._2
529+ let listName = getUsersListName(lpAssetIdStr)
530+ let listActions = if (if (containsNode(listName, userAddressStr))
531+ then (amount == stakedByUser)
532+ else false)
533+ then deleteNodeActions(listName, userAddressStr)
534+ else nil
535+ let claimedByUser = getBigIntFromStringOrZero(this, keyClaimedByUser(lpAssetIdStr, userAddressStr))
536+ let poolAddress = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr))
537+ let wxToClaimUserNew = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddress, 0)._1
538+ let availableToClaim = (wxToClaimUserNew - claimedByUser)
539+ let r = if ((availableToClaim > zeroBigInt))
540+ then invoke(this, "claimWxINTERNAL", [lpAssetIdStr, userAddressStr], nil)
541+ else unit
542+ if ((r == r))
543+ then if ((amount > stakedByUser))
544+ then throw("passed amount is less then available")
545+ else (([IntegerEntry(stakedByUserKEY, (stakedByUser - amount)), IntegerEntry(stakedTotalKEY, (stakedTotal - amount)), ScriptTransfer(i.caller, amount, lpAssetId), OperationHistoryEntry("unstake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) ++ listActions)
546+ else throw("Strict value is not equal to itself.")
547+ }
532548 else throw("Strict value is not equal to itself.")
533549 }
534550
558574 let claimedByUserMinReward = getBigIntFromStringOrZero(this, claimedByUserMinRewardKEY)
559575 let claimedByUserBoostReward = getBigIntFromStringOrZero(this, claimedByUserBoostRewardKEY)
560576 let claimedTotal = getBigIntFromStringOrZero(this, claimedTotalKEY)
561- let $t02259022702 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
562- let wxToClaimUserNew = $t02259022702._1
563- let integralSTATE = $t02259022702._2
564- let debug = $t02259022702._3
577+ let $t02288322995 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
578+ let wxToClaimUserNew = $t02288322995._1
579+ let integralSTATE = $t02288322995._2
580+ let debug = $t02288322995._3
565581 let availableToClaim = max([(wxToClaimUserNew - claimedByUser), zeroBigInt])
566582 if ((zeroBigInt >= availableToClaim))
567583 then throw("nothing to claim")
604620 else (height - emissionStartBlock)
605621 let poolWxEmission = fraction((wxEmissionPerBlock * passedBlocks), poolWeight, POOLWEIGHTMULT)
606622 let userWxReward = fraction(poolWxEmission, stakedByUser, stakedTotal)
607- let $t02534425456 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
608- let wxToClaimUserNew = $t02534425456._1
609- let integralSTATE = $t02534425456._2
610- let debug = $t02534425456._3
623+ let $t02563725749 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
624+ let wxToClaimUserNew = $t02563725749._1
625+ let integralSTATE = $t02563725749._2
626+ let debug = $t02563725749._3
611627 let availableToClaim = max([(wxToClaimUserNew - claimedByUser), zeroBigInt])
612628 let boostInvResult = asAnyList(invoke(boostingContract, "claimWxBoostREADONLY", [lpAssetIdStr, userAddressStr], nil))
613629 let wxAmountBoostTotal = max([asInt(boostInvResult[0]), 0])
674690 func onModifyWeight (lpAssetIdStr,poolAddressStr) = if ((i.caller != factoryContract))
675691 then throw("permissions denied")
676692 else {
677- let $t02780727917 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, 0)
678- let wxPerLpIntegralNew = $t02780727917._1
679- let poolIntegralSTATE = $t02780727917._2
680- let poolDEBUG = $t02780727917._3
693+ let $t02810028210 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, 0)
694+ let wxPerLpIntegralNew = $t02810028210._1
695+ let poolIntegralSTATE = $t02810028210._2
696+ let poolDEBUG = $t02810028210._3
681697 poolIntegralSTATE
682698 }
699+
700+
701+
702+@Callable(i)
703+func setMigrator (pk) = if ((pk == ""))
704+ then [DeleteEntry(keyMigrator)]
705+ else [BinaryEntry(keyMigrator, fromBase58String(pk))]
683706
684707
685708 @Verifier(tx)
692715 case _ =>
693716 throw("Match error")
694717 }
695- sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
718+ if (sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey))
719+ then true
720+ else sigVerify(tx.bodyBytes, tx.proofs[0], getBinaryValue(this, keyMigrator))
696721 }
697722
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SCALE8 = 8
55
66 let MULT8 = 100000000
77
88 let SCALE18 = 18
99
1010 let MULT18 = toBigInt(1000000000000000000)
1111
1212 let SEP = "__"
1313
1414 let POOLWEIGHTMULT = MULT8
1515
1616 let zeroBigInt = toBigInt(0)
1717
1818 let oneBigInt = toBigInt(1)
19+
20+let keyMigrator = "migrator"
1921
2022 func asAnyList (val) = match val {
2123 case valAnyLyst: List[Any] =>
2224 valAnyLyst
2325 case _ =>
2426 throw("fail to cast into List[Any]")
2527 }
2628
2729
2830 func asInt (val) = match val {
2931 case valInt: Int =>
3032 valInt
3133 case _ =>
3234 throw("fail to cast into Int")
3335 }
3436
3537
3638 func asString (val) = match val {
3739 case valStr: String =>
3840 valStr
3941 case _ =>
4042 throw("fail to cast into Int")
4143 }
4244
4345
4446 func asByteVector (val) = match val {
4547 case valBin: ByteVector =>
4648 valBin
4749 case _ =>
4850 throw("fail to cast into Int")
4951 }
5052
5153
5254 func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), (("mandatory this." + key) + " is not defined"))
5355
5456
5557 func getStringByAddressOrFail (address,key) = valueOrErrorMessage(getString(address, key), (((("mandatory " + toString(address)) + ".") + key) + " is not defined"))
5658
5759
5860 func getIntOrZero (address,key) = valueOrElse(getInteger(address, key), 0)
5961
6062
6163 func getIntOrDefault (address,key,defaultVal) = valueOrElse(getInteger(address, key), defaultVal)
6264
6365
6466 func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), (("mandatory this." + key) + " is not defined"))
6567
6668
6769 func getBigIntFromStringOrZero (address,key) = value(parseBigInt(valueOrElse(getString(address, key), "0")))
6870
6971
7072 func getBigIntFromStringOrDefault (address,key,defaultVal) = match getString(address, key) {
7173 case s: String =>
7274 value(parseBigInt(s))
7375 case _: Unit =>
7476 defaultVal
7577 case _ =>
7678 throw("Match error")
7779 }
7880
7981
8082 func toX18 (origVal,origScaleMult) = fraction(toBigInt(origVal), MULT18, toBigInt(origScaleMult))
8183
8284
8385 func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), MULT18))
8486
8587
8688 func keyFactoryAddress () = "%s%s__config__factoryAddress"
8789
8890
8991 func keyVotingEmissionContract () = "%s__votingEmissionContract"
9092
9193
9294 let IdxFactoryCfgStakingDapp = 1
9395
9496 let IdxFactoryCfgBoostingDapp = 2
9597
9698 let IdxFactoryCfgIdoDapp = 3
9799
98100 let IdxFactoryCfgTeamDapp = 4
99101
100102 let IdxFactoryCfgEmissionDapp = 5
101103
102104 let IdxFactoryCfgRestDapp = 6
103105
104106 let IdxFactoryCfgSlippageDapp = 7
105107
106108 func keyFactoryCfg () = "%s__factoryConfig"
107109
108110
109111 func keyManagerPublicKey () = "%s__managerPublicKey"
110112
111113
112114 func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
113115
114116
115117 func keyStablePoolAddonAddr () = "%s__stablePoolAddonAddr"
116118
117119
118120 func keyFactoryLp2AssetsMapping (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP)
119121
120122
121123 func keyFactoryLpList () = "%s__lpTokensList"
122124
123125
124126 func keyFactoryLpAssetToPoolContractAddress (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP)
125127
126128
127129 func keyFactoryPoolWeight (contractAddress) = makeString(["%s%s", "poolWeight", contractAddress], SEP)
128130
129131
130132 func readLpList (factory) = split(valueOrElse(getString(factory, keyFactoryLpList()), ""), SEP)
131133
132134
133135 func readFactoryCfgOrFail (factory) = split(getStringByAddressOrFail(factory, keyFactoryCfg()), SEP)
134136
135137
136138 func getBoostingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgBoostingDapp])
137139
138140
139141 func getEmissionAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgEmissionDapp])
140142
141143
142144 func getStakingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgStakingDapp])
143145
144146
145147 func keyEmissionRatePerBlockCurrent () = "%s%s__ratePerBlock__current"
146148
147149
148150 func keyEmissionRatePerBlockMaxCurrent () = "%s%s__ratePerBlockMax__current"
149151
150152
151153 func keyEmissionStartBlock () = "%s%s__emission__startBlock"
152154
153155
154156 func keyEmissionDurationInBlocks () = "%s%s__emission__duration"
155157
156158
157159 func keyEmissionEndBlock () = "%s%s__emission__endBlock"
158160
159161
160162 func keyStakedByUser (userAddressStr,lpAssetIdStr) = makeString(["%s%s%s__staked", userAddressStr, lpAssetIdStr], SEP)
161163
162164
163165 func keyStakedTotal (lpAssetIdStr) = ("%s%s%s__staked__total__" + lpAssetIdStr)
164166
165167
166168 func keyClaimedByUser (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimed", userAddressStr, lpAssetIdStr], SEP)
167169
168170
169171 func keyClaimedByUserMinReward (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimedMinReward", userAddressStr, lpAssetIdStr], SEP)
170172
171173
172174 func keyClaimedByUserBoostReward (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimedBoostReward", userAddressStr, lpAssetIdStr], SEP)
173175
174176
175177 func keyClaimedTotal (lpAssetIdStr) = makeString(["%s%s%s__claimed__total", lpAssetIdStr], SEP)
176178
177179
178180 func readStaked (key) = valueOrElse(getInteger(this, key), 0)
179181
180182
181183 func keyLastTotalLpBalance (lpAssetId) = makeString(["%s%s%s", lpAssetId, "total", "bal"], SEP)
182184
183185
184186 func keyLastUserLpBalance (lpAssetId,userAddress) = makeString(["%s%s%s", lpAssetId, userAddress, "bal"], SEP)
185187
186188
187189 func keyTotalLpBalanceIntegral (lpAssetId) = makeString(["%s%s%s", lpAssetId, "total", "balINT"], SEP)
188190
189191
190192 func keyUserLpBalanceIntegral (lpAssetId,userAddress) = makeString(["%s%s%s", lpAssetId, userAddress, "balINT"], SEP)
191193
192194
193195 func keyTotalLpBalanceIntegralLastUpdHeight (lpAssetId) = makeString(["%s%s%s", lpAssetId, "total", "lastUpd"], SEP)
194196
195197
196198 func keyUserLpBalanceIntegralLastUpdHeight (lpAssetId,userAddress) = makeString(["%s%s%s", lpAssetId, userAddress, "lastUpd"], SEP)
197199
198200
199201 func keyWxPerLpIntegral (lpAssetId) = makeString(["%s%s%s%s", lpAssetId, "common", "lpInt"], SEP)
200202
201203
202204 func keyWxPerLpIntegralLastUpdHeight (lpAssetId) = makeString(["%s%s%s%s", lpAssetId, "common", "lpIntH"], SEP)
203205
204206
205207 func keyWxToClaimUser (lpAssetId,userAddress) = makeString(["%s%s%s%s", lpAssetId, userAddress, "lpInt"], SEP)
206208
207209
208210 func keyWxPerLpIntegralUserLastUpdHeight (lpAssetId,userAddress) = makeString(["%s%s%s%s", lpAssetId, userAddress, "lpIntH"], SEP)
209211
210212
211213 func keyWxPerLp (lpAssetId) = makeString(["%s", lpAssetId, "wxPerLp"], SEP)
212214
213215
214216 func keyWxPerLpX18 (lpAssetId) = makeString(["%s", lpAssetId, "wxPerLpX18"], SEP)
215217
216218
217219 func keyWxPerLpIntegralUserLast (lpAssetId,userAddress) = makeString(["%s%s%s%s", lpAssetId, userAddress, "uIntL"], SEP)
218220
219221
220222 func keyOperationHistoryRecord (type,userAddress,txId58) = makeString(["%s%s%s%s__history", type, userAddress, txId58], SEP)
221223
222224
223225 func formatHistoryRecord (userAddress,lpAssetId,type,amount) = makeString(["%s%s%s%d%d%d", userAddress, lpAssetId, type, toString(height), toString(lastBlock.timestamp), toString(amount)], SEP)
224226
225227
226228 func OperationHistoryEntry (type,userAddress,lpAssetId,amount,txId) = StringEntry(keyOperationHistoryRecord(type, userAddress, toBase58String(txId)), formatHistoryRecord(userAddress, lpAssetId, type, amount))
227229
228230
229231 let factoryAddress = getStringOrFail(this, keyFactoryAddress())
230232
231233 let factoryContract = addressFromStringValue(factoryAddress)
232234
233235 let factoryCfg = readFactoryCfgOrFail(factoryContract)
234236
235237 let emissionContract = getEmissionAddressOrFail(factoryCfg)
236238
237239 let boostingContract = getBoostingAddressOrFail(factoryCfg)
238240
239241 func keyNextUser (lpAssetId) = makeString(["%s%s", lpAssetId, "nextUser"], SEP)
240242
241243
242244 func getUsersListName (lpAssetId) = makeString(["users", lpAssetId], SEP)
243245
244246
245247 func keyListHead (listName) = makeString(["%s%s%s", listName, "head"], SEP)
246248
247249
248250 func keyListSize (listName) = makeString(["%s%s%s", listName, "size"], SEP)
249251
250252
251253 func keyListPrev (listName,id) = makeString(["%s%s%s%s", listName, id, "prev"], SEP)
252254
253255
254256 func keyListNext (listName,id) = makeString(["%s%s%s%s", listName, id, "next"], SEP)
255257
256258
257259 func containsNode (listName,id) = {
258260 let headOrUnit = getString(this, keyListHead(listName))
259261 let prevOrUnit = getString(this, keyListPrev(listName, id))
260262 let nextOrUnit = getString(this, keyListNext(listName, id))
261263 if (if ((id == valueOrElse(headOrUnit, "")))
262264 then true
263265 else (prevOrUnit != unit))
264266 then true
265267 else (nextOrUnit != unit)
266268 }
267269
268270
269271 func insertNodeActions (listName,id) = {
270272 let headOrUnit = getString(this, keyListHead(listName))
271273 let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0)
272274 let checkNode = if (!(containsNode(listName, id)))
273275 then true
274276 else throw("Node exists")
275277 if ((checkNode == checkNode))
276278 then (([IntegerEntry(keyListSize(listName), (listSize + 1))] ++ (if ((headOrUnit != unit))
277279 then [StringEntry(keyListNext(listName, id), value(headOrUnit)), StringEntry(keyListPrev(listName, value(headOrUnit)), id)]
278280 else nil)) ++ [StringEntry(keyListHead(listName), id)])
279281 else throw("Strict value is not equal to itself.")
280282 }
281283
282284
283285 func deleteNodeActions (listName,id) = {
284286 let headOrUnit = getString(this, keyListHead(listName))
285287 let listSize = valueOrElse(getInteger(this, keyListSize(listName)), 0)
286288 let prevOrUnit = getString(this, keyListPrev(listName, id))
287289 let nextOrUnit = getString(this, keyListNext(listName, id))
288290 ([IntegerEntry(keyListSize(listName), (listSize - 1))] ++ (if (if ((prevOrUnit != unit))
289291 then (nextOrUnit != unit)
290292 else false)
291293 then [StringEntry(keyListNext(listName, value(prevOrUnit)), value(nextOrUnit)), StringEntry(keyListPrev(listName, value(nextOrUnit)), value(prevOrUnit)), DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, id))]
292294 else if ((nextOrUnit != unit))
293295 then [StringEntry(keyListHead(listName), value(nextOrUnit)), DeleteEntry(keyListNext(listName, id)), DeleteEntry(keyListPrev(listName, value(nextOrUnit)))]
294296 else if ((prevOrUnit != unit))
295297 then [DeleteEntry(keyListPrev(listName, id)), DeleteEntry(keyListNext(listName, value(prevOrUnit)))]
296298 else if ((id == valueOrElse(headOrUnit, "")))
297299 then [DeleteEntry(keyListHead(listName))]
298300 else throw(((("invalid node: " + listName) + ".") + id))))
299301 }
300302
301303
302304 func calcWxPerLpIntegralUserLast (stakedByUser,wxPerLpIntegralUserLastUpdHeightOrZero,wxPerLpIntegralNew,wxPerLpIntegralUserLastKEY) = if (if ((wxPerLpIntegralUserLastUpdHeightOrZero == zeroBigInt))
303305 then (stakedByUser > zeroBigInt)
304306 else false)
305307 then zeroBigInt
306308 else if ((stakedByUser == zeroBigInt))
307309 then wxPerLpIntegralNew
308310 else if (if ((wxPerLpIntegralUserLastUpdHeightOrZero > zeroBigInt))
309311 then (stakedByUser > zeroBigInt)
310312 else false)
311313 then value(parseBigInt(getStringOrFail(this, wxPerLpIntegralUserLastKEY)))
312314 else throw("calcWxPerLpIntegralUserLast: unexpected state")
313315
314316
315317 func refreshPoolINTEGRALS (lpAssetIdStr,poolAddressStr,lpDeltaAmount) = {
316318 let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
317319 let stakedTotal = toBigInt(readStaked(stakedTotalKEY))
318320 let nonZeroStakedTotal = if ((stakedTotal == zeroBigInt))
319321 then oneBigInt
320322 else stakedTotal
321323 let poolWeight = getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr))
322324 let emissionStartBlock = getIntOrFail(emissionContract, keyEmissionStartBlock())
323325 let MULT3 = 1000
324326 let wxEmissionPerBlockX3 = (getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent()) * MULT3)
325327 let poolWxEmissionPerBlockX3 = fraction(wxEmissionPerBlockX3, poolWeight, (POOLWEIGHTMULT * 3))
326328 let wxPerLpIntegralKEY = keyWxPerLpIntegral(lpAssetIdStr)
327329 let wxPerLpIntegralLastUpdHeightKEY = keyWxPerLpIntegralLastUpdHeight(lpAssetIdStr)
328330 let wxPerLpKEY = keyWxPerLp(lpAssetIdStr)
329331 let wxPerLpIntegralLastUpdHeight = getIntOrDefault(this, wxPerLpIntegralLastUpdHeightKEY, emissionStartBlock)
330332 let wxPerLpIntegral = getBigIntFromStringOrZero(this, wxPerLpIntegralKEY)
331333 let wxPerLpOrZeroX3 = 0
332334 let dh = max([(height - wxPerLpIntegralLastUpdHeight), 0])
333335 let wxPerLpX3 = if ((wxPerLpOrZeroX3 != 0))
334336 then toBigInt(wxPerLpOrZeroX3)
335337 else fraction(toBigInt(poolWxEmissionPerBlockX3), toBigInt(MULT8), nonZeroStakedTotal)
336338 let stakedTotalNew = (stakedTotal + toBigInt(lpDeltaAmount))
337339 let nonZeroStakedTotalNew = if ((stakedTotalNew == zeroBigInt))
338340 then oneBigInt
339341 else stakedTotalNew
340342 let wxPerLpIntegralNew = (wxPerLpIntegral + (wxPerLpX3 * toBigInt(dh)))
341343 let wxPerLpX3New = (toBigInt(poolWxEmissionPerBlockX3) / nonZeroStakedTotalNew)
342344 let wxPerLpIntegralLastUpdHeightNew = height
343345 let debug = makeString([toString(wxPerLpIntegralNew), toString(dh), toString(wxPerLpX3), toString(stakedTotal), toString(poolWxEmissionPerBlockX3), toString(wxEmissionPerBlockX3), toString(poolWeight)], "::")
344346 $Tuple3(wxPerLpIntegralNew, [StringEntry(wxPerLpIntegralKEY, toString(wxPerLpIntegralNew)), IntegerEntry(wxPerLpIntegralLastUpdHeightKEY, wxPerLpIntegralLastUpdHeightNew), StringEntry(wxPerLpKEY, toString(wxPerLpX3New))], debug)
345347 }
346348
347349
348350 func refreshINTEGRALS (lpAssetIdStr,userAddressStr,poolAddressStr,lpDeltaAmount) = {
349- let $t01421714339 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, lpDeltaAmount)
350- let wxPerLpIntegralNew = $t01421714339._1
351- let poolIntegralSTATE = $t01421714339._2
352- let poolDEBUG = $t01421714339._3
351+ let $t01424614368 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, lpDeltaAmount)
352+ let wxPerLpIntegralNew = $t01424614368._1
353+ let poolIntegralSTATE = $t01424614368._2
354+ let poolDEBUG = $t01424614368._3
353355 let MULT3 = 1000
354356 let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
355357 let stakedByUser = readStaked(stakedByUserKEY)
356358 let wxToClaimUserKEY = keyWxToClaimUser(lpAssetIdStr, userAddressStr)
357359 let wxPerLpIntegralUserLastUpdHeightKEY = keyWxPerLpIntegralUserLastUpdHeight(lpAssetIdStr, userAddressStr)
358360 let wxPerLpIntegralUserLastKEY = keyWxPerLpIntegralUserLast(lpAssetIdStr, userAddressStr)
359361 let wxToClaimUser = getBigIntFromStringOrZero(this, wxToClaimUserKEY)
360362 let wxPerLpIntegralUserLastUpdHeightOrZero = getIntOrZero(this, wxPerLpIntegralUserLastUpdHeightKEY)
361363 let wxPerLpIntegralUserLast = calcWxPerLpIntegralUserLast(toBigInt(stakedByUser), toBigInt(wxPerLpIntegralUserLastUpdHeightOrZero), wxPerLpIntegralNew, wxPerLpIntegralUserLastKEY)
362364 let MULT11 = (MULT8 * MULT3)
363365 let wxToClaimUserNew = max([(wxToClaimUser + fraction((wxPerLpIntegralNew - wxPerLpIntegralUserLast), toBigInt(stakedByUser), toBigInt(MULT11))), zeroBigInt])
364366 let wxPerLpIntegralUserLastNew = wxPerLpIntegralNew
365367 let wxPerLpIntegralUserLastUpdHeightNew = height
366368 let debug = makeString([toString(wxToClaimUser), toString(wxPerLpIntegralUserLast), toString(stakedByUser), poolDEBUG, toString(height)], "::")
367369 $Tuple3(wxToClaimUserNew, (poolIntegralSTATE ++ [StringEntry(wxToClaimUserKEY, toString(wxToClaimUserNew)), IntegerEntry(wxPerLpIntegralUserLastUpdHeightKEY, wxPerLpIntegralUserLastUpdHeightNew), StringEntry(wxPerLpIntegralUserLastKEY, toString(wxPerLpIntegralUserLastNew))]), debug)
368370 }
369371
370372
371373 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
372374 case s: String =>
373375 fromBase58String(s)
374376 case _: Unit =>
375377 unit
376378 case _ =>
377379 throw("Match error")
378380 }
379381
380382
381383 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
382384 case s: String =>
383385 fromBase58String(s)
384386 case _: Unit =>
385387 unit
386388 case _ =>
387389 throw("Match error")
388390 }
389391
390392
391393 let permissionDeniedError = throw("Permission denied")
392394
393395 func mustThis (i) = if ((i.caller == this))
394396 then true
395397 else permissionDeniedError
396398
397399
398400 func mustManager (i) = match managerPublicKeyOrUnit() {
399401 case pk: ByteVector =>
400402 if ((i.callerPublicKey == pk))
401403 then true
402404 else permissionDeniedError
403405 case _: Unit =>
404406 if ((i.caller == this))
405407 then true
406408 else permissionDeniedError
407409 case _ =>
408410 throw("Match error")
409411 }
410412
411413
412414 @Callable(i)
413415 func constructor (factoryAddressStr) = {
414416 let checkCaller = mustManager(i)
415417 if ((checkCaller == checkCaller))
416418 then [StringEntry(keyFactoryAddress(), factoryAddressStr)]
417419 else throw("Strict value is not equal to itself.")
418420 }
419421
420422
421423
422424 @Callable(i)
423425 func constructorV2 (votingEmissionContract) = {
424426 let cheks = [mustManager(i), if ((addressFromString(votingEmissionContract) != unit))
425427 then true
426428 else "invalid voting emission contract address"]
427429 if ((cheks == cheks))
428430 then [StringEntry(keyVotingEmissionContract(), votingEmissionContract)]
429431 else throw("Strict value is not equal to itself.")
430432 }
431433
432434
433435
434436 @Callable(i)
435437 func setManager (pendingManagerPublicKey) = {
436438 let checkCaller = mustManager(i)
437439 if ((checkCaller == checkCaller))
438440 then {
439441 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
440442 if ((checkManagerPublicKey == checkManagerPublicKey))
441443 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
442444 else throw("Strict value is not equal to itself.")
443445 }
444446 else throw("Strict value is not equal to itself.")
445447 }
446448
447449
448450
449451 @Callable(i)
450452 func confirmManager () = {
451453 let pm = pendingManagerPublicKeyOrUnit()
452454 let hasPM = if (isDefined(pm))
453455 then true
454456 else throw("No pending manager")
455457 if ((hasPM == hasPM))
456458 then {
457459 let checkPM = if ((i.callerPublicKey == value(pm)))
458460 then true
459461 else throw("You are not pending manager")
460462 if ((checkPM == checkPM))
461463 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
462464 else throw("Strict value is not equal to itself.")
463465 }
464466 else throw("Strict value is not equal to itself.")
465467 }
466468
467469
468470
469471 @Callable(i)
470-func stake () = if ((size(i.payments) != 1))
471- then throw("invalid payment - exact one payment must be attached")
472- else {
473- let pmt = i.payments[0]
474- let lpAssetId = value(pmt.assetId)
475- let lpAssetIdStr = toBase58String(lpAssetId)
476- let amount = pmt.amount
477- let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr))
478- let callerStr = toString(i.caller)
479- let userAddressStr = if ((callerStr == poolAddressStr))
480- then toString(i.originCaller)
481- else callerStr
482- let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
483- let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
484- let stakedByUser = readStaked(stakedByUserKEY)
485- let stakedTotal = readStaked(stakedTotalKEY)
486- let $t01877518892 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, amount)
487- let wxToClaimUserNew = $t01877518892._1
488- let integralSTATE = $t01877518892._2
489- let debug = $t01877518892._3
490- let listName = getUsersListName(lpAssetIdStr)
491- let listActions = if (containsNode(listName, userAddressStr))
492- then nil
493- else insertNodeActions(listName, userAddressStr)
494- (([IntegerEntry(stakedByUserKEY, (stakedByUser + amount)), IntegerEntry(stakedTotalKEY, (stakedTotal + amount)), OperationHistoryEntry("stake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) ++ listActions)
495- }
472+func stake () = {
473+ let migration = if ((getBinary(this, keyMigrator) != unit))
474+ then throw("maintenance")
475+ else unit
476+ if ((migration == migration))
477+ then if ((size(i.payments) != 1))
478+ then throw("invalid payment - exact one payment must be attached")
479+ else {
480+ let pmt = i.payments[0]
481+ let lpAssetId = value(pmt.assetId)
482+ let lpAssetIdStr = toBase58String(lpAssetId)
483+ let amount = pmt.amount
484+ let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr))
485+ let callerStr = toString(i.caller)
486+ let userAddressStr = if ((callerStr == poolAddressStr))
487+ then toString(i.originCaller)
488+ else callerStr
489+ let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
490+ let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
491+ let stakedByUser = readStaked(stakedByUserKEY)
492+ let stakedTotal = readStaked(stakedTotalKEY)
493+ let $t01893619053 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, amount)
494+ let wxToClaimUserNew = $t01893619053._1
495+ let integralSTATE = $t01893619053._2
496+ let debug = $t01893619053._3
497+ let listName = getUsersListName(lpAssetIdStr)
498+ let listActions = if (containsNode(listName, userAddressStr))
499+ then nil
500+ else insertNodeActions(listName, userAddressStr)
501+ (([IntegerEntry(stakedByUserKEY, (stakedByUser + amount)), IntegerEntry(stakedTotalKEY, (stakedTotal + amount)), OperationHistoryEntry("stake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) ++ listActions)
502+ }
503+ else throw("Strict value is not equal to itself.")
504+ }
496505
497506
498507
499508 @Callable(i)
500509 func unstake (lpAssetIdStr,amount) = {
501- let lpAssetId = fromBase58String(lpAssetIdStr)
502- let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr))
503- let poolAddon = valueOrElse(getString(this, keyStablePoolAddonAddr()), poolAddressStr)
504- let callerStr = toString(i.caller)
505- let userAddressStr = if (if ((callerStr == poolAddressStr))
506- then true
507- else (callerStr == poolAddon))
508- then toString(i.originCaller)
509- else callerStr
510- let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
511- let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
512- let stakedByUser = readStaked(stakedByUserKEY)
513- let stakedTotal = readStaked(stakedTotalKEY)
514- let integralSTATE = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, -(amount))._2
515- let listName = getUsersListName(lpAssetIdStr)
516- let listActions = if (if (containsNode(listName, userAddressStr))
517- then (amount == stakedByUser)
518- else false)
519- then deleteNodeActions(listName, userAddressStr)
520- else nil
521- let claimedByUser = getBigIntFromStringOrZero(this, keyClaimedByUser(lpAssetIdStr, userAddressStr))
522- let poolAddress = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr))
523- let wxToClaimUserNew = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddress, 0)._1
524- let availableToClaim = (wxToClaimUserNew - claimedByUser)
525- let r = if ((availableToClaim > zeroBigInt))
526- then invoke(this, "claimWxINTERNAL", [lpAssetIdStr, userAddressStr], nil)
510+ let migration = if ((getBinary(this, keyMigrator) != unit))
511+ then throw("maintenance")
527512 else unit
528- if ((r == r))
529- then if ((amount > stakedByUser))
530- then throw("passed amount is less then available")
531- else (([IntegerEntry(stakedByUserKEY, (stakedByUser - amount)), IntegerEntry(stakedTotalKEY, (stakedTotal - amount)), ScriptTransfer(i.caller, amount, lpAssetId), OperationHistoryEntry("unstake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) ++ listActions)
513+ if ((migration == migration))
514+ then {
515+ let lpAssetId = fromBase58String(lpAssetIdStr)
516+ let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr))
517+ let poolAddon = valueOrElse(getString(this, keyStablePoolAddonAddr()), poolAddressStr)
518+ let callerStr = toString(i.caller)
519+ let userAddressStr = if (if ((callerStr == poolAddressStr))
520+ then true
521+ else (callerStr == poolAddon))
522+ then toString(i.originCaller)
523+ else callerStr
524+ let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
525+ let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
526+ let stakedByUser = readStaked(stakedByUserKEY)
527+ let stakedTotal = readStaked(stakedTotalKEY)
528+ let integralSTATE = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, -(amount))._2
529+ let listName = getUsersListName(lpAssetIdStr)
530+ let listActions = if (if (containsNode(listName, userAddressStr))
531+ then (amount == stakedByUser)
532+ else false)
533+ then deleteNodeActions(listName, userAddressStr)
534+ else nil
535+ let claimedByUser = getBigIntFromStringOrZero(this, keyClaimedByUser(lpAssetIdStr, userAddressStr))
536+ let poolAddress = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr))
537+ let wxToClaimUserNew = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddress, 0)._1
538+ let availableToClaim = (wxToClaimUserNew - claimedByUser)
539+ let r = if ((availableToClaim > zeroBigInt))
540+ then invoke(this, "claimWxINTERNAL", [lpAssetIdStr, userAddressStr], nil)
541+ else unit
542+ if ((r == r))
543+ then if ((amount > stakedByUser))
544+ then throw("passed amount is less then available")
545+ else (([IntegerEntry(stakedByUserKEY, (stakedByUser - amount)), IntegerEntry(stakedTotalKEY, (stakedTotal - amount)), ScriptTransfer(i.caller, amount, lpAssetId), OperationHistoryEntry("unstake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) ++ listActions)
546+ else throw("Strict value is not equal to itself.")
547+ }
532548 else throw("Strict value is not equal to itself.")
533549 }
534550
535551
536552
537553 @Callable(i)
538554 func claimWx (lpAssetIdStr) = {
539555 let userAddressStr = toString(i.caller)
540556 let result = invoke(this, "claimWxINTERNAL", [lpAssetIdStr, userAddressStr], nil)
541557 $Tuple2(nil, result)
542558 }
543559
544560
545561
546562 @Callable(i)
547563 func claimWxINTERNAL (lpAssetIdStr,userAddressStr) = {
548564 let checkCaller = mustThis(i)
549565 if ((checkCaller == checkCaller))
550566 then {
551567 let userAddress = valueOrErrorMessage(addressFromString(userAddressStr), "claimWxINTERNAL: invalid user address")
552568 let poolAddressStr = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr))
553569 let claimedByUserKEY = keyClaimedByUser(lpAssetIdStr, userAddressStr)
554570 let claimedTotalKEY = keyClaimedTotal(lpAssetIdStr)
555571 let claimedByUserMinRewardKEY = keyClaimedByUserMinReward(lpAssetIdStr, userAddressStr)
556572 let claimedByUserBoostRewardKEY = keyClaimedByUserBoostReward(lpAssetIdStr, userAddressStr)
557573 let claimedByUser = getBigIntFromStringOrZero(this, claimedByUserKEY)
558574 let claimedByUserMinReward = getBigIntFromStringOrZero(this, claimedByUserMinRewardKEY)
559575 let claimedByUserBoostReward = getBigIntFromStringOrZero(this, claimedByUserBoostRewardKEY)
560576 let claimedTotal = getBigIntFromStringOrZero(this, claimedTotalKEY)
561- let $t02259022702 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
562- let wxToClaimUserNew = $t02259022702._1
563- let integralSTATE = $t02259022702._2
564- let debug = $t02259022702._3
577+ let $t02288322995 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
578+ let wxToClaimUserNew = $t02288322995._1
579+ let integralSTATE = $t02288322995._2
580+ let debug = $t02288322995._3
565581 let availableToClaim = max([(wxToClaimUserNew - claimedByUser), zeroBigInt])
566582 if ((zeroBigInt >= availableToClaim))
567583 then throw("nothing to claim")
568584 else {
569585 let wxAmountBoostTotal = max([asInt(asAnyList(invoke(boostingContract, "claimWxBoost", [lpAssetIdStr, userAddressStr], nil))[0]), 0])
570586 let minRewardPart = availableToClaim
571587 let boostRewardPart = min([(minRewardPart * toBigInt(2)), toBigInt(wxAmountBoostTotal)])
572588 let wxAssetId = asByteVector(asAnyList(invoke(emissionContract, "emit", [toInt(minRewardPart)], nil))[0])
573589 let emitBoost = asAnyList(invoke(emissionContract, "emit", [toInt(boostRewardPart)], nil))
574590 if ((emitBoost == emitBoost))
575591 then {
576592 let claimedByUserValue = (claimedByUser + availableToClaim)
577593 let claimedByUserMinRewardPlusPart = (claimedByUserMinReward + minRewardPart)
578594 let claimedByUserBoostRewardPlusBoostRewardPart = (claimedByUserMinReward + minRewardPart)
579595 let claimedTotalPlusAvailableToClaim = (claimedByUserMinReward + minRewardPart)
580596 [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)]
581597 }
582598 else throw("Strict value is not equal to itself.")
583599 }
584600 }
585601 else throw("Strict value is not equal to itself.")
586602 }
587603
588604
589605
590606 @Callable(i)
591607 func claimWxREADONLY (lpAssetIdStr,userAddressStr) = {
592608 let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
593609 let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
594610 let claimedByUserKEY = keyClaimedByUser(lpAssetIdStr, userAddressStr)
595611 let stakedByUser = readStaked(stakedByUserKEY)
596612 let stakedTotal = readStaked(stakedTotalKEY)
597613 let claimedByUser = getBigIntFromStringOrZero(this, claimedByUserKEY)
598614 let poolAddressStr = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr))
599615 let poolWeight = getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr))
600616 let wxEmissionPerBlock = getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent())
601617 let emissionStartBlock = getIntOrFail(emissionContract, keyEmissionStartBlock())
602618 let passedBlocks = if ((emissionStartBlock > height))
603619 then 0
604620 else (height - emissionStartBlock)
605621 let poolWxEmission = fraction((wxEmissionPerBlock * passedBlocks), poolWeight, POOLWEIGHTMULT)
606622 let userWxReward = fraction(poolWxEmission, stakedByUser, stakedTotal)
607- let $t02534425456 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
608- let wxToClaimUserNew = $t02534425456._1
609- let integralSTATE = $t02534425456._2
610- let debug = $t02534425456._3
623+ let $t02563725749 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0)
624+ let wxToClaimUserNew = $t02563725749._1
625+ let integralSTATE = $t02563725749._2
626+ let debug = $t02563725749._3
611627 let availableToClaim = max([(wxToClaimUserNew - claimedByUser), zeroBigInt])
612628 let boostInvResult = asAnyList(invoke(boostingContract, "claimWxBoostREADONLY", [lpAssetIdStr, userAddressStr], nil))
613629 let wxAmountBoostTotal = max([asInt(boostInvResult[0]), 0])
614630 let boostDebug = asString(boostInvResult[1])
615631 let minRewardPart = availableToClaim
616632 let boostRewardPart = min([(minRewardPart * toBigInt(2)), toBigInt(wxAmountBoostTotal)])
617633 let totalReward = (minRewardPart + boostRewardPart)
618634 $Tuple2(nil, makeString(["%s%s%d%d%d%d%s", lpAssetIdStr, userAddressStr, toString(totalReward), toString(claimedByUser), toString(minRewardPart), toString(boostRewardPart), ((((debug + "::") + toString(userWxReward)) + "::BOOST::") + boostDebug)], SEP))
619635 }
620636
621637
622638
623639 @Callable(i)
624640 func usersListTraversal (lpAssetId) = {
625641 let checkCaller = if ((toBase58String(i.caller.bytes) == valueOrElse(getString(this, keyVotingEmissionContract()), "")))
626642 then true
627643 else mustManager(i)
628644 if ((checkCaller == checkCaller))
629645 then {
630646 let listName = getUsersListName(lpAssetId)
631647 let userOrUnit = getString(keyNextUser(lpAssetId))
632648 let headOrUnit = getString(keyListHead(listName))
633649 match userOrUnit {
634650 case _: Unit =>
635651 match headOrUnit {
636652 case _: Unit =>
637653 $Tuple2(nil, false)
638654 case head: String =>
639655 $Tuple2([StringEntry(keyNextUser(lpAssetId), head)], true)
640656 case _ =>
641657 throw("Match error")
642658 }
643659 case userAddress: String =>
644660 let claimedByUser = getBigIntFromStringOrZero(this, keyClaimedByUser(lpAssetId, userAddress))
645661 let poolAddress = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetId))
646662 let wxToClaimUserNew = refreshINTEGRALS(lpAssetId, userAddress, poolAddress, 0)._1
647663 let availableToClaim = (wxToClaimUserNew - claimedByUser)
648664 let r = if ((availableToClaim > zeroBigInt))
649665 then invoke(this, "claimWxINTERNAL", [lpAssetId, userAddress], nil)
650666 else unit
651667 if ((r == r))
652668 then {
653669 let nextUserOrUnit = getString(keyListNext(listName, userAddress))
654670 match nextUserOrUnit {
655671 case _: Unit =>
656672 $Tuple2([DeleteEntry(keyNextUser(lpAssetId))], false)
657673 case nextUser: String =>
658674 $Tuple2([StringEntry(keyNextUser(lpAssetId), nextUser)], true)
659675 case _ =>
660676 throw("Match error")
661677 }
662678 }
663679 else throw("Strict value is not equal to itself.")
664680 case _ =>
665681 throw("Match error")
666682 }
667683 }
668684 else throw("Strict value is not equal to itself.")
669685 }
670686
671687
672688
673689 @Callable(i)
674690 func onModifyWeight (lpAssetIdStr,poolAddressStr) = if ((i.caller != factoryContract))
675691 then throw("permissions denied")
676692 else {
677- let $t02780727917 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, 0)
678- let wxPerLpIntegralNew = $t02780727917._1
679- let poolIntegralSTATE = $t02780727917._2
680- let poolDEBUG = $t02780727917._3
693+ let $t02810028210 = refreshPoolINTEGRALS(lpAssetIdStr, poolAddressStr, 0)
694+ let wxPerLpIntegralNew = $t02810028210._1
695+ let poolIntegralSTATE = $t02810028210._2
696+ let poolDEBUG = $t02810028210._3
681697 poolIntegralSTATE
682698 }
699+
700+
701+
702+@Callable(i)
703+func setMigrator (pk) = if ((pk == ""))
704+ then [DeleteEntry(keyMigrator)]
705+ else [BinaryEntry(keyMigrator, fromBase58String(pk))]
683706
684707
685708 @Verifier(tx)
686709 func verify () = {
687710 let targetPublicKey = match managerPublicKeyOrUnit() {
688711 case pk: ByteVector =>
689712 pk
690713 case _: Unit =>
691714 tx.senderPublicKey
692715 case _ =>
693716 throw("Match error")
694717 }
695- sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
718+ if (sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey))
719+ then true
720+ else sigVerify(tx.bodyBytes, tx.proofs[0], getBinaryValue(this, keyMigrator))
696721 }
697722

github/deemru/w8io/026f985 
105.86 ms