tx · FhPwoLPNswri7oXo6thhRsowpo7MmaqYx8egkmUd3Bvs

3MsNhK6uve98J6DeqbuwGFBRh9GoHPGUFgp:  -0.02300000 Waves

2023.02.20 16:54 [2458061] smart account 3MsNhK6uve98J6DeqbuwGFBRh9GoHPGUFgp > SELF 0.00000000 Waves

{ "type": 13, "id": "FhPwoLPNswri7oXo6thhRsowpo7MmaqYx8egkmUd3Bvs", "fee": 2300000, "feeAssetId": null, "timestamp": 1676901257131, "version": 2, "chainId": 84, "sender": "3MsNhK6uve98J6DeqbuwGFBRh9GoHPGUFgp", "senderPublicKey": "86RHVxKovtU7yKnepY8wKsd8niDxGAsiwuA1XA1DNqrS", "proofs": [ "3418o6W7Uw1pbrmCjKfhCZKxiEK8pZk5c32YwGpm1dUGzEyhbqGPwPvayVxTQz4jyhtqbVu8j6YWT4EMsYGR4kSv" ], "script": "base64:BgKPIggCEgMKAQgSAwoBCBIECgIICBIJCgcBERERGAgYEgcKBRERERgIEgcKBQEBAQgIEgASAwoBCBIECgIIARIECgIIARIECgIIARIDCgEIEgYKBAgBCAESBQoDARgYEgMKARgSAwoBCBIAIgZTQ0FMRTgiBU1VTFQ4IgdTQ0FMRTE4IgZNVUxUMTgiA1NFUCIOUE9PTFdFSUdIVE1VTFQiCnplcm9CaWdJbnQiDmlkeFBvb2xBZGRyZXNzIg1pZHhQb29sU3RhdHVzIhBpZHhQb29sTFBBc3NldElkIg1pZHhBbXRBc3NldElkIg9pZHhQcmljZUFzc2V0SWQiDmlkeEFtdEFzc2V0RGNtIhBpZHhQcmljZUFzc2V0RGNtIg5pZHhJQW10QXNzZXRJZCIQaWR4SVByaWNlQXNzZXRJZCINaWR4TFBBc3NldERjbSIPZ2V0U3RyaW5nT3JGYWlsIgNrZXkiGGdldFN0cmluZ0J5QWRkcmVzc09yRmFpbCIHYWRkcmVzcyIMZ2V0SW50T3JaZXJvIgxnZXRJbnRPckZhaWwiCWFzQW55TGlzdCIDdmFsIgckbWF0Y2gwIgp2YWxBb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c2VuZGVyUHVibGljS2V5CQACAQILTWF0Y2ggZXJyb3IJAPQDAwgFAmVkCWJvZHlCeXRlcwkAkQMCCAUCZWQGcHJvb2ZzAAAFAmVm12kILA==", "height": 2458061, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2WczFfc61PGZL5P7As5wtFQX3TKmjE5u7KZyKeXHA3ET Next: 9wffeaxtZvF138KggTXUBRUQ8aawWewMwA2HhPnhHix8 Diff:
OldNewDifferences
402402
403403 @Callable(i)
404404 func calcBoostREADONLY (deltaWxAmount,deltaLockPeriodInBlocks,deltaLpAmount,lpAssetIdOpt,userAddressOpt) = {
405- let boostCoeff = {
406- let @ = invoke(emissionDapp, "getBoostCoeffREADONLY", nil, nil)
407- if ($isInstanceOf(@, "Int"))
408- then @
409- else throw(($getType(@) + " couldn't be cast to Int"))
410- }
411405 let mathDapp = gwxRewardDapp
412406 let EMPTYSTR = "empty"
413407 let maxLockDurationInBlocks = parseIntValue(split(getStringByAddressOrFail(boostingDapp, keyBoostCfg()), SEP)[4])
463457 let boostEmissionPerBlockX3 = (poolWxEmissionPerBlockX3 * 2)
464458 let tmpUserBoostPerBlockX3 = fraction(gWxAmountStartNew, boostEmissionPerBlockX3, (totalCachedGwx + gWxAmountDiff))
465459 let userBoostPerBlockX3 = min([tmpUserBoostPerBlockX3, (userWxPerBlockX3 * 2)])
466- let userBoostCoeff = if ((userWxPerBlockX3 == 0))
460+ let boostCoeff = if ((userWxPerBlockX3 == 0))
467461 then (1 * MULT8)
468462 else fraction((userBoostPerBlockX3 + userWxPerBlockX3), MULT8, userWxPerBlockX3)
469- $Tuple2(nil, makeString(["%d%d%s", toString(gWxAmountStartNew), toString(userBoostCoeff), "d"], SEP))
463+ $Tuple2(nil, makeString(["%d%d%s", toString(gWxAmountStartNew), toString(boostCoeff), "d"], SEP))
470464 }
471465
472466
565559 let inPrAssetAmtX18 = fraction(inAmAssetAmtX18, curPriceX18, MULT18)
566560 let inPrAssetAmt = asInt(invoke(poolAddress, "fromX18WrapperREADONLY", [toString(inPrAssetAmtX18), priceAssetDcm], nil))
567561 let res = invoke(poolAddress, "estimatePutOperationWrapperREADONLY", ["", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false], nil)
568- let $t02345723810 = match res {
562+ let $t02336423717 = match res {
569563 case _ =>
570564 if (if (if ($isInstanceOf($match0._1, "Int"))
571565 then if ($isInstanceOf($match0._3, "Int"))
588582 }
589583 else throw("Couldn't cast types")
590584 }
591- let calcLpAmt = $t02345723810._1
592- let curPriceCalc = $t02345723810._2
593- let amBalance = $t02345723810._3
594- let prBalance = $t02345723810._4
595- let lpEmission = $t02345723810._5
585+ let calcLpAmt = $t02336423717._1
586+ let curPriceCalc = $t02336423717._2
587+ let amBalance = $t02336423717._3
588+ let prBalance = $t02336423717._4
589+ let lpEmission = $t02336423717._5
596590 $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(calcLpAmt), toString(curPrice), toString(amBalance), toString(prBalance), toString(lpEmission), poolStatus, toString(inAmAssetAmt), toString(inPrAssetAmt)], SEP))
597591 }
598592
623617 let inAmAssetAmtX18 = fraction(inPrAssetAmtX18, MULT18, curPriceX18)
624618 let inAmAssetAmt = asInt(invoke(poolAddress, "fromX18WrapperREADONLY", [toString(inAmAssetAmtX18), amtAssetDcm], nil))
625619 let res = invoke(poolAddress, "estimatePutOperationWrapperREADONLY", ["", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false], nil)
626- let $t02638326736 = match res {
620+ let $t02629026643 = match res {
627621 case _ =>
628622 if (if (if ($isInstanceOf($match0._1, "Int"))
629623 then if ($isInstanceOf($match0._3, "Int"))
646640 }
647641 else throw("Couldn't cast types")
648642 }
649- let calcLpAmt = $t02638326736._1
650- let curPriceCalc = $t02638326736._2
651- let amBalance = $t02638326736._3
652- let prBalance = $t02638326736._4
653- let lpEmission = $t02638326736._5
643+ let calcLpAmt = $t02629026643._1
644+ let curPriceCalc = $t02629026643._2
645+ let amBalance = $t02629026643._3
646+ let prBalance = $t02629026643._4
647+ let lpEmission = $t02629026643._5
654648 $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(calcLpAmt), toString(curPrice), toString(amBalance), toString(prBalance), toString(lpEmission), poolStatus, toString(inAmAssetAmt), toString(inPrAssetAmt)], SEP))
655649 }
656650
660654 func poolEvaluateGetREADONLY (paymentLpAssetId,paymentLpAmt) = {
661655 let poolAddress = addressFromStringValue(getStringByAddressOrFail(factoryDapp, keyFactoryLpAssetToPoolContractAddress(paymentLpAssetId)))
662656 let res = invoke(poolAddress, "estimateGetOperationWrapperREADONLY", ["", paymentLpAssetId, paymentLpAmt, toString(poolAddress)], nil)
663- let $t02743127848 = match res {
657+ let $t02733827755 = match res {
664658 case _ =>
665659 if (if (if ($isInstanceOf($match0._1, "Int"))
666660 then if ($isInstanceOf($match0._2, "Int"))
689683 }
690684 else throw("Couldn't cast types")
691685 }
692- let outAmAmt = $t02743127848._1
693- let outPrAmt = $t02743127848._2
694- let amBalance = $t02743127848._3
695- let prBalance = $t02743127848._4
696- let lpEmission = $t02743127848._5
697- let curPrice = $t02743127848._6
698- let poolStatus = $t02743127848._7
686+ let outAmAmt = $t02733827755._1
687+ let outPrAmt = $t02733827755._2
688+ let amBalance = $t02733827755._3
689+ let prBalance = $t02733827755._4
690+ let lpEmission = $t02733827755._5
691+ let curPrice = $t02733827755._6
692+ let poolStatus = $t02733827755._7
699693 $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(outAmAmt), toString(outPrAmt), toString(amBalance), toString(prBalance), toString(lpEmission), curPrice, poolStatus], SEP))
700694 }
701695
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SCALE8 = 8
55
66 let MULT8 = 100000000
77
88 let SCALE18 = 18
99
1010 let MULT18 = toBigInt(1000000000000000000)
1111
1212 let SEP = "__"
1313
1414 let POOLWEIGHTMULT = MULT8
1515
1616 let zeroBigInt = toBigInt(0)
1717
1818 let idxPoolAddress = 1
1919
2020 let idxPoolStatus = 2
2121
2222 let idxPoolLPAssetId = 3
2323
2424 let idxAmtAssetId = 4
2525
2626 let idxPriceAssetId = 5
2727
2828 let idxAmtAssetDcm = 6
2929
3030 let idxPriceAssetDcm = 7
3131
3232 let idxIAmtAssetId = 8
3333
3434 let idxIPriceAssetId = 9
3535
3636 let idxLPAssetDcm = 10
3737
3838 func getStringOrFail (key) = valueOrErrorMessage(getString(key), (("mandatory this." + key) + " is not defined"))
3939
4040
4141 func getStringByAddressOrFail (address,key) = valueOrErrorMessage(getString(address, key), (((("mandatory " + toString(address)) + ".") + key) + " is not defined"))
4242
4343
4444 func getIntOrZero (address,key) = valueOrElse(getInteger(address, key), 0)
4545
4646
4747 func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), (("mandatory this." + key) + " is not defined"))
4848
4949
5050 func asAnyList (val) = match val {
5151 case valAnyLyst: List[Any] =>
5252 valAnyLyst
5353 case _ =>
5454 throw("fail to cast into List[Any]")
5555 }
5656
5757
5858 func asInt (val) = match val {
5959 case valInt: Int =>
6060 valInt
6161 case _ =>
6262 throw("fail to cast into Int")
6363 }
6464
6565
6666 func asString (val) = match val {
6767 case valStr: String =>
6868 valStr
6969 case _ =>
7070 throw("fail to cast into String")
7171 }
7272
7373
7474 func keyFactoryAddress () = "%s%s__config__factoryAddress"
7575
7676
7777 func keyManagerPublicKey () = "%s__managerPublicKey"
7878
7979
8080 func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
8181
8282
8383 let IdxFactoryCfgStakingDapp = 1
8484
8585 let IdxFactoryCfgBoostingDapp = 2
8686
8787 let IdxFactoryCfgIdoDapp = 3
8888
8989 let IdxFactoryCfgTeamDapp = 4
9090
9191 let IdxFactoryCfgEmissionDapp = 5
9292
9393 let IdxFactoryCfgRestDapp = 6
9494
9595 let IdxFactoryCfgSlippageDapp = 7
9696
9797 let IdxFactoryCfgGwxRewardDapp = 8
9898
9999 func keyFactoryCfg () = "%s__factoryConfig"
100100
101101
102102 func keyFactoryLp2AssetsMapping (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP)
103103
104104
105105 func keyFactoryLpList () = "%s__lpTokensList"
106106
107107
108108 func keyFactoryLpAssetToPoolContractAddress (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP)
109109
110110
111111 func keyFactoryPoolWeight (contractAddress) = makeString(["%s%s", "poolWeight", contractAddress], SEP)
112112
113113
114114 func readFactoryAddressOrFail () = addressFromStringValue(getStringOrFail(keyFactoryAddress()))
115115
116116
117117 func readLpList () = split(valueOrElse(getString(readFactoryAddressOrFail(), keyFactoryLpList()), ""), SEP)
118118
119119
120120 func readFactoryCfgOrFail (factory) = split(getStringByAddressOrFail(factory, keyFactoryCfg()), SEP)
121121
122122
123123 func getBoostingAddressOrFail (fCfg) = addressFromStringValue(fCfg[IdxFactoryCfgBoostingDapp])
124124
125125
126126 func getEmissionAddressOrFail (fCfg) = addressFromStringValue(fCfg[IdxFactoryCfgEmissionDapp])
127127
128128
129129 func getStakingAddressOrFail (fCfg) = addressFromStringValue(fCfg[IdxFactoryCfgStakingDapp])
130130
131131
132132 func getGwxRewardAddressOrFail (fCfg) = addressFromStringValue(fCfg[IdxFactoryCfgGwxRewardDapp])
133133
134134
135135 func keyBoostCfg () = "%s__config"
136136
137137
138138 func keyBoostingLockParamTotalAmount () = "%s%s__stats__activeTotalLocked"
139139
140140
141141 func keyBoostingStatsLocksDurationSumInBlocks () = "%s%s__stats__locksDurationSumInBlocks"
142142
143143
144144 func keyBoostingStatsLocksCount () = "%s%s__stats__locksCount"
145145
146146
147147 func keyBoostingStatsUsersCount () = "%s%s__stats__activeUsersCount"
148148
149149
150150 func keyUser2NumMapping (userAddress) = makeString(["%s%s%s__mapping__user2num", userAddress], SEP)
151151
152152
153153 func keyNum2UserMapping (num) = makeString(["%s%s%s__mapping__num2user", num], SEP)
154154
155155
156156 func keyLockParamUserAmount (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "amount"], SEP)
157157
158158
159159 func keyLockParamStartBlock (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "start"], SEP)
160160
161161
162162 func keyLockParamDuration (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "duration"], SEP)
163163
164164
165165 func keyLockParamK (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "k"], SEP)
166166
167167
168168 func keyLockParamB (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "b"], SEP)
169169
170170
171171 func keyLockParamByPeriodK (userNum,period) = makeString(["%s%d%s%d__paramByPeriod", userNum, "k", period], SEP)
172172
173173
174174 func keyLockParamByPeriodB (userNum,period) = makeString(["%s%d%s%d__paramByPeriod", userNum, "b", period], SEP)
175175
176176
177177 func keyUserBoostEmissionLastINTEGRAL (userNum) = makeString(["%s%d__userBoostEmissionLastInt", userNum], SEP)
178178
179179
180180 func keyUserMaxBoostINTEGRAL (userNum) = makeString(["%s%d__maxBoostInt", userNum], SEP)
181181
182182
183183 func keyTotalMaxBoostINTEGRAL () = "%s%s__maxBoostInt__total"
184184
185185
186186 func keyUserBoostAvalaibleToClaimTotal (userNum) = makeString(["%s%d__userBoostAvaliableToClaimTotal", userNum], SEP)
187187
188188
189189 func keyUserBoostClaimed (userNum) = makeString(["%s%d__userBoostClaimed", userNum], SEP)
190190
191191
192192 func keyTotalCachedGwx () = "%s%s__gwxCached__total"
193193
194194
195195 func keyStakedByUser (userAddressStr,lpAssetIdStr) = makeString(["%s%s%s__staked", userAddressStr, lpAssetIdStr], SEP)
196196
197197
198198 func keyStakedTotal (lpAssetIdStr) = ("%s%s%s__staked__total__" + lpAssetIdStr)
199199
200200
201201 func keyClaimedByUser (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimed", userAddressStr, lpAssetIdStr], SEP)
202202
203203
204204 func keyClaimedByUserMinReward (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimedMinReward", userAddressStr, lpAssetIdStr], SEP)
205205
206206
207207 func keyClaimedByUserBoostReward (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimedBoostReward", userAddressStr, lpAssetIdStr], SEP)
208208
209209
210210 func readStaked (stakingDapp,key) = valueOrElse(getInteger(stakingDapp, key), 0)
211211
212212
213213 func keyEmissionRatePerBlockCurrent () = "%s%s__ratePerBlock__current"
214214
215215
216216 func keyEmissionRatePerBlockMaxCurrent () = "%s%s__ratePerBlockMax__current"
217217
218218
219219 func keyEmissionStartBlock () = "%s%s__emission__startBlock"
220220
221221
222222 func keyEmissionDurationInBlocks () = "%s%s__emission__duration"
223223
224224
225225 func keyEmissionEndBlock () = "%s%s__emission__endBlock"
226226
227227
228228 func keyAddonAddr () = "%s__addonAddr"
229229
230230
231231 let factoryDapp = readFactoryAddressOrFail()
232232
233233 let factoryCfg = readFactoryCfgOrFail(factoryDapp)
234234
235235 let emissionDapp = getEmissionAddressOrFail(factoryCfg)
236236
237237 let stakingDapp = getStakingAddressOrFail(factoryCfg)
238238
239239 let gwxRewardDapp = getGwxRewardAddressOrFail(factoryCfg)
240240
241241 let boostingDapp = getBoostingAddressOrFail(factoryCfg)
242242
243243 func getPoolInFee (poolAddress) = {
244244 let @ = invoke(factoryDapp, "getInFeeREADONLY", [toString(poolAddress)], nil)
245245 if ($isInstanceOf(@, "Int"))
246246 then @
247247 else throw(($getType(@) + " couldn't be cast to Int"))
248248 }
249249
250250
251251 func getPoolOutFee (poolAddress) = {
252252 let @ = invoke(factoryDapp, "getOutFeeREADONLY", [toString(poolAddress)], nil)
253253 if ($isInstanceOf(@, "Int"))
254254 then @
255255 else throw(($getType(@) + " couldn't be cast to Int"))
256256 }
257257
258258
259259 func internalCurrentRewardRate (lpAssetId) = {
260260 let poolAddressStr = getStringByAddressOrFail(factoryDapp, keyFactoryLpAssetToPoolContractAddress(lpAssetId))
261261 let poolWeightMult = MULT8
262262 let poolWeight = getIntegerValue(factoryDapp, keyFactoryPoolWeight(poolAddressStr))
263263 let wxEmissionPerBlock = getIntOrFail(emissionDapp, keyEmissionRatePerBlockCurrent())
264264 let wxEmissionPerBlockMax = getIntOrFail(emissionDapp, keyEmissionRatePerBlockMaxCurrent())
265265 let boostMaxCoeff = 3
266266 let poolWxEmissionPerBlock = (fraction(wxEmissionPerBlock, poolWeight, poolWeightMult) / boostMaxCoeff)
267267 let poolWxEmissionPerBlockMax = fraction(wxEmissionPerBlockMax, poolWeight, poolWeightMult)
268268 let maxFactor = (boostMaxCoeff * MULT8)
269269 let totalLpStaked = getIntOrZero(stakingDapp, keyStakedTotal(lpAssetId))
270270 [poolWxEmissionPerBlock, maxFactor, totalLpStaked]
271271 }
272272
273273
274274 func calcGwxAmountStartREADONLY (lockAmount,lockDuration,maxLockDuration) = {
275275 let coeffX8 = fraction(lockDuration, MULT8, maxLockDuration)
276276 let gWxAmountStart = fraction(lockAmount, coeffX8, MULT8)
277277 [gWxAmountStart]
278278 }
279279
280280
281281 func getKey (addr,key,type) = if ((type == "string"))
282282 then getStringValue(addr, key)
283283 else if ((type == "integer"))
284284 then toString(getIntegerValue(addr, key))
285285 else if ((type == "boolean"))
286286 then toString(getBooleanValue(addr, key))
287287 else throw("unknown type. expected string/integer/boolean")
288288
289289
290290 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
291291 case s: String =>
292292 fromBase58String(s)
293293 case _: Unit =>
294294 unit
295295 case _ =>
296296 throw("Match error")
297297 }
298298
299299
300300 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
301301 case s: String =>
302302 fromBase58String(s)
303303 case _: Unit =>
304304 unit
305305 case _ =>
306306 throw("Match error")
307307 }
308308
309309
310310 func mustManager (i) = {
311311 let pd = throw("Permission denied")
312312 match managerPublicKeyOrUnit() {
313313 case pk: ByteVector =>
314314 if ((i.callerPublicKey == pk))
315315 then true
316316 else pd
317317 case _: Unit =>
318318 if ((i.caller == this))
319319 then true
320320 else pd
321321 case _ =>
322322 throw("Match error")
323323 }
324324 }
325325
326326
327327 @Callable(i)
328328 func constructor (factoryAddress) = {
329329 let checkCaller = mustManager(i)
330330 if ((checkCaller == checkCaller))
331331 then [StringEntry(keyFactoryAddress(), factoryAddress)]
332332 else throw("Strict value is not equal to itself.")
333333 }
334334
335335
336336
337337 @Callable(i)
338338 func currentRewardRateREADONLY (lpAssetId) = {
339339 let rewardData = internalCurrentRewardRate(lpAssetId)
340340 let wxEmissionPerBlock = rewardData[0]
341341 let maxFactor = rewardData[1]
342342 let totalLpStaked = rewardData[2]
343343 $Tuple2(nil, makeString(["%d%d%d", toString(wxEmissionPerBlock), toString(maxFactor), toString(totalLpStaked)], SEP))
344344 }
345345
346346
347347
348348 @Callable(i)
349349 func currentUserRewardRateREADONLY (lpAssetId,userAddress) = {
350350 let rewardData = internalCurrentRewardRate(lpAssetId)
351351 let wxEmissionPerBlock = rewardData[0]
352352 let maxFactor = rewardData[1]
353353 let totalLpStaked = rewardData[2]
354354 let lpStakedByUser = getIntOrZero(stakingDapp, keyStakedByUser(userAddress, lpAssetId))
355355 let userClaimInfo = split(asString(invoke(stakingDapp, "claimWxREADONLY", [lpAssetId, userAddress], nil)), SEP)
356356 let minRewardPart = valueOrErrorMessage(parseInt(userClaimInfo[5]), "couldn't parse minRewardPart")
357357 let boostRewardPart = valueOrErrorMessage(parseInt(userClaimInfo[6]), "couldn't parse boostRewardPart")
358358 let debug = userClaimInfo[7]
359359 let boostingPower = if ((boostRewardPart == 0))
360360 then (1 * MULT8)
361361 else fraction((minRewardPart + boostRewardPart), MULT8, minRewardPart)
362362 $Tuple2(nil, makeString(["%d%d%d%d%d%s", toString(wxEmissionPerBlock), toString(maxFactor), toString(totalLpStaked), toString(lpStakedByUser), toString(boostingPower), debug], SEP))
363363 }
364364
365365
366366
367367 @Callable(i)
368368 func calcBoostBulkInternalREADONLY (currentIter,deltaWxAmountBulk,deltaLockPeriodInBlocksBulk,deltaLpAmountBulk,lpAssetIdOptBulk,userAddressOpt,resAcc) = if ((currentIter == size(deltaWxAmountBulk)))
369369 then $Tuple2(nil, resAcc)
370370 else {
371371 let deltaWxAmount = deltaWxAmountBulk[currentIter]
372372 let deltaLockPeriodInBlocks = deltaLockPeriodInBlocksBulk[currentIter]
373373 let deltaLpAmount = deltaLpAmountBulk[currentIter]
374374 let lpAssetIdOpt = lpAssetIdOptBulk[currentIter]
375375 let info = {
376376 let @ = invoke(this, "calcBoostREADONLY", [deltaWxAmount, deltaLockPeriodInBlocks, deltaLpAmount, lpAssetIdOpt, userAddressOpt], nil)
377377 if ($isInstanceOf(@, "String"))
378378 then @
379379 else throw(($getType(@) + " couldn't be cast to String"))
380380 }
381381 let res = (resAcc :+ info)
382382 let inv = {
383383 let @ = invoke(this, "calcBoostBulkInternalREADONLY", [(currentIter + 1), deltaWxAmountBulk, deltaLockPeriodInBlocksBulk, deltaLpAmountBulk, lpAssetIdOptBulk, userAddressOpt, res], nil)
384384 if ($isInstanceOf(@, "List[Any]"))
385385 then @
386386 else throw(($getType(@) + " couldn't be cast to List[Any]"))
387387 }
388388 if ((inv == inv))
389389 then $Tuple2(nil, inv)
390390 else throw("Strict value is not equal to itself.")
391391 }
392392
393393
394394
395395 @Callable(i)
396396 func calcBoostBulkREADONLY (deltaWxAmount,deltaLockPeriodInBlocks,deltaLpAmount,lpAssetIdOpt,userAddressOpt) = {
397397 let res = invoke(this, "calcBoostBulkInternalREADONLY", [0, deltaWxAmount, deltaLockPeriodInBlocks, deltaLpAmount, lpAssetIdOpt, userAddressOpt, nil], nil)
398398 $Tuple2(nil, res)
399399 }
400400
401401
402402
403403 @Callable(i)
404404 func calcBoostREADONLY (deltaWxAmount,deltaLockPeriodInBlocks,deltaLpAmount,lpAssetIdOpt,userAddressOpt) = {
405- let boostCoeff = {
406- let @ = invoke(emissionDapp, "getBoostCoeffREADONLY", nil, nil)
407- if ($isInstanceOf(@, "Int"))
408- then @
409- else throw(($getType(@) + " couldn't be cast to Int"))
410- }
411405 let mathDapp = gwxRewardDapp
412406 let EMPTYSTR = "empty"
413407 let maxLockDurationInBlocks = parseIntValue(split(getStringByAddressOrFail(boostingDapp, keyBoostCfg()), SEP)[4])
414408 let lpAssetIdStr = if ((lpAssetIdOpt == ""))
415409 then EMPTYSTR
416410 else lpAssetIdOpt
417411 let userAddressStr = if ((userAddressOpt == ""))
418412 then EMPTYSTR
419413 else userAddressOpt
420414 let userNumStr = valueOrElse(getString(boostingDapp, keyUser2NumMapping(userAddressOpt)), EMPTYSTR)
421415 let userAmount = valueOrElse(getInteger(boostingDapp, keyLockParamUserAmount(userNumStr)), 0)
422416 let lockStart = valueOrElse(getInteger(boostingDapp, keyLockParamStartBlock(userNumStr)), height)
423417 let lockDuration = valueOrElse(getInteger(boostingDapp, keyLockParamDuration(userNumStr)), 0)
424418 let lockEnd = (lockStart + lockDuration)
425419 let remainingDuration = max([(lockEnd - height), 0])
426420 let userAmountNew = (userAmount + deltaWxAmount)
427421 let lockDurationNew = min([(remainingDuration + deltaLockPeriodInBlocks), maxLockDurationInBlocks])
428422 let userCurrgWxAmount = asInt(asAnyList(invoke(boostingDapp, "gwxUserInfoREADONLY", [userAddressStr], nil))[0])
429423 let gWxAmountStartNew = calcGwxAmountStartREADONLY(userAmountNew, lockDurationNew, maxLockDurationInBlocks)[0]
430424 let gWxParamsResultList = asAnyList(invoke(mathDapp, "calcGwxParamsREADONLY", [gWxAmountStartNew, height, lockDurationNew], nil))
431425 let gWxAmountDiff = (gWxAmountStartNew - userCurrgWxAmount)
432426 let k = asInt(gWxParamsResultList[0])
433427 let b = asInt(gWxParamsResultList[1])
434428 let period = toString(asInt(gWxParamsResultList[2]))
435429 let totalMaxBoostIntegralKEY = keyTotalMaxBoostINTEGRAL()
436430 let userMaxBoostIntNew = ((gWxAmountStartNew * lockDurationNew) / 2)
437431 let totalMaxBoostInt = getIntOrZero(boostingDapp, totalMaxBoostIntegralKEY)
438432 let totalCachedGwx = {
439433 let @ = invoke(boostingDapp, "getTotalCachedGwxREADONLY", nil, nil)
440434 if ($isInstanceOf(@, "Int"))
441435 then @
442436 else throw(($getType(@) + " couldn't be cast to Int"))
443437 }
444438 let MULT3 = 1000
445439 let wxEmissionPerBlockX3 = (getIntOrFail(emissionDapp, keyEmissionRatePerBlockCurrent()) * MULT3)
446440 let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
447441 let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
448442 let stakedByUser = readStaked(stakingDapp, stakedByUserKEY)
449443 let stakedTotal = readStaked(stakingDapp, stakedTotalKEY)
450444 let stakedByUserNew = (stakedByUser + deltaLpAmount)
451445 let stakedTotalNew = (stakedTotal + deltaLpAmount)
452446 let poolWeight = if ((lpAssetIdStr != EMPTYSTR))
453447 then {
454448 let poolAddressStr = valueOrErrorMessage(getString(factoryDapp, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr))
455449 getIntegerValue(factoryDapp, keyFactoryPoolWeight(poolAddressStr))
456450 }
457451 else 0
458452 let poolWxEmissionPerBlockX3 = fraction(wxEmissionPerBlockX3, poolWeight, (POOLWEIGHTMULT * 3))
459453 let wxPerLpX3 = if ((stakedTotalNew != 0))
460454 then fraction(poolWxEmissionPerBlockX3, MULT8, stakedTotalNew)
461455 else 0
462456 let userWxPerBlockX3 = fraction(wxPerLpX3, stakedByUserNew, MULT8)
463457 let boostEmissionPerBlockX3 = (poolWxEmissionPerBlockX3 * 2)
464458 let tmpUserBoostPerBlockX3 = fraction(gWxAmountStartNew, boostEmissionPerBlockX3, (totalCachedGwx + gWxAmountDiff))
465459 let userBoostPerBlockX3 = min([tmpUserBoostPerBlockX3, (userWxPerBlockX3 * 2)])
466- let userBoostCoeff = if ((userWxPerBlockX3 == 0))
460+ let boostCoeff = if ((userWxPerBlockX3 == 0))
467461 then (1 * MULT8)
468462 else fraction((userBoostPerBlockX3 + userWxPerBlockX3), MULT8, userWxPerBlockX3)
469- $Tuple2(nil, makeString(["%d%d%s", toString(gWxAmountStartNew), toString(userBoostCoeff), "d"], SEP))
463+ $Tuple2(nil, makeString(["%d%d%s", toString(gWxAmountStartNew), toString(boostCoeff), "d"], SEP))
470464 }
471465
472466
473467
474468 @Callable(i)
475469 func wxEmissionStatsREADONLY () = {
476470 let ONEMULT = toString(MULT8)
477471 let ONE = "1"
478472 let wxEmissionPerBlock = getIntOrFail(emissionDapp, keyEmissionRatePerBlockCurrent())
479473 let emissionStartBlock = getIntOrFail(emissionDapp, keyEmissionStartBlock())
480474 let passedBlocks = if ((emissionStartBlock > height))
481475 then 0
482476 else (height - emissionStartBlock)
483477 let teamEmDuration = (1440 * 365)
484478 let teamEmMax = (201000000 * MULT8)
485479 let teamEm = if ((passedBlocks > teamEmDuration))
486480 then teamEmMax
487481 else fraction(teamEmMax, passedBlocks, teamEmDuration)
488482 let totalWxReleased = ((wxEmissionPerBlock * passedBlocks) + teamEm)
489483 let totalWxLocked = getIntOrZero(boostingDapp, keyBoostingLockParamTotalAmount())
490484 let locksDurationSumInBlocks = getIntOrZero(boostingDapp, keyBoostingStatsLocksDurationSumInBlocks())
491485 let locksCount = getIntOrZero(boostingDapp, keyBoostingStatsLocksCount())
492486 $Tuple2(nil, makeString(["%d%d%d%d", toString(totalWxReleased), toString(totalWxLocked), toString(locksDurationSumInBlocks), toString(locksCount)], SEP))
493487 }
494488
495489
496490
497491 @Callable(i)
498492 func poolStatsREADONLY (lpAsset) = {
499493 let poolAddress = addressFromStringValue(getStringByAddressOrFail(factoryDapp, keyFactoryLpAssetToPoolContractAddress(lpAsset)))
500494 let status = {
501495 let @ = invoke(factoryDapp, "getPoolStatusREADONLY", [toString(poolAddress)], nil)
502496 if ($isInstanceOf(@, "Int"))
503497 then @
504498 else throw(($getType(@) + " couldn't be cast to Int"))
505499 }
506500 let tpl = "%d%d%d%d%d%d%d%d%d%s"
507501 if ((status == 4))
508502 then $Tuple2(nil, makeString([tpl, toString(0), toString(0), toString(0), toString(0), toString(0), toString(0), toString(0), toString(0), toString(0), toString(false)], SEP))
509503 else {
510504 let cfg = asAnyList(invoke(poolAddress, "getPoolConfigWrapperREADONLY", nil, nil))
511505 let lpAssetId = fromBase58String(asString(cfg[idxPoolLPAssetId]))
512506 let amtAssetId = asString(cfg[idxAmtAssetId])
513507 let priceAssetId = asString(cfg[idxPriceAssetId])
514508 let iAmtAssetId = asString(cfg[idxIAmtAssetId])
515509 let iPriceAssetId = asString(cfg[idxIPriceAssetId])
516510 let amtAssetDcm = parseIntValue(asString(cfg[idxAmtAssetDcm]))
517511 let priceAssetDcm = parseIntValue(asString(cfg[idxPriceAssetDcm]))
518512 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
519513 let accAmtAssetBalance = asInt(invoke(poolAddress, "getAccBalanceWrapperREADONLY", [amtAssetId], nil))
520514 let accPriceAssetBalance = asInt(invoke(poolAddress, "getAccBalanceWrapperREADONLY", [priceAssetId], nil))
521515 let pricesList = if ((poolLPBalance == 0))
522516 then [toString(zeroBigInt), toString(zeroBigInt), toString(zeroBigInt)]
523517 else asAnyList(invoke(poolAddress, "calcPricesWrapperREADONLY", [accAmtAssetBalance, accPriceAssetBalance, poolLPBalance], nil))
524518 let curPrice = 0
525519 let lpAmtAssetShare = asInt(invoke(poolAddress, "fromX18WrapperREADONLY", [pricesList[1], MULT8], nil))
526520 let lpPriceAssetShare = asInt(invoke(poolAddress, "fromX18WrapperREADONLY", [pricesList[2], MULT8], nil))
527521 let poolWeight = getIntegerValue(factoryDapp, keyFactoryPoolWeight(toString(poolAddress)))
528522 let inFee = getPoolInFee(poolAddress)
529523 let outFee = getPoolOutFee(poolAddress)
530524 let poolOneTokenOperationsDisabled = {
531525 let @ = invoke(factoryDapp, "isPoolOneTokenOperationsDisabledREADONLY", [toString(poolAddress)], nil)
532526 if ($isInstanceOf(@, "Boolean"))
533527 then @
534528 else throw(($getType(@) + " couldn't be cast to Boolean"))
535529 }
536530 let poolOneTokenOperationsEnabled = !(poolOneTokenOperationsDisabled)
537531 $Tuple2(nil, makeString([tpl, toString(accAmtAssetBalance), toString(accPriceAssetBalance), toString(poolLPBalance), toString(curPrice), toString(lpAmtAssetShare), toString(lpPriceAssetShare), toString(poolWeight), toString(inFee), toString(outFee), toString(poolOneTokenOperationsEnabled)], SEP))
538532 }
539533 }
540534
541535
542536
543537 @Callable(i)
544538 func poolEvaluatePutByAmountAssetREADONLY (lpAsset,inAmAssetAmt) = {
545539 let poolAddress = addressFromStringValue(getStringByAddressOrFail(factoryDapp, keyFactoryLpAssetToPoolContractAddress(lpAsset)))
546540 let cfg = asAnyList(invoke(poolAddress, "getPoolConfigWrapperREADONLY", nil, nil))
547541 let lpAssetId = fromBase58String(asString(cfg[idxPoolLPAssetId]))
548542 let amAssetIdStr = asString(cfg[idxAmtAssetId])
549543 let amAssetId = fromBase58String(amAssetIdStr)
550544 let prAssetIdStr = asString(cfg[idxPriceAssetId])
551545 let prAssetId = fromBase58String(prAssetIdStr)
552546 let amtAssetDcm = parseIntValue(asString(cfg[idxAmtAssetDcm]))
553547 let priceAssetDcm = parseIntValue(asString(cfg[idxPriceAssetDcm]))
554548 let poolStatus = asString(cfg[idxPoolStatus])
555549 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
556550 let accAmtAssetBalance = asInt(invoke(poolAddress, "getAccBalanceWrapperREADONLY", [amAssetIdStr], nil))
557551 let accPriceAssetBalance = asInt(invoke(poolAddress, "getAccBalanceWrapperREADONLY", [prAssetIdStr], nil))
558552 let amtAssetAmtX18 = parseBigIntValue(asString(invoke(poolAddress, "toX18WrapperREADONLY", [accAmtAssetBalance, amtAssetDcm], nil)))
559553 let priceAssetAmtX18 = parseBigIntValue(asString(invoke(poolAddress, "toX18WrapperREADONLY", [accPriceAssetBalance, priceAssetDcm], nil)))
560554 let curPriceX18 = if ((poolLPBalance == 0))
561555 then zeroBigInt
562556 else parseBigIntValue(asString(invoke(poolAddress, "calcPriceBigIntWrapperREADONLY", [toString(priceAssetAmtX18), toString(amtAssetAmtX18)], nil)))
563557 let curPrice = asInt(invoke(poolAddress, "fromX18WrapperREADONLY", [toString(curPriceX18), MULT8], nil))
564558 let inAmAssetAmtX18 = parseBigIntValue(asString(invoke(poolAddress, "toX18WrapperREADONLY", [inAmAssetAmt, amtAssetDcm], nil)))
565559 let inPrAssetAmtX18 = fraction(inAmAssetAmtX18, curPriceX18, MULT18)
566560 let inPrAssetAmt = asInt(invoke(poolAddress, "fromX18WrapperREADONLY", [toString(inPrAssetAmtX18), priceAssetDcm], nil))
567561 let res = invoke(poolAddress, "estimatePutOperationWrapperREADONLY", ["", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false], nil)
568- let $t02345723810 = match res {
562+ let $t02336423717 = match res {
569563 case _ =>
570564 if (if (if ($isInstanceOf($match0._1, "Int"))
571565 then if ($isInstanceOf($match0._3, "Int"))
572566 then if ($isInstanceOf($match0._4, "Int"))
573567 then if ($isInstanceOf($match0._5, "Int"))
574568 then $isInstanceOf($match0._6, "Int")
575569 else false
576570 else false
577571 else false
578572 else false)
579573 then (size($match0) == 13)
580574 else false)
581575 then {
582576 let calcLpAmt = $match0._1
583577 let curPriceCalc = $match0._3
584578 let amBalance = $match0._4
585579 let prBalance = $match0._5
586580 let lpEmission = $match0._6
587581 $Tuple5(calcLpAmt, curPriceCalc, amBalance, prBalance, lpEmission)
588582 }
589583 else throw("Couldn't cast types")
590584 }
591- let calcLpAmt = $t02345723810._1
592- let curPriceCalc = $t02345723810._2
593- let amBalance = $t02345723810._3
594- let prBalance = $t02345723810._4
595- let lpEmission = $t02345723810._5
585+ let calcLpAmt = $t02336423717._1
586+ let curPriceCalc = $t02336423717._2
587+ let amBalance = $t02336423717._3
588+ let prBalance = $t02336423717._4
589+ let lpEmission = $t02336423717._5
596590 $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(calcLpAmt), toString(curPrice), toString(amBalance), toString(prBalance), toString(lpEmission), poolStatus, toString(inAmAssetAmt), toString(inPrAssetAmt)], SEP))
597591 }
598592
599593
600594
601595 @Callable(i)
602596 func poolEvaluatePutByPriceAssetREADONLY (lpAsset,inPrAssetAmt) = {
603597 let poolAddress = addressFromStringValue(getStringByAddressOrFail(factoryDapp, keyFactoryLpAssetToPoolContractAddress(lpAsset)))
604598 let cfg = asAnyList(invoke(poolAddress, "getPoolConfigWrapperREADONLY", nil, nil))
605599 let lpAssetId = fromBase58String(asString(cfg[idxPoolLPAssetId]))
606600 let amAssetIdStr = asString(cfg[idxAmtAssetId])
607601 let amAssetId = fromBase58String(amAssetIdStr)
608602 let prAssetIdStr = asString(cfg[idxPriceAssetId])
609603 let prAssetId = fromBase58String(prAssetIdStr)
610604 let amtAssetDcm = parseIntValue(asString(cfg[idxAmtAssetDcm]))
611605 let priceAssetDcm = parseIntValue(asString(cfg[idxPriceAssetDcm]))
612606 let poolStatus = asString(cfg[idxPoolStatus])
613607 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
614608 let amBalanceRaw = asInt(invoke(poolAddress, "getAccBalanceWrapperREADONLY", [amAssetIdStr], nil))
615609 let prBalanceRaw = asInt(invoke(poolAddress, "getAccBalanceWrapperREADONLY", [prAssetIdStr], nil))
616610 let amBalanceRawX18 = parseBigIntValue(asString(invoke(poolAddress, "toX18WrapperREADONLY", [amBalanceRaw, amtAssetDcm], nil)))
617611 let prBalanceRawX18 = parseBigIntValue(asString(invoke(poolAddress, "toX18WrapperREADONLY", [prBalanceRaw, priceAssetDcm], nil)))
618612 let curPriceX18 = if ((poolLPBalance == 0))
619613 then zeroBigInt
620614 else parseBigIntValue(asString(invoke(poolAddress, "calcPriceBigIntWrapperREADONLY", [toString(prBalanceRawX18), toString(amBalanceRawX18)], nil)))
621615 let curPrice = asInt(invoke(poolAddress, "fromX18WrapperREADONLY", [toString(curPriceX18), MULT8], nil))
622616 let inPrAssetAmtX18 = parseBigIntValue(asString(invoke(poolAddress, "toX18WrapperREADONLY", [inPrAssetAmt, priceAssetDcm], nil)))
623617 let inAmAssetAmtX18 = fraction(inPrAssetAmtX18, MULT18, curPriceX18)
624618 let inAmAssetAmt = asInt(invoke(poolAddress, "fromX18WrapperREADONLY", [toString(inAmAssetAmtX18), amtAssetDcm], nil))
625619 let res = invoke(poolAddress, "estimatePutOperationWrapperREADONLY", ["", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false], nil)
626- let $t02638326736 = match res {
620+ let $t02629026643 = match res {
627621 case _ =>
628622 if (if (if ($isInstanceOf($match0._1, "Int"))
629623 then if ($isInstanceOf($match0._3, "Int"))
630624 then if ($isInstanceOf($match0._4, "Int"))
631625 then if ($isInstanceOf($match0._5, "Int"))
632626 then $isInstanceOf($match0._6, "Int")
633627 else false
634628 else false
635629 else false
636630 else false)
637631 then (size($match0) == 13)
638632 else false)
639633 then {
640634 let calcLpAmt = $match0._1
641635 let curPriceCalc = $match0._3
642636 let amBalance = $match0._4
643637 let prBalance = $match0._5
644638 let lpEmission = $match0._6
645639 $Tuple5(calcLpAmt, curPriceCalc, amBalance, prBalance, lpEmission)
646640 }
647641 else throw("Couldn't cast types")
648642 }
649- let calcLpAmt = $t02638326736._1
650- let curPriceCalc = $t02638326736._2
651- let amBalance = $t02638326736._3
652- let prBalance = $t02638326736._4
653- let lpEmission = $t02638326736._5
643+ let calcLpAmt = $t02629026643._1
644+ let curPriceCalc = $t02629026643._2
645+ let amBalance = $t02629026643._3
646+ let prBalance = $t02629026643._4
647+ let lpEmission = $t02629026643._5
654648 $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(calcLpAmt), toString(curPrice), toString(amBalance), toString(prBalance), toString(lpEmission), poolStatus, toString(inAmAssetAmt), toString(inPrAssetAmt)], SEP))
655649 }
656650
657651
658652
659653 @Callable(i)
660654 func poolEvaluateGetREADONLY (paymentLpAssetId,paymentLpAmt) = {
661655 let poolAddress = addressFromStringValue(getStringByAddressOrFail(factoryDapp, keyFactoryLpAssetToPoolContractAddress(paymentLpAssetId)))
662656 let res = invoke(poolAddress, "estimateGetOperationWrapperREADONLY", ["", paymentLpAssetId, paymentLpAmt, toString(poolAddress)], nil)
663- let $t02743127848 = match res {
657+ let $t02733827755 = match res {
664658 case _ =>
665659 if (if (if ($isInstanceOf($match0._1, "Int"))
666660 then if ($isInstanceOf($match0._2, "Int"))
667661 then if ($isInstanceOf($match0._5, "Int"))
668662 then if ($isInstanceOf($match0._6, "Int"))
669663 then if ($isInstanceOf($match0._7, "Int"))
670664 then if ($isInstanceOf($match0._8, "String"))
671665 then $isInstanceOf($match0._9, "String")
672666 else false
673667 else false
674668 else false
675669 else false
676670 else false
677671 else false)
678672 then (size($match0) == 10)
679673 else false)
680674 then {
681675 let outAmAmt = $match0._1
682676 let outPrAmt = $match0._2
683677 let amBalance = $match0._5
684678 let prBalance = $match0._6
685679 let lpEmission = $match0._7
686680 let curPrice = $match0._8
687681 let poolStatus = $match0._9
688682 $Tuple7(outAmAmt, outPrAmt, amBalance, prBalance, lpEmission, curPrice, poolStatus)
689683 }
690684 else throw("Couldn't cast types")
691685 }
692- let outAmAmt = $t02743127848._1
693- let outPrAmt = $t02743127848._2
694- let amBalance = $t02743127848._3
695- let prBalance = $t02743127848._4
696- let lpEmission = $t02743127848._5
697- let curPrice = $t02743127848._6
698- let poolStatus = $t02743127848._7
686+ let outAmAmt = $t02733827755._1
687+ let outPrAmt = $t02733827755._2
688+ let amBalance = $t02733827755._3
689+ let prBalance = $t02733827755._4
690+ let lpEmission = $t02733827755._5
691+ let curPrice = $t02733827755._6
692+ let poolStatus = $t02733827755._7
699693 $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(outAmAmt), toString(outPrAmt), toString(amBalance), toString(prBalance), toString(lpEmission), curPrice, poolStatus], SEP))
700694 }
701695
702696
703697
704698 @Callable(i)
705699 func gwxUserInfoREADONLY (userAddress) = {
706700 let gwxUserInfoLIST = asAnyList(invoke(boostingDapp, "gwxUserInfoREADONLY", [userAddress], nil))
707701 let gwxAmount = asInt(gwxUserInfoLIST[0])
708702 $Tuple2(nil, makeString(["%d", toString(gwxAmount)], SEP))
709703 }
710704
711705
712706
713707 @Callable(i)
714708 func unstakeAndGetOneTknV2 (poolAddress,unstakeAmount,outAssetId,minOutAmount) = {
715709 let inv = invoke(addressFromStringValue(poolAddress), "unstakeAndGetOneTknV2", [unstakeAmount, outAssetId, minOutAmount], nil)
716710 if ((inv == inv))
717711 then $Tuple2(nil, unit)
718712 else throw("Strict value is not equal to itself.")
719713 }
720714
721715
722716
723717 @Callable(i)
724718 func getKeysBulkInternal (currentIter,keys,resAcc) = if ((currentIter == size(keys)))
725719 then $Tuple2(nil, resAcc)
726720 else {
727721 let k = split(keys[currentIter], "++")
728722 let addr = addressFromStringValue(k[0])
729723 let key = k[1]
730724 let type = k[2]
731725 let val = getKey(addr, key, type)
732726 let res = (resAcc :+ val)
733727 let inv = invoke(this, "getKeysBulkInternal", [(currentIter + 1), keys, res], nil)
734728 if ((inv == inv))
735729 then $Tuple2(nil, inv)
736730 else throw("Strict value is not equal to itself.")
737731 }
738732
739733
740734
741735 @Callable(i)
742736 func getKeysBulk (keys) = {
743737 let res = invoke(this, "getKeysBulkInternal", [0, keys, nil], nil)
744738 $Tuple2(nil, res)
745739 }
746740
747741
748742
749743 @Callable(i)
750744 func setManager (pendingManagerPublicKey) = {
751745 let checkCaller = mustManager(i)
752746 if ((checkCaller == checkCaller))
753747 then {
754748 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
755749 if ((checkManagerPublicKey == checkManagerPublicKey))
756750 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
757751 else throw("Strict value is not equal to itself.")
758752 }
759753 else throw("Strict value is not equal to itself.")
760754 }
761755
762756
763757
764758 @Callable(i)
765759 func confirmManager () = {
766760 let pm = pendingManagerPublicKeyOrUnit()
767761 let hasPM = if (isDefined(pm))
768762 then true
769763 else throw("No pending manager")
770764 if ((hasPM == hasPM))
771765 then {
772766 let checkPM = if ((i.callerPublicKey == value(pm)))
773767 then true
774768 else throw("You are not pending manager")
775769 if ((checkPM == checkPM))
776770 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
777771 else throw("Strict value is not equal to itself.")
778772 }
779773 else throw("Strict value is not equal to itself.")
780774 }
781775
782776
783777 @Verifier(tx)
784778 func verify () = {
785779 let targetPublicKey = match managerPublicKeyOrUnit() {
786780 case pk: ByteVector =>
787781 pk
788782 case _: Unit =>
789783 tx.senderPublicKey
790784 case _ =>
791785 throw("Match error")
792786 }
793787 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
794788 }
795789

github/deemru/w8io/fabc49c 
79.30 ms