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