tx · EJUHr7jSppSwQkf45TYcWhLryTd7J2dLckt1u7kcp85r 3Myn55vLkduxbX3ZXfiDCZhaQsLxYp1kmCy: -0.01000000 Waves 2021.12.02 09:54 [1816325] smart account 3Myn55vLkduxbX3ZXfiDCZhaQsLxYp1kmCy > SELF 0.00000000 Waves
{ "type": 13, "id": "EJUHr7jSppSwQkf45TYcWhLryTd7J2dLckt1u7kcp85r", "fee": 1000000, "feeAssetId": null, "timestamp": 1638428077466, "version": 1, "sender": "3Myn55vLkduxbX3ZXfiDCZhaQsLxYp1kmCy", "senderPublicKey": "9W33iCCNfmFxUbiC6XZcH5x7f6xfwC7Jb3BoExT5q2PV", "proofs": [ "bLthqDavSb8K1cXCcs3sAds92Y39U6y9ZkVAjCNzEau6KQnY1bb32i9H8KArtRKQTiVfoxejAm6E28HzxByRtGv" ], "script": "base64:AAIFAAAAAAAAACoIAhIICgYICAEBAQgSAwoBARIDCgEBEgMKAQgSAwoBCBIDCgEIEgMKAQgAAABTAAAAAANTRVACAAAAAl9fAAAAAAZTQ0FMRTgAAAAAAAAAAAgAAAAABU1VTFQ4AAAAAAAF9eEAAQAAAA9nZXRTdHJpbmdPckZhaWwAAAACAAAAB2FkZHJlc3MAAAADa2V5CQEAAAATdmFsdWVPckVycm9yTWVzc2FnZQAAAAIJAAQdAAAAAgUAAAAHYWRkcmVzcwUAAAADa2V5CQABLAAAAAIJAAEsAAAAAgIAAAAPbWFuZGF0b3J5IHRoaXMuBQAAAANrZXkCAAAADyBpcyBub3QgZGVmaW5lZAEAAAAMZ2V0SW50T3JaZXJvAAAAAgAAAAdhZGRyZXNzAAAAA2tleQkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABBoAAAACBQAAAAdhZGRyZXNzBQAAAANrZXkAAAAAAAAAAAABAAAAD2dldEludE9yRGVmYXVsdAAAAAMAAAAHYWRkcmVzcwAAAANrZXkAAAAKZGVmYXVsdFZhbAkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABBoAAAACBQAA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AAAQUAAAALdXNlckFkZHJlc3MFAAAACnVzZXJBbW91bnQFAAAAB2Fzc2V0SWQAAAABaQEAAAATZ3d4VXNlckluZm9SRUFET05MWQAAAAEAAAALdXNlckFkZHJlc3MEAAAACWd3eEFtb3VudAkBAAAAFGNhbGNDdXJyZW50R3d4QW1vdW50AAAAAQUAAAALdXNlckFkZHJlc3MJAAUUAAAAAgUAAAADbmlsCQAETAAAAAIFAAAACWd3eEFtb3VudAUAAAADbmlsAAAAAIWgDRg=", "chainId": 84, "height": 1816325, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: C1HJd4QMoE19e9JTF8pMAvT5jGdmaFLswbEmsTZ8pja9 Next: AkxFVWFQrYPSAVPouQo5m9z3aXGP4AatVbMDh4iNxcyo Diff:
Old | New | Differences | |
---|---|---|---|
203 | 203 | func keyUserBoostClaimed (userNum) = makeString(["%s%d__userBoostClaimed", userNum], SEP) | |
204 | 204 | ||
205 | 205 | ||
206 | + | func keyTotalCachedGwx () = "%s%s__gwxCached__total" | |
207 | + | ||
208 | + | ||
206 | 209 | let factoryContract = readFactoryAddressOrFail() | |
207 | 210 | ||
208 | 211 | let factoryCfg = readFactoryCfgOrFail(factoryContract) | |
300 | 303 | else { | |
301 | 304 | let userMaxBoostIntegralKEY = keyUserMaxBoostINTEGRAL(userNumStr) | |
302 | 305 | let totalMaxBoostIntegralKEY = keyTotalMaxBoostINTEGRAL() | |
303 | - | let userBoostAvalaibleToClaimTotalKEY = keyUserBoostAvalaibleToClaimTotal(userNumStr) | |
304 | 306 | let userMaxBoostInt = getIntOrZero(this, userMaxBoostIntegralKEY) | |
305 | 307 | let totalMaxBoostInt = getIntOrZero(this, totalMaxBoostIntegralKEY) | |
308 | + | let totalCachedGwxKEY = keyTotalCachedGwx() | |
309 | + | let totalCachedGwx = valueOrElse(getInteger(this, totalCachedGwxKEY), 0) | |
310 | + | let userCurrGwx = calcCurrentGwxAmount(userAddressStr) | |
311 | + | let userBoostAvalaibleToClaimTotalKEY = keyUserBoostAvalaibleToClaimTotal(userNumStr) | |
306 | 312 | let userBoostAvaliableToClaimTotal = getIntOrZero(this, userBoostAvalaibleToClaimTotalKEY) | |
307 | - | let userBoostAvaliableToClaimTotalNew = (userBoostAvaliableToClaimTotal + fraction(userBoostEmissionIntegral, userMaxBoostInt, totalMaxBoostInt)) | |
313 | + | let userBoostAvaliableToClaimTotalNew = (userBoostAvaliableToClaimTotal + (if ((totalCachedGwx == 0)) | |
314 | + | then 0 | |
315 | + | else fraction(userBoostEmissionIntegral, userCurrGwx, totalCachedGwx))) | |
308 | 316 | let userBoostClaimedKEY = keyUserBoostClaimed(userNumStr) | |
309 | 317 | let userBoostClaimed = getIntOrZero(this, userBoostClaimedKEY) | |
310 | 318 | let userBoostAvailable = (userBoostAvaliableToClaimTotalNew - userBoostClaimed) | |
381 | 389 | let totalMaxBoostIntegralKEY = keyTotalMaxBoostINTEGRAL() | |
382 | 390 | let userMaxBoostInt = ((gWxAmountStart * duration) / 2) | |
383 | 391 | let totalMaxBoostInt = getIntOrZero(this, totalMaxBoostIntegralKEY) | |
392 | + | let totalCachedGwxKEY = keyTotalCachedGwx() | |
393 | + | let totalCachedGwx = valueOrElse(getInteger(this, totalCachedGwxKEY), 0) | |
384 | 394 | let arr = if (userIsExisting) | |
385 | 395 | then nil | |
386 | 396 | else [IntegerEntry(nextUserNumKEY, (userNum + 1)), StringEntry(keyUser2NumMapping(userAddressStr), userNumStr), StringEntry(keyNum2UserMapping(userNumStr), userAddressStr)] | |
387 | 397 | ((((arr ++ LockParamsEntry(userAddressStr, userNumStr, pmtAmount, lockStart, duration, k, b, period)) ++ StatsEntry(pmtAmount, duration, 1, if (userIsExisting) | |
388 | 398 | then 0 | |
389 | - | else 1)) :+ HistoryEntry("lock", userAddressStr, pmtAmount, lockStart, duration, k, b, i)) ++ [IntegerEntry(userBoostEmissionLastIntegralKEY, boostEmissionIntegral), IntegerEntry( | |
399 | + | else 1)) :+ HistoryEntry("lock", userAddressStr, pmtAmount, lockStart, duration, k, b, i)) ++ [IntegerEntry(userBoostEmissionLastIntegralKEY, boostEmissionIntegral), IntegerEntry(totalCachedGwxKEY, (totalCachedGwx + gWxAmountStart))]) | |
390 | 400 | } | |
391 | 401 | } | |
392 | 402 | } | |
457 | 467 | let userMaxBoostIntDiff = (userMaxBoostIntNew - remainingUserMaxBoostInt) | |
458 | 468 | if ((0 > userMaxBoostIntDiff)) | |
459 | 469 | then throw("wrong calculations") | |
460 | - | else (((LockParamsEntry(userAddressStr, userNumStr, userAmountNew, lockStart, lockDurationNew, k, b, period) ++ StatsEntry(pmtAmount, deltaDuration, 0, 0)) :+ HistoryEntry("lock", userAddressStr, pmtAmount, lockStart, lockDurationNew, k, b, i)) ++ [IntegerEntry(userMaxBoostIntegralKEY, (userMaxBoostInt + userMaxBoostIntDiff)), IntegerEntry(totalMaxBoostIntegralKEY, (totalMaxBoostInt + userMaxBoostIntDiff)), IntegerEntry(userBoostAvalaibleToClaimTotalKEY, userBoostAvaliableToClaimTotalNew), IntegerEntry(userBoostEmissionLastIntegralKEY, boostEmissionIntegral)]) | |
470 | + | else { | |
471 | + | let gwxDiff = (gWxAmountStart - currUserGwx) | |
472 | + | if ((0 > gwxDiff)) | |
473 | + | then throw("gwxDiff is less then 0") | |
474 | + | else { | |
475 | + | let totalCachedGwxKEY = keyTotalCachedGwx() | |
476 | + | let totalCachedGwx = valueOrElse(getInteger(this, totalCachedGwxKEY), 0) | |
477 | + | (((LockParamsEntry(userAddressStr, userNumStr, userAmountNew, lockStart, lockDurationNew, k, b, period) ++ StatsEntry(pmtAmount, deltaDuration, 0, 0)) :+ HistoryEntry("lock", userAddressStr, pmtAmount, lockStart, lockDurationNew, k, b, i)) ++ [IntegerEntry(userBoostAvalaibleToClaimTotalKEY, userBoostAvaliableToClaimTotalNew), IntegerEntry(userBoostEmissionLastIntegralKEY, boostEmissionIntegral), IntegerEntry(totalCachedGwxKEY, (totalCachedGwx + gwxDiff))]) | |
478 | + | } | |
479 | + | } | |
461 | 480 | } | |
462 | 481 | } | |
463 | 482 | } | |
468 | 487 | func claimWxBoost (userAddressStr) = if ((stakingContract != i.caller)) | |
469 | 488 | then throw("permissions denied") | |
470 | 489 | else { | |
471 | - | let $ | |
472 | - | let userBoostAvailable = $ | |
473 | - | let dataState = $ | |
474 | - | let debug = $ | |
490 | + | let $t02346223543 = internalClaimWxBoost(userAddressStr) | |
491 | + | let userBoostAvailable = $t02346223543._1 | |
492 | + | let dataState = $t02346223543._2 | |
493 | + | let debug = $t02346223543._3 | |
475 | 494 | $Tuple2(dataState, [userBoostAvailable]) | |
476 | 495 | } | |
477 | 496 | ||
479 | 498 | ||
480 | 499 | @Callable(i) | |
481 | 500 | func claimWxBoostREADONLY (userAddressStr) = { | |
482 | - | let $ | |
483 | - | let userBoostAvailable = $ | |
484 | - | let dataState = $ | |
485 | - | let debug = $ | |
501 | + | let $t02365323734 = internalClaimWxBoost(userAddressStr) | |
502 | + | let userBoostAvailable = $t02365323734._1 | |
503 | + | let dataState = $t02365323734._2 | |
504 | + | let debug = $t02365323734._3 | |
486 | 505 | $Tuple2(nil, [userBoostAvailable, debug]) | |
487 | 506 | } | |
488 | 507 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let SEP = "__" | |
5 | 5 | ||
6 | 6 | let SCALE8 = 8 | |
7 | 7 | ||
8 | 8 | let MULT8 = 100000000 | |
9 | 9 | ||
10 | 10 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), (("mandatory this." + key) + " is not defined")) | |
11 | 11 | ||
12 | 12 | ||
13 | 13 | func getIntOrZero (address,key) = valueOrElse(getInteger(address, key), 0) | |
14 | 14 | ||
15 | 15 | ||
16 | 16 | func getIntOrDefault (address,key,defaultVal) = valueOrElse(getInteger(address, key), defaultVal) | |
17 | 17 | ||
18 | 18 | ||
19 | 19 | func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), (("mandatory this." + key) + " is not defined")) | |
20 | 20 | ||
21 | 21 | ||
22 | 22 | func asAnyList (val) = match val { | |
23 | 23 | case valAnyLyst: List[Any] => | |
24 | 24 | valAnyLyst | |
25 | 25 | case _ => | |
26 | 26 | throw("fail to cast into List[Any]") | |
27 | 27 | } | |
28 | 28 | ||
29 | 29 | ||
30 | 30 | func asInt (val) = match val { | |
31 | 31 | case valInt: Int => | |
32 | 32 | valInt | |
33 | 33 | case _ => | |
34 | 34 | throw("fail to cast into Int") | |
35 | 35 | } | |
36 | 36 | ||
37 | 37 | ||
38 | 38 | func keyFactoryAddress () = "%s%s__config__factoryAddress" | |
39 | 39 | ||
40 | 40 | ||
41 | 41 | let IdxFactoryCfgStakingDapp = 1 | |
42 | 42 | ||
43 | 43 | let IdxFactoryCfgBoostingDapp = 2 | |
44 | 44 | ||
45 | 45 | let IdxFactoryCfgIdoDapp = 3 | |
46 | 46 | ||
47 | 47 | let IdxFactoryCfgTeamDapp = 4 | |
48 | 48 | ||
49 | 49 | let IdxFactoryCfgEmissionDapp = 5 | |
50 | 50 | ||
51 | 51 | let IdxFactoryCfgRestDapp = 6 | |
52 | 52 | ||
53 | 53 | let IdxFactoryCfgSlippageDapp = 7 | |
54 | 54 | ||
55 | 55 | func keyFactoryCfg () = "%s__factoryConfig" | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | func keyFactoryLp2AssetsMapping (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP) | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func keyFactoryLpList () = "%s__lpTokensList" | |
62 | 62 | ||
63 | 63 | ||
64 | 64 | func keyFactoryLpAssetToPoolContractAddress (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP) | |
65 | 65 | ||
66 | 66 | ||
67 | 67 | func keyFactoryPoolWeight (contractAddress) = makeString(["%s%s", "poolWeight", contractAddress], SEP) | |
68 | 68 | ||
69 | 69 | ||
70 | 70 | func readFactoryAddressOrFail () = addressFromStringValue(getStringOrFail(this, keyFactoryAddress())) | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | func readLpList () = split(valueOrElse(getString(readFactoryAddressOrFail(), keyFactoryLpList()), ""), SEP) | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | func readFactoryCfgOrFail (factory) = split(getStringOrFail(factory, keyFactoryCfg()), SEP) | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | func getBoostingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgBoostingDapp]) | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | func getEmissionAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgEmissionDapp]) | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | func getStakingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgStakingDapp]) | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | func keyEmissionRatePerBlockCurrent () = "%s%s__ratePerBlock__current" | |
89 | 89 | ||
90 | 90 | ||
91 | 91 | func keyEmissionRatePerBlockMaxCurrent () = "%s%s__ratePerBlockMax__current" | |
92 | 92 | ||
93 | 93 | ||
94 | 94 | func keyEmissionStartBlock () = "%s%s__emission__startBlock" | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | func keyEmissionDurationInBlocks () = "%s%s__emission__duration" | |
98 | 98 | ||
99 | 99 | ||
100 | 100 | func keyEmissionEndBlock () = "%s%s__emission__endBlock" | |
101 | 101 | ||
102 | 102 | ||
103 | 103 | let IdxCfgAssetId = 1 | |
104 | 104 | ||
105 | 105 | let IdxCfgMinLockAmount = 2 | |
106 | 106 | ||
107 | 107 | let IdxCfgMinLockDuration = 3 | |
108 | 108 | ||
109 | 109 | let IdxCfgMaxLockDuration = 4 | |
110 | 110 | ||
111 | 111 | let IdxCfgMathContract = 5 | |
112 | 112 | ||
113 | 113 | func keyConfig () = "%s__config" | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | func readConfigArrayOrFail () = split(getStringOrFail(this, keyConfig()), SEP) | |
117 | 117 | ||
118 | 118 | ||
119 | 119 | func formatConfigS (assetId,minLockAmount,minLockDuration,maxLockDuration,mathContract) = makeString(["%s%d%d%d", assetId, minLockAmount, minLockDuration, maxLockDuration, mathContract], SEP) | |
120 | 120 | ||
121 | 121 | ||
122 | 122 | func formatConfig (assetId,minLockAmount,minLockDuration,maxLockDuration,mathContract) = formatConfigS(assetId, toString(minLockAmount), toString(minLockDuration), toString(maxLockDuration), mathContract) | |
123 | 123 | ||
124 | 124 | ||
125 | 125 | let IdxLockUserNum = 1 | |
126 | 126 | ||
127 | 127 | let IdxLockAmount = 2 | |
128 | 128 | ||
129 | 129 | let IdxLockStart = 3 | |
130 | 130 | ||
131 | 131 | let IdxLockDuration = 4 | |
132 | 132 | ||
133 | 133 | let IdxLockParamK = 5 | |
134 | 134 | ||
135 | 135 | let IdxLockParamB = 6 | |
136 | 136 | ||
137 | 137 | func keyLockParamsRecord (userAddress) = makeString(["%s%s__lock", userAddress], SEP) | |
138 | 138 | ||
139 | 139 | ||
140 | 140 | func readLockParamsRecordOrFail (userAddress) = split(getStringOrFail(this, keyLockParamsRecord(userAddress)), SEP) | |
141 | 141 | ||
142 | 142 | ||
143 | 143 | 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) | |
144 | 144 | ||
145 | 145 | ||
146 | 146 | 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)) | |
147 | 147 | ||
148 | 148 | ||
149 | 149 | func keyNextUserNum () = "%s__nextUserNum" | |
150 | 150 | ||
151 | 151 | ||
152 | 152 | func keyUser2NumMapping (userAddress) = makeString(["%s%s%s__mapping__user2num", userAddress], SEP) | |
153 | 153 | ||
154 | 154 | ||
155 | 155 | func keyNum2UserMapping (num) = makeString(["%s%s%s__mapping__num2user", num], SEP) | |
156 | 156 | ||
157 | 157 | ||
158 | 158 | func keyLockParamUserAmount (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "amount"], SEP) | |
159 | 159 | ||
160 | 160 | ||
161 | 161 | func keyLockParamStartBlock (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "start"], SEP) | |
162 | 162 | ||
163 | 163 | ||
164 | 164 | func keyLockParamDuration (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "duration"], SEP) | |
165 | 165 | ||
166 | 166 | ||
167 | 167 | func keyLockParamK (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "k"], SEP) | |
168 | 168 | ||
169 | 169 | ||
170 | 170 | func keyLockParamB (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "b"], SEP) | |
171 | 171 | ||
172 | 172 | ||
173 | 173 | func keyLockParamByPeriodK (userNum,period) = makeString(["%s%d%s%d__paramByPeriod", userNum, "k", period], SEP) | |
174 | 174 | ||
175 | 175 | ||
176 | 176 | func keyLockParamByPeriodB (userNum,period) = makeString(["%s%d%s%d__paramByPeriod", userNum, "b", period], SEP) | |
177 | 177 | ||
178 | 178 | ||
179 | 179 | func keyLockParamTotalAmount () = "%s%s__stats__activeTotalLocked" | |
180 | 180 | ||
181 | 181 | ||
182 | 182 | func keyStatsLocksDurationSumInBlocks () = "%s%s__stats__locksDurationSumInBlocks" | |
183 | 183 | ||
184 | 184 | ||
185 | 185 | func keyStatsLocksCount () = "%s%s__stats__locksCount" | |
186 | 186 | ||
187 | 187 | ||
188 | 188 | func keyStatsUsersCount () = "%s%s__stats__activeUsersCount" | |
189 | 189 | ||
190 | 190 | ||
191 | 191 | func keyUserBoostEmissionLastINTEGRAL (userNum) = makeString(["%s%d__userBoostEmissionLastInt", userNum], SEP) | |
192 | 192 | ||
193 | 193 | ||
194 | 194 | func keyUserMaxBoostINTEGRAL (userNum) = makeString(["%s%d__maxBoostInt", userNum], SEP) | |
195 | 195 | ||
196 | 196 | ||
197 | 197 | func keyTotalMaxBoostINTEGRAL () = "%s%s__maxBoostInt__total" | |
198 | 198 | ||
199 | 199 | ||
200 | 200 | func keyUserBoostAvalaibleToClaimTotal (userNum) = makeString(["%s%d__userBoostAvaliableToClaimTotal", userNum], SEP) | |
201 | 201 | ||
202 | 202 | ||
203 | 203 | func keyUserBoostClaimed (userNum) = makeString(["%s%d__userBoostClaimed", userNum], SEP) | |
204 | 204 | ||
205 | 205 | ||
206 | + | func keyTotalCachedGwx () = "%s%s__gwxCached__total" | |
207 | + | ||
208 | + | ||
206 | 209 | let factoryContract = readFactoryAddressOrFail() | |
207 | 210 | ||
208 | 211 | let factoryCfg = readFactoryCfgOrFail(factoryContract) | |
209 | 212 | ||
210 | 213 | let emissionContract = getEmissionAddressOrFail(factoryCfg) | |
211 | 214 | ||
212 | 215 | let stakingContract = getStakingAddressOrFail(factoryCfg) | |
213 | 216 | ||
214 | 217 | func HistoryEntry (type,user,amount,lockStart,duration,k,b,i) = { | |
215 | 218 | let historyKEY = makeString(["%s%s%s%s__history", type, user, toBase58String(i.transactionId)], SEP) | |
216 | 219 | 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) | |
217 | 220 | StringEntry(historyKEY, historyDATA) | |
218 | 221 | } | |
219 | 222 | ||
220 | 223 | ||
221 | 224 | func StatsEntry (totalLockedInc,durationInc,lockCountInc,usersCountInc) = { | |
222 | 225 | let locksDurationSumInBlocksKEY = keyStatsLocksDurationSumInBlocks() | |
223 | 226 | let locksCountKEY = keyStatsLocksCount() | |
224 | 227 | let usersCountKEY = keyStatsUsersCount() | |
225 | 228 | let totalAmountKEY = keyLockParamTotalAmount() | |
226 | 229 | let locksDurationSumInBlocks = getIntOrZero(this, locksDurationSumInBlocksKEY) | |
227 | 230 | let locksCount = getIntOrZero(this, locksCountKEY) | |
228 | 231 | let usersCount = getIntOrZero(this, usersCountKEY) | |
229 | 232 | let totalAmount = getIntOrZero(this, totalAmountKEY) | |
230 | 233 | [IntegerEntry(locksDurationSumInBlocksKEY, (locksDurationSumInBlocks + durationInc)), IntegerEntry(locksCountKEY, (locksCount + lockCountInc)), IntegerEntry(usersCountKEY, (usersCount + usersCountInc)), IntegerEntry(totalAmountKEY, (totalAmount + totalLockedInc))] | |
231 | 234 | } | |
232 | 235 | ||
233 | 236 | ||
234 | 237 | func calcGwxAmount (kRaw,bRaw,h) = { | |
235 | 238 | let SCALE = 1000 | |
236 | 239 | (((kRaw * h) + bRaw) / SCALE) | |
237 | 240 | } | |
238 | 241 | ||
239 | 242 | ||
240 | 243 | func LockParamsEntry (userAddress,userNum,amount,start,duration,k,b,period) = { | |
241 | 244 | let userAmountKEY = keyLockParamUserAmount(userNum) | |
242 | 245 | let startBlockKEY = keyLockParamStartBlock(userNum) | |
243 | 246 | let durationKEY = keyLockParamDuration(userNum) | |
244 | 247 | let kKEY = keyLockParamK(userNum) | |
245 | 248 | let bKEY = keyLockParamB(userNum) | |
246 | 249 | let kByPerioKEY = keyLockParamByPeriodK(userNum, period) | |
247 | 250 | let bByPeriodKEY = keyLockParamByPeriodB(userNum, period) | |
248 | 251 | let gwxAmount = calcGwxAmount(k, b, height) | |
249 | 252 | [IntegerEntry(userAmountKEY, amount), IntegerEntry(startBlockKEY, start), IntegerEntry(durationKEY, duration), IntegerEntry(kKEY, k), IntegerEntry(bKEY, b), IntegerEntry(kByPerioKEY, k), IntegerEntry(bByPeriodKEY, b), StringEntry(keyLockParamsRecord(userAddress), formatLockParamsRecord(userNum, amount, start, duration, k, b, gwxAmount))] | |
250 | 253 | } | |
251 | 254 | ||
252 | 255 | ||
253 | 256 | func extractOptionalPaymentAmountOrFail (i,expectedAssetId) = if ((size(i.payments) > 1)) | |
254 | 257 | then throw("only one payment is allowed") | |
255 | 258 | else if ((size(i.payments) == 0)) | |
256 | 259 | then 0 | |
257 | 260 | else { | |
258 | 261 | let pmt = i.payments[0] | |
259 | 262 | if ((value(pmt.assetId) != expectedAssetId)) | |
260 | 263 | then throw("invalid asset id in payment") | |
261 | 264 | else pmt.amount | |
262 | 265 | } | |
263 | 266 | ||
264 | 267 | ||
265 | 268 | func calcCurrentGwxAmount (userAddress) = { | |
266 | 269 | let EMPTY = "empty" | |
267 | 270 | let user2NumMappingKEY = keyUser2NumMapping(userAddress) | |
268 | 271 | let userNum = valueOrElse(getString(user2NumMappingKEY), EMPTY) | |
269 | 272 | let k = valueOrElse(getInteger(keyLockParamK(userNum)), 0) | |
270 | 273 | let b = valueOrElse(getInteger(keyLockParamB(userNum)), 0) | |
271 | 274 | let gwxAmountCalc = calcGwxAmount(k, b, height) | |
272 | 275 | let gwxAmount = if ((0 > gwxAmountCalc)) | |
273 | 276 | then 0 | |
274 | 277 | else gwxAmountCalc | |
275 | 278 | gwxAmount | |
276 | 279 | } | |
277 | 280 | ||
278 | 281 | ||
279 | 282 | func internalClaimWxBoost (userAddressStr) = { | |
280 | 283 | let EMPTY = "EMPTY" | |
281 | 284 | let userRecordOrEmpty = valueOrElse(getString(this, keyLockParamsRecord(userAddressStr)), EMPTY) | |
282 | 285 | if ((userRecordOrEmpty == EMPTY)) | |
283 | 286 | then $Tuple3(0, nil, "userRecord::is::empty") | |
284 | 287 | else { | |
285 | 288 | let userRecordArray = split(userRecordOrEmpty, SEP) | |
286 | 289 | let userNumStr = userRecordArray[IdxLockUserNum] | |
287 | 290 | let wxEmissionPerBlock = getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent()) | |
288 | 291 | let emissionStart = getIntOrFail(emissionContract, keyEmissionStartBlock()) | |
289 | 292 | let emissionEnd = getIntOrFail(emissionContract, keyEmissionEndBlock()) | |
290 | 293 | let h = if ((height > emissionEnd)) | |
291 | 294 | then emissionEnd | |
292 | 295 | else height | |
293 | 296 | let dh = max([(h - emissionStart), 0]) | |
294 | 297 | let userBoostEmissionLastIntegralKEY = keyUserBoostEmissionLastINTEGRAL(userNumStr) | |
295 | 298 | let userBoostEmissionLastIntegral = getIntOrZero(this, userBoostEmissionLastIntegralKEY) | |
296 | 299 | let boostEmissionIntegral = (((wxEmissionPerBlock * dh) * 2) / 3) | |
297 | 300 | let userBoostEmissionIntegral = (boostEmissionIntegral - userBoostEmissionLastIntegral) | |
298 | 301 | if ((0 > userBoostEmissionIntegral)) | |
299 | 302 | then throw("wrong calculations") | |
300 | 303 | else { | |
301 | 304 | let userMaxBoostIntegralKEY = keyUserMaxBoostINTEGRAL(userNumStr) | |
302 | 305 | let totalMaxBoostIntegralKEY = keyTotalMaxBoostINTEGRAL() | |
303 | - | let userBoostAvalaibleToClaimTotalKEY = keyUserBoostAvalaibleToClaimTotal(userNumStr) | |
304 | 306 | let userMaxBoostInt = getIntOrZero(this, userMaxBoostIntegralKEY) | |
305 | 307 | let totalMaxBoostInt = getIntOrZero(this, totalMaxBoostIntegralKEY) | |
308 | + | let totalCachedGwxKEY = keyTotalCachedGwx() | |
309 | + | let totalCachedGwx = valueOrElse(getInteger(this, totalCachedGwxKEY), 0) | |
310 | + | let userCurrGwx = calcCurrentGwxAmount(userAddressStr) | |
311 | + | let userBoostAvalaibleToClaimTotalKEY = keyUserBoostAvalaibleToClaimTotal(userNumStr) | |
306 | 312 | let userBoostAvaliableToClaimTotal = getIntOrZero(this, userBoostAvalaibleToClaimTotalKEY) | |
307 | - | let userBoostAvaliableToClaimTotalNew = (userBoostAvaliableToClaimTotal + fraction(userBoostEmissionIntegral, userMaxBoostInt, totalMaxBoostInt)) | |
313 | + | let userBoostAvaliableToClaimTotalNew = (userBoostAvaliableToClaimTotal + (if ((totalCachedGwx == 0)) | |
314 | + | then 0 | |
315 | + | else fraction(userBoostEmissionIntegral, userCurrGwx, totalCachedGwx))) | |
308 | 316 | let userBoostClaimedKEY = keyUserBoostClaimed(userNumStr) | |
309 | 317 | let userBoostClaimed = getIntOrZero(this, userBoostClaimedKEY) | |
310 | 318 | let userBoostAvailable = (userBoostAvaliableToClaimTotalNew - userBoostClaimed) | |
311 | 319 | let dataState = [IntegerEntry(userBoostAvalaibleToClaimTotalKEY, userBoostAvaliableToClaimTotalNew), IntegerEntry(userBoostEmissionLastIntegralKEY, boostEmissionIntegral)] | |
312 | 320 | let debug = makeString([("userBoostEmissionLastIntegral=" + toString(userBoostEmissionLastIntegral)), ("userBoostEmissionIntegral=" + toString(userBoostEmissionIntegral)), ("userMaxBoostInt=" + toString(userMaxBoostInt)), ("totalMaxBoostInt=" + toString(totalMaxBoostInt)), ("userBoostAvaliableToClaimTotal=" + toString(userBoostAvaliableToClaimTotal)), ("userBoostAvaliableToClaimTotalNew=" + toString(userBoostAvaliableToClaimTotalNew)), ("userBoostClaimed=" + toString(userBoostClaimed)), ("userBoostAvailable=" + toString(userBoostAvailable))], "::") | |
313 | 321 | $Tuple3(userBoostAvailable, dataState, debug) | |
314 | 322 | } | |
315 | 323 | } | |
316 | 324 | } | |
317 | 325 | ||
318 | 326 | ||
319 | 327 | @Callable(i) | |
320 | 328 | func constructor (factoryAddressStr,lockAssetIdStr,minLockAmount,minDuration,maxDuration,mathContract) = if ((this != i.caller)) | |
321 | 329 | then throw("not authorized") | |
322 | 330 | else ([IntegerEntry(keyNextUserNum(), 0), StringEntry(keyConfig(), formatConfig(lockAssetIdStr, minLockAmount, minDuration, maxDuration, mathContract)), StringEntry(keyFactoryAddress(), factoryAddressStr)] ++ StatsEntry(0, 0, 0, 0)) | |
323 | 331 | ||
324 | 332 | ||
325 | 333 | ||
326 | 334 | @Callable(i) | |
327 | 335 | func lock (duration) = { | |
328 | 336 | let cfgArray = readConfigArrayOrFail() | |
329 | 337 | let assetIdStr = cfgArray[IdxCfgAssetId] | |
330 | 338 | let assetId = fromBase58String(assetIdStr) | |
331 | 339 | let minLockAmount = parseIntValue(cfgArray[IdxCfgMinLockAmount]) | |
332 | 340 | let minLockDuration = parseIntValue(cfgArray[IdxCfgMinLockDuration]) | |
333 | 341 | let maxLockDuration = parseIntValue(cfgArray[IdxCfgMaxLockDuration]) | |
334 | 342 | let mathContract = addressFromStringValue(cfgArray[IdxCfgMathContract]) | |
335 | 343 | if ((size(i.payments) != 1)) | |
336 | 344 | then throw("invalid payment - exact one payment must be attached") | |
337 | 345 | else { | |
338 | 346 | let pmt = i.payments[0] | |
339 | 347 | let pmtAmount = pmt.amount | |
340 | 348 | if ((assetId != value(pmt.assetId))) | |
341 | 349 | then throw((("invalid asset is in payment - " + assetIdStr) + " is expected")) | |
342 | 350 | else { | |
343 | 351 | let nextUserNumKEY = keyNextUserNum() | |
344 | 352 | let userAddressStr = toString(i.caller) | |
345 | 353 | let userIsExisting = isDefined(getString(keyUser2NumMapping(userAddressStr))) | |
346 | 354 | let userNumStr = if (userIsExisting) | |
347 | 355 | then value(getString(keyUser2NumMapping(userAddressStr))) | |
348 | 356 | else toString(getIntOrFail(this, nextUserNumKEY)) | |
349 | 357 | let userNum = parseIntValue(userNumStr) | |
350 | 358 | let lockStart = height | |
351 | 359 | let startBlockKEY = keyLockParamStartBlock(userNumStr) | |
352 | 360 | let durationKEY = keyLockParamDuration(userNumStr) | |
353 | 361 | let userAmountKEY = keyLockParamUserAmount(userNumStr) | |
354 | 362 | if ((minLockAmount > pmtAmount)) | |
355 | 363 | then throw(("amount is less then minLockAmount=" + toString(minLockAmount))) | |
356 | 364 | else if ((minLockDuration > duration)) | |
357 | 365 | then throw(("passed duration is less then minLockDuration=" + toString(minLockDuration))) | |
358 | 366 | else if ((duration > maxLockDuration)) | |
359 | 367 | then throw(("passed duration is greater then maxLockDuration=" + toString(maxLockDuration))) | |
360 | 368 | else if (if (userIsExisting) | |
361 | 369 | then ((getIntOrFail(this, startBlockKEY) + getIntOrFail(this, durationKEY)) >= lockStart) | |
362 | 370 | else false) | |
363 | 371 | then throw("there is an active lock - consider to use increaseLock") | |
364 | 372 | else { | |
365 | 373 | let coeffX8 = fraction(duration, MULT8, maxLockDuration) | |
366 | 374 | let gWxAmountStart = fraction(pmtAmount, coeffX8, MULT8) | |
367 | 375 | let gWxParamsResultList = asAnyList(invoke(mathContract, "calcGwxParamsREADONLY", [gWxAmountStart, lockStart, duration], nil)) | |
368 | 376 | let k = asInt(gWxParamsResultList[0]) | |
369 | 377 | let b = asInt(gWxParamsResultList[1]) | |
370 | 378 | let period = toString(asInt(gWxParamsResultList[2])) | |
371 | 379 | let wxEmissionPerBlock = getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent()) | |
372 | 380 | let emissionStart = getIntOrFail(emissionContract, keyEmissionStartBlock()) | |
373 | 381 | let emissionEnd = getIntOrFail(emissionContract, keyEmissionEndBlock()) | |
374 | 382 | let h = if ((height > emissionEnd)) | |
375 | 383 | then emissionEnd | |
376 | 384 | else height | |
377 | 385 | let dh = max([(h - emissionStart), 0]) | |
378 | 386 | let userBoostEmissionLastIntegralKEY = keyUserBoostEmissionLastINTEGRAL(userNumStr) | |
379 | 387 | let boostEmissionIntegral = (((wxEmissionPerBlock * dh) * 2) / 3) | |
380 | 388 | let userMaxBoostIntegralKEY = keyUserMaxBoostINTEGRAL(userNumStr) | |
381 | 389 | let totalMaxBoostIntegralKEY = keyTotalMaxBoostINTEGRAL() | |
382 | 390 | let userMaxBoostInt = ((gWxAmountStart * duration) / 2) | |
383 | 391 | let totalMaxBoostInt = getIntOrZero(this, totalMaxBoostIntegralKEY) | |
392 | + | let totalCachedGwxKEY = keyTotalCachedGwx() | |
393 | + | let totalCachedGwx = valueOrElse(getInteger(this, totalCachedGwxKEY), 0) | |
384 | 394 | let arr = if (userIsExisting) | |
385 | 395 | then nil | |
386 | 396 | else [IntegerEntry(nextUserNumKEY, (userNum + 1)), StringEntry(keyUser2NumMapping(userAddressStr), userNumStr), StringEntry(keyNum2UserMapping(userNumStr), userAddressStr)] | |
387 | 397 | ((((arr ++ LockParamsEntry(userAddressStr, userNumStr, pmtAmount, lockStart, duration, k, b, period)) ++ StatsEntry(pmtAmount, duration, 1, if (userIsExisting) | |
388 | 398 | then 0 | |
389 | - | else 1)) :+ HistoryEntry("lock", userAddressStr, pmtAmount, lockStart, duration, k, b, i)) ++ [IntegerEntry(userBoostEmissionLastIntegralKEY, boostEmissionIntegral), IntegerEntry( | |
399 | + | else 1)) :+ HistoryEntry("lock", userAddressStr, pmtAmount, lockStart, duration, k, b, i)) ++ [IntegerEntry(userBoostEmissionLastIntegralKEY, boostEmissionIntegral), IntegerEntry(totalCachedGwxKEY, (totalCachedGwx + gWxAmountStart))]) | |
390 | 400 | } | |
391 | 401 | } | |
392 | 402 | } | |
393 | 403 | } | |
394 | 404 | ||
395 | 405 | ||
396 | 406 | ||
397 | 407 | @Callable(i) | |
398 | 408 | func increaseLock (deltaDuration) = { | |
399 | 409 | let cfgArray = readConfigArrayOrFail() | |
400 | 410 | let assetIdStr = cfgArray[IdxCfgAssetId] | |
401 | 411 | let assetId = fromBase58String(assetIdStr) | |
402 | 412 | let minLockDuration = parseIntValue(cfgArray[IdxCfgMinLockDuration]) | |
403 | 413 | let maxLockDuration = parseIntValue(cfgArray[IdxCfgMaxLockDuration]) | |
404 | 414 | let mathContract = addressFromStringValue(cfgArray[IdxCfgMathContract]) | |
405 | 415 | let pmtAmount = extractOptionalPaymentAmountOrFail(i, assetId) | |
406 | 416 | let userAddressStr = toString(i.caller) | |
407 | 417 | let userRecordArray = readLockParamsRecordOrFail(userAddressStr) | |
408 | 418 | let userNumStr = userRecordArray[IdxLockUserNum] | |
409 | 419 | let userAmount = parseIntValue(userRecordArray[IdxLockAmount]) | |
410 | 420 | let lockStart = parseIntValue(userRecordArray[IdxLockStart]) | |
411 | 421 | let lockDuration = parseIntValue(userRecordArray[IdxLockDuration]) | |
412 | 422 | let lockEnd = (lockStart + lockDuration) | |
413 | 423 | let remainingDuration = max([(lockEnd - height), 0]) | |
414 | 424 | let userAmountNew = (userAmount + pmtAmount) | |
415 | 425 | let lockDurationNew = (remainingDuration + deltaDuration) | |
416 | 426 | if ((0 > deltaDuration)) | |
417 | 427 | then throw("duration is less then zero") | |
418 | 428 | else if ((minLockDuration > lockDurationNew)) | |
419 | 429 | then throw(("lockDurationNew is less then minLockDuration=" + toString(minLockDuration))) | |
420 | 430 | else if ((lockDurationNew > maxLockDuration)) | |
421 | 431 | then throw(("deltaDuration + existedLockDuration is greater then maxLockDuration=" + toString(maxLockDuration))) | |
422 | 432 | else if (if ((height >= lockEnd)) | |
423 | 433 | then (userAmount > 0) | |
424 | 434 | else false) | |
425 | 435 | then throw("there is an expired lock - need to unlock before new lock") | |
426 | 436 | else { | |
427 | 437 | let coeffX8 = fraction(lockDurationNew, MULT8, maxLockDuration) | |
428 | 438 | let gWxAmountStart = fraction(userAmountNew, coeffX8, MULT8) | |
429 | 439 | let gWxParamsResultList = asAnyList(invoke(mathContract, "calcGwxParamsREADONLY", [gWxAmountStart, height, lockDurationNew], nil)) | |
430 | 440 | let k = asInt(gWxParamsResultList[0]) | |
431 | 441 | let b = asInt(gWxParamsResultList[1]) | |
432 | 442 | let period = toString(asInt(gWxParamsResultList[2])) | |
433 | 443 | let wxEmissionPerBlock = getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent()) | |
434 | 444 | let emissionStart = getIntOrFail(emissionContract, keyEmissionStartBlock()) | |
435 | 445 | let emissionEnd = getIntOrFail(emissionContract, keyEmissionEndBlock()) | |
436 | 446 | let h = if ((height > emissionEnd)) | |
437 | 447 | then emissionEnd | |
438 | 448 | else height | |
439 | 449 | let dh = max([(h - emissionStart), 0]) | |
440 | 450 | let userBoostEmissionLastIntegralKEY = keyUserBoostEmissionLastINTEGRAL(userNumStr) | |
441 | 451 | let userBoostEmissionLastIntegral = getIntOrZero(this, userBoostEmissionLastIntegralKEY) | |
442 | 452 | let boostEmissionIntegral = (((wxEmissionPerBlock * dh) * 2) / 3) | |
443 | 453 | let userBoostEmissionIntegral = (boostEmissionIntegral - userBoostEmissionLastIntegral) | |
444 | 454 | if ((0 > userBoostEmissionIntegral)) | |
445 | 455 | then throw("wrong calculations") | |
446 | 456 | else { | |
447 | 457 | let userMaxBoostIntegralKEY = keyUserMaxBoostINTEGRAL(userNumStr) | |
448 | 458 | let totalMaxBoostIntegralKEY = keyTotalMaxBoostINTEGRAL() | |
449 | 459 | let userBoostAvalaibleToClaimTotalKEY = keyUserBoostAvalaibleToClaimTotal(userNumStr) | |
450 | 460 | let userMaxBoostInt = getIntOrZero(this, userMaxBoostIntegralKEY) | |
451 | 461 | let totalMaxBoostInt = getIntOrZero(this, totalMaxBoostIntegralKEY) | |
452 | 462 | let userBoostAvaliableToClaimTotal = getIntOrZero(this, userBoostAvalaibleToClaimTotalKEY) | |
453 | 463 | let userBoostAvaliableToClaimTotalNew = (userBoostAvaliableToClaimTotal + fraction(userBoostEmissionIntegral, userMaxBoostInt, totalMaxBoostInt)) | |
454 | 464 | let userMaxBoostIntNew = ((gWxAmountStart * lockDurationNew) / 2) | |
455 | 465 | let currUserGwx = calcCurrentGwxAmount(userAddressStr) | |
456 | 466 | let remainingUserMaxBoostInt = ((currUserGwx * remainingDuration) / 2) | |
457 | 467 | let userMaxBoostIntDiff = (userMaxBoostIntNew - remainingUserMaxBoostInt) | |
458 | 468 | if ((0 > userMaxBoostIntDiff)) | |
459 | 469 | then throw("wrong calculations") | |
460 | - | else (((LockParamsEntry(userAddressStr, userNumStr, userAmountNew, lockStart, lockDurationNew, k, b, period) ++ StatsEntry(pmtAmount, deltaDuration, 0, 0)) :+ HistoryEntry("lock", userAddressStr, pmtAmount, lockStart, lockDurationNew, k, b, i)) ++ [IntegerEntry(userMaxBoostIntegralKEY, (userMaxBoostInt + userMaxBoostIntDiff)), IntegerEntry(totalMaxBoostIntegralKEY, (totalMaxBoostInt + userMaxBoostIntDiff)), IntegerEntry(userBoostAvalaibleToClaimTotalKEY, userBoostAvaliableToClaimTotalNew), IntegerEntry(userBoostEmissionLastIntegralKEY, boostEmissionIntegral)]) | |
470 | + | else { | |
471 | + | let gwxDiff = (gWxAmountStart - currUserGwx) | |
472 | + | if ((0 > gwxDiff)) | |
473 | + | then throw("gwxDiff is less then 0") | |
474 | + | else { | |
475 | + | let totalCachedGwxKEY = keyTotalCachedGwx() | |
476 | + | let totalCachedGwx = valueOrElse(getInteger(this, totalCachedGwxKEY), 0) | |
477 | + | (((LockParamsEntry(userAddressStr, userNumStr, userAmountNew, lockStart, lockDurationNew, k, b, period) ++ StatsEntry(pmtAmount, deltaDuration, 0, 0)) :+ HistoryEntry("lock", userAddressStr, pmtAmount, lockStart, lockDurationNew, k, b, i)) ++ [IntegerEntry(userBoostAvalaibleToClaimTotalKEY, userBoostAvaliableToClaimTotalNew), IntegerEntry(userBoostEmissionLastIntegralKEY, boostEmissionIntegral), IntegerEntry(totalCachedGwxKEY, (totalCachedGwx + gwxDiff))]) | |
478 | + | } | |
479 | + | } | |
461 | 480 | } | |
462 | 481 | } | |
463 | 482 | } | |
464 | 483 | ||
465 | 484 | ||
466 | 485 | ||
467 | 486 | @Callable(i) | |
468 | 487 | func claimWxBoost (userAddressStr) = if ((stakingContract != i.caller)) | |
469 | 488 | then throw("permissions denied") | |
470 | 489 | else { | |
471 | - | let $ | |
472 | - | let userBoostAvailable = $ | |
473 | - | let dataState = $ | |
474 | - | let debug = $ | |
490 | + | let $t02346223543 = internalClaimWxBoost(userAddressStr) | |
491 | + | let userBoostAvailable = $t02346223543._1 | |
492 | + | let dataState = $t02346223543._2 | |
493 | + | let debug = $t02346223543._3 | |
475 | 494 | $Tuple2(dataState, [userBoostAvailable]) | |
476 | 495 | } | |
477 | 496 | ||
478 | 497 | ||
479 | 498 | ||
480 | 499 | @Callable(i) | |
481 | 500 | func claimWxBoostREADONLY (userAddressStr) = { | |
482 | - | let $ | |
483 | - | let userBoostAvailable = $ | |
484 | - | let dataState = $ | |
485 | - | let debug = $ | |
501 | + | let $t02365323734 = internalClaimWxBoost(userAddressStr) | |
502 | + | let userBoostAvailable = $t02365323734._1 | |
503 | + | let dataState = $t02365323734._2 | |
504 | + | let debug = $t02365323734._3 | |
486 | 505 | $Tuple2(nil, [userBoostAvailable, debug]) | |
487 | 506 | } | |
488 | 507 | ||
489 | 508 | ||
490 | 509 | ||
491 | 510 | @Callable(i) | |
492 | 511 | func unlock (userAddress) = { | |
493 | 512 | let userRecordArray = readLockParamsRecordOrFail(userAddress) | |
494 | 513 | let userNumStr = userRecordArray[IdxLockUserNum] | |
495 | 514 | let userAmount = parseIntValue(userRecordArray[IdxLockAmount]) | |
496 | 515 | let lockStart = parseIntValue(userRecordArray[IdxLockStart]) | |
497 | 516 | let lockDuration = parseIntValue(userRecordArray[IdxLockDuration]) | |
498 | 517 | let lockEnd = (lockStart + lockDuration) | |
499 | 518 | let cfgArray = readConfigArrayOrFail() | |
500 | 519 | let assetId = fromBase58String(cfgArray[IdxCfgAssetId]) | |
501 | 520 | if ((lockEnd >= height)) | |
502 | 521 | then throw((("wait " + toString(lockEnd)) + " to unlock")) | |
503 | 522 | else if ((0 >= userAmount)) | |
504 | 523 | then throw("nothing to unlock") | |
505 | 524 | else { | |
506 | 525 | let period = "0" | |
507 | 526 | (((LockParamsEntry(userAddress, userNumStr, 0, lockStart, lockDuration, 0, 0, period) ++ StatsEntry(-(userAmount), 0, 0, -1)) :+ HistoryEntry("unlock", userAddress, userAmount, lockStart, lockDuration, 0, 0, i)) :+ ScriptTransfer(addressFromStringValue(userAddress), userAmount, assetId)) | |
508 | 527 | } | |
509 | 528 | } | |
510 | 529 | ||
511 | 530 | ||
512 | 531 | ||
513 | 532 | @Callable(i) | |
514 | 533 | func gwxUserInfoREADONLY (userAddress) = { | |
515 | 534 | let gwxAmount = calcCurrentGwxAmount(userAddress) | |
516 | 535 | $Tuple2(nil, [gwxAmount]) | |
517 | 536 | } | |
518 | 537 | ||
519 | 538 |
github/deemru/w8io/169f3d6 77.24 ms ◑