tx · 3cjMYLNE5kPp5LX9wr42qQyBKwRqSpwejBqucBp4fgXa 3N5QAcgvpAGzTtSGT2iGZcy6DnRqaLMQLk6: -0.01000000 Waves 2021.11.24 14:20 [1805060] smart account 3N5QAcgvpAGzTtSGT2iGZcy6DnRqaLMQLk6 > SELF 0.00000000 Waves
{ "type": 13, "id": "3cjMYLNE5kPp5LX9wr42qQyBKwRqSpwejBqucBp4fgXa", "fee": 1000000, "feeAssetId": null, "timestamp": 1637752910249, "version": 1, "sender": "3N5QAcgvpAGzTtSGT2iGZcy6DnRqaLMQLk6", "senderPublicKey": "2F6Xr5hWciNeY5nz7JLvHqGLWVccgu2VNM9NRhoeghWN", "proofs": [ "5T6yBhKopQD6JfpRdfetyVoLni6GJZfpjTTT8FNe6jhBjHVyiGBiyFC71vZnfwtw9yV5gHA9PNSvzvKVksat2BKR" ], "script": "base64:AAIFAAAAAAAAACwIAhIDCgEIEgMKAQgSBAoCCAgSAwoBCBIHCgUBAQEICBIAEgMKAQgSAwoBCAAAADIAAAAABlNDQUxFOAAAAAAAAAAACAAAAAAFTVVMVDgAAAAAAAX14QAAAAAAB1NDQUxFMTgAAAAAAAAAABIAAAAABk1VTFQxOAkAATYAAAABAA3gtrOnZAAAAAAAAANTRVACAAAAAl9fAAAAAA5pZHhQb29sQWRkcmVzcwAAAAAAAAAAAQAAAAANaWR4UG9vbFN0YXR1cwAAAAAAAAAAAgAAAAAQaWR4UG9vbExQQXNzZXRJZAAAAAAAAAAAAwAAAAANaWR4QW10QXNzZXRJZAAAAAAAAAAABAAAAAAPaWR4UHJpY2VBc3NldElkAAAAAAAAAAAFAAAAAA5pZHhBbXRBc3NldERjbQAAAAAAAAAABgAAAAAQaWR4UHJpY2VBc3NldERjbQAAAAAAAAAABwAAAAAOaWR4SUFtdEFzc2V0SWQAAAAAAAAAAAgAAAAAEGlkeElQcmljZUFzc2V0SWQAAAAAAAAAAAkAAAAADWlkeExQQXNzZXREY20AAAAAAAAAAAoBAAAAD2dldFN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ZmFjdG9yeUNvbnRyYWN0CQEAAAAYcmVhZEZhY3RvcnlBZGRyZXNzT3JGYWlsAAAAAAQAAAAKZmFjdG9yeUNmZwkBAAAAFHJlYWRGYWN0b3J5Q2ZnT3JGYWlsAAAAAQUAAAAPZmFjdG9yeUNvbnRyYWN0BAAAABBib29zdGluZ0NvbnRyYWN0CQEAAAAYZ2V0Qm9vc3RpbmdBZGRyZXNzT3JGYWlsAAAAAQUAAAAKZmFjdG9yeUNmZwQAAAAPZ3d4VXNlckluZm9MSVNUAwkAAAEAAAACCQAD/AAAAAQFAAAAEGJvb3N0aW5nQ29udHJhY3QCAAAAE2d3eFVzZXJJbmZvUkVBRE9OTFkJAARMAAAAAgUAAAALdXNlckFkZHJlc3MFAAAAA25pbAUAAAADbmlsAgAAAAlMaXN0W0FueV0JAAP8AAAABAUAAAAQYm9vc3RpbmdDb250cmFjdAIAAAATZ3d4VXNlckluZm9SRUFET05MWQkABEwAAAACBQAAAAt1c2VyQWRkcmVzcwUAAAADbmlsBQAAAANuaWwJAAACAAAAAQIAAAAeQ291bGRuJ3QgY2FzdCBBbnkgdG8gTGlzdFtBbnldBAAAAAlnd3hBbW91bnQDCQAAAQAAAAIJAAGRAAAAAgUAAAAPZ3d4VXNlckluZm9MSVNUAAAAAAAAAAAAAgAAAANJbnQJAAGRAAAAAgUAAAAPZ3d4VXNlckluZm9MSVNUAAAAAAAAAAAACQAAAgAAAAECAAAAGENvdWxkbid0IGNhc3QgQW55IHRvIEludAkABRQAAAACBQAAAANuaWwJAAS5AAAAAgkABEwAAAACAgAAAAIlZAkABEwAAAACCQABpAAAAAEFAAAACWd3eEFtb3VudAUAAAADbmlsBQAAAANTRVAAAAAAlYn1/A==", "chainId": 84, "height": 1805060, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: 742342fAXps3hg7zSGfKSEUE8477SVpDVpKyEimjSVWj Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 5 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let SCALE8 = 8 | |
5 | + | ||
6 | + | let MULT8 = 100000000 | |
7 | + | ||
8 | + | let SCALE18 = 18 | |
9 | + | ||
10 | + | let MULT18 = toBigInt(1000000000000000000) | |
11 | + | ||
12 | + | let SEP = "__" | |
13 | + | ||
14 | + | let idxPoolAddress = 1 | |
15 | + | ||
16 | + | let idxPoolStatus = 2 | |
17 | + | ||
18 | + | let idxPoolLPAssetId = 3 | |
19 | + | ||
20 | + | let idxAmtAssetId = 4 | |
21 | + | ||
22 | + | let idxPriceAssetId = 5 | |
23 | + | ||
24 | + | let idxAmtAssetDcm = 6 | |
25 | + | ||
26 | + | let idxPriceAssetDcm = 7 | |
27 | + | ||
28 | + | let idxIAmtAssetId = 8 | |
29 | + | ||
30 | + | let idxIPriceAssetId = 9 | |
31 | + | ||
32 | + | let idxLPAssetDcm = 10 | |
33 | + | ||
34 | + | func getStringOrFail (key) = valueOrErrorMessage(getString(key), (("mandatory this." + key) + " is not defined")) | |
35 | + | ||
36 | + | ||
37 | + | func getStringByAddressOrFail (address,key) = valueOrErrorMessage(getString(address, key), (((("mandatory " + toString(address)) + ".") + key) + " is not defined")) | |
38 | + | ||
39 | + | ||
40 | + | func getIntOrZero (address,key) = valueOrElse(getInteger(address, key), 0) | |
41 | + | ||
42 | + | ||
43 | + | func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), (("mandatory this." + key) + " is not defined")) | |
44 | + | ||
45 | + | ||
46 | + | func keyFactoryAddress () = "%s%s__config__factoryAddress" | |
47 | + | ||
48 | + | ||
49 | + | let IdxFactoryCfgStakingDapp = 1 | |
50 | + | ||
51 | + | let IdxFactoryCfgBoostingDapp = 2 | |
52 | + | ||
53 | + | let IdxFactoryCfgIdoDapp = 3 | |
54 | + | ||
55 | + | let IdxFactoryCfgTeamDapp = 4 | |
56 | + | ||
57 | + | let IdxFactoryCfgEmissionDapp = 5 | |
58 | + | ||
59 | + | let IdxFactoryCfgRestDapp = 6 | |
60 | + | ||
61 | + | let IdxFactoryCfgSlippageDapp = 7 | |
62 | + | ||
63 | + | func keyFactoryCfg () = "%s__factoryConfig" | |
64 | + | ||
65 | + | ||
66 | + | func keyFactoryLp2AssetsMapping (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP) | |
67 | + | ||
68 | + | ||
69 | + | func keyFactoryLpList () = "%s__lpTokensList" | |
70 | + | ||
71 | + | ||
72 | + | func keyFactoryLpAssetToPoolContractAddress (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP) | |
73 | + | ||
74 | + | ||
75 | + | func keyFactoryPoolWeight (contractAddress) = makeString(["%s%s", "poolWeight", contractAddress], SEP) | |
76 | + | ||
77 | + | ||
78 | + | func readFactoryAddressOrFail () = addressFromStringValue(getStringOrFail(keyFactoryAddress())) | |
79 | + | ||
80 | + | ||
81 | + | func readLpList () = split(valueOrElse(getString(readFactoryAddressOrFail(), keyFactoryLpList()), ""), SEP) | |
82 | + | ||
83 | + | ||
84 | + | func readFactoryCfgOrFail (factory) = split(getStringByAddressOrFail(factory, keyFactoryCfg()), SEP) | |
85 | + | ||
86 | + | ||
87 | + | func getBoostingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgBoostingDapp]) | |
88 | + | ||
89 | + | ||
90 | + | func getEmissionAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgEmissionDapp]) | |
91 | + | ||
92 | + | ||
93 | + | func getStakingAddressOrFail (factoryCfg) = addressFromStringValue(factoryCfg[IdxFactoryCfgStakingDapp]) | |
94 | + | ||
95 | + | ||
96 | + | func keyBoostingLockParamTotalAmount () = "%s%s__stats__activeTotalLocked" | |
97 | + | ||
98 | + | ||
99 | + | func keyBoostingStatsLocksDurationSumInBlocks () = "%s%s__stats__locksDurationSumInBlocks" | |
100 | + | ||
101 | + | ||
102 | + | func keyBoostingStatsLocksCount () = "%s%s__stats__locksCount" | |
103 | + | ||
104 | + | ||
105 | + | func keyBoostingStatsUsersCount () = "%s%s__stats__activeUsersCount" | |
106 | + | ||
107 | + | ||
108 | + | func keyStakedByUser (userAddressStr,lpAssetIdStr) = makeString(["%s%s%s__staked", userAddressStr, lpAssetIdStr], SEP) | |
109 | + | ||
110 | + | ||
111 | + | func keyStakedTotal (lpAssetIdStr) = ("%s%s%s__staked__total__" + lpAssetIdStr) | |
112 | + | ||
113 | + | ||
114 | + | func keyEmissionRatePerBlockCurrent () = "%s%s__ratePerBlock__current" | |
115 | + | ||
116 | + | ||
117 | + | func keyEmissionRatePerBlockMaxCurrent () = "%s%s__ratePerBlockMax__current" | |
118 | + | ||
119 | + | ||
120 | + | func keyEmissionStartBlock () = "%s%s__emission__startBlock" | |
121 | + | ||
122 | + | ||
123 | + | func keyEmissionDurationInBlocks () = "%s%s__emission__duration" | |
124 | + | ||
125 | + | ||
126 | + | func keyEmissionEndBlock () = "%s%s__emission__endBlock" | |
127 | + | ||
128 | + | ||
129 | + | func internalCurrentRewardRate (factoryContract,stakingContract,emissionContract,lpAssetId) = { | |
130 | + | let poolAddressStr = getStringByAddressOrFail(factoryContract, keyFactoryLpAssetToPoolContractAddress(lpAssetId)) | |
131 | + | let poolWeightMult = MULT8 | |
132 | + | let poolWeight = getIntegerValue(factoryContract, keyFactoryPoolWeight(poolAddressStr)) | |
133 | + | let wxEmissionPerBlock = getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent()) | |
134 | + | let wxEmissionPerBlockMax = getIntOrFail(emissionContract, keyEmissionRatePerBlockMaxCurrent()) | |
135 | + | let poolWxEmissionPerBlock = fraction(wxEmissionPerBlock, poolWeight, poolWeightMult) | |
136 | + | let poolWxEmissionPerBlockMax = fraction(wxEmissionPerBlockMax, poolWeight, poolWeightMult) | |
137 | + | let maxFactor = (3 * MULT8) | |
138 | + | let totalLpStaked = getIntOrZero(stakingContract, keyStakedTotal(lpAssetId)) | |
139 | + | [poolWxEmissionPerBlock, maxFactor, totalLpStaked] | |
140 | + | } | |
141 | + | ||
142 | + | ||
143 | + | @Callable(i) | |
144 | + | func constructor (factoryAddress) = if ((i.caller != this)) | |
145 | + | then throw("not authorized") | |
146 | + | else [StringEntry(keyFactoryAddress(), factoryAddress)] | |
147 | + | ||
148 | + | ||
149 | + | ||
150 | + | @Callable(i) | |
151 | + | func currentRewardRateREADONLY (lpAssetId) = { | |
152 | + | let factoryContract = readFactoryAddressOrFail() | |
153 | + | let factoryCfg = readFactoryCfgOrFail(factoryContract) | |
154 | + | let stakingContract = getStakingAddressOrFail(factoryCfg) | |
155 | + | let emissionContract = getEmissionAddressOrFail(factoryCfg) | |
156 | + | let rewardData = internalCurrentRewardRate(factoryContract, stakingContract, emissionContract, lpAssetId) | |
157 | + | let wxEmissionPerBlock = rewardData[0] | |
158 | + | let maxFactor = rewardData[1] | |
159 | + | let totalLpStaked = rewardData[2] | |
160 | + | $Tuple2(nil, makeString(["%d%d%d", toString(wxEmissionPerBlock), toString(maxFactor), toString(totalLpStaked)], SEP)) | |
161 | + | } | |
162 | + | ||
163 | + | ||
164 | + | ||
165 | + | @Callable(i) | |
166 | + | func currentUserRewardRateREADONLY (lpAssetId,userAddress) = { | |
167 | + | let factoryContract = readFactoryAddressOrFail() | |
168 | + | let factoryCfg = readFactoryCfgOrFail(factoryContract) | |
169 | + | let stakingContract = getStakingAddressOrFail(factoryCfg) | |
170 | + | let emissionContract = getEmissionAddressOrFail(factoryCfg) | |
171 | + | let rewardData = internalCurrentRewardRate(factoryContract, stakingContract, emissionContract, lpAssetId) | |
172 | + | let wxEmissionPerBlock = rewardData[0] | |
173 | + | let maxFactor = rewardData[1] | |
174 | + | let totalLpStaked = rewardData[2] | |
175 | + | let lpStakedByUser = getIntOrZero(stakingContract, keyStakedByUser(userAddress, lpAssetId)) | |
176 | + | let boostingPower = (1 * MULT8) | |
177 | + | $Tuple2(nil, makeString(["%d%d%d%d%d", toString(wxEmissionPerBlock), toString(maxFactor), toString(totalLpStaked), toString(lpStakedByUser), toString(boostingPower)], SEP)) | |
178 | + | } | |
179 | + | ||
180 | + | ||
181 | + | ||
182 | + | @Callable(i) | |
183 | + | func claimedRewardREADONLY (userAddress) = { | |
184 | + | let lpList = readLpList() | |
185 | + | let prefix = "%s%d%d%d%s" | |
186 | + | func claimedRewardByLpAggregator (resultStr,nextLp) = { | |
187 | + | let rand = ((toInt(fromBase58String(nextLp)) % 100000) + (toInt(toBytes(userAddress)) % 100000)) | |
188 | + | let absRand = if ((0 > rand)) | |
189 | + | then -(rand) | |
190 | + | else rand | |
191 | + | let val = (((absRand % 100) * MULT8) + (absRand * (MULT8 / 100000))) | |
192 | + | let minRewardClaimed = ((val / 6) * 2) | |
193 | + | let boostRewardClaimed = ((val / 6) * 3) | |
194 | + | let gFeeClaimed = (val / 6) | |
195 | + | makeString([(prefix + resultStr), nextLp, toString(minRewardClaimed), toString(boostRewardClaimed), toString(gFeeClaimed), "end"], SEP) | |
196 | + | } | |
197 | + | ||
198 | + | let result = { | |
199 | + | let $l = lpList | |
200 | + | let $s = size($l) | |
201 | + | let $acc0 = "%s" | |
202 | + | func 1 ($a,$i) = if (($i >= $s)) | |
203 | + | then $a | |
204 | + | else claimedRewardByLpAggregator($a, $l[$i]) | |
205 | + | ||
206 | + | func 2 ($a,$i) = if (($i >= $s)) | |
207 | + | then $a | |
208 | + | else throw("List size exceeds 10") | |
209 | + | ||
210 | + | 2(1(1(1(1(1(1(1(1(1(1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
211 | + | } | |
212 | + | $Tuple2(nil, ((result + SEP) + userAddress)) | |
213 | + | } | |
214 | + | ||
215 | + | ||
216 | + | ||
217 | + | @Callable(i) | |
218 | + | func calcBoostREADONLY (deltaWxAmount,deltaLockPeriodInBlocks,deltaLpAmount,lpAssetIdOpt,userAddressOpt) = { | |
219 | + | let boost = if ((userAddressOpt != "")) | |
220 | + | then (3 * MULT8) | |
221 | + | else (1 * MULT8) | |
222 | + | let monthes18 = fraction(toBigInt(deltaLockPeriodInBlocks), MULT18, toBigInt((30 * 1440))) | |
223 | + | let coeff18 = (pow(monthes18, SCALE18, toBigInt(2), 0, SCALE18, HALFUP) / toBigInt(1000)) | |
224 | + | let SCALE = 1000 | |
225 | + | let wxAmount = deltaWxAmount | |
226 | + | let lockDurationBlocks = deltaLockPeriodInBlocks | |
227 | + | let lockEndHeight = (height + deltaLockPeriodInBlocks) | |
228 | + | let scale8ParamK = -(fraction(wxAmount, SCALE, lockDurationBlocks)) | |
229 | + | let scale8ParamB = (fraction(wxAmount, SCALE, lockDurationBlocks) * lockEndHeight) | |
230 | + | let gWxAmount = (((scale8ParamK * height) + scale8ParamB) / SCALE) | |
231 | + | $Tuple2(nil, makeString(["%d%d", toString(gWxAmount), toString(boost)], SEP)) | |
232 | + | } | |
233 | + | ||
234 | + | ||
235 | + | ||
236 | + | @Callable(i) | |
237 | + | func wxEmissionStatsREADONLY () = { | |
238 | + | let ONEMULT = toString(MULT8) | |
239 | + | let ONE = "1" | |
240 | + | let factoryContract = readFactoryAddressOrFail() | |
241 | + | let factoryCfg = readFactoryCfgOrFail(factoryContract) | |
242 | + | let boostingContract = getBoostingAddressOrFail(factoryCfg) | |
243 | + | let emissionContract = getEmissionAddressOrFail(factoryCfg) | |
244 | + | let wxEmissionPerBlock = getIntOrFail(emissionContract, keyEmissionRatePerBlockCurrent()) | |
245 | + | let emissionStartBlock = getIntOrFail(emissionContract, keyEmissionStartBlock()) | |
246 | + | let passedBlocks = if ((emissionStartBlock > height)) | |
247 | + | then 0 | |
248 | + | else (height - emissionStartBlock) | |
249 | + | let teamEmDuration = (1440 * 365) | |
250 | + | let teamEmMax = (200000000 * MULT8) | |
251 | + | let teamEm = if ((passedBlocks > teamEmDuration)) | |
252 | + | then teamEmMax | |
253 | + | else fraction(teamEmMax, passedBlocks, teamEmDuration) | |
254 | + | let totalWxReleased = ((wxEmissionPerBlock * passedBlocks) + teamEm) | |
255 | + | let totalWxLocked = getIntOrZero(boostingContract, keyBoostingLockParamTotalAmount()) | |
256 | + | let locksDurationSumInBlocks = getIntOrZero(boostingContract, keyBoostingStatsLocksDurationSumInBlocks()) | |
257 | + | let locksCount = getIntOrZero(boostingContract, keyBoostingStatsLocksCount()) | |
258 | + | $Tuple2(nil, makeString(["%d%d%d%d", toString(totalWxReleased), toString(totalWxLocked), toString(locksDurationSumInBlocks), toString(locksCount)], SEP)) | |
259 | + | } | |
260 | + | ||
261 | + | ||
262 | + | ||
263 | + | @Callable(i) | |
264 | + | func lpStatsREADONLY (lpAsset) = { | |
265 | + | let factoryAddress = readFactoryAddressOrFail() | |
266 | + | let poolAddress = addressFromStringValue(getStringByAddressOrFail(factoryAddress, keyFactoryLpAssetToPoolContractAddress(lpAsset))) | |
267 | + | let cfg = if ($isInstanceOf(invoke(poolAddress, "getPoolConfigWrapperREADONLY", nil, nil), "List[Any]")) | |
268 | + | then invoke(poolAddress, "getPoolConfigWrapperREADONLY", nil, nil) | |
269 | + | else throw("Couldn't cast Any to List[Any]") | |
270 | + | let lpAssetId = fromBase58String(if ($isInstanceOf(cfg[idxPoolLPAssetId], "String")) | |
271 | + | then cfg[idxPoolLPAssetId] | |
272 | + | else throw("Couldn't cast Any to String")) | |
273 | + | let amtAssetId = if ($isInstanceOf(cfg[idxAmtAssetId], "String")) | |
274 | + | then cfg[idxAmtAssetId] | |
275 | + | else throw("Couldn't cast Any to String") | |
276 | + | let priceAssetId = if ($isInstanceOf(cfg[idxPriceAssetId], "String")) | |
277 | + | then cfg[idxPriceAssetId] | |
278 | + | else throw("Couldn't cast Any to String") | |
279 | + | let iAmtAssetId = if ($isInstanceOf(cfg[idxIAmtAssetId], "String")) | |
280 | + | then cfg[idxIAmtAssetId] | |
281 | + | else throw("Couldn't cast Any to String") | |
282 | + | let iPriceAssetId = if ($isInstanceOf(cfg[idxIPriceAssetId], "String")) | |
283 | + | then cfg[idxIPriceAssetId] | |
284 | + | else throw("Couldn't cast Any to String") | |
285 | + | let amtAssetDcm = parseIntValue(if ($isInstanceOf(cfg[idxAmtAssetDcm], "String")) | |
286 | + | then cfg[idxAmtAssetDcm] | |
287 | + | else throw("Couldn't cast Any to String")) | |
288 | + | let priceAssetDcm = parseIntValue(if ($isInstanceOf(cfg[idxPriceAssetDcm], "String")) | |
289 | + | then cfg[idxPriceAssetDcm] | |
290 | + | else throw("Couldn't cast Any to String")) | |
291 | + | let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity | |
292 | + | let accAmtAssetBalance = if ($isInstanceOf(invoke(poolAddress, "getAccBalanceWrapperREADONLY", [amtAssetId], nil), "Int")) | |
293 | + | then invoke(poolAddress, "getAccBalanceWrapperREADONLY", [amtAssetId], nil) | |
294 | + | else throw("Couldn't cast Any to Int") | |
295 | + | let accPriceAssetBalance = if ($isInstanceOf(invoke(poolAddress, "getAccBalanceWrapperREADONLY", [priceAssetId], nil), "Int")) | |
296 | + | then invoke(poolAddress, "getAccBalanceWrapperREADONLY", [priceAssetId], nil) | |
297 | + | else throw("Couldn't cast Any to Int") | |
298 | + | let pricesList = if ($isInstanceOf(invoke(poolAddress, "calcPricesWrapperREADONLY", [accAmtAssetBalance, accPriceAssetBalance, poolLPBalance], nil), "List[Any]")) | |
299 | + | then invoke(poolAddress, "calcPricesWrapperREADONLY", [accAmtAssetBalance, accPriceAssetBalance, poolLPBalance], nil) | |
300 | + | else throw("Couldn't cast Any to List[Any]") | |
301 | + | let curPrice = 0 | |
302 | + | let lpAmtAssetShare = if ($isInstanceOf(invoke(poolAddress, "fromX18WrapperREADONLY", [pricesList[1], MULT8], nil), "Int")) | |
303 | + | then invoke(poolAddress, "fromX18WrapperREADONLY", [pricesList[1], MULT8], nil) | |
304 | + | else throw("Couldn't cast Any to Int") | |
305 | + | let lpPriceAssetShare = if ($isInstanceOf(invoke(poolAddress, "fromX18WrapperREADONLY", [pricesList[2], MULT8], nil), "Int")) | |
306 | + | then invoke(poolAddress, "fromX18WrapperREADONLY", [pricesList[2], MULT8], nil) | |
307 | + | else throw("Couldn't cast Any to Int") | |
308 | + | let poolWeight = getIntegerValue(factoryAddress, keyFactoryPoolWeight(toString(poolAddress))) | |
309 | + | $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)) | |
310 | + | } | |
311 | + | ||
312 | + | ||
313 | + | ||
314 | + | @Callable(i) | |
315 | + | func gwxUserInfoREADONLY (userAddress) = { | |
316 | + | let factoryContract = readFactoryAddressOrFail() | |
317 | + | let factoryCfg = readFactoryCfgOrFail(factoryContract) | |
318 | + | let boostingContract = getBoostingAddressOrFail(factoryCfg) | |
319 | + | let gwxUserInfoLIST = if ($isInstanceOf(invoke(boostingContract, "gwxUserInfoREADONLY", [userAddress], nil), "List[Any]")) | |
320 | + | then invoke(boostingContract, "gwxUserInfoREADONLY", [userAddress], nil) | |
321 | + | else throw("Couldn't cast Any to List[Any]") | |
322 | + | let gwxAmount = if ($isInstanceOf(gwxUserInfoLIST[0], "Int")) | |
323 | + | then gwxUserInfoLIST[0] | |
324 | + | else throw("Couldn't cast Any to Int") | |
325 | + | $Tuple2(nil, makeString(["%d", toString(gwxAmount)], SEP)) | |
326 | + | } | |
327 | + | ||
328 | + |
github/deemru/w8io/169f3d6 25.10 ms ◑