tx · 5AfqGhPdmUoZRUg3gK2jdYzHPb95gtSppa9aqJEUSsyX 3MsNhK6uve98J6DeqbuwGFBRh9GoHPGUFgp: -0.01000000 Waves 2021.11.25 18:23 [1806743] smart account 3MsNhK6uve98J6DeqbuwGFBRh9GoHPGUFgp > SELF 0.00000000 Waves
{ "type": 13, "id": "5AfqGhPdmUoZRUg3gK2jdYzHPb95gtSppa9aqJEUSsyX", "fee": 1000000, "feeAssetId": null, "timestamp": 1637853820283, "version": 1, "sender": "3MsNhK6uve98J6DeqbuwGFBRh9GoHPGUFgp", "senderPublicKey": "86RHVxKovtU7yKnepY8wKsd8niDxGAsiwuA1XA1DNqrS", "proofs": [ "4kyvgmnFeLiCgF7nG7C3XSWX3ASKSsse6uFEECB1wuLiyvZVNdLw13sxz1w1LVBD1Ju8y5ZP7pa6QohzDg9F94vs" ], "script": "base64:AAIFAAAAAAAAACwIAhIDCgEIEgMKAQgSBAoCCAgSAwoBCBIHCgUBAQEICBIAEgMKAQgSAwoBCAAAAD8AAAAABlNDQUxFOAAAAAAAAAAACAAAAAAFTVVMVDgAAAAAAAX14QAAAAAAB1NDQUxFMTgAAAAAAAAAABIAAAAABk1VTFQxOAkAATYAAAABAA3gtrOnZAAAAAAAAANTRVACAAAAAl9fAAAAAA5pZHhQb29sQWRkcmVzcwAAAAAAAAAAAQAAAAANaWR4UG9vbFN0YXR1cwAAAAAAAAAAAgAAAAAQaWR4UG9vbExQQXNzZXRJZAAAAAAAAAAAAwAAAAANaWR4QW10QXNzZXRJZAAAAAAAAAAABAAAAAAPaWR4UHJpY2VBc3NldElkAAAAAAAAAAAFAAAAAA5pZHhBbXRBc3NldERjbQAAAAAAAAAABgAAAAAQaWR4UHJpY2VBc3NldERjbQAAAAAAAAAABwAAAAAOaWR4SUFtdEFzc2V0SWQAAAAAAAAAAAgAAAAAEGlkeElQcmljZUFzc2V0SWQAAAAAAAAAAAkAAAAADWlkeExQQXNzZXREY20AAAAAAAAAAAoBAAAAD2dldFN0cm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MAAAAAgUAAAALdXNlckFkZHJlc3MFAAAAA25pbAUAAAADbmlsAgAAAAlMaXN0W0FueV0JAAP8AAAABAUAAAAQYm9vc3RpbmdDb250cmFjdAIAAAATZ3d4VXNlckluZm9SRUFET05MWQkABEwAAAACBQAAAAt1c2VyQWRkcmVzcwUAAAADbmlsBQAAAANuaWwJAAACAAAAAQIAAAAeQ291bGRuJ3QgY2FzdCBBbnkgdG8gTGlzdFtBbnldBAAAAAlnd3hBbW91bnQDCQAAAQAAAAIJAAGRAAAAAgUAAAAPZ3d4VXNlckluZm9MSVNUAAAAAAAAAAAAAgAAAANJbnQJAAGRAAAAAgUAAAAPZ3d4VXNlckluZm9MSVNUAAAAAAAAAAAACQAAAgAAAAECAAAAGENvdWxkbid0IGNhc3QgQW55IHRvIEludAkABRQAAAACBQAAAANuaWwJAAS5AAAAAgkABEwAAAACAgAAAAIlZAkABEwAAAACCQABpAAAAAEFAAAACWd3eEFtb3VudAUAAAADbmlsBQAAAANTRVAAAAAATdfgZw==", "chainId": 84, "height": 1806743, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: QQWZN9wrsZVV8xQbUFRyQRg7SibZZVnXunGngfRUh19 Next: Gvc7UUS7ATgfcVC7LAiJT8AqKjgXwbAX1Naaowa6EkYp Full:
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 idxPoolAddress = 1 | |
15 | 15 | ||
16 | 16 | let idxPoolStatus = 2 | |
17 | 17 | ||
18 | 18 | let idxPoolLPAssetId = 3 | |
19 | 19 | ||
20 | 20 | let idxAmtAssetId = 4 | |
21 | 21 | ||
22 | 22 | let idxPriceAssetId = 5 | |
23 | 23 | ||
24 | 24 | let idxAmtAssetDcm = 6 | |
25 | 25 | ||
26 | 26 | let idxPriceAssetDcm = 7 | |
27 | 27 | ||
28 | 28 | let idxIAmtAssetId = 8 | |
29 | 29 | ||
30 | 30 | let idxIPriceAssetId = 9 | |
31 | 31 | ||
32 | 32 | let idxLPAssetDcm = 10 | |
33 | 33 | ||
34 | 34 | func getStringOrFail (key) = valueOrErrorMessage(getString(key), (("mandatory this." + key) + " is not defined")) | |
35 | 35 | ||
36 | 36 | ||
37 | 37 | func getStringByAddressOrFail (address,key) = valueOrErrorMessage(getString(address, key), (((("mandatory " + toString(address)) + ".") + key) + " is not defined")) | |
38 | 38 | ||
39 | 39 | ||
40 | 40 | func getIntOrZero (address,key) = valueOrElse(getInteger(address, key), 0) | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), (("mandatory this." + key) + " is not defined")) | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | func keyFactoryAddress () = "%s%s__config__factoryAddress" | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | let IdxFactoryCfgStakingDapp = 1 | |
50 | 50 | ||
51 | 51 | let IdxFactoryCfgBoostingDapp = 2 | |
52 | 52 | ||
53 | 53 | let IdxFactoryCfgIdoDapp = 3 | |
54 | 54 | ||
55 | 55 | let IdxFactoryCfgTeamDapp = 4 | |
56 | 56 | ||
57 | 57 | let IdxFactoryCfgEmissionDapp = 5 | |
58 | 58 | ||
59 | 59 | let IdxFactoryCfgRestDapp = 6 | |
60 | 60 | ||
61 | 61 | let IdxFactoryCfgSlippageDapp = 7 | |
62 | 62 | ||
63 | 63 | func keyFactoryCfg () = "%s__factoryConfig" | |
64 | 64 | ||
65 | 65 | ||
66 | 66 | func keyFactoryLp2AssetsMapping (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP) | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | func keyFactoryLpList () = "%s__lpTokensList" | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func keyFactoryLpAssetToPoolContractAddress (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP) | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | func keyFactoryPoolWeight (contractAddress) = makeString(["%s%s", "poolWeight", contractAddress], SEP) | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func readFactoryAddressOrFail () = addressFromStringValue(getStringOrFail(keyFactoryAddress())) | |
79 | 79 | ||
80 | 80 | ||
81 | 81 | func readLpList () = split(valueOrElse(getString(readFactoryAddressOrFail(), keyFactoryLpList()), ""), SEP) | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func readFactoryCfgOrFail (factory) = split(getStringByAddressOrFail(factory, keyFactoryCfg()), SEP) | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func getBoostingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgBoostingDapp]) | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func getEmissionAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgEmissionDapp]) | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | func getStakingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgStakingDapp]) | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | func keyBoostCfg () = "%s__config" | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | func keyBoostingLockParamTotalAmount () = "%s%s__stats__activeTotalLocked" | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func keyBoostingStatsLocksDurationSumInBlocks () = "%s%s__stats__locksDurationSumInBlocks" | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func keyBoostingStatsLocksCount () = "%s%s__stats__locksCount" | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | func keyBoostingStatsUsersCount () = "%s%s__stats__activeUsersCount" | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | func keyUser2NumMapping (userAddress) = makeString(["%s%s%s__mapping__user2num", userAddress], SEP) | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | func keyNum2UserMapping (num) = makeString(["%s%s%s__mapping__num2user", num], SEP) | |
115 | 115 | ||
116 | 116 | ||
117 | 117 | func keyLockParamUserAmount (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "amount"], SEP) | |
118 | 118 | ||
119 | 119 | ||
120 | 120 | func keyLockParamStartBlock (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "start"], SEP) | |
121 | 121 | ||
122 | 122 | ||
123 | 123 | func keyLockParamDuration (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "duration"], SEP) | |
124 | 124 | ||
125 | 125 | ||
126 | 126 | func keyLockParamK (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "k"], SEP) | |
127 | 127 | ||
128 | 128 | ||
129 | 129 | func keyLockParamB (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "b"], SEP) | |
130 | 130 | ||
131 | 131 | ||
132 | 132 | func keyLockParamByPeriodK (userNum,period) = makeString(["%s%d%s%d__paramByPeriod", userNum, "k", period], SEP) | |
133 | 133 | ||
134 | 134 | ||
135 | 135 | func keyLockParamByPeriodB (userNum,period) = makeString(["%s%d%s%d__paramByPeriod", userNum, "b", period], SEP) | |
136 | 136 | ||
137 | 137 | ||
138 | 138 | func keyStakedByUser (userAddressStr,lpAssetIdStr) = makeString(["%s%s%s__staked", userAddressStr, lpAssetIdStr], SEP) | |
139 | 139 | ||
140 | 140 | ||
141 | 141 | func keyStakedTotal (lpAssetIdStr) = ("%s%s%s__staked__total__" + lpAssetIdStr) | |
142 | 142 | ||
143 | 143 | ||
144 | 144 | func keyClaimedByUser (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimed", userAddressStr, lpAssetIdStr], SEP) | |
145 | 145 | ||
146 | 146 | ||
147 | 147 | func keyClaimedByUserMinReward (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimedMinReward", userAddressStr, lpAssetIdStr], SEP) | |
148 | 148 | ||
149 | 149 | ||
150 | 150 | func keyClaimedByUserBoostReward (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimedBoostReward", userAddressStr, lpAssetIdStr], SEP) | |
151 | 151 | ||
152 | 152 | ||
153 | 153 | func keyEmissionRatePerBlockCurrent () = "%s%s__ratePerBlock__current" | |
154 | 154 | ||
155 | 155 | ||
156 | 156 | func keyEmissionRatePerBlockMaxCurrent () = "%s%s__ratePerBlockMax__current" | |
157 | 157 | ||
158 | 158 | ||
159 | 159 | func keyEmissionStartBlock () = "%s%s__emission__startBlock" | |
160 | 160 | ||
161 | 161 | ||
162 | 162 | func keyEmissionDurationInBlocks () = "%s%s__emission__duration" | |
163 | 163 | ||
164 | 164 | ||
165 | 165 | func keyEmissionEndBlock () = "%s%s__emission__endBlock" | |
166 | 166 | ||
167 | 167 | ||
168 | 168 | func internalCurrentRewardRate (factoryContract,stakingContract,emissionContract,lpAssetId) = { | |
169 | 169 | let poolAddressStr = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetId)) | |
170 | 170 | let poolWeightMult = MULT8 | |
171 | 171 | let poolWeight = getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr)) | |
172 | 172 | let wxEmissionPerBlock = getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent()) | |
173 | 173 | let wxEmissionPerBlockMax = getIntOrFail(emissionContract, keyEmissionRatePerBlockMaxCurrent()) | |
174 | 174 | let poolWxEmissionPerBlock = fraction(wxEmissionPerBlock, poolWeight, poolWeightMult) | |
175 | 175 | let poolWxEmissionPerBlockMax = fraction(wxEmissionPerBlockMax, poolWeight, poolWeightMult) | |
176 | 176 | let maxFactor = (3 * MULT8) | |
177 | 177 | let totalLpStaked = getIntOrZero(stakingContract, keyStakedTotal(lpAssetId)) | |
178 | 178 | [poolWxEmissionPerBlock, maxFactor, totalLpStaked] | |
179 | 179 | } | |
180 | 180 | ||
181 | 181 | ||
182 | 182 | @Callable(i) | |
183 | 183 | func constructor (factoryAddress) = if ((i.caller != this)) | |
184 | 184 | then throw("not authorized") | |
185 | 185 | else [StringEntry(keyFactoryAddress(), factoryAddress)] | |
186 | 186 | ||
187 | 187 | ||
188 | 188 | ||
189 | 189 | @Callable(i) | |
190 | 190 | func currentRewardRateREADONLY (lpAssetId) = { | |
191 | 191 | let factoryContract = readFactoryAddressOrFail() | |
192 | 192 | let factoryCfg = readFactoryCfgOrFail(factoryContract) | |
193 | 193 | let stakingContract = getStakingAddressOrFail(factoryCfg) | |
194 | 194 | let emissionContract = getEmissionAddressOrFail(factoryCfg) | |
195 | 195 | let rewardData = internalCurrentRewardRate(factoryContract, stakingContract, emissionContract, lpAssetId) | |
196 | 196 | let wxEmissionPerBlock = rewardData[0] | |
197 | 197 | let maxFactor = rewardData[1] | |
198 | 198 | let totalLpStaked = rewardData[2] | |
199 | 199 | $Tuple2(nil, makeString(["%d%d%d", toString(wxEmissionPerBlock), toString(maxFactor), toString(totalLpStaked)], SEP)) | |
200 | 200 | } | |
201 | 201 | ||
202 | 202 | ||
203 | 203 | ||
204 | 204 | @Callable(i) | |
205 | 205 | func currentUserRewardRateREADONLY (lpAssetId,userAddress) = { | |
206 | 206 | let factoryContract = readFactoryAddressOrFail() | |
207 | 207 | let factoryCfg = readFactoryCfgOrFail(factoryContract) | |
208 | 208 | let stakingContract = getStakingAddressOrFail(factoryCfg) | |
209 | 209 | let emissionContract = getEmissionAddressOrFail(factoryCfg) | |
210 | 210 | let rewardData = internalCurrentRewardRate(factoryContract, stakingContract, emissionContract, lpAssetId) | |
211 | 211 | let wxEmissionPerBlock = rewardData[0] | |
212 | 212 | let maxFactor = rewardData[1] | |
213 | 213 | let totalLpStaked = rewardData[2] | |
214 | 214 | let lpStakedByUser = getIntOrZero(stakingContract, keyStakedByUser(userAddress, lpAssetId)) | |
215 | 215 | let boostingPower = (1 * MULT8) | |
216 | 216 | $Tuple2(nil, makeString(["%d%d%d%d%d", toString(wxEmissionPerBlock), toString(maxFactor), toString(totalLpStaked), toString(lpStakedByUser), toString(boostingPower)], SEP)) | |
217 | 217 | } | |
218 | 218 | ||
219 | 219 | ||
220 | 220 | ||
221 | 221 | @Callable(i) | |
222 | 222 | func claimedRewardREADONLY (userAddress) = { | |
223 | 223 | let factoryContract = readFactoryAddressOrFail() | |
224 | 224 | let factoryCfg = readFactoryCfgOrFail(factoryContract) | |
225 | 225 | let stakingContract = getStakingAddressOrFail(factoryCfg) | |
226 | 226 | let lpList = readLpList() | |
227 | 227 | let prefix = "%s%d%d%d%s" | |
228 | 228 | func claimedRewardByLpAggregator (resultStr,nextLp) = { | |
229 | 229 | let claimedByUserMinRewardKEY = keyClaimedByUserMinReward(nextLp, userAddress) | |
230 | 230 | let claimedByUserBoostRewardKEY = keyClaimedByUserBoostReward(nextLp, userAddress) | |
231 | 231 | let minRewardClaimed = valueOrElse(getInteger(stakingContract, claimedByUserMinRewardKEY), 0) | |
232 | 232 | let boostRewardClaimed = valueOrElse(getInteger(stakingContract, claimedByUserBoostRewardKEY), 0) | |
233 | 233 | let gFeeClaimed = 0 | |
234 | 234 | makeString([(prefix + resultStr), nextLp, toString(minRewardClaimed), toString(boostRewardClaimed), toString(gFeeClaimed), "end"], SEP) | |
235 | 235 | } | |
236 | 236 | ||
237 | 237 | let result = { | |
238 | 238 | let $l = lpList | |
239 | 239 | let $s = size($l) | |
240 | 240 | let $acc0 = "%s" | |
241 | 241 | func 1 ($a,$i) = if (($i >= $s)) | |
242 | 242 | then $a | |
243 | 243 | else claimedRewardByLpAggregator($a, $l[$i]) | |
244 | 244 | ||
245 | 245 | func 2 ($a,$i) = if (($i >= $s)) | |
246 | 246 | then $a | |
247 | 247 | else throw("List size exceeds 10") | |
248 | 248 | ||
249 | 249 | 2(1(1(1(1(1(1(1(1(1(1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
250 | 250 | } | |
251 | 251 | $Tuple2(nil, ((result + SEP) + userAddress)) | |
252 | 252 | } | |
253 | 253 | ||
254 | 254 | ||
255 | 255 | ||
256 | 256 | @Callable(i) | |
257 | 257 | func calcBoostREADONLY (deltaWxAmount,deltaLockPeriodInBlocks,deltaLpAmount,lpAssetIdOpt,userAddressOpt) = { | |
258 | 258 | let factoryContract = readFactoryAddressOrFail() | |
259 | 259 | let factoryCfg = readFactoryCfgOrFail(factoryContract) | |
260 | 260 | let boostingContract = getBoostingAddressOrFail(factoryCfg) | |
261 | 261 | let EMPTYSTR = "empty" | |
262 | 262 | let maxLockDurationInBlocks = parseIntValue(split(getStringByAddressOrFail(boostingContract, keyBoostCfg()), SEP)[4]) | |
263 | 263 | let userNum = valueOrElse(getString(boostingContract, keyUser2NumMapping(userAddressOpt)), EMPTYSTR) | |
264 | 264 | let userAmount = valueOrElse(getInteger(boostingContract, keyLockParamUserAmount(userNum)), 0) | |
265 | 265 | let lockStart = valueOrElse(getInteger(boostingContract, keyLockParamStartBlock(userNum)), height) | |
266 | 266 | let lockDuration = valueOrElse(getInteger(boostingContract, keyLockParamDuration(userNum)), 0) | |
267 | 267 | let lockEnd = (lockStart + lockDuration) | |
268 | 268 | let remainingDuration = max([(lockEnd - height), 0]) | |
269 | 269 | let boost = if ((userAddressOpt != "")) | |
270 | 270 | then (3 * MULT8) | |
271 | 271 | else (1 * MULT8) | |
272 | 272 | let SCALE = 1000 | |
273 | 273 | let userAmountNew = (userAmount + deltaWxAmount) | |
274 | 274 | let lockDurationNew = min([(remainingDuration + deltaLockPeriodInBlocks), maxLockDurationInBlocks]) | |
275 | 275 | let coeffX8 = fraction(lockDurationNew, MULT8, maxLockDurationInBlocks) | |
276 | 276 | let wxAmountStart = fraction(userAmountNew, coeffX8, MULT8) | |
277 | 277 | let lockEndHeight = (height + lockDurationNew) | |
278 | 278 | let scale8ParamK = -(fraction(wxAmountStart, SCALE, lockDurationNew)) | |
279 | 279 | let scale8ParamB = (fraction(wxAmountStart, SCALE, lockDurationNew) * lockEndHeight) | |
280 | 280 | let gWxAmount = (((scale8ParamK * height) + scale8ParamB) / SCALE) | |
281 | 281 | $Tuple2(nil, makeString(["%d%d", toString(gWxAmount), toString(boost)], SEP)) | |
282 | 282 | } | |
283 | 283 | ||
284 | 284 | ||
285 | 285 | ||
286 | 286 | @Callable(i) | |
287 | 287 | func wxEmissionStatsREADONLY () = { | |
288 | 288 | let ONEMULT = toString(MULT8) | |
289 | 289 | let ONE = "1" | |
290 | 290 | let factoryContract = readFactoryAddressOrFail() | |
291 | 291 | let factoryCfg = readFactoryCfgOrFail(factoryContract) | |
292 | 292 | let boostingContract = getBoostingAddressOrFail(factoryCfg) | |
293 | 293 | let emissionContract = getEmissionAddressOrFail(factoryCfg) | |
294 | 294 | let wxEmissionPerBlock = getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent()) | |
295 | 295 | let emissionStartBlock = getIntOrFail(emissionContract, keyEmissionStartBlock()) | |
296 | 296 | let passedBlocks = if ((emissionStartBlock > height)) | |
297 | 297 | then 0 | |
298 | 298 | else (height - emissionStartBlock) | |
299 | 299 | let teamEmDuration = (1440 * 365) | |
300 | 300 | let teamEmMax = (201000000 * MULT8) | |
301 | 301 | let teamEm = if ((passedBlocks > teamEmDuration)) | |
302 | 302 | then teamEmMax | |
303 | 303 | else fraction(teamEmMax, passedBlocks, teamEmDuration) | |
304 | 304 | let totalWxReleased = ((wxEmissionPerBlock * passedBlocks) + teamEm) | |
305 | 305 | let totalWxLocked = getIntOrZero(boostingContract, keyBoostingLockParamTotalAmount()) | |
306 | 306 | let locksDurationSumInBlocks = getIntOrZero(boostingContract, keyBoostingStatsLocksDurationSumInBlocks()) | |
307 | 307 | let locksCount = getIntOrZero(boostingContract, keyBoostingStatsLocksCount()) | |
308 | 308 | $Tuple2(nil, makeString(["%d%d%d%d", toString(totalWxReleased), toString(totalWxLocked), toString(locksDurationSumInBlocks), toString(locksCount)], SEP)) | |
309 | 309 | } | |
310 | 310 | ||
311 | 311 | ||
312 | 312 | ||
313 | 313 | @Callable(i) | |
314 | 314 | func lpStatsREADONLY (lpAsset) = { | |
315 | 315 | let factoryAddress = readFactoryAddressOrFail() | |
316 | 316 | let poolAddress = addressFromStringValue(getStringByAddressOrFail(factoryAddress, keyFactoryLpAssetToPoolContractAddress(lpAsset))) | |
317 | 317 | let cfg = if ($isInstanceOf(invoke(poolAddress, "getPoolConfigWrapperREADONLY", nil, nil), "List[Any]")) | |
318 | 318 | then invoke(poolAddress, "getPoolConfigWrapperREADONLY", nil, nil) | |
319 | 319 | else throw("Couldn't cast Any to List[Any]") | |
320 | 320 | let lpAssetId = fromBase58String(if ($isInstanceOf(cfg[idxPoolLPAssetId], "String")) | |
321 | 321 | then cfg[idxPoolLPAssetId] | |
322 | 322 | else throw("Couldn't cast Any to String")) | |
323 | 323 | let amtAssetId = if ($isInstanceOf(cfg[idxAmtAssetId], "String")) | |
324 | 324 | then cfg[idxAmtAssetId] | |
325 | 325 | else throw("Couldn't cast Any to String") | |
326 | 326 | let priceAssetId = if ($isInstanceOf(cfg[idxPriceAssetId], "String")) | |
327 | 327 | then cfg[idxPriceAssetId] | |
328 | 328 | else throw("Couldn't cast Any to String") | |
329 | 329 | let iAmtAssetId = if ($isInstanceOf(cfg[idxIAmtAssetId], "String")) | |
330 | 330 | then cfg[idxIAmtAssetId] | |
331 | 331 | else throw("Couldn't cast Any to String") | |
332 | 332 | let iPriceAssetId = if ($isInstanceOf(cfg[idxIPriceAssetId], "String")) | |
333 | 333 | then cfg[idxIPriceAssetId] | |
334 | 334 | else throw("Couldn't cast Any to String") | |
335 | 335 | let amtAssetDcm = parseIntValue(if ($isInstanceOf(cfg[idxAmtAssetDcm], "String")) | |
336 | 336 | then cfg[idxAmtAssetDcm] | |
337 | 337 | else throw("Couldn't cast Any to String")) | |
338 | 338 | let priceAssetDcm = parseIntValue(if ($isInstanceOf(cfg[idxPriceAssetDcm], "String")) | |
339 | 339 | then cfg[idxPriceAssetDcm] | |
340 | 340 | else throw("Couldn't cast Any to String")) | |
341 | 341 | let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity | |
342 | 342 | let accAmtAssetBalance = if ($isInstanceOf(invoke(poolAddress, "getAccBalanceWrapperREADONLY", [amtAssetId], nil), "Int")) | |
343 | 343 | then invoke(poolAddress, "getAccBalanceWrapperREADONLY", [amtAssetId], nil) | |
344 | 344 | else throw("Couldn't cast Any to Int") | |
345 | 345 | let accPriceAssetBalance = if ($isInstanceOf(invoke(poolAddress, "getAccBalanceWrapperREADONLY", [priceAssetId], nil), "Int")) | |
346 | 346 | then invoke(poolAddress, "getAccBalanceWrapperREADONLY", [priceAssetId], nil) | |
347 | 347 | else throw("Couldn't cast Any to Int") | |
348 | 348 | let pricesList = if ($isInstanceOf(invoke(poolAddress, "calcPricesWrapperREADONLY", [accAmtAssetBalance, accPriceAssetBalance, poolLPBalance], nil), "List[Any]")) | |
349 | 349 | then invoke(poolAddress, "calcPricesWrapperREADONLY", [accAmtAssetBalance, accPriceAssetBalance, poolLPBalance], nil) | |
350 | 350 | else throw("Couldn't cast Any to List[Any]") | |
351 | 351 | let curPrice = 0 | |
352 | 352 | let lpAmtAssetShare = if ($isInstanceOf(invoke(poolAddress, "fromX18WrapperREADONLY", [pricesList[1], MULT8], nil), "Int")) | |
353 | 353 | then invoke(poolAddress, "fromX18WrapperREADONLY", [pricesList[1], MULT8], nil) | |
354 | 354 | else throw("Couldn't cast Any to Int") | |
355 | 355 | let lpPriceAssetShare = if ($isInstanceOf(invoke(poolAddress, "fromX18WrapperREADONLY", [pricesList[2], MULT8], nil), "Int")) | |
356 | 356 | then invoke(poolAddress, "fromX18WrapperREADONLY", [pricesList[2], MULT8], nil) | |
357 | 357 | else throw("Couldn't cast Any to Int") | |
358 | 358 | let poolWeight = getIntegerValue(factoryAddress, keyFactoryPoolWeight(toString(poolAddress))) | |
359 | 359 | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(accAmtAssetBalance), toString(accPriceAssetBalance), toString(poolLPBalance), toString(curPrice), toString(lpAmtAssetShare), toString(lpPriceAssetShare), toString(poolWeight)], SEP)) | |
360 | 360 | } | |
361 | 361 | ||
362 | 362 | ||
363 | 363 | ||
364 | 364 | @Callable(i) | |
365 | 365 | func gwxUserInfoREADONLY (userAddress) = { | |
366 | 366 | let factoryContract = readFactoryAddressOrFail() | |
367 | 367 | let factoryCfg = readFactoryCfgOrFail(factoryContract) | |
368 | 368 | let boostingContract = getBoostingAddressOrFail(factoryCfg) | |
369 | 369 | let gwxUserInfoLIST = if ($isInstanceOf(invoke(boostingContract, "gwxUserInfoREADONLY", [userAddress], nil), "List[Any]")) | |
370 | 370 | then invoke(boostingContract, "gwxUserInfoREADONLY", [userAddress], nil) | |
371 | 371 | else throw("Couldn't cast Any to List[Any]") | |
372 | 372 | let gwxAmount = if ($isInstanceOf(gwxUserInfoLIST[0], "Int")) | |
373 | 373 | then gwxUserInfoLIST[0] | |
374 | 374 | else throw("Couldn't cast Any to Int") | |
375 | 375 | $Tuple2(nil, makeString(["%d", toString(gwxAmount)], SEP)) | |
376 | 376 | } | |
377 | 377 | ||
378 | 378 |
github/deemru/w8io/026f985 42.74 ms ◑