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