tx · 8YsUZh4c4Y9TSzSjEZ6ZUoc2kjewLDmcucJvyd2ehK8H 3N9Q1fto4gNiBzBhunuF57xU7chekeJBzJb: -0.01000000 Waves 2021.11.24 03:51 [1804422] smart account 3N9Q1fto4gNiBzBhunuF57xU7chekeJBzJb > SELF 0.00000000 Waves
{ "type": 13, "id": "8YsUZh4c4Y9TSzSjEZ6ZUoc2kjewLDmcucJvyd2ehK8H", "fee": 1000000, "feeAssetId": null, "timestamp": 1637715191481, "version": 1, "sender": "3N9Q1fto4gNiBzBhunuF57xU7chekeJBzJb", "senderPublicKey": "5LCbyfeLnA6WFFq4M6L7AEzy8ktT8sL9A5JXoyuaxCCJ", "proofs": [ "NZQgrS4v3b8xqDssFbvN6kvcPmq5ry5A5fYudqa2AewoAHQ2JxLFVJorELGmpbRjkhK1CXsrQPxaY7r6G6Yuf8d" ], "script": "base64:AAIFAAAAAAAAABoIAhIDCgEIEgASBAoCCAESAwoBCBIECgIICAAAADwAAAAABlNDQUxFOAAAAAAAAAAACAAAAAAFTVVMVDgAAAAAAAX14QAAAAAAB1NDQUxFMTgAAAAAAAAAABIAAAAABk1VTFQxOAkAATYAAAABAA3gtrOnZAAAAAAAAANTRVACAAAAAl9fAAAAAA5QT09MV0VJR0hUTVVMVAUAAAAFTVVMVDgBAAAAD2dldFN0cmluZ09yRmFpbAAAAAEAAAADa2V5CQEAAAATdmFsdWVPckVycm9yTWVzc2FnZQAAAAIJAAQiAAAAAQUAAAADa2V5CQABLAAAAAIJAAEsAAAAAgIAAAAPbWFuZGF0b3J5IHRoaXMuBQAAAANrZXkCAAAADyBpcyBub3QgZGVmaW5lZAEAAAAYZ2V0U3RyaW5nQnlBZGRyZXNzT3JGYWlsAAAAAgAAAAdhZGRyZXNzAAAAA2tleQkBAAAAE3ZhbHVlT3JFcnJvck1lc3NhZ2UAAAACCQAEHQAAAAIFAAAAB2FkZHJlc3MFAAAAA2tleQkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACAgA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"applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9PLYxB4AW9KUP8wjv6WP3zN8PDXSz1R7DAQGjd4ckNxY Next: 7oskVMXXvLPLv1vqySq2iPhJG3B6FfXhYCezotG3DofP Diff:
Old | New | Differences | |
---|---|---|---|
292 | 292 | func claimWxREADONLY (lpAssetIdStr,userAddressStr) = { | |
293 | 293 | let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr) | |
294 | 294 | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
295 | + | let claimedByUserKEY = keyClaimedByUser(lpAssetIdStr, userAddressStr) | |
295 | 296 | let stakedByUser = readStaked(stakedByUserKEY) | |
296 | 297 | let stakedTotal = readStaked(stakedTotalKEY) | |
298 | + | let claimedByUser = getIntOrZero(this, claimedByUserKEY) | |
297 | 299 | let poolAddressStr = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr)) | |
298 | 300 | let poolWeightMult = MULT8 | |
299 | 301 | let poolWeight = getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr)) | |
304 | 306 | else (height - emissionStartBlock) | |
305 | 307 | let poolWxEmission = fraction((wxEmissionPerBlock * passedBlocks), poolWeight, poolWeightMult) | |
306 | 308 | let userWxReward = fraction(poolWxEmission, stakedByUser, stakedTotal) | |
307 | - | let $ | |
308 | - | let wxToClaimUserNew = $ | |
309 | - | let integralSTATE = $ | |
310 | - | let debug = $ | |
311 | - | $Tuple2(nil, makeString(["%s%s%d%d%s", lpAssetIdStr, userAddressStr, toString(userWxReward), | |
309 | + | let $t01494715059 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0) | |
310 | + | let wxToClaimUserNew = $t01494715059._1 | |
311 | + | let integralSTATE = $t01494715059._2 | |
312 | + | let debug = $t01494715059._3 | |
313 | + | $Tuple2(nil, makeString(["%s%s%d%d%s", lpAssetIdStr, userAddressStr, toString(userWxReward), toString(claimedByUser), debug], SEP)) | |
312 | 314 | } | |
313 | 315 | ||
314 | 316 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let SCALE8 = 8 | |
5 | 5 | ||
6 | 6 | let MULT8 = 100000000 | |
7 | 7 | ||
8 | 8 | let SCALE18 = 18 | |
9 | 9 | ||
10 | 10 | let MULT18 = toBigInt(1000000000000000000) | |
11 | 11 | ||
12 | 12 | let SEP = "__" | |
13 | 13 | ||
14 | 14 | let POOLWEIGHTMULT = MULT8 | |
15 | 15 | ||
16 | 16 | func getStringOrFail (key) = valueOrErrorMessage(getString(key), (("mandatory this." + key) + " is not defined")) | |
17 | 17 | ||
18 | 18 | ||
19 | 19 | func getStringByAddressOrFail (address,key) = valueOrErrorMessage(getString(address, key), (((("mandatory " + toString(address)) + ".") + key) + " is not defined")) | |
20 | 20 | ||
21 | 21 | ||
22 | 22 | func getIntOrZero (address,key) = valueOrElse(getInteger(address, key), 0) | |
23 | 23 | ||
24 | 24 | ||
25 | 25 | func getIntOrDefault (address,key,defaultVal) = valueOrElse(getInteger(address, key), defaultVal) | |
26 | 26 | ||
27 | 27 | ||
28 | 28 | func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), (("mandatory this." + key) + " is not defined")) | |
29 | 29 | ||
30 | 30 | ||
31 | 31 | func keyFactoryAddress () = "%s%s__config__factoryAddress" | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | let IdxFactoryCfgStakingDapp = 1 | |
35 | 35 | ||
36 | 36 | let IdxFactoryCfgBoostingDapp = 2 | |
37 | 37 | ||
38 | 38 | let IdxFactoryCfgIdoDapp = 3 | |
39 | 39 | ||
40 | 40 | let IdxFactoryCfgTeamDapp = 4 | |
41 | 41 | ||
42 | 42 | let IdxFactoryCfgEmissionDapp = 5 | |
43 | 43 | ||
44 | 44 | let IdxFactoryCfgRestDapp = 6 | |
45 | 45 | ||
46 | 46 | let IdxFactoryCfgSlippageDapp = 7 | |
47 | 47 | ||
48 | 48 | func keyFactoryCfg () = "%s__factoryConfig" | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | func keyFactoryLp2AssetsMapping (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP) | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | func keyFactoryLpList () = "%s__lpTokensList" | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func keyFactoryLpAssetToPoolContractAddress (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP) | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | func keyFactoryPoolWeight (contractAddress) = makeString(["%s%s", "poolWeight", contractAddress], SEP) | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | func readFactoryAddressOrFail () = addressFromStringValue(getStringOrFail(keyFactoryAddress())) | |
64 | 64 | ||
65 | 65 | ||
66 | 66 | func readLpList () = split(valueOrElse(getString(readFactoryAddressOrFail(), keyFactoryLpList()), ""), SEP) | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | func readFactoryCfgOrFail (factory) = split(getStringByAddressOrFail(factory, keyFactoryCfg()), SEP) | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func getBoostingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgBoostingDapp]) | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | func getEmissionAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgEmissionDapp]) | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func getStakingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgStakingDapp]) | |
79 | 79 | ||
80 | 80 | ||
81 | 81 | func keyEmissionRatePerBlockCurrent () = "%s%s__ratePerBlock__current" | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func keyEmissionRatePerBlockMaxCurrent () = "%s%s__ratePerBlockMax__current" | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func keyEmissionStartBlock () = "%s%s__emission__startBlock" | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func keyEmissionDurationInBlocks () = "%s%s__emission__duration" | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | func keyEmissionEndBlock () = "%s%s__emission__endBlock" | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | func keyStakedByUser (userAddressStr,lpAssetIdStr) = makeString(["%s%s%s__staked", userAddressStr, lpAssetIdStr], SEP) | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | func keyStakedTotal (lpAssetIdStr) = ("%s%s%s__staked__total__" + lpAssetIdStr) | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func keyClaimedByUser (userAddressStr,lpAssetIdStr) = makeString(["%s%s%s__claimed", userAddressStr, lpAssetIdStr], SEP) | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func keyClaimedTotal (lpAssetIdStr) = makeString(["%s%s%s__claimed", "total", lpAssetIdStr], SEP) | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | func readStaked (key) = valueOrElse(getInteger(this, key), 0) | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | func keyLastTotalLpBalance (lpAssetId) = makeString(["%s%s%s", lpAssetId, "total", "bal"], SEP) | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | func keyLastUserLpBalance (lpAssetId,userAddress) = makeString(["%s%s%s", lpAssetId, userAddress, "bal"], SEP) | |
115 | 115 | ||
116 | 116 | ||
117 | 117 | func keyTotalLpBalanceIntegral (lpAssetId) = makeString(["%s%s%s", lpAssetId, "total", "balINT"], SEP) | |
118 | 118 | ||
119 | 119 | ||
120 | 120 | func keyUserLpBalanceIntegral (lpAssetId,userAddress) = makeString(["%s%s%s", lpAssetId, userAddress, "balINT"], SEP) | |
121 | 121 | ||
122 | 122 | ||
123 | 123 | func keyTotalLpBalanceIntegralLastUpdHeight (lpAssetId) = makeString(["%s%s%s", lpAssetId, "total", "lastUpd"], SEP) | |
124 | 124 | ||
125 | 125 | ||
126 | 126 | func keyUserLpBalanceIntegralLastUpdHeight (lpAssetId,userAddress) = makeString(["%s%s%s", lpAssetId, userAddress, "lastUpd"], SEP) | |
127 | 127 | ||
128 | 128 | ||
129 | 129 | func keyWxPerLpIntegral (lpAssetId) = makeString(["%s%s%s%s", lpAssetId, "common", "lpInt"], SEP) | |
130 | 130 | ||
131 | 131 | ||
132 | 132 | func keyWxPerLpIntegralLastUpdHeight (lpAssetId) = makeString(["%s%s%s%s", lpAssetId, "common", "lpIntH"], SEP) | |
133 | 133 | ||
134 | 134 | ||
135 | 135 | func keyWxToClaimUser (lpAssetId,userAddress) = makeString(["%s%s%s%s", lpAssetId, userAddress, "lpInt"], SEP) | |
136 | 136 | ||
137 | 137 | ||
138 | 138 | func keyWxPerLpIntegralUserLastUpdHeight (lpAssetId,userAddress) = makeString(["%s%s%s%s", lpAssetId, userAddress, "lpIntH"], SEP) | |
139 | 139 | ||
140 | 140 | ||
141 | 141 | func keyWxPerLp (lpAssetId) = makeString(["%s", lpAssetId, "wxPerLp"], SEP) | |
142 | 142 | ||
143 | 143 | ||
144 | 144 | func keyWxPerLpIntegralUserLast (lpAssetId,userAddress) = makeString(["%s%s%s%s", lpAssetId, userAddress, "uIntL"], SEP) | |
145 | 145 | ||
146 | 146 | ||
147 | 147 | func keyOperationHistoryRecord (type,userAddress,txId58) = makeString(["%s%s%s%s__history", type, userAddress, txId58], SEP) | |
148 | 148 | ||
149 | 149 | ||
150 | 150 | func formatHistoryRecord (userAddress,lpAssetId,type,amount) = makeString(["%s%s%s%d%d%d", userAddress, lpAssetId, type, toString(height), toString(lastBlock.timestamp), toString(amount)], SEP) | |
151 | 151 | ||
152 | 152 | ||
153 | 153 | func OperationHistoryEntry (type,userAddress,lpAssetId,amount,txId) = StringEntry(keyOperationHistoryRecord(type, userAddress, toBase58String(txId)), formatHistoryRecord(userAddress, lpAssetId, type, amount)) | |
154 | 154 | ||
155 | 155 | ||
156 | 156 | let factoryContract = readFactoryAddressOrFail() | |
157 | 157 | ||
158 | 158 | let factoryCfg = readFactoryCfgOrFail(factoryContract) | |
159 | 159 | ||
160 | 160 | let emissionContract = getEmissionAddressOrFail(factoryCfg) | |
161 | 161 | ||
162 | 162 | func calcWxPerLpIntegralUserLast (stakedByUser,wxPerLpIntegralUserLastUpdHeightOrZero,wxPerLpIntegralNew,wxPerLpIntegralUserLastKEY) = if (if ((wxPerLpIntegralUserLastUpdHeightOrZero == 0)) | |
163 | 163 | then (stakedByUser > 0) | |
164 | 164 | else false) | |
165 | 165 | then 0 | |
166 | 166 | else if ((stakedByUser == 0)) | |
167 | 167 | then wxPerLpIntegralNew | |
168 | 168 | else if (if ((wxPerLpIntegralUserLastUpdHeightOrZero > 0)) | |
169 | 169 | then (stakedByUser > 0) | |
170 | 170 | else false) | |
171 | 171 | then getIntOrFail(this, wxPerLpIntegralUserLastKEY) | |
172 | 172 | else throw("calcWxPerLpIntegralUserLast: unexpected state") | |
173 | 173 | ||
174 | 174 | ||
175 | 175 | func refreshINTEGRALS (lpAssetIdStr,userAddressStr,poolAddressStr,lpDeltaAmount) = { | |
176 | 176 | let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr) | |
177 | 177 | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
178 | 178 | let stakedByUser = readStaked(stakedByUserKEY) | |
179 | 179 | let stakedTotal = readStaked(stakedTotalKEY) | |
180 | 180 | let poolWeight = getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr)) | |
181 | 181 | let emissionStartBlock = getIntOrFail(emissionContract, keyEmissionStartBlock()) | |
182 | 182 | let wxEmissionPerBlock = getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent()) | |
183 | 183 | let poolWxEmissionPerBlock = fraction(wxEmissionPerBlock, poolWeight, POOLWEIGHTMULT) | |
184 | 184 | let wxPerLpIntegralKEY = keyWxPerLpIntegral(lpAssetIdStr) | |
185 | 185 | let wxPerLpIntegralLastUpdHeightKEY = keyWxPerLpIntegralLastUpdHeight(lpAssetIdStr) | |
186 | 186 | let wxToClaimUserKEY = keyWxToClaimUser(lpAssetIdStr, userAddressStr) | |
187 | 187 | let wxPerLpIntegralUserLastUpdHeightKEY = keyWxPerLpIntegralUserLastUpdHeight(lpAssetIdStr, userAddressStr) | |
188 | 188 | let wxPerLpKEY = keyWxPerLp(lpAssetIdStr) | |
189 | 189 | let wxPerLpIntegralUserLastKEY = keyWxPerLpIntegralUserLast(lpAssetIdStr, userAddressStr) | |
190 | 190 | let wxPerLpIntegralLastUpdHeight = getIntOrDefault(this, wxPerLpIntegralLastUpdHeightKEY, emissionStartBlock) | |
191 | 191 | let wxPerLpIntegral = getIntOrZero(this, wxPerLpIntegralKEY) | |
192 | 192 | let wxToClaimUser = getIntOrZero(this, wxToClaimUserKEY) | |
193 | 193 | let wxPerLpIntegralUserLastUpdHeightOrZero = getIntOrZero(this, wxPerLpIntegralUserLastUpdHeightKEY) | |
194 | 194 | let wxPerLpOrZero = getIntOrZero(this, wxPerLpKEY) | |
195 | 195 | let dh = max([(height - wxPerLpIntegralLastUpdHeight), 0]) | |
196 | 196 | let wxPerLp = if ((wxPerLpOrZero != 0)) | |
197 | 197 | then wxPerLpOrZero | |
198 | 198 | else fraction(poolWxEmissionPerBlock, MULT8, stakedTotal) | |
199 | 199 | let stakedTotalNew = (stakedTotal + lpDeltaAmount) | |
200 | 200 | let wxPerLpIntegralNew = (wxPerLpIntegral + (wxPerLp * dh)) | |
201 | 201 | let wxPerLpIntegralUserLast = calcWxPerLpIntegralUserLast(stakedByUser, wxPerLpIntegralUserLastUpdHeightOrZero, wxPerLpIntegralNew, wxPerLpIntegralUserLastKEY) | |
202 | 202 | let wxToClaimUserNew = (wxToClaimUser + fraction((wxPerLpIntegralNew - wxPerLpIntegralUserLast), stakedByUser, MULT8)) | |
203 | 203 | let wxPerLpIntegralUserLastNew = wxPerLpIntegralNew | |
204 | 204 | let wxPerLpNew = (poolWxEmissionPerBlock / stakedTotalNew) | |
205 | 205 | let wxPerLpIntegralLastUpdHeightNew = height | |
206 | 206 | let wxPerLpIntegralUserLastUpdHeightNew = height | |
207 | 207 | let debug = makeString([toString(wxToClaimUserNew), toString(wxPerLpIntegralNew), toString(wxPerLpIntegralUserLast), toString(stakedByUser), toString(dh), toString(wxPerLp), toString(stakedTotal), toString(poolWxEmissionPerBlock), toString(wxEmissionPerBlock), toString(poolWeight), toString(height)], "::") | |
208 | 208 | $Tuple3(wxToClaimUserNew, [IntegerEntry(wxPerLpIntegralKEY, wxPerLpIntegralNew), IntegerEntry(wxPerLpIntegralLastUpdHeightKEY, wxPerLpIntegralLastUpdHeightNew), IntegerEntry(wxToClaimUserKEY, wxToClaimUserNew), IntegerEntry(wxPerLpIntegralUserLastUpdHeightKEY, wxPerLpIntegralUserLastUpdHeightNew), IntegerEntry(wxPerLpKEY, wxPerLpNew), IntegerEntry(wxPerLpIntegralUserLastKEY, wxPerLpIntegralUserLastNew)], debug) | |
209 | 209 | } | |
210 | 210 | ||
211 | 211 | ||
212 | 212 | @Callable(i) | |
213 | 213 | func constructor (factoryAddressStr) = if ((i.caller != this)) | |
214 | 214 | then throw("not authorized") | |
215 | 215 | else [StringEntry(keyFactoryAddress(), factoryAddressStr)] | |
216 | 216 | ||
217 | 217 | ||
218 | 218 | ||
219 | 219 | @Callable(i) | |
220 | 220 | func stake () = if ((size(i.payments) != 1)) | |
221 | 221 | then throw("invalid payment - exact one payment must be attached") | |
222 | 222 | else { | |
223 | 223 | let pmt = i.payments[0] | |
224 | 224 | let lpAssetId = value(pmt.assetId) | |
225 | 225 | let lpAssetIdStr = toBase58String(lpAssetId) | |
226 | 226 | let amount = pmt.amount | |
227 | 227 | let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr)) | |
228 | 228 | let callerStr = toString(i.caller) | |
229 | 229 | let userAddressStr = if ((callerStr == poolAddressStr)) | |
230 | 230 | then toString(i.originCaller) | |
231 | 231 | else callerStr | |
232 | 232 | let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr) | |
233 | 233 | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
234 | 234 | let stakedByUser = readStaked(stakedByUserKEY) | |
235 | 235 | let stakedTotal = readStaked(stakedTotalKEY) | |
236 | 236 | let $t01127211389 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, amount) | |
237 | 237 | let wxToClaimUserNew = $t01127211389._1 | |
238 | 238 | let integralSTATE = $t01127211389._2 | |
239 | 239 | let debug = $t01127211389._3 | |
240 | 240 | ([IntegerEntry(stakedByUserKEY, (stakedByUser + amount)), IntegerEntry(stakedTotalKEY, (stakedTotal + amount)), OperationHistoryEntry("stake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) | |
241 | 241 | } | |
242 | 242 | ||
243 | 243 | ||
244 | 244 | ||
245 | 245 | @Callable(i) | |
246 | 246 | func unstake (lpAssetIdStr,amount) = { | |
247 | 247 | let userAddressStr = toString(i.caller) | |
248 | 248 | let lpAssetId = fromBase58String(lpAssetIdStr) | |
249 | 249 | let poolAddressStr = valueOrErrorMessage(getString(factoryContract, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr)) | |
250 | 250 | let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr) | |
251 | 251 | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
252 | 252 | let stakedByUser = readStaked(stakedByUserKEY) | |
253 | 253 | let stakedTotal = readStaked(stakedTotalKEY) | |
254 | 254 | let $t01220612324 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, -(amount)) | |
255 | 255 | let wxToClaimUserNew = $t01220612324._1 | |
256 | 256 | let integralSTATE = $t01220612324._2 | |
257 | 257 | let debug = $t01220612324._3 | |
258 | 258 | if ((amount > stakedByUser)) | |
259 | 259 | then throw("passed amount is less then available") | |
260 | 260 | else ([IntegerEntry(stakedByUserKEY, (stakedByUser - amount)), IntegerEntry(stakedTotalKEY, (stakedTotal - amount)), ScriptTransfer(i.caller, amount, lpAssetId), OperationHistoryEntry("unstake", userAddressStr, lpAssetIdStr, amount, i.transactionId)] ++ integralSTATE) | |
261 | 261 | } | |
262 | 262 | ||
263 | 263 | ||
264 | 264 | ||
265 | 265 | @Callable(i) | |
266 | 266 | func claimWx (lpAssetIdStr) = { | |
267 | 267 | let userAddress = i.caller | |
268 | 268 | let userAddressStr = toString(i.caller) | |
269 | 269 | let poolAddressStr = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr)) | |
270 | 270 | let claimedByUserKEY = keyClaimedByUser(lpAssetIdStr, userAddressStr) | |
271 | 271 | let claimedTotalKEY = keyClaimedTotal(lpAssetIdStr) | |
272 | 272 | let claimedByUser = getIntOrZero(this, claimedByUserKEY) | |
273 | 273 | let claimedTotal = getIntOrZero(this, claimedTotalKEY) | |
274 | 274 | let $t01317613288 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0) | |
275 | 275 | let wxToClaimUserNew = $t01317613288._1 | |
276 | 276 | let integralSTATE = $t01317613288._2 | |
277 | 277 | let debug = $t01317613288._3 | |
278 | 278 | let availableToClaim = (wxToClaimUserNew - claimedByUser) | |
279 | 279 | if ((0 >= availableToClaim)) | |
280 | 280 | then throw("nothing to claim") | |
281 | 281 | else { | |
282 | 282 | let wxAssetId = if ($isInstanceOf(invoke(emissionContract, "emit", [availableToClaim], nil), "ByteVector")) | |
283 | 283 | then invoke(emissionContract, "emit", [availableToClaim], nil) | |
284 | 284 | else throw("Couldn't cast Any to ByteVector") | |
285 | 285 | [IntegerEntry(claimedByUserKEY, (claimedByUser + availableToClaim)), IntegerEntry(claimedTotalKEY, (claimedTotal + availableToClaim)), ScriptTransfer(userAddress, availableToClaim, wxAssetId), OperationHistoryEntry("claim", userAddressStr, lpAssetIdStr, availableToClaim, i.transactionId)] | |
286 | 286 | } | |
287 | 287 | } | |
288 | 288 | ||
289 | 289 | ||
290 | 290 | ||
291 | 291 | @Callable(i) | |
292 | 292 | func claimWxREADONLY (lpAssetIdStr,userAddressStr) = { | |
293 | 293 | let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr) | |
294 | 294 | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
295 | + | let claimedByUserKEY = keyClaimedByUser(lpAssetIdStr, userAddressStr) | |
295 | 296 | let stakedByUser = readStaked(stakedByUserKEY) | |
296 | 297 | let stakedTotal = readStaked(stakedTotalKEY) | |
298 | + | let claimedByUser = getIntOrZero(this, claimedByUserKEY) | |
297 | 299 | let poolAddressStr = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetIdStr)) | |
298 | 300 | let poolWeightMult = MULT8 | |
299 | 301 | let poolWeight = getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr)) | |
300 | 302 | let wxEmissionPerBlock = getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent()) | |
301 | 303 | let emissionStartBlock = getIntOrFail(emissionContract, keyEmissionStartBlock()) | |
302 | 304 | let passedBlocks = if ((emissionStartBlock > height)) | |
303 | 305 | then 0 | |
304 | 306 | else (height - emissionStartBlock) | |
305 | 307 | let poolWxEmission = fraction((wxEmissionPerBlock * passedBlocks), poolWeight, poolWeightMult) | |
306 | 308 | let userWxReward = fraction(poolWxEmission, stakedByUser, stakedTotal) | |
307 | - | let $ | |
308 | - | let wxToClaimUserNew = $ | |
309 | - | let integralSTATE = $ | |
310 | - | let debug = $ | |
311 | - | $Tuple2(nil, makeString(["%s%s%d%d%s", lpAssetIdStr, userAddressStr, toString(userWxReward), | |
309 | + | let $t01494715059 = refreshINTEGRALS(lpAssetIdStr, userAddressStr, poolAddressStr, 0) | |
310 | + | let wxToClaimUserNew = $t01494715059._1 | |
311 | + | let integralSTATE = $t01494715059._2 | |
312 | + | let debug = $t01494715059._3 | |
313 | + | $Tuple2(nil, makeString(["%s%s%d%d%s", lpAssetIdStr, userAddressStr, toString(userWxReward), toString(claimedByUser), debug], SEP)) | |
312 | 314 | } | |
313 | 315 | ||
314 | 316 |
github/deemru/w8io/026f985 42.80 ms ◑