tx · 2Hd8oQSoZ4AspgbzN4PTNUtdsW2SjWdSA8FgMN2roFyW 3Myn55vLkduxbX3ZXfiDCZhaQsLxYp1kmCy: -0.02900000 Waves 2022.06.24 15:01 [2110467] smart account 3Myn55vLkduxbX3ZXfiDCZhaQsLxYp1kmCy > SELF 0.00000000 Waves
{ "type": 13, "id": "2Hd8oQSoZ4AspgbzN4PTNUtdsW2SjWdSA8FgMN2roFyW", "fee": 2900000, "feeAssetId": null, "timestamp": 1656072117196, "version": 1, "sender": "3Myn55vLkduxbX3ZXfiDCZhaQsLxYp1kmCy", "senderPublicKey": "9W33iCCNfmFxUbiC6XZcH5x7f6xfwC7Jb3BoExT5q2PV", "proofs": [ "garLNSkMEr5saSWuDATwS77WG4UeNSTeGJXLgKiX21mwrLj749A5umWaj1wAyj6xoD8mPkZNRdZQyDEucpwpxGH" ], "script": "base64:BgI5CAISCAoGCAgBAQEIEgMKAQESAwoBARIECgIICBIECgIICBIDCgEIEgMKAQgSBAoCCAESAwoBCBIAZQADU0VQAgJfXwAGU0NBTEU4AAgABU1VTFQ4AIDC1y8ADlBPT0xXRUlHSFRNVUxUBQVNVUxUOAEEc3RyZgIHYWRkcmVzcwNrZXkJARN2YWx1ZU9yRXJyb3JNZXNzYWdlAgkAnQgCBQdhZGRyZXNzBQNrZXkJAKwCAgkArAICAg9tYW5kYXRvcnkgdGhpcy4FA2tleQIPIGlzIG5vdCBkZWZpbmVkAQNpb3oCB2FkZHJlc3MDa2V5CQELdmFsdWVPckVsc2UCCQCaCAIFB2FkZHJlc3MFA2tleQAAAQNpb2QDB2FkZHJlc3MDa2V5CmRlZmF1bHRWYWwJAQt2YWx1ZU9yRWxzZQIJAJoIAgUHYWRkcmVzcwUDa2V5BQpkZWZhdWx0VmFsAQNpb2YCB2FkZHJlc3MDa2V5CQETdmFsdWVPckVycm9yTWVzc2FnZQIJAJoIAgUHYWRkcmVzcwUDa2V5CQCsAgIJAKwCAgIPbWFuZGF0b3J5IHRoaXMuBQNrZ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": 84, "height": 2110467, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8UkmtTr11M8siA41f1yFbnZKPZT25WgFgrZCLGxidLWx Next: 4qAyQdNa4gyufRQxkRkH6EAA6PW9GRtGt6jn14A1NbNy Diff:
Old | New | Differences | |
---|---|---|---|
432 | 432 | let userBoostClaimed = ioz(this, userBoostClaimedKEY) | |
433 | 433 | let userBoostAvailable = (userBoostAvaliableToClaimTotalNew - userBoostClaimed) | |
434 | 434 | let dataState = [IntegerEntry(userLpBoostEmissionLastIntegralKEY, boostEmissionIntegral)] | |
435 | - | let debug = makeString([ | |
435 | + | let debug = makeString([toString(userBoostEmissionLastIntegral), toString(userBoostEmissionIntegral), toString(userMaxBoostInt), toString(totalMaxBoostInt), toString(userBoostAvaliableToClaimTotal), toString(userBoostAvaliableToClaimTotalNew), toString(userBoostClaimed), toString(userBoostAvailable), toString(userBoostEmissionIntegral0), toString(userBoostEmissionIntegral1), toString(poolUserBoostEmissionIntegral0), toString(poolUserBoostEmissionIntegral1), toString(poolWeight0), toString(poolWeight1), toString(h), toString(udh), toString(uLastH), toString(udh0), toString(udh1), toString(userCurrGwx), toString(totalCachedGwx)], ":") | |
436 | 436 | $Tuple3(userBoostAvaliableToClaimTotalNew, dataState, debug) | |
437 | 437 | } | |
438 | 438 | } | |
600 | 600 | func claimWxBoost (lpAssetIdStr,userAddressStr) = if ((stakingContract != i.caller)) | |
601 | 601 | then throw("permissions denied") | |
602 | 602 | else { | |
603 | - | let $ | |
604 | - | let userBoostAvailable = $ | |
605 | - | let dataState = $ | |
606 | - | let debug = $ | |
603 | + | let $t02726427366 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, false) | |
604 | + | let userBoostAvailable = $t02726427366._1 | |
605 | + | let dataState = $t02726427366._2 | |
606 | + | let debug = $t02726427366._3 | |
607 | 607 | $Tuple2(dataState, [userBoostAvailable]) | |
608 | 608 | } | |
609 | 609 | ||
611 | 611 | ||
612 | 612 | @Callable(i) | |
613 | 613 | func claimWxBoostREADONLY (lpAssetIdStr,userAddressStr) = { | |
614 | - | let $ | |
615 | - | let userBoostAvailable = $ | |
616 | - | let dataState = $ | |
617 | - | let debug = $ | |
614 | + | let $t02749827599 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, true) | |
615 | + | let userBoostAvailable = $t02749827599._1 | |
616 | + | let dataState = $t02749827599._2 | |
617 | + | let debug = $t02749827599._3 | |
618 | 618 | $Tuple2(nil, [userBoostAvailable, debug]) | |
619 | 619 | } | |
620 | 620 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
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 | let POOLWEIGHTMULT = MULT8 | |
11 | 11 | ||
12 | 12 | func strf (address,key) = valueOrErrorMessage(getString(address, key), (("mandatory this." + key) + " is not defined")) | |
13 | 13 | ||
14 | 14 | ||
15 | 15 | func ioz (address,key) = valueOrElse(getInteger(address, key), 0) | |
16 | 16 | ||
17 | 17 | ||
18 | 18 | func iod (address,key,defaultVal) = valueOrElse(getInteger(address, key), defaultVal) | |
19 | 19 | ||
20 | 20 | ||
21 | 21 | func iof (address,key) = valueOrErrorMessage(getInteger(address, key), (("mandatory this." + key) + " is not defined")) | |
22 | 22 | ||
23 | 23 | ||
24 | 24 | func abs (val) = if ((0 > val)) | |
25 | 25 | then -(val) | |
26 | 26 | else val | |
27 | 27 | ||
28 | 28 | ||
29 | 29 | func aal (val) = match val { | |
30 | 30 | case valAnyLyst: List[Any] => | |
31 | 31 | valAnyLyst | |
32 | 32 | case _ => | |
33 | 33 | throw("fail to cast into List[Any]") | |
34 | 34 | } | |
35 | 35 | ||
36 | 36 | ||
37 | 37 | func ai (val) = match val { | |
38 | 38 | case valInt: Int => | |
39 | 39 | valInt | |
40 | 40 | case _ => | |
41 | 41 | throw("fail to cast into Int") | |
42 | 42 | } | |
43 | 43 | ||
44 | 44 | ||
45 | 45 | func keyFactoryAddress () = "%s%s__config__factoryAddress" | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | let IdxFactoryCfgStakingDapp = 1 | |
49 | 49 | ||
50 | 50 | let IdxFactoryCfgBoostingDapp = 2 | |
51 | 51 | ||
52 | 52 | let IdxFactoryCfgIdoDapp = 3 | |
53 | 53 | ||
54 | 54 | let IdxFactoryCfgTeamDapp = 4 | |
55 | 55 | ||
56 | 56 | let IdxFactoryCfgEmissionDapp = 5 | |
57 | 57 | ||
58 | 58 | let IdxFactoryCfgRestDapp = 6 | |
59 | 59 | ||
60 | 60 | let IdxFactoryCfgSlippageDapp = 7 | |
61 | 61 | ||
62 | 62 | let IdxFactoryCfgDaoDapp = 8 | |
63 | 63 | ||
64 | 64 | let IdxFactoryCfgMarketingDapp = 9 | |
65 | 65 | ||
66 | 66 | let IdxFactoryCfgGwxRewardDapp = 10 | |
67 | 67 | ||
68 | 68 | let IdxFactoryCfgBirdsDapp = 11 | |
69 | 69 | ||
70 | 70 | func keyFactoryCfg () = "%s__factoryConfig" | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | func keyFactoryLp2AssetsMapping (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP) | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | func keyFactoryLpList () = "%s__lpTokensList" | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | func keyFactoryLpAssetToPoolContractAddress (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP) | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | func keyFactoryPoolWeight (contractAddress) = makeString(["%s%s", "poolWeight", contractAddress], SEP) | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | func keyFactoryPoolWeightHistory (poolAddress,num) = ((("%s%s__poolWeight__" + poolAddress) + "__") + toString(num)) | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | func readFactoryAddressOrFail () = addressFromStringValue(strf(this, keyFactoryAddress())) | |
89 | 89 | ||
90 | 90 | ||
91 | 91 | func readLpList () = split(valueOrElse(getString(readFactoryAddressOrFail(), keyFactoryLpList()), ""), SEP) | |
92 | 92 | ||
93 | 93 | ||
94 | 94 | func readFactoryCfgOrFail (factory) = split(strf(factory, keyFactoryCfg()), SEP) | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | func getBoostingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgBoostingDapp]) | |
98 | 98 | ||
99 | 99 | ||
100 | 100 | func getEmissionAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgEmissionDapp]) | |
101 | 101 | ||
102 | 102 | ||
103 | 103 | func getStakingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgStakingDapp]) | |
104 | 104 | ||
105 | 105 | ||
106 | 106 | func getGwxRewardAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgGwxRewardDapp]) | |
107 | 107 | ||
108 | 108 | ||
109 | 109 | func keyManagerPublicKey () = "%s__managerPublicKey" | |
110 | 110 | ||
111 | 111 | ||
112 | 112 | func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey" | |
113 | 113 | ||
114 | 114 | ||
115 | 115 | func keyEmissionRatePerBlockCurrent () = "%s%s__ratePerBlock__current" | |
116 | 116 | ||
117 | 117 | ||
118 | 118 | func keyEmissionRatePerBlockMaxCurrent () = "%s%s__ratePerBlockMax__current" | |
119 | 119 | ||
120 | 120 | ||
121 | 121 | func keyEmissionStartBlock () = "%s%s__emission__startBlock" | |
122 | 122 | ||
123 | 123 | ||
124 | 124 | func keyEmissionDurationInBlocks () = "%s%s__emission__duration" | |
125 | 125 | ||
126 | 126 | ||
127 | 127 | func keyEmissionEndBlock () = "%s%s__emission__endBlock" | |
128 | 128 | ||
129 | 129 | ||
130 | 130 | func keyNextPeriod () = "%s__nextPeriod" | |
131 | 131 | ||
132 | 132 | ||
133 | 133 | func keyGwxRewardEmissionStartHeight () = "%s%s__gwxRewardEmissionPart__startHeight" | |
134 | 134 | ||
135 | 135 | ||
136 | 136 | let IdxCfgAssetId = 1 | |
137 | 137 | ||
138 | 138 | let IdxCfgMinLockAmount = 2 | |
139 | 139 | ||
140 | 140 | let IdxCfgMinLockDuration = 3 | |
141 | 141 | ||
142 | 142 | let IdxCfgMaxLockDuration = 4 | |
143 | 143 | ||
144 | 144 | let IdxCfgMathContract = 5 | |
145 | 145 | ||
146 | 146 | func keyConfig () = "%s__config" | |
147 | 147 | ||
148 | 148 | ||
149 | 149 | func readConfigArrayOrFail () = split(strf(this, keyConfig()), SEP) | |
150 | 150 | ||
151 | 151 | ||
152 | 152 | func formatConfigS (assetId,minLockAmount,minLockDuration,maxLockDuration,mathContract) = makeString(["%s%d%d%d", assetId, minLockAmount, minLockDuration, maxLockDuration, mathContract], SEP) | |
153 | 153 | ||
154 | 154 | ||
155 | 155 | func formatConfig (assetId,minLockAmount,minLockDuration,maxLockDuration,mathContract) = formatConfigS(assetId, toString(minLockAmount), toString(minLockDuration), toString(maxLockDuration), mathContract) | |
156 | 156 | ||
157 | 157 | ||
158 | 158 | func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) { | |
159 | 159 | case s: String => | |
160 | 160 | fromBase58String(s) | |
161 | 161 | case _: Unit => | |
162 | 162 | unit | |
163 | 163 | case _ => | |
164 | 164 | throw("Match error") | |
165 | 165 | } | |
166 | 166 | ||
167 | 167 | ||
168 | 168 | func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) { | |
169 | 169 | case s: String => | |
170 | 170 | fromBase58String(s) | |
171 | 171 | case _: Unit => | |
172 | 172 | unit | |
173 | 173 | case _ => | |
174 | 174 | throw("Match error") | |
175 | 175 | } | |
176 | 176 | ||
177 | 177 | ||
178 | 178 | func mustManager (i) = { | |
179 | 179 | let pd = throw("Permission denied") | |
180 | 180 | match managerPublicKeyOrUnit() { | |
181 | 181 | case pk: ByteVector => | |
182 | 182 | if ((i.callerPublicKey == pk)) | |
183 | 183 | then true | |
184 | 184 | else pd | |
185 | 185 | case _: Unit => | |
186 | 186 | if ((i.caller == this)) | |
187 | 187 | then true | |
188 | 188 | else pd | |
189 | 189 | case _ => | |
190 | 190 | throw("Match error") | |
191 | 191 | } | |
192 | 192 | } | |
193 | 193 | ||
194 | 194 | ||
195 | 195 | let IdxLockUserNum = 1 | |
196 | 196 | ||
197 | 197 | let IdxLockAmount = 2 | |
198 | 198 | ||
199 | 199 | let IdxLockStart = 3 | |
200 | 200 | ||
201 | 201 | let IdxLockDuration = 4 | |
202 | 202 | ||
203 | 203 | let IdxLockParamK = 5 | |
204 | 204 | ||
205 | 205 | let IdxLockParamB = 6 | |
206 | 206 | ||
207 | 207 | func keyLockParamsRecord (userAddress) = makeString(["%s%s__lock", userAddress], SEP) | |
208 | 208 | ||
209 | 209 | ||
210 | 210 | func readLockParamsRecordOrFail (userAddress) = split(strf(this, keyLockParamsRecord(userAddress)), SEP) | |
211 | 211 | ||
212 | 212 | ||
213 | 213 | 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) | |
214 | 214 | ||
215 | 215 | ||
216 | 216 | 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)) | |
217 | 217 | ||
218 | 218 | ||
219 | 219 | func keyNextUserNum () = "%s__nextUserNum" | |
220 | 220 | ||
221 | 221 | ||
222 | 222 | func keyUser2NumMapping (userAddress) = makeString(["%s%s%s__mapping__user2num", userAddress], SEP) | |
223 | 223 | ||
224 | 224 | ||
225 | 225 | func keyNum2UserMapping (num) = makeString(["%s%s%s__mapping__num2user", num], SEP) | |
226 | 226 | ||
227 | 227 | ||
228 | 228 | func keyLockParamUserAmount (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "amount"], SEP) | |
229 | 229 | ||
230 | 230 | ||
231 | 231 | func keyLockParamStartBlock (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "start"], SEP) | |
232 | 232 | ||
233 | 233 | ||
234 | 234 | func keyLockParamDuration (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "duration"], SEP) | |
235 | 235 | ||
236 | 236 | ||
237 | 237 | func keyLockParamK (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "k"], SEP) | |
238 | 238 | ||
239 | 239 | ||
240 | 240 | func keyLockParamB (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "b"], SEP) | |
241 | 241 | ||
242 | 242 | ||
243 | 243 | func keyLockParamByPeriodK (userNum,period) = makeString(["%s%d%s%d__paramByPeriod", userNum, "k", period], SEP) | |
244 | 244 | ||
245 | 245 | ||
246 | 246 | func keyLockParamByPeriodB (userNum,period) = makeString(["%s%d%s%d__paramByPeriod", userNum, "b", period], SEP) | |
247 | 247 | ||
248 | 248 | ||
249 | 249 | func keyLockParamTotalAmount () = "%s%s__stats__activeTotalLocked" | |
250 | 250 | ||
251 | 251 | ||
252 | 252 | func keyStatsLocksDurationSumInBlocks () = "%s%s__stats__locksDurationSumInBlocks" | |
253 | 253 | ||
254 | 254 | ||
255 | 255 | func keyStatsLocksCount () = "%s%s__stats__locksCount" | |
256 | 256 | ||
257 | 257 | ||
258 | 258 | func keyStatsUsersCount () = "%s%s__stats__activeUsersCount" | |
259 | 259 | ||
260 | 260 | ||
261 | 261 | func keyUserBoostEmissionLastINTEGRAL (userNum) = makeString(["%s%d__userBoostEmissionLastInt", userNum], SEP) | |
262 | 262 | ||
263 | 263 | ||
264 | 264 | func keyUserLpBoostEmissionLastINTEGRAL (userNum,lpAssetId) = makeString(["%s%d__userBoostEmissionLastInt", userNum, lpAssetId], SEP) | |
265 | 265 | ||
266 | 266 | ||
267 | 267 | func keyUserMaxBoostINTEGRAL (userNum) = makeString(["%s%d__maxBoostInt", userNum], SEP) | |
268 | 268 | ||
269 | 269 | ||
270 | 270 | func keyTotalMaxBoostINTEGRAL () = "%s%s__maxBoostInt__total" | |
271 | 271 | ||
272 | 272 | ||
273 | 273 | func keyUserBoostAvalaibleToClaimTotal (userNum) = makeString(["%s%d__userBoostAvaliableToClaimTotal", userNum], SEP) | |
274 | 274 | ||
275 | 275 | ||
276 | 276 | func keyUserBoostClaimed (userNum) = makeString(["%s%d__userBoostClaimed", userNum], SEP) | |
277 | 277 | ||
278 | 278 | ||
279 | 279 | func keyTotalCachedGwx () = "%s%s__gwxCached__total" | |
280 | 280 | ||
281 | 281 | ||
282 | 282 | let factoryContract = readFactoryAddressOrFail() | |
283 | 283 | ||
284 | 284 | let factoryCfg = readFactoryCfgOrFail(factoryContract) | |
285 | 285 | ||
286 | 286 | let emissionContract = getEmissionAddressOrFail(factoryCfg) | |
287 | 287 | ||
288 | 288 | let stakingContract = getStakingAddressOrFail(factoryCfg) | |
289 | 289 | ||
290 | 290 | let gwxRewardContract = getGwxRewardAddressOrFail(factoryCfg) | |
291 | 291 | ||
292 | 292 | func HistoryEntry (type,user,amount,lockStart,duration,k,b,i) = { | |
293 | 293 | let historyKEY = makeString(["%s%s%s%s__history", type, user, toBase58String(i.transactionId)], SEP) | |
294 | 294 | 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) | |
295 | 295 | StringEntry(historyKEY, historyDATA) | |
296 | 296 | } | |
297 | 297 | ||
298 | 298 | ||
299 | 299 | func StatsEntry (totalLockedInc,durationInc,lockCountInc,usersCountInc) = { | |
300 | 300 | let locksDurationSumInBlocksKEY = keyStatsLocksDurationSumInBlocks() | |
301 | 301 | let locksCountKEY = keyStatsLocksCount() | |
302 | 302 | let usersCountKEY = keyStatsUsersCount() | |
303 | 303 | let totalAmountKEY = keyLockParamTotalAmount() | |
304 | 304 | let locksDurationSumInBlocks = ioz(this, locksDurationSumInBlocksKEY) | |
305 | 305 | let locksCount = ioz(this, locksCountKEY) | |
306 | 306 | let usersCount = ioz(this, usersCountKEY) | |
307 | 307 | let totalAmount = ioz(this, totalAmountKEY) | |
308 | 308 | [IntegerEntry(locksDurationSumInBlocksKEY, (locksDurationSumInBlocks + durationInc)), IntegerEntry(locksCountKEY, (locksCount + lockCountInc)), IntegerEntry(usersCountKEY, (usersCount + usersCountInc)), IntegerEntry(totalAmountKEY, (totalAmount + totalLockedInc))] | |
309 | 309 | } | |
310 | 310 | ||
311 | 311 | ||
312 | 312 | func calcGwxAmount (kRaw,bRaw,h) = { | |
313 | 313 | let SCALE = 1000 | |
314 | 314 | (((kRaw * h) + bRaw) / SCALE) | |
315 | 315 | } | |
316 | 316 | ||
317 | 317 | ||
318 | 318 | func LockParamsEntry (userAddress,userNum,amount,start,duration,k,b,period) = { | |
319 | 319 | let userAmountKEY = keyLockParamUserAmount(userNum) | |
320 | 320 | let startBlockKEY = keyLockParamStartBlock(userNum) | |
321 | 321 | let durationKEY = keyLockParamDuration(userNum) | |
322 | 322 | let kKEY = keyLockParamK(userNum) | |
323 | 323 | let bKEY = keyLockParamB(userNum) | |
324 | 324 | let kByPeriodKEY = keyLockParamByPeriodK(userNum, period) | |
325 | 325 | let bByPeriodKEY = keyLockParamByPeriodB(userNum, period) | |
326 | 326 | let gwxAmount = calcGwxAmount(k, b, height) | |
327 | 327 | [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))] | |
328 | 328 | } | |
329 | 329 | ||
330 | 330 | ||
331 | 331 | func extractOptionalPaymentAmountOrFail (i,expectedAssetId) = if ((size(i.payments) > 1)) | |
332 | 332 | then throw("only one payment is allowed") | |
333 | 333 | else if ((size(i.payments) == 0)) | |
334 | 334 | then 0 | |
335 | 335 | else { | |
336 | 336 | let pmt = i.payments[0] | |
337 | 337 | if ((value(pmt.assetId) != expectedAssetId)) | |
338 | 338 | then throw("invalid asset id in payment") | |
339 | 339 | else pmt.amount | |
340 | 340 | } | |
341 | 341 | ||
342 | 342 | ||
343 | 343 | func calcUserGwxAmountAtHeight (userAddress,targetHeight) = { | |
344 | 344 | let EMPTY = "empty" | |
345 | 345 | let user2NumMappingKEY = keyUser2NumMapping(userAddress) | |
346 | 346 | let userNum = valueOrElse(getString(user2NumMappingKEY), EMPTY) | |
347 | 347 | let k = valueOrElse(getInteger(keyLockParamK(userNum)), 0) | |
348 | 348 | let b = valueOrElse(getInteger(keyLockParamB(userNum)), 0) | |
349 | 349 | let gwxAmountCalc = calcGwxAmount(k, b, targetHeight) | |
350 | 350 | let gwxAmount = if ((0 > gwxAmountCalc)) | |
351 | 351 | then 0 | |
352 | 352 | else gwxAmountCalc | |
353 | 353 | gwxAmount | |
354 | 354 | } | |
355 | 355 | ||
356 | 356 | ||
357 | 357 | func calcCurrentGwxAmount (userAddress) = calcUserGwxAmountAtHeight(userAddress, height) | |
358 | 358 | ||
359 | 359 | ||
360 | 360 | func internalClaimWxBoost (lpAssetIdStr,userAddressStr,readOnly) = { | |
361 | 361 | let EMPTY = "EMPTY" | |
362 | 362 | let userRecordOrEmpty = valueOrElse(getString(this, keyLockParamsRecord(userAddressStr)), EMPTY) | |
363 | 363 | if ((userRecordOrEmpty == EMPTY)) | |
364 | 364 | then $Tuple3(0, nil, "userRecord::is::empty") | |
365 | 365 | else { | |
366 | 366 | let userRecordArray = split(userRecordOrEmpty, SEP) | |
367 | 367 | let userNumStr = userRecordArray[IdxLockUserNum] | |
368 | 368 | let gwxRewardEmissionStartHeight = valueOrElse(getInteger(gwxRewardContract, keyGwxRewardEmissionStartHeight()), 0) | |
369 | 369 | let EMPTYSTR = "empty" | |
370 | 370 | let $t01316713735 = if ((lpAssetIdStr != EMPTYSTR)) | |
371 | 371 | then { | |
372 | 372 | let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr)) | |
373 | 373 | let pw1 = getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr)) | |
374 | 374 | let pw0 = valueOrElse(getInteger(factoryContract, keyFactoryPoolWeightHistory(poolAddressStr, 0)), pw1) | |
375 | 375 | $Tuple2(pw0, pw1) | |
376 | 376 | } | |
377 | 377 | else if (readOnly) | |
378 | 378 | then $Tuple2(0, 0) | |
379 | 379 | else throw(("not readonly mode: unsupported lp asset " + lpAssetIdStr)) | |
380 | 380 | let poolWeight0 = $t01316713735._1 | |
381 | 381 | let poolWeight1 = $t01316713735._2 | |
382 | 382 | let wxEmissionPerBlock = iof(emissionContract, keyEmissionRatePerBlockCurrent()) | |
383 | 383 | let emissionStart = iof(emissionContract, keyEmissionStartBlock()) | |
384 | 384 | let emissionEnd = iof(emissionContract, keyEmissionEndBlock()) | |
385 | 385 | let h = if ((height > emissionEnd)) | |
386 | 386 | then emissionEnd | |
387 | 387 | else height | |
388 | 388 | let dh = max([(h - emissionStart), 0]) | |
389 | 389 | let userLpBoostEmissionLastIntegralKEY = keyUserLpBoostEmissionLastINTEGRAL(userNumStr, lpAssetIdStr) | |
390 | 390 | let userBoostEmissionLastIntegralKEY = keyUserBoostEmissionLastINTEGRAL(userNumStr) | |
391 | 391 | let userBoostEmissionLastIntegral = valueOrElse(getInteger(this, userLpBoostEmissionLastIntegralKEY), ioz(this, userBoostEmissionLastIntegralKEY)) | |
392 | 392 | let boostEmissionIntegral = (((wxEmissionPerBlock * dh) * 2) / 3) | |
393 | 393 | let userBoostEmissionIntegral = (boostEmissionIntegral - userBoostEmissionLastIntegral) | |
394 | 394 | let udh = fraction(userBoostEmissionIntegral, 3, (2 * wxEmissionPerBlock)) | |
395 | 395 | let uLastH = (h - udh) | |
396 | 396 | let udh0 = max([(gwxRewardEmissionStartHeight - uLastH), 0]) | |
397 | 397 | let udh1 = ((h - uLastH) - udh0) | |
398 | 398 | if (if (if ((0 > uLastH)) | |
399 | 399 | then true | |
400 | 400 | else (0 > udh1)) | |
401 | 401 | then true | |
402 | 402 | else (abs(((udh0 + udh1) - udh)) >= 1)) | |
403 | 403 | then throw(((((((("invalid udh calc: udh=" + toString(udh)) + " uLastH=") + toString(uLastH)) + " udh0=") + toString(udh0)) + " udh1=") + toString(udh1))) | |
404 | 404 | else if ((0 > userBoostEmissionIntegral)) | |
405 | 405 | then throw("wrong calculations") | |
406 | 406 | else { | |
407 | 407 | let userMaxBoostIntegralKEY = keyUserMaxBoostINTEGRAL(userNumStr) | |
408 | 408 | let totalMaxBoostIntegralKEY = keyTotalMaxBoostINTEGRAL() | |
409 | 409 | let userMaxBoostInt = ioz(this, userMaxBoostIntegralKEY) | |
410 | 410 | let totalMaxBoostInt = ioz(this, totalMaxBoostIntegralKEY) | |
411 | 411 | let totalCachedGwxKEY = keyTotalCachedGwx() | |
412 | 412 | let totalCachedGwx = valueOrElse(getInteger(this, totalCachedGwxKEY), 0) | |
413 | 413 | let userCurrGwx = calcCurrentGwxAmount(userAddressStr) | |
414 | 414 | let userBoostAvalaibleToClaimTotalKEY = keyUserBoostAvalaibleToClaimTotal(userNumStr) | |
415 | 415 | let userBoostAvaliableToClaimTotal = ioz(this, userBoostAvalaibleToClaimTotalKEY) | |
416 | 416 | let userBoostEmissionIntegral0 = if ((udh == 0)) | |
417 | 417 | then 0 | |
418 | 418 | else fraction(userBoostEmissionIntegral, udh0, udh) | |
419 | 419 | let userBoostEmissionIntegral1 = if ((udh == 0)) | |
420 | 420 | then 0 | |
421 | 421 | else fraction(userBoostEmissionIntegral, udh1, udh) | |
422 | 422 | let poolUserBoostEmissionIntegral0 = fraction(userBoostEmissionIntegral0, poolWeight0, POOLWEIGHTMULT) | |
423 | 423 | let poolUserBoostEmissionIntegral1 = fraction(userBoostEmissionIntegral1, poolWeight1, POOLWEIGHTMULT) | |
424 | 424 | let userBoostAvaliableToClaimTotalNew0 = if ((totalCachedGwx == 0)) | |
425 | 425 | then 0 | |
426 | 426 | else fraction(poolUserBoostEmissionIntegral0, userCurrGwx, totalCachedGwx) | |
427 | 427 | let userBoostAvaliableToClaimTotalNew1 = if ((totalCachedGwx == 0)) | |
428 | 428 | then 0 | |
429 | 429 | else fraction(poolUserBoostEmissionIntegral1, userCurrGwx, totalCachedGwx) | |
430 | 430 | let userBoostAvaliableToClaimTotalNew = (userBoostAvaliableToClaimTotalNew0 + userBoostAvaliableToClaimTotalNew1) | |
431 | 431 | let userBoostClaimedKEY = keyUserBoostClaimed(userNumStr) | |
432 | 432 | let userBoostClaimed = ioz(this, userBoostClaimedKEY) | |
433 | 433 | let userBoostAvailable = (userBoostAvaliableToClaimTotalNew - userBoostClaimed) | |
434 | 434 | let dataState = [IntegerEntry(userLpBoostEmissionLastIntegralKEY, boostEmissionIntegral)] | |
435 | - | let debug = makeString([ | |
435 | + | let debug = makeString([toString(userBoostEmissionLastIntegral), toString(userBoostEmissionIntegral), toString(userMaxBoostInt), toString(totalMaxBoostInt), toString(userBoostAvaliableToClaimTotal), toString(userBoostAvaliableToClaimTotalNew), toString(userBoostClaimed), toString(userBoostAvailable), toString(userBoostEmissionIntegral0), toString(userBoostEmissionIntegral1), toString(poolUserBoostEmissionIntegral0), toString(poolUserBoostEmissionIntegral1), toString(poolWeight0), toString(poolWeight1), toString(h), toString(udh), toString(uLastH), toString(udh0), toString(udh1), toString(userCurrGwx), toString(totalCachedGwx)], ":") | |
436 | 436 | $Tuple3(userBoostAvaliableToClaimTotalNew, dataState, debug) | |
437 | 437 | } | |
438 | 438 | } | |
439 | 439 | } | |
440 | 440 | ||
441 | 441 | ||
442 | 442 | @Callable(i) | |
443 | 443 | func constructor (factoryAddressStr,lockAssetIdStr,minLockAmount,minDuration,maxDuration,mathContract) = { | |
444 | 444 | let checkCaller = mustManager(i) | |
445 | 445 | if ((checkCaller == checkCaller)) | |
446 | 446 | then ([IntegerEntry(keyNextUserNum(), 0), StringEntry(keyConfig(), formatConfig(lockAssetIdStr, minLockAmount, minDuration, maxDuration, mathContract)), StringEntry(keyFactoryAddress(), factoryAddressStr)] ++ StatsEntry(0, 0, 0, 0)) | |
447 | 447 | else throw("Strict value is not equal to itself.") | |
448 | 448 | } | |
449 | 449 | ||
450 | 450 | ||
451 | 451 | ||
452 | 452 | @Callable(i) | |
453 | 453 | func lock (duration) = { | |
454 | 454 | let cfgArray = readConfigArrayOrFail() | |
455 | 455 | let assetIdStr = cfgArray[IdxCfgAssetId] | |
456 | 456 | let assetId = fromBase58String(assetIdStr) | |
457 | 457 | let minLockAmount = parseIntValue(cfgArray[IdxCfgMinLockAmount]) | |
458 | 458 | let minLockDuration = parseIntValue(cfgArray[IdxCfgMinLockDuration]) | |
459 | 459 | let maxLockDuration = parseIntValue(cfgArray[IdxCfgMaxLockDuration]) | |
460 | 460 | let mathContract = addressFromStringValue(cfgArray[IdxCfgMathContract]) | |
461 | 461 | if ((size(i.payments) != 1)) | |
462 | 462 | then throw("invalid payment - exact one payment must be attached") | |
463 | 463 | else { | |
464 | 464 | let pmt = i.payments[0] | |
465 | 465 | let pmtAmount = pmt.amount | |
466 | 466 | if ((assetId != value(pmt.assetId))) | |
467 | 467 | then throw((("invalid asset is in payment - " + assetIdStr) + " is expected")) | |
468 | 468 | else { | |
469 | 469 | let nextUserNumKEY = keyNextUserNum() | |
470 | 470 | let userAddressStr = toString(i.caller) | |
471 | 471 | let userIsExisting = isDefined(getString(keyUser2NumMapping(userAddressStr))) | |
472 | 472 | let userNumStr = if (userIsExisting) | |
473 | 473 | then value(getString(keyUser2NumMapping(userAddressStr))) | |
474 | 474 | else toString(iof(this, nextUserNumKEY)) | |
475 | 475 | let userNum = parseIntValue(userNumStr) | |
476 | 476 | let lockStart = height | |
477 | 477 | let startBlockKEY = keyLockParamStartBlock(userNumStr) | |
478 | 478 | let durationKEY = keyLockParamDuration(userNumStr) | |
479 | 479 | let userAmountKEY = keyLockParamUserAmount(userNumStr) | |
480 | 480 | if ((minLockAmount > pmtAmount)) | |
481 | 481 | then throw(("amount is less then minLockAmount=" + toString(minLockAmount))) | |
482 | 482 | else if ((minLockDuration > duration)) | |
483 | 483 | then throw(("passed duration is less then minLockDuration=" + toString(minLockDuration))) | |
484 | 484 | else if ((duration > maxLockDuration)) | |
485 | 485 | then throw(("passed duration is greater then maxLockDuration=" + toString(maxLockDuration))) | |
486 | 486 | else if (if (userIsExisting) | |
487 | 487 | then ((iof(this, startBlockKEY) + iof(this, durationKEY)) >= lockStart) | |
488 | 488 | else false) | |
489 | 489 | then throw("there is an active lock - consider to use increaseLock") | |
490 | 490 | else if ((ioz(this, userAmountKEY) > 0)) | |
491 | 491 | then throw(("there are locked WXs - consider to use increaseLock " + userAmountKEY)) | |
492 | 492 | else { | |
493 | 493 | let coeffX8 = fraction(duration, MULT8, maxLockDuration) | |
494 | 494 | let gWxAmountStart = fraction(pmtAmount, coeffX8, MULT8) | |
495 | 495 | let gWxParamsResultList = aal(invoke(mathContract, "calcGwxParamsREADONLY", [gWxAmountStart, lockStart, duration], nil)) | |
496 | 496 | let k = ai(gWxParamsResultList[0]) | |
497 | 497 | let b = ai(gWxParamsResultList[1]) | |
498 | 498 | let period = toString(ai(gWxParamsResultList[2])) | |
499 | 499 | let wxEmissionPerBlock = iof(emissionContract, keyEmissionRatePerBlockCurrent()) | |
500 | 500 | let emissionStart = iof(emissionContract, keyEmissionStartBlock()) | |
501 | 501 | let emissionEnd = iof(emissionContract, keyEmissionEndBlock()) | |
502 | 502 | let h = if ((height > emissionEnd)) | |
503 | 503 | then emissionEnd | |
504 | 504 | else height | |
505 | 505 | let dh = max([(h - emissionStart), 0]) | |
506 | 506 | let userBoostEmissionLastIntegralKEY = keyUserBoostEmissionLastINTEGRAL(userNumStr) | |
507 | 507 | let boostEmissionIntegral = (((wxEmissionPerBlock * dh) * 2) / 3) | |
508 | 508 | let userMaxBoostIntegralKEY = keyUserMaxBoostINTEGRAL(userNumStr) | |
509 | 509 | let totalMaxBoostIntegralKEY = keyTotalMaxBoostINTEGRAL() | |
510 | 510 | let userMaxBoostInt = ((gWxAmountStart * duration) / 2) | |
511 | 511 | let totalMaxBoostInt = ioz(this, totalMaxBoostIntegralKEY) | |
512 | 512 | let totalCachedGwxKEY = keyTotalCachedGwx() | |
513 | 513 | let totalCachedGwx = valueOrElse(getInteger(this, totalCachedGwxKEY), 0) | |
514 | 514 | let arr = if (userIsExisting) | |
515 | 515 | then nil | |
516 | 516 | else [IntegerEntry(nextUserNumKEY, (userNum + 1)), StringEntry(keyUser2NumMapping(userAddressStr), userNumStr), StringEntry(keyNum2UserMapping(userNumStr), userAddressStr)] | |
517 | 517 | ((((arr ++ LockParamsEntry(userAddressStr, userNumStr, pmtAmount, lockStart, duration, k, b, period)) ++ StatsEntry(pmtAmount, duration, 1, if (userIsExisting) | |
518 | 518 | then 0 | |
519 | 519 | else 1)) :+ HistoryEntry("lock", userAddressStr, pmtAmount, lockStart, duration, k, b, i)) ++ [IntegerEntry(userBoostEmissionLastIntegralKEY, boostEmissionIntegral), IntegerEntry(totalCachedGwxKEY, (totalCachedGwx + gWxAmountStart))]) | |
520 | 520 | } | |
521 | 521 | } | |
522 | 522 | } | |
523 | 523 | } | |
524 | 524 | ||
525 | 525 | ||
526 | 526 | ||
527 | 527 | @Callable(i) | |
528 | 528 | func increaseLock (deltaDuration) = { | |
529 | 529 | let cfgArray = readConfigArrayOrFail() | |
530 | 530 | let assetIdStr = cfgArray[IdxCfgAssetId] | |
531 | 531 | let assetId = fromBase58String(assetIdStr) | |
532 | 532 | let minLockDuration = parseIntValue(cfgArray[IdxCfgMinLockDuration]) | |
533 | 533 | let maxLockDuration = parseIntValue(cfgArray[IdxCfgMaxLockDuration]) | |
534 | 534 | let mathContract = addressFromStringValue(cfgArray[IdxCfgMathContract]) | |
535 | 535 | let pmtAmount = extractOptionalPaymentAmountOrFail(i, assetId) | |
536 | 536 | let userAddressStr = toString(i.caller) | |
537 | 537 | let userRecordArray = readLockParamsRecordOrFail(userAddressStr) | |
538 | 538 | let userNumStr = userRecordArray[IdxLockUserNum] | |
539 | 539 | let userAmount = parseIntValue(userRecordArray[IdxLockAmount]) | |
540 | 540 | let lockStart = parseIntValue(userRecordArray[IdxLockStart]) | |
541 | 541 | let lockDuration = parseIntValue(userRecordArray[IdxLockDuration]) | |
542 | 542 | let lockEnd = (lockStart + lockDuration) | |
543 | 543 | let remainingDuration = max([(lockEnd - height), 0]) | |
544 | 544 | let userAmountNew = (userAmount + pmtAmount) | |
545 | 545 | let lockDurationNew = (remainingDuration + deltaDuration) | |
546 | 546 | if ((0 > deltaDuration)) | |
547 | 547 | then throw("duration is less then zero") | |
548 | 548 | else if ((minLockDuration > lockDurationNew)) | |
549 | 549 | then throw(("lockDurationNew is less then minLockDuration=" + toString(minLockDuration))) | |
550 | 550 | else if ((lockDurationNew > maxLockDuration)) | |
551 | 551 | then throw(("deltaDuration + existedLockDuration is greater then maxLockDuration=" + toString(maxLockDuration))) | |
552 | 552 | else { | |
553 | 553 | let coeffX8 = fraction(lockDurationNew, MULT8, maxLockDuration) | |
554 | 554 | let gWxAmountStart = fraction(userAmountNew, coeffX8, MULT8) | |
555 | 555 | let lockStartNew = height | |
556 | 556 | let gWxParamsResultList = aal(invoke(mathContract, "calcGwxParamsREADONLY", [gWxAmountStart, lockStartNew, lockDurationNew], nil)) | |
557 | 557 | let k = ai(gWxParamsResultList[0]) | |
558 | 558 | let b = ai(gWxParamsResultList[1]) | |
559 | 559 | let period = toString(ai(gWxParamsResultList[2])) | |
560 | 560 | let wxEmissionPerBlock = iof(emissionContract, keyEmissionRatePerBlockCurrent()) | |
561 | 561 | let emissionStart = iof(emissionContract, keyEmissionStartBlock()) | |
562 | 562 | let emissionEnd = iof(emissionContract, keyEmissionEndBlock()) | |
563 | 563 | let h = if ((height > emissionEnd)) | |
564 | 564 | then emissionEnd | |
565 | 565 | else height | |
566 | 566 | let dh = max([(h - emissionStart), 0]) | |
567 | 567 | let userBoostEmissionLastIntegralKEY = keyUserBoostEmissionLastINTEGRAL(userNumStr) | |
568 | 568 | let userBoostEmissionLastIntegral = ioz(this, userBoostEmissionLastIntegralKEY) | |
569 | 569 | let boostEmissionIntegral = (((wxEmissionPerBlock * dh) * 2) / 3) | |
570 | 570 | let userBoostEmissionIntegral = (boostEmissionIntegral - userBoostEmissionLastIntegral) | |
571 | 571 | if ((0 > userBoostEmissionIntegral)) | |
572 | 572 | then throw("wrong calculations") | |
573 | 573 | else { | |
574 | 574 | let userMaxBoostIntegralKEY = keyUserMaxBoostINTEGRAL(userNumStr) | |
575 | 575 | let totalMaxBoostIntegralKEY = keyTotalMaxBoostINTEGRAL() | |
576 | 576 | let userMaxBoostInt = ioz(this, userMaxBoostIntegralKEY) | |
577 | 577 | let totalMaxBoostInt = ioz(this, totalMaxBoostIntegralKEY) | |
578 | 578 | let currUserGwx = calcCurrentGwxAmount(userAddressStr) | |
579 | 579 | let gwxDiff = (gWxAmountStart - currUserGwx) | |
580 | 580 | if ((0 > gwxDiff)) | |
581 | 581 | then throw(("gwxDiff is less then 0: " + toString(gwxDiff))) | |
582 | 582 | else { | |
583 | 583 | let totalCachedGwxKEY = keyTotalCachedGwx() | |
584 | 584 | let totalCachedGwx = valueOrElse(getInteger(this, totalCachedGwxKEY), 0) | |
585 | 585 | let userBoostAvalaibleToClaimTotalKEY = keyUserBoostAvalaibleToClaimTotal(userNumStr) | |
586 | 586 | let userBoostAvaliableToClaimTotal = ioz(this, userBoostAvalaibleToClaimTotalKEY) | |
587 | 587 | let userBoostAvaliableToClaimTotalNew = fraction(userBoostEmissionIntegral, currUserGwx, totalCachedGwx) | |
588 | 588 | let userMaxBoostIntNew = ((gWxAmountStart * lockDurationNew) / 2) | |
589 | 589 | let remainingUserMaxBoostInt = ((currUserGwx * remainingDuration) / 2) | |
590 | 590 | let userMaxBoostIntDiff = (userMaxBoostIntNew - remainingUserMaxBoostInt) | |
591 | 591 | (((LockParamsEntry(userAddressStr, userNumStr, userAmountNew, lockStartNew, lockDurationNew, k, b, period) ++ StatsEntry(pmtAmount, deltaDuration, 0, 0)) :+ HistoryEntry("lock", userAddressStr, pmtAmount, lockStart, lockDurationNew, k, b, i)) ++ [IntegerEntry(totalCachedGwxKEY, (totalCachedGwx + gwxDiff))]) | |
592 | 592 | } | |
593 | 593 | } | |
594 | 594 | } | |
595 | 595 | } | |
596 | 596 | ||
597 | 597 | ||
598 | 598 | ||
599 | 599 | @Callable(i) | |
600 | 600 | func claimWxBoost (lpAssetIdStr,userAddressStr) = if ((stakingContract != i.caller)) | |
601 | 601 | then throw("permissions denied") | |
602 | 602 | else { | |
603 | - | let $ | |
604 | - | let userBoostAvailable = $ | |
605 | - | let dataState = $ | |
606 | - | let debug = $ | |
603 | + | let $t02726427366 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, false) | |
604 | + | let userBoostAvailable = $t02726427366._1 | |
605 | + | let dataState = $t02726427366._2 | |
606 | + | let debug = $t02726427366._3 | |
607 | 607 | $Tuple2(dataState, [userBoostAvailable]) | |
608 | 608 | } | |
609 | 609 | ||
610 | 610 | ||
611 | 611 | ||
612 | 612 | @Callable(i) | |
613 | 613 | func claimWxBoostREADONLY (lpAssetIdStr,userAddressStr) = { | |
614 | - | let $ | |
615 | - | let userBoostAvailable = $ | |
616 | - | let dataState = $ | |
617 | - | let debug = $ | |
614 | + | let $t02749827599 = internalClaimWxBoost(lpAssetIdStr, userAddressStr, true) | |
615 | + | let userBoostAvailable = $t02749827599._1 | |
616 | + | let dataState = $t02749827599._2 | |
617 | + | let debug = $t02749827599._3 | |
618 | 618 | $Tuple2(nil, [userBoostAvailable, debug]) | |
619 | 619 | } | |
620 | 620 | ||
621 | 621 | ||
622 | 622 | ||
623 | 623 | @Callable(i) | |
624 | 624 | func unlock (userAddress) = { | |
625 | 625 | let userRecordArray = readLockParamsRecordOrFail(userAddress) | |
626 | 626 | let userNumStr = userRecordArray[IdxLockUserNum] | |
627 | 627 | let userAmount = parseIntValue(userRecordArray[IdxLockAmount]) | |
628 | 628 | let lockStart = parseIntValue(userRecordArray[IdxLockStart]) | |
629 | 629 | let lockDuration = parseIntValue(userRecordArray[IdxLockDuration]) | |
630 | 630 | let lockEnd = (lockStart + lockDuration) | |
631 | 631 | let cfgArray = readConfigArrayOrFail() | |
632 | 632 | let assetId = fromBase58String(cfgArray[IdxCfgAssetId]) | |
633 | 633 | let mathContract = addressFromStringValue(cfgArray[IdxCfgMathContract]) | |
634 | 634 | if ((lockEnd >= height)) | |
635 | 635 | then throw((("wait " + toString(lockEnd)) + " to unlock")) | |
636 | 636 | else if ((0 >= userAmount)) | |
637 | 637 | then throw("nothing to unlock") | |
638 | 638 | else { | |
639 | 639 | let period = valueOrElse(getInteger(mathContract, keyNextPeriod()), 0) | |
640 | 640 | (((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)) | |
641 | 641 | } | |
642 | 642 | } | |
643 | 643 | ||
644 | 644 | ||
645 | 645 | ||
646 | 646 | @Callable(i) | |
647 | 647 | func gwxUserInfoREADONLY (userAddress) = { | |
648 | 648 | let gwxAmount = calcCurrentGwxAmount(userAddress) | |
649 | 649 | $Tuple2(nil, [gwxAmount]) | |
650 | 650 | } | |
651 | 651 | ||
652 | 652 | ||
653 | 653 | ||
654 | 654 | @Callable(i) | |
655 | 655 | func getUserGwxAmountAtHeightREADONLY (userAddress,targetHeight) = { | |
656 | 656 | let gwxAmount = calcUserGwxAmountAtHeight(userAddress, targetHeight) | |
657 | 657 | $Tuple2(nil, gwxAmount) | |
658 | 658 | } | |
659 | 659 | ||
660 | 660 | ||
661 | 661 | ||
662 | 662 | @Callable(i) | |
663 | 663 | func setManager (pendingManagerPublicKey) = { | |
664 | 664 | let checkCaller = mustManager(i) | |
665 | 665 | if ((checkCaller == checkCaller)) | |
666 | 666 | then { | |
667 | 667 | let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey) | |
668 | 668 | if ((checkManagerPublicKey == checkManagerPublicKey)) | |
669 | 669 | then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)] | |
670 | 670 | else throw("Strict value is not equal to itself.") | |
671 | 671 | } | |
672 | 672 | else throw("Strict value is not equal to itself.") | |
673 | 673 | } | |
674 | 674 | ||
675 | 675 | ||
676 | 676 | ||
677 | 677 | @Callable(i) | |
678 | 678 | func confirmManager () = { | |
679 | 679 | let pm = pendingManagerPublicKeyOrUnit() | |
680 | 680 | let hasPM = if (isDefined(pm)) | |
681 | 681 | then true | |
682 | 682 | else throw("No pending manager") | |
683 | 683 | if ((hasPM == hasPM)) | |
684 | 684 | then { | |
685 | 685 | let checkPM = if ((i.callerPublicKey == value(pm))) | |
686 | 686 | then true | |
687 | 687 | else throw("You are not pending manager") | |
688 | 688 | if ((checkPM == checkPM)) | |
689 | 689 | then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())] | |
690 | 690 | else throw("Strict value is not equal to itself.") | |
691 | 691 | } | |
692 | 692 | else throw("Strict value is not equal to itself.") | |
693 | 693 | } | |
694 | 694 | ||
695 | 695 | ||
696 | 696 | @Verifier(tx) | |
697 | 697 | func verify () = { | |
698 | 698 | let targetPublicKey = match managerPublicKeyOrUnit() { | |
699 | 699 | case pk: ByteVector => | |
700 | 700 | pk | |
701 | 701 | case _: Unit => | |
702 | 702 | tx.senderPublicKey | |
703 | 703 | case _ => | |
704 | 704 | throw("Match error") | |
705 | 705 | } | |
706 | 706 | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
707 | 707 | } | |
708 | 708 |
github/deemru/w8io/026f985 110.76 ms ◑