tx · BskLMfXpLaR9V9pDsWzAWTWriKeW8XPeQk4d2whGb51u

3Myn55vLkduxbX3ZXfiDCZhaQsLxYp1kmCy:  -0.02300000 Waves

2023.02.15 16:04 [2450760] smart account 3Myn55vLkduxbX3ZXfiDCZhaQsLxYp1kmCy > SELF 0.00000000 Waves

{ "type": 13, "id": "BskLMfXpLaR9V9pDsWzAWTWriKeW8XPeQk4d2whGb51u", "fee": 2300000, "feeAssetId": null, "timestamp": 1676466294820, "version": 2, "chainId": 84, "sender": "3Myn55vLkduxbX3ZXfiDCZhaQsLxYp1kmCy", "senderPublicKey": "9W33iCCNfmFxUbiC6XZcH5x7f6xfwC7Jb3BoExT5q2PV", "proofs": [ "3jYWzrxQby6f6sQRf3wK9RkTAwqqixDTGPWjk38jb4s7E4pQTwGaiWCuwnSpPHpeDuz8uLE3jhDmKcVHpSR6q2di" ], "script": "base64:BgKbJggCEggKBggIAQEBCBIFCgMBCAISAwoBARIDCgEBEgQKAggIEgQKAggIEgMKAQgSAwoBCBIECgIIARIAEgMKAQgSACIDU0VQIgZTQ0FMRTgiBU1VTFQ4Ig5QT09MV0VJR0hUTVVMVCIHd3JhcEVyciIDbXNnIgh0aHJvd0VyciIEc3RyZiIHYWRkcmVzcyIDa2V5IgNpb3oiA2lvZCIKZGVmYXVsdFZhbCIDaW9mIgNhYnMiA3ZhbCIDYWFsIgckbWF0Y2gwIgp2YWxBbnlMeXN0IgJhaSIGdmFsSW50IhtrZXlSZWZlcnJhbHNDb250cmFjdEFkZHJlc3MiHnJlZmVycmFsc0NvbnRyYWN0QWRkcmVzc09yRmFpbCIWa2V5UmVmZXJyYWxQcm9ncmFtTmFtZSIacmVmZXJyYWxQcm9ncmFtTmFtZURlZmF1bHQiE3JlZmVycmFsUHJvZ3JhbU5hbWUiEWtleUZhY3RvcnlBZGRyZXNzIhhJZHhGYWN0b3J5Q2ZnU3Rha2luZ0RhcHAiGUlkeEZhY3RvcnlDZmdCb29zdGluZ0RhcHAiFElkeEZhY3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IBQJlQQZwcm9vZnMAAAUCZUO7K12R", "height": 2450760, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Exks2UkriPFqjRP5E8F3QS8vd8gYfCLqdJdYVVTQQwU1 Next: 5tog8x7bSLC6iuCsZ5peaA914TR6cERf2aVHu9YZoL3C Diff:
OldNewDifferences
435435 }
436436 let keyCurrentEpoch = makeString(["%s", "currentEpoch"], SEP)
437437 let lastFinalizedEpoch = {
438- let epoch = (value(getInteger(this, keyCurrentEpoch)) - 1)
438+ let epoch = (value(getInteger(votingEmissionContract, keyCurrentEpoch)) - 1)
439439 if ((0 > epoch))
440440 then throwErr("invalid epoch")
441441 else epoch
445445 func keyVotingResult (pool,epoch) = makeString(["%s%s%s%d", "votingResult", amountAssetId, priceAssetId, toString(epoch)], SEP)
446446
447447 let pool = $Tuple2(amountAssetId, priceAssetId)
448- let userVote = valueOrElse(getInteger(this, keyVote(pool, userAddress, lastFinalizedEpoch)), 0)
449- let poolResult = valueOrElse(getInteger(this, keyVotingResult(pool, lastFinalizedEpoch)), 0)
448+ let userVote = valueOrElse(getInteger(votingEmissionContract, keyVote(pool, userAddress, lastFinalizedEpoch)), 0)
449+ let poolResult = valueOrElse(getInteger(votingEmissionContract, keyVotingResult(pool, lastFinalizedEpoch)), 0)
450450 $Tuple2(userVote, poolResult)
451451 }
452452
489489 let totalMaxBoostIntegralKEY = keyTotalMaxBoostINTEGRAL()
490490 let userMaxBoostInt = ioz(this, userMaxBoostIntegralKEY)
491491 let totalMaxBoostInt = ioz(this, totalMaxBoostIntegralKEY)
492- let $t01812418202 = getVoteInfoREADONLY(lpAssetIdStr, userAddressStr)
493- let userVote = $t01812418202._1
494- let totalVotes = $t01812418202._2
492+ let $t01817818256 = getVoteInfoREADONLY(lpAssetIdStr, userAddressStr)
493+ let userVote = $t01817818256._1
494+ let totalVotes = $t01817818256._2
495495 let userBoostAvalaibleToClaimTotalKEY = keyUserBoostAvalaibleToClaimTotal(userNumStr)
496496 let userBoostAvaliableToClaimTotal = ioz(this, userBoostAvalaibleToClaimTotalKEY)
497497 let poolUserBoostEmissionIntegral = fraction(userBoostEmissionIntegral, poolWeight, POOLWEIGHTMULT)
592592
593593 @Callable(i)
594594 func lockRef (duration,referrerAddress,signature) = {
595- let $t02415424219 = lockActions(i, duration)
596- let lockActionsResult = $t02415424219._1
597- let gWxAmountStart = $t02415424219._2
595+ let $t02420824273 = lockActions(i, duration)
596+ let lockActionsResult = $t02420824273._1
597+ let gWxAmountStart = $t02420824273._2
598598 let referralAddress = toString(i.caller)
599599 let refInv = if (if ((referrerAddress == ""))
600600 then true
615615
616616 @Callable(i)
617617 func lock (duration) = {
618- let $t02467724742 = lockActions(i, duration)
619- let lockActionsResult = $t02467724742._1
620- let gWxAmountStart = $t02467724742._2
618+ let $t02473124796 = lockActions(i, duration)
619+ let lockActionsResult = $t02473124796._1
620+ let gWxAmountStart = $t02473124796._2
621621 let updateRefActivity = invoke(mathContract, "updateReferralActivity", [toString(i.caller), gWxAmountStart], nil)
622622 if ((updateRefActivity == updateRefActivity))
623623 then $Tuple2(lockActionsResult, unit)
706706 func claimWxBoost (lpAssetIdStr,userAddressStr) = if ((stakingContract != i.caller))
707707 then throw("permissions denied")
708708 else {
709- let $t02972329825 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, false)
710- let userBoostAvailable = $t02972329825._1
711- let dataState = $t02972329825._2
712- let debug = $t02972329825._3
709+ let $t02977729879 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, false)
710+ let userBoostAvailable = $t02977729879._1
711+ let dataState = $t02977729879._2
712+ let debug = $t02977729879._3
713713 $Tuple2(dataState, [userBoostAvailable])
714714 }
715715
717717
718718 @Callable(i)
719719 func claimWxBoostREADONLY (lpAssetIdStr,userAddressStr) = {
720- let $t02995730058 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, true)
721- let userBoostAvailable = $t02995730058._1
722- let dataState = $t02995730058._2
723- let debug = $t02995730058._3
720+ let $t03001130112 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, true)
721+ let userBoostAvailable = $t03001130112._1
722+ let dataState = $t03001130112._2
723+ let debug = $t03001130112._3
724724 $Tuple2(nil, [userBoostAvailable, debug])
725725 }
726726
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SEP = "__"
55
66 let SCALE8 = 8
77
88 let MULT8 = 100000000
99
1010 let POOLWEIGHTMULT = MULT8
1111
1212 func wrapErr (msg) = makeString(["boosting.ride:", msg], " ")
1313
1414
1515 func throwErr (msg) = throw(wrapErr(msg))
1616
1717
1818 func strf (address,key) = valueOrErrorMessage(getString(address, key), (("mandatory this." + key) + " is not defined"))
1919
2020
2121 func ioz (address,key) = valueOrElse(getInteger(address, key), 0)
2222
2323
2424 func iod (address,key,defaultVal) = valueOrElse(getInteger(address, key), defaultVal)
2525
2626
2727 func iof (address,key) = valueOrErrorMessage(getInteger(address, key), (("mandatory this." + key) + " is not defined"))
2828
2929
3030 func abs (val) = if ((0 > val))
3131 then -(val)
3232 else val
3333
3434
3535 func aal (val) = match val {
3636 case valAnyLyst: List[Any] =>
3737 valAnyLyst
3838 case _ =>
3939 throw("fail to cast into List[Any]")
4040 }
4141
4242
4343 func ai (val) = match val {
4444 case valInt: Int =>
4545 valInt
4646 case _ =>
4747 throw("fail to cast into Int")
4848 }
4949
5050
5151 func keyReferralsContractAddress () = makeString(["%s%s", "config", "referralsContractAddress"], SEP)
5252
5353
5454 let referralsContractAddressOrFail = addressFromStringValue(strf(this, keyReferralsContractAddress()))
5555
5656 let keyReferralProgramName = makeString(["%s%s", "referral", "programName"], SEP)
5757
5858 let referralProgramNameDefault = "wxlock"
5959
6060 let referralProgramName = valueOrElse(getString(this, keyReferralProgramName), referralProgramNameDefault)
6161
6262 func keyFactoryAddress () = "%s%s__config__factoryAddress"
6363
6464
6565 let IdxFactoryCfgStakingDapp = 1
6666
6767 let IdxFactoryCfgBoostingDapp = 2
6868
6969 let IdxFactoryCfgIdoDapp = 3
7070
7171 let IdxFactoryCfgTeamDapp = 4
7272
7373 let IdxFactoryCfgEmissionDapp = 5
7474
7575 let IdxFactoryCfgRestDapp = 6
7676
7777 let IdxFactoryCfgSlippageDapp = 7
7878
7979 let IdxFactoryCfgDaoDapp = 8
8080
8181 let IdxFactoryCfgMarketingDapp = 9
8282
8383 let IdxFactoryCfgGwxRewardDapp = 10
8484
8585 let IdxFactoryCfgBirdsDapp = 11
8686
8787 func keyFactoryCfg () = "%s__factoryConfig"
8888
8989
9090 func keyFactoryLp2AssetsMapping (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP)
9191
9292
9393 func keyFactoryLpList () = "%s__lpTokensList"
9494
9595
9696 func keyFactoryLpAssetToPoolContractAddress (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP)
9797
9898
9999 func keyFactoryPoolWeight (contractAddress) = makeString(["%s%s", "poolWeight", contractAddress], SEP)
100100
101101
102102 func keyFactoryPoolWeightHistory (poolAddress,num) = ((("%s%s__poolWeight__" + poolAddress) + "__") + toString(num))
103103
104104
105105 func readFactoryAddressOrFail () = addressFromStringValue(strf(this, keyFactoryAddress()))
106106
107107
108108 func readLpList () = split(valueOrElse(getString(readFactoryAddressOrFail(), keyFactoryLpList()), ""), SEP)
109109
110110
111111 func readFactoryCfgOrFail (factory) = split(strf(factory, keyFactoryCfg()), SEP)
112112
113113
114114 func getBoostingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgBoostingDapp])
115115
116116
117117 func getEmissionAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgEmissionDapp])
118118
119119
120120 func getStakingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgStakingDapp])
121121
122122
123123 func getGwxRewardAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgGwxRewardDapp])
124124
125125
126126 func keyManagerPublicKey () = "%s__managerPublicKey"
127127
128128
129129 func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
130130
131131
132132 func keyEmissionRatePerBlockCurrent () = "%s%s__ratePerBlock__current"
133133
134134
135135 func keyEmissionRatePerBlockMaxCurrent () = "%s%s__ratePerBlockMax__current"
136136
137137
138138 func keyEmissionStartBlock () = "%s%s__emission__startBlock"
139139
140140
141141 func keyBoostingV2StartHeight () = "%s%s__boostingV2__startBlock"
142142
143143
144144 func keyEmissionDurationInBlocks () = "%s%s__emission__duration"
145145
146146
147147 func keyEmissionEndBlock () = "%s%s__emission__endBlock"
148148
149149
150150 func keyNextPeriod () = "%s__nextPeriod"
151151
152152
153153 func keyGwxRewardEmissionStartHeight () = "%s%s__gwxRewardEmissionPart__startHeight"
154154
155155
156156 let IdxCfgAssetId = 1
157157
158158 let IdxCfgMinLockAmount = 2
159159
160160 let IdxCfgMinLockDuration = 3
161161
162162 let IdxCfgMaxLockDuration = 4
163163
164164 let IdxCfgMathContract = 5
165165
166166 func keyConfig () = "%s__config"
167167
168168
169169 func readConfigArrayOrFail () = split(strf(this, keyConfig()), SEP)
170170
171171
172172 let mathContract = addressFromStringValue(readConfigArrayOrFail()[IdxCfgMathContract])
173173
174174 func formatConfigS (assetId,minLockAmount,minLockDuration,maxLockDuration,mathContract) = makeString(["%s%d%d%d", assetId, minLockAmount, minLockDuration, maxLockDuration, mathContract], SEP)
175175
176176
177177 func formatConfig (assetId,minLockAmount,minLockDuration,maxLockDuration,mathContract) = formatConfigS(assetId, toString(minLockAmount), toString(minLockDuration), toString(maxLockDuration), mathContract)
178178
179179
180180 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
181181 case s: String =>
182182 fromBase58String(s)
183183 case _: Unit =>
184184 unit
185185 case _ =>
186186 throw("Match error")
187187 }
188188
189189
190190 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
191191 case s: String =>
192192 fromBase58String(s)
193193 case _: Unit =>
194194 unit
195195 case _ =>
196196 throw("Match error")
197197 }
198198
199199
200200 func mustManager (i) = {
201201 let pd = throw("Permission denied")
202202 match managerPublicKeyOrUnit() {
203203 case pk: ByteVector =>
204204 if ((i.callerPublicKey == pk))
205205 then true
206206 else pd
207207 case _: Unit =>
208208 if ((i.caller == this))
209209 then true
210210 else pd
211211 case _ =>
212212 throw("Match error")
213213 }
214214 }
215215
216216
217217 let IdxLockUserNum = 1
218218
219219 let IdxLockAmount = 2
220220
221221 let IdxLockStart = 3
222222
223223 let IdxLockDuration = 4
224224
225225 let IdxLockParamK = 5
226226
227227 let IdxLockParamB = 6
228228
229229 func keyLockParamsRecord (userAddress) = makeString(["%s%s__lock", userAddress], SEP)
230230
231231
232232 func readLockParamsRecordOrFail (userAddress) = split(strf(this, keyLockParamsRecord(userAddress)), SEP)
233233
234234
235235 func formatLockParamsRecordS (userNum,amount,start,duration,paramK,paramB,lastUpdTimestamp,gwxAmount) = makeString(["%d%d%d%d%d%d%d%d", userNum, amount, start, duration, paramK, paramB, lastUpdTimestamp, gwxAmount], SEP)
236236
237237
238238 func formatLockParamsRecord (userNum,amount,start,duration,paramK,paramB,gwxAmount) = formatLockParamsRecordS(userNum, toString(amount), toString(start), toString(duration), toString(paramK), toString(paramB), toString(lastBlock.timestamp), toString(gwxAmount))
239239
240240
241241 func keyNextUserNum () = "%s__nextUserNum"
242242
243243
244244 func keyUser2NumMapping (userAddress) = makeString(["%s%s%s__mapping__user2num", userAddress], SEP)
245245
246246
247247 func keyNum2UserMapping (num) = makeString(["%s%s%s__mapping__num2user", num], SEP)
248248
249249
250250 func keyLockParamUserAmount (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "amount"], SEP)
251251
252252
253253 func keyLockParamStartBlock (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "start"], SEP)
254254
255255
256256 func keyLockParamDuration (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "duration"], SEP)
257257
258258
259259 func keyLockParamK (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "k"], SEP)
260260
261261
262262 func keyLockParamB (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "b"], SEP)
263263
264264
265265 func keyLockParamByPeriodK (userNum,period) = makeString(["%s%d%s%d__paramByPeriod", userNum, "k", period], SEP)
266266
267267
268268 func keyLockParamByPeriodB (userNum,period) = makeString(["%s%d%s%d__paramByPeriod", userNum, "b", period], SEP)
269269
270270
271271 func keyLockParamTotalAmount () = "%s%s__stats__activeTotalLocked"
272272
273273
274274 func keyStatsLocksDurationSumInBlocks () = "%s%s__stats__locksDurationSumInBlocks"
275275
276276
277277 func keyStatsLocksCount () = "%s%s__stats__locksCount"
278278
279279
280280 func keyStatsUsersCount () = "%s%s__stats__activeUsersCount"
281281
282282
283283 func keyUserBoostEmissionLastINTEGRAL (userNum) = makeString(["%s%d__userBoostEmissionLastIntV2", userNum], SEP)
284284
285285
286286 func keyUserLpBoostEmissionLastINTEGRAL (userNum,lpAssetId) = makeString(["%s%d__userBoostEmissionLastIntV2", userNum, lpAssetId], SEP)
287287
288288
289289 func keyUserMaxBoostINTEGRAL (userNum) = makeString(["%s%d__maxBoostInt", userNum], SEP)
290290
291291
292292 func keyTotalMaxBoostINTEGRAL () = "%s%s__maxBoostInt__total"
293293
294294
295295 func keyUserBoostAvalaibleToClaimTotal (userNum) = makeString(["%s%d__userBoostAvaliableToClaimTotal", userNum], SEP)
296296
297297
298298 func keyUserBoostClaimed (userNum) = makeString(["%s%d__userBoostClaimed", userNum], SEP)
299299
300300
301301 func keyTotalCachedGwx () = "%s%s__gwxCached__total"
302302
303303
304304 func keyTotalCachedGwxCorrective () = "%s__gwxCachedTotalCorrective"
305305
306306
307307 let factoryContract = readFactoryAddressOrFail()
308308
309309 let factoryCfg = readFactoryCfgOrFail(factoryContract)
310310
311311 let emissionContract = getEmissionAddressOrFail(factoryCfg)
312312
313313 let stakingContract = getStakingAddressOrFail(factoryCfg)
314314
315315 let gwxRewardContract = getGwxRewardAddressOrFail(factoryCfg)
316316
317317 let keyVotingEmissionContract = makeString(["%s", "votingEmissionContract"], SEP)
318318
319319 let votingEmissionContract = addressFromStringValue(getStringValue(factoryContract, keyVotingEmissionContract))
320320
321321 let boostCoeff = {
322322 let @ = invoke(emissionContract, "getBoostCoeffREADONLY", nil, nil)
323323 if ($isInstanceOf(@, "Int"))
324324 then @
325325 else throw(($getType(@) + " couldn't be cast to Int"))
326326 }
327327
328328 func getTotalCachedGwx (correct) = {
329329 let keyCurrentEpochUi = makeString(["%s", "currentEpochUi"], SEP)
330330 let currentEpochUi = getIntegerValue(votingEmissionContract, keyCurrentEpochUi)
331331 let keyTargetEpoch = makeString(["%s%s", "totalCachedGwxCorrection__activationEpoch"], SEP)
332332 let targetEpochOption = getInteger(this, keyTargetEpoch)
333333 let totalCachedGwxRaw = valueOrElse(getInteger(this, keyTotalCachedGwx()), 0)
334334 let isCorrectionActivated = if (isDefined(targetEpochOption))
335335 then (currentEpochUi >= value(targetEpochOption))
336336 else false
337337 let corrective = if (if (isCorrectionActivated)
338338 then correct
339339 else false)
340340 then valueOrElse(getInteger(this, keyTotalCachedGwxCorrective()), 0)
341341 else 0
342342 max([0, (totalCachedGwxRaw + corrective)])
343343 }
344344
345345
346346 func HistoryEntry (type,user,amount,lockStart,duration,k,b,i) = {
347347 let historyKEY = makeString(["%s%s%s%s__history", type, user, toBase58String(i.transactionId)], SEP)
348348 let historyDATA = makeString(["%d%d%d%d%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(amount), toString(lockStart), toString(duration), toString(k), toString(b)], SEP)
349349 StringEntry(historyKEY, historyDATA)
350350 }
351351
352352
353353 func StatsEntry (totalLockedInc,durationInc,lockCountInc,usersCountInc) = {
354354 let locksDurationSumInBlocksKEY = keyStatsLocksDurationSumInBlocks()
355355 let locksCountKEY = keyStatsLocksCount()
356356 let usersCountKEY = keyStatsUsersCount()
357357 let totalAmountKEY = keyLockParamTotalAmount()
358358 let locksDurationSumInBlocks = ioz(this, locksDurationSumInBlocksKEY)
359359 let locksCount = ioz(this, locksCountKEY)
360360 let usersCount = ioz(this, usersCountKEY)
361361 let totalAmount = ioz(this, totalAmountKEY)
362362 [IntegerEntry(locksDurationSumInBlocksKEY, (locksDurationSumInBlocks + durationInc)), IntegerEntry(locksCountKEY, (locksCount + lockCountInc)), IntegerEntry(usersCountKEY, (usersCount + usersCountInc)), IntegerEntry(totalAmountKEY, (totalAmount + totalLockedInc))]
363363 }
364364
365365
366366 func calcGwxAmount (kRaw,bRaw,h) = {
367367 let SCALE = 1000
368368 (((kRaw * h) + bRaw) / SCALE)
369369 }
370370
371371
372372 func LockParamsEntry (userAddress,userNum,amount,start,duration,k,b,period) = {
373373 let userAmountKEY = keyLockParamUserAmount(userNum)
374374 let startBlockKEY = keyLockParamStartBlock(userNum)
375375 let durationKEY = keyLockParamDuration(userNum)
376376 let kKEY = keyLockParamK(userNum)
377377 let bKEY = keyLockParamB(userNum)
378378 let kByPeriodKEY = keyLockParamByPeriodK(userNum, period)
379379 let bByPeriodKEY = keyLockParamByPeriodB(userNum, period)
380380 let gwxAmount = calcGwxAmount(k, b, height)
381381 [IntegerEntry(userAmountKEY, amount), IntegerEntry(startBlockKEY, start), IntegerEntry(durationKEY, duration), IntegerEntry(kKEY, k), IntegerEntry(bKEY, b), IntegerEntry(kByPeriodKEY, k), IntegerEntry(bByPeriodKEY, b), StringEntry(keyLockParamsRecord(userAddress), formatLockParamsRecord(userNum, amount, start, duration, k, b, gwxAmount))]
382382 }
383383
384384
385385 func extractOptionalPaymentAmountOrFail (i,expectedAssetId) = if ((size(i.payments) > 1))
386386 then throw("only one payment is allowed")
387387 else if ((size(i.payments) == 0))
388388 then 0
389389 else {
390390 let pmt = i.payments[0]
391391 if ((value(pmt.assetId) != expectedAssetId))
392392 then throw("invalid asset id in payment")
393393 else pmt.amount
394394 }
395395
396396
397397 func calcUserGwxAmountAtHeight (userAddress,targetHeight) = {
398398 let EMPTY = "empty"
399399 let user2NumMappingKEY = keyUser2NumMapping(userAddress)
400400 let userNum = valueOrElse(getString(user2NumMappingKEY), EMPTY)
401401 let k = valueOrElse(getInteger(keyLockParamK(userNum)), 0)
402402 let b = valueOrElse(getInteger(keyLockParamB(userNum)), 0)
403403 let gwxAmountCalc = calcGwxAmount(k, b, targetHeight)
404404 let gwxAmount = if ((0 > gwxAmountCalc))
405405 then 0
406406 else gwxAmountCalc
407407 gwxAmount
408408 }
409409
410410
411411 func calcCurrentGwxAmount (userAddress) = calcUserGwxAmountAtHeight(userAddress, height)
412412
413413
414414 func getVoteInfoREADONLY (lpAssetIdStr,userAddressStr) = {
415415 let userAddress = addressFromStringValue(userAddressStr)
416416 let idxAmountAssetId = 4
417417 let idxPriceAssetId = 5
418418 let poolCfg = {
419419 let @ = invoke(factoryContract, "getPoolConfigByLpAssetId", [lpAssetIdStr], nil)
420420 if ($isInstanceOf(@, "List[Any]"))
421421 then @
422422 else throw(($getType(@) + " couldn't be cast to List[Any]"))
423423 }
424424 let amountAssetId = {
425425 let @ = poolCfg[idxAmountAssetId]
426426 if ($isInstanceOf(@, "String"))
427427 then @
428428 else throw(($getType(@) + " couldn't be cast to String"))
429429 }
430430 let priceAssetId = {
431431 let @ = poolCfg[idxPriceAssetId]
432432 if ($isInstanceOf(@, "String"))
433433 then @
434434 else throw(($getType(@) + " couldn't be cast to String"))
435435 }
436436 let keyCurrentEpoch = makeString(["%s", "currentEpoch"], SEP)
437437 let lastFinalizedEpoch = {
438- let epoch = (value(getInteger(this, keyCurrentEpoch)) - 1)
438+ let epoch = (value(getInteger(votingEmissionContract, keyCurrentEpoch)) - 1)
439439 if ((0 > epoch))
440440 then throwErr("invalid epoch")
441441 else epoch
442442 }
443443 func keyVote (pool,address,epoch) = makeString(["%s%s%s%s%d", "vote", amountAssetId, priceAssetId, toString(address), toString(epoch)], SEP)
444444
445445 func keyVotingResult (pool,epoch) = makeString(["%s%s%s%d", "votingResult", amountAssetId, priceAssetId, toString(epoch)], SEP)
446446
447447 let pool = $Tuple2(amountAssetId, priceAssetId)
448- let userVote = valueOrElse(getInteger(this, keyVote(pool, userAddress, lastFinalizedEpoch)), 0)
449- let poolResult = valueOrElse(getInteger(this, keyVotingResult(pool, lastFinalizedEpoch)), 0)
448+ let userVote = valueOrElse(getInteger(votingEmissionContract, keyVote(pool, userAddress, lastFinalizedEpoch)), 0)
449+ let poolResult = valueOrElse(getInteger(votingEmissionContract, keyVotingResult(pool, lastFinalizedEpoch)), 0)
450450 $Tuple2(userVote, poolResult)
451451 }
452452
453453
454454 func internalClaimWxBoost (lpAssetIdStr,userAddressStr,readOnly) = {
455455 let EMPTY = "EMPTY"
456456 let userRecordOrEmpty = valueOrElse(getString(this, keyLockParamsRecord(userAddressStr)), EMPTY)
457457 if ((userRecordOrEmpty == EMPTY))
458458 then $Tuple3(0, nil, "userRecord::is::empty")
459459 else {
460460 let userRecordArray = split(userRecordOrEmpty, SEP)
461461 let userNumStr = userRecordArray[IdxLockUserNum]
462462 let EMPTYSTR = "empty"
463463 let poolWeight = if ((lpAssetIdStr != EMPTYSTR))
464464 then {
465465 let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr))
466466 getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr))
467467 }
468468 else if (readOnly)
469469 then 0
470470 else throw(("not readonly mode: unsupported lp asset " + lpAssetIdStr))
471471 let wxEmissionPerBlock = iof(emissionContract, keyEmissionRatePerBlockCurrent())
472472 let boostingV2StartHeight = iof(emissionContract, keyBoostingV2StartHeight())
473473 let emissionEnd = iof(emissionContract, keyEmissionEndBlock())
474474 let h = if ((height > emissionEnd))
475475 then emissionEnd
476476 else height
477477 let dh = max([(h - boostingV2StartHeight), 0])
478478 let userLpBoostEmissionLastIntegralKEY = keyUserLpBoostEmissionLastINTEGRAL(userNumStr, lpAssetIdStr)
479479 let userBoostEmissionLastIntegralKEY = keyUserBoostEmissionLastINTEGRAL(userNumStr)
480480 let userBoostEmissionLastIntegral = valueOrElse(getInteger(this, userLpBoostEmissionLastIntegralKEY), ioz(this, userBoostEmissionLastIntegralKEY))
481481 let boostEmissionIntegral = (((wxEmissionPerBlock * dh) * (boostCoeff - 1)) / boostCoeff)
482482 let userBoostEmissionIntegral = (boostEmissionIntegral - userBoostEmissionLastIntegral)
483483 let udh = fraction(userBoostEmissionIntegral, boostCoeff, ((boostCoeff - 1) * wxEmissionPerBlock))
484484 let uLastH = (h - udh)
485485 if ((0 > userBoostEmissionIntegral))
486486 then throw("wrong calculations")
487487 else {
488488 let userMaxBoostIntegralKEY = keyUserMaxBoostINTEGRAL(userNumStr)
489489 let totalMaxBoostIntegralKEY = keyTotalMaxBoostINTEGRAL()
490490 let userMaxBoostInt = ioz(this, userMaxBoostIntegralKEY)
491491 let totalMaxBoostInt = ioz(this, totalMaxBoostIntegralKEY)
492- let $t01812418202 = getVoteInfoREADONLY(lpAssetIdStr, userAddressStr)
493- let userVote = $t01812418202._1
494- let totalVotes = $t01812418202._2
492+ let $t01817818256 = getVoteInfoREADONLY(lpAssetIdStr, userAddressStr)
493+ let userVote = $t01817818256._1
494+ let totalVotes = $t01817818256._2
495495 let userBoostAvalaibleToClaimTotalKEY = keyUserBoostAvalaibleToClaimTotal(userNumStr)
496496 let userBoostAvaliableToClaimTotal = ioz(this, userBoostAvalaibleToClaimTotalKEY)
497497 let poolUserBoostEmissionIntegral = fraction(userBoostEmissionIntegral, poolWeight, POOLWEIGHTMULT)
498498 let userBoostAvaliableToClaimTotalNew = if ((totalVotes == 0))
499499 then 0
500500 else fraction(poolUserBoostEmissionIntegral, userVote, totalVotes)
501501 let userBoostClaimedKEY = keyUserBoostClaimed(userNumStr)
502502 let userBoostClaimed = ioz(this, userBoostClaimedKEY)
503503 let userBoostAvailable = (userBoostAvaliableToClaimTotalNew - userBoostClaimed)
504504 let dataState = [IntegerEntry(userLpBoostEmissionLastIntegralKEY, boostEmissionIntegral)]
505505 let debug = makeString([toString(userBoostEmissionLastIntegral), toString(userBoostEmissionIntegral), toString(userBoostClaimed), toString(userBoostAvailable), toString(poolWeight), toString(h), toString(udh), toString(uLastH), toString(userVote), toString(totalVotes)], ":")
506506 $Tuple3(userBoostAvaliableToClaimTotalNew, dataState, debug)
507507 }
508508 }
509509 }
510510
511511
512512 func lockActions (i,duration) = {
513513 let cfgArray = readConfigArrayOrFail()
514514 let assetIdStr = cfgArray[IdxCfgAssetId]
515515 let assetId = fromBase58String(assetIdStr)
516516 let minLockAmount = parseIntValue(cfgArray[IdxCfgMinLockAmount])
517517 let minLockDuration = parseIntValue(cfgArray[IdxCfgMinLockDuration])
518518 let maxLockDuration = parseIntValue(cfgArray[IdxCfgMaxLockDuration])
519519 if ((size(i.payments) != 1))
520520 then throw("invalid payment - exact one payment must be attached")
521521 else {
522522 let pmt = i.payments[0]
523523 let pmtAmount = pmt.amount
524524 if ((assetId != value(pmt.assetId)))
525525 then throw((("invalid asset is in payment - " + assetIdStr) + " is expected"))
526526 else {
527527 let nextUserNumKEY = keyNextUserNum()
528528 let userAddressStr = toString(i.caller)
529529 let userIsExisting = isDefined(getString(keyUser2NumMapping(userAddressStr)))
530530 let userNumStr = if (userIsExisting)
531531 then value(getString(keyUser2NumMapping(userAddressStr)))
532532 else toString(iof(this, nextUserNumKEY))
533533 let userNum = parseIntValue(userNumStr)
534534 let lockStart = height
535535 let startBlockKEY = keyLockParamStartBlock(userNumStr)
536536 let durationKEY = keyLockParamDuration(userNumStr)
537537 let userAmountKEY = keyLockParamUserAmount(userNumStr)
538538 if ((minLockAmount > pmtAmount))
539539 then throw(("amount is less then minLockAmount=" + toString(minLockAmount)))
540540 else if ((minLockDuration > duration))
541541 then throw(("passed duration is less then minLockDuration=" + toString(minLockDuration)))
542542 else if ((duration > maxLockDuration))
543543 then throw(("passed duration is greater then maxLockDuration=" + toString(maxLockDuration)))
544544 else if (if (userIsExisting)
545545 then ((iof(this, startBlockKEY) + iof(this, durationKEY)) >= lockStart)
546546 else false)
547547 then throw("there is an active lock - consider to use increaseLock")
548548 else if ((ioz(this, userAmountKEY) > 0))
549549 then throw(("there are locked WXs - consider to use increaseLock " + userAmountKEY))
550550 else {
551551 let coeffX8 = fraction(duration, MULT8, maxLockDuration)
552552 let gWxAmountStart = fraction(pmtAmount, coeffX8, MULT8)
553553 let gWxParamsResultList = aal(invoke(mathContract, "calcGwxParamsREADONLY", [gWxAmountStart, lockStart, duration], nil))
554554 let k = ai(gWxParamsResultList[0])
555555 let b = ai(gWxParamsResultList[1])
556556 let period = toString(ai(gWxParamsResultList[2]))
557557 let wxEmissionPerBlock = iof(emissionContract, keyEmissionRatePerBlockCurrent())
558558 let emissionStart = iof(emissionContract, keyEmissionStartBlock())
559559 let emissionEnd = iof(emissionContract, keyEmissionEndBlock())
560560 let h = if ((height > emissionEnd))
561561 then emissionEnd
562562 else height
563563 let dh = max([(h - emissionStart), 0])
564564 let userBoostEmissionLastIntegralKEY = keyUserBoostEmissionLastINTEGRAL(userNumStr)
565565 let boostEmissionIntegral = (((wxEmissionPerBlock * dh) * 2) / 3)
566566 let userMaxBoostIntegralKEY = keyUserMaxBoostINTEGRAL(userNumStr)
567567 let totalMaxBoostIntegralKEY = keyTotalMaxBoostINTEGRAL()
568568 let userMaxBoostInt = ((gWxAmountStart * duration) / 2)
569569 let totalMaxBoostInt = ioz(this, totalMaxBoostIntegralKEY)
570570 let totalCachedGwxRaw = getTotalCachedGwx(false)
571571 let arr = if (userIsExisting)
572572 then nil
573573 else [IntegerEntry(nextUserNumKEY, (userNum + 1)), StringEntry(keyUser2NumMapping(userAddressStr), userNumStr), StringEntry(keyNum2UserMapping(userNumStr), userAddressStr)]
574574 $Tuple2(((((arr ++ LockParamsEntry(userAddressStr, userNumStr, pmtAmount, lockStart, duration, k, b, period)) ++ StatsEntry(pmtAmount, duration, 1, if (userIsExisting)
575575 then 0
576576 else 1)) :+ HistoryEntry("lock", userAddressStr, pmtAmount, lockStart, duration, k, b, i)) ++ [IntegerEntry(userBoostEmissionLastIntegralKEY, boostEmissionIntegral), IntegerEntry(keyTotalCachedGwx(), (totalCachedGwxRaw + gWxAmountStart))]), gWxAmountStart)
577577 }
578578 }
579579 }
580580 }
581581
582582
583583 @Callable(i)
584584 func constructor (factoryAddressStr,lockAssetIdStr,minLockAmount,minDuration,maxDuration,mathContract) = {
585585 let checkCaller = mustManager(i)
586586 if ((checkCaller == checkCaller))
587587 then ([IntegerEntry(keyNextUserNum(), 0), StringEntry(keyConfig(), formatConfig(lockAssetIdStr, minLockAmount, minDuration, maxDuration, mathContract)), StringEntry(keyFactoryAddress(), factoryAddressStr)] ++ StatsEntry(0, 0, 0, 0))
588588 else throw("Strict value is not equal to itself.")
589589 }
590590
591591
592592
593593 @Callable(i)
594594 func lockRef (duration,referrerAddress,signature) = {
595- let $t02415424219 = lockActions(i, duration)
596- let lockActionsResult = $t02415424219._1
597- let gWxAmountStart = $t02415424219._2
595+ let $t02420824273 = lockActions(i, duration)
596+ let lockActionsResult = $t02420824273._1
597+ let gWxAmountStart = $t02420824273._2
598598 let referralAddress = toString(i.caller)
599599 let refInv = if (if ((referrerAddress == ""))
600600 then true
601601 else (signature == base58''))
602602 then unit
603603 else invoke(referralsContractAddressOrFail, "createPair", [referralProgramName, referrerAddress, referralAddress, signature], nil)
604604 if ((refInv == refInv))
605605 then {
606606 let updateRefActivity = invoke(mathContract, "updateReferralActivity", [toString(i.caller), gWxAmountStart], nil)
607607 if ((updateRefActivity == updateRefActivity))
608608 then $Tuple2(lockActionsResult, unit)
609609 else throw("Strict value is not equal to itself.")
610610 }
611611 else throw("Strict value is not equal to itself.")
612612 }
613613
614614
615615
616616 @Callable(i)
617617 func lock (duration) = {
618- let $t02467724742 = lockActions(i, duration)
619- let lockActionsResult = $t02467724742._1
620- let gWxAmountStart = $t02467724742._2
618+ let $t02473124796 = lockActions(i, duration)
619+ let lockActionsResult = $t02473124796._1
620+ let gWxAmountStart = $t02473124796._2
621621 let updateRefActivity = invoke(mathContract, "updateReferralActivity", [toString(i.caller), gWxAmountStart], nil)
622622 if ((updateRefActivity == updateRefActivity))
623623 then $Tuple2(lockActionsResult, unit)
624624 else throw("Strict value is not equal to itself.")
625625 }
626626
627627
628628
629629 @Callable(i)
630630 func increaseLock (deltaDuration) = {
631631 let cfgArray = readConfigArrayOrFail()
632632 let assetIdStr = cfgArray[IdxCfgAssetId]
633633 let assetId = fromBase58String(assetIdStr)
634634 let minLockDuration = parseIntValue(cfgArray[IdxCfgMinLockDuration])
635635 let maxLockDuration = parseIntValue(cfgArray[IdxCfgMaxLockDuration])
636636 let pmtAmount = extractOptionalPaymentAmountOrFail(i, assetId)
637637 let userAddressStr = toString(i.caller)
638638 let userRecordArray = readLockParamsRecordOrFail(userAddressStr)
639639 let userNumStr = userRecordArray[IdxLockUserNum]
640640 let userAmount = parseIntValue(userRecordArray[IdxLockAmount])
641641 let lockStart = parseIntValue(userRecordArray[IdxLockStart])
642642 let lockDuration = parseIntValue(userRecordArray[IdxLockDuration])
643643 let lockEnd = (lockStart + lockDuration)
644644 let remainingDuration = max([(lockEnd - height), 0])
645645 let userAmountNew = (userAmount + pmtAmount)
646646 let lockDurationNew = (remainingDuration + deltaDuration)
647647 if ((0 > deltaDuration))
648648 then throw("duration is less then zero")
649649 else if ((minLockDuration > lockDurationNew))
650650 then throw(("lockDurationNew is less then minLockDuration=" + toString(minLockDuration)))
651651 else if ((lockDurationNew > maxLockDuration))
652652 then throw(("deltaDuration + existedLockDuration is greater then maxLockDuration=" + toString(maxLockDuration)))
653653 else {
654654 let coeffX8 = fraction(lockDurationNew, MULT8, maxLockDuration)
655655 let gWxAmountStart = fraction(userAmountNew, coeffX8, MULT8)
656656 let updateRefActivity = invoke(mathContract, "updateReferralActivity", [toString(i.caller), gWxAmountStart], nil)
657657 if ((updateRefActivity == updateRefActivity))
658658 then {
659659 let lockStartNew = height
660660 let gWxParamsResultList = aal(invoke(mathContract, "calcGwxParamsREADONLY", [gWxAmountStart, lockStartNew, lockDurationNew], nil))
661661 let k = ai(gWxParamsResultList[0])
662662 let b = ai(gWxParamsResultList[1])
663663 let period = toString(ai(gWxParamsResultList[2]))
664664 let wxEmissionPerBlock = iof(emissionContract, keyEmissionRatePerBlockCurrent())
665665 let emissionStart = iof(emissionContract, keyEmissionStartBlock())
666666 let emissionEnd = iof(emissionContract, keyEmissionEndBlock())
667667 let h = if ((height > emissionEnd))
668668 then emissionEnd
669669 else height
670670 let dh = max([(h - emissionStart), 0])
671671 let userBoostEmissionLastIntegralKEY = keyUserBoostEmissionLastINTEGRAL(userNumStr)
672672 let userBoostEmissionLastIntegral = ioz(this, userBoostEmissionLastIntegralKEY)
673673 let boostEmissionIntegral = (((wxEmissionPerBlock * dh) * 2) / 3)
674674 let userBoostEmissionIntegral = (boostEmissionIntegral - userBoostEmissionLastIntegral)
675675 if ((0 > userBoostEmissionIntegral))
676676 then throw("wrong calculations")
677677 else {
678678 let userMaxBoostIntegralKEY = keyUserMaxBoostINTEGRAL(userNumStr)
679679 let totalMaxBoostIntegralKEY = keyTotalMaxBoostINTEGRAL()
680680 let userMaxBoostInt = ioz(this, userMaxBoostIntegralKEY)
681681 let totalMaxBoostInt = ioz(this, totalMaxBoostIntegralKEY)
682682 let currUserGwx = calcCurrentGwxAmount(userAddressStr)
683683 let gwxDiff = (gWxAmountStart - currUserGwx)
684684 if ((0 > gwxDiff))
685685 then throw(("gwxDiff is less then 0: " + toString(gwxDiff)))
686686 else {
687687 let totalCachedGwxRaw = getTotalCachedGwx(false)
688688 let totalCachedGwxCorrected = getTotalCachedGwx(true)
689689 let userBoostAvalaibleToClaimTotalKEY = keyUserBoostAvalaibleToClaimTotal(userNumStr)
690690 let userBoostAvaliableToClaimTotal = ioz(this, userBoostAvalaibleToClaimTotalKEY)
691691 let userBoostAvaliableToClaimTotalNew = fraction(userBoostEmissionIntegral, currUserGwx, totalCachedGwxCorrected)
692692 let userMaxBoostIntNew = ((gWxAmountStart * lockDurationNew) / 2)
693693 let remainingUserMaxBoostInt = ((currUserGwx * remainingDuration) / 2)
694694 let userMaxBoostIntDiff = (userMaxBoostIntNew - remainingUserMaxBoostInt)
695695 (((LockParamsEntry(userAddressStr, userNumStr, userAmountNew, lockStartNew, lockDurationNew, k, b, period) ++ StatsEntry(pmtAmount, deltaDuration, 0, 0)) :+ HistoryEntry("lock", userAddressStr, pmtAmount, lockStart, lockDurationNew, k, b, i)) ++ [IntegerEntry(keyTotalCachedGwx(), (totalCachedGwxRaw + gwxDiff))])
696696 }
697697 }
698698 }
699699 else throw("Strict value is not equal to itself.")
700700 }
701701 }
702702
703703
704704
705705 @Callable(i)
706706 func claimWxBoost (lpAssetIdStr,userAddressStr) = if ((stakingContract != i.caller))
707707 then throw("permissions denied")
708708 else {
709- let $t02972329825 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, false)
710- let userBoostAvailable = $t02972329825._1
711- let dataState = $t02972329825._2
712- let debug = $t02972329825._3
709+ let $t02977729879 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, false)
710+ let userBoostAvailable = $t02977729879._1
711+ let dataState = $t02977729879._2
712+ let debug = $t02977729879._3
713713 $Tuple2(dataState, [userBoostAvailable])
714714 }
715715
716716
717717
718718 @Callable(i)
719719 func claimWxBoostREADONLY (lpAssetIdStr,userAddressStr) = {
720- let $t02995730058 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, true)
721- let userBoostAvailable = $t02995730058._1
722- let dataState = $t02995730058._2
723- let debug = $t02995730058._3
720+ let $t03001130112 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, true)
721+ let userBoostAvailable = $t03001130112._1
722+ let dataState = $t03001130112._2
723+ let debug = $t03001130112._3
724724 $Tuple2(nil, [userBoostAvailable, debug])
725725 }
726726
727727
728728
729729 @Callable(i)
730730 func unlock (userAddress) = {
731731 let userRecordArray = readLockParamsRecordOrFail(userAddress)
732732 let userNumStr = userRecordArray[IdxLockUserNum]
733733 let userAmount = parseIntValue(userRecordArray[IdxLockAmount])
734734 let lockStart = parseIntValue(userRecordArray[IdxLockStart])
735735 let lockDuration = parseIntValue(userRecordArray[IdxLockDuration])
736736 let lockEnd = (lockStart + lockDuration)
737737 let cfgArray = readConfigArrayOrFail()
738738 let assetId = fromBase58String(cfgArray[IdxCfgAssetId])
739739 if ((lockEnd >= height))
740740 then throw((("wait " + toString(lockEnd)) + " to unlock"))
741741 else if ((0 >= userAmount))
742742 then throw("nothing to unlock")
743743 else {
744744 let period = valueOrElse(getInteger(mathContract, keyNextPeriod()), 0)
745745 (((LockParamsEntry(userAddress, userNumStr, 0, lockStart, lockDuration, 0, 0, toString(period)) ++ StatsEntry(-(userAmount), 0, 0, -1)) :+ HistoryEntry("unlock", userAddress, userAmount, lockStart, lockDuration, 0, 0, i)) :+ ScriptTransfer(addressFromStringValue(userAddress), userAmount, assetId))
746746 }
747747 }
748748
749749
750750
751751 @Callable(i)
752752 func gwxUserInfoREADONLY (userAddress) = {
753753 let gwxAmount = calcCurrentGwxAmount(userAddress)
754754 $Tuple2(nil, [gwxAmount])
755755 }
756756
757757
758758
759759 @Callable(i)
760760 func getUserGwxAmountAtHeightREADONLY (userAddress,targetHeight) = {
761761 let gwxAmount = calcUserGwxAmountAtHeight(userAddress, targetHeight)
762762 $Tuple2(nil, gwxAmount)
763763 }
764764
765765
766766
767767 @Callable(i)
768768 func getTotalCachedGwxREADONLY () = $Tuple2(nil, getTotalCachedGwx(true))
769769
770770
771771
772772 @Callable(i)
773773 func setManager (pendingManagerPublicKey) = {
774774 let checkCaller = mustManager(i)
775775 if ((checkCaller == checkCaller))
776776 then {
777777 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
778778 if ((checkManagerPublicKey == checkManagerPublicKey))
779779 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
780780 else throw("Strict value is not equal to itself.")
781781 }
782782 else throw("Strict value is not equal to itself.")
783783 }
784784
785785
786786
787787 @Callable(i)
788788 func confirmManager () = {
789789 let pm = pendingManagerPublicKeyOrUnit()
790790 let hasPM = if (isDefined(pm))
791791 then true
792792 else throw("No pending manager")
793793 if ((hasPM == hasPM))
794794 then {
795795 let checkPM = if ((i.callerPublicKey == value(pm)))
796796 then true
797797 else throw("You are not pending manager")
798798 if ((checkPM == checkPM))
799799 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
800800 else throw("Strict value is not equal to itself.")
801801 }
802802 else throw("Strict value is not equal to itself.")
803803 }
804804
805805
806806 @Verifier(tx)
807807 func verify () = {
808808 let targetPublicKey = match managerPublicKeyOrUnit() {
809809 case pk: ByteVector =>
810810 pk
811811 case _: Unit =>
812812 tx.senderPublicKey
813813 case _ =>
814814 throw("Match error")
815815 }
816816 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
817817 }
818818

github/deemru/w8io/026f985 
104.24 ms