tx · 5ZK44dEGDxQU6AfDQPncX6NcVNMrP2kM7HG8jsQLLLHm

3MsNhK6uve98J6DeqbuwGFBRh9GoHPGUFgp:  -0.02300000 Waves

2022.12.22 09:28 [2371140] smart account 3MsNhK6uve98J6DeqbuwGFBRh9GoHPGUFgp > SELF 0.00000000 Waves

{ "type": 13, "id": "5ZK44dEGDxQU6AfDQPncX6NcVNMrP2kM7HG8jsQLLLHm", "fee": 2300000, "feeAssetId": null, "timestamp": 1671690555094, "version": 1, "sender": "3MsNhK6uve98J6DeqbuwGFBRh9GoHPGUFgp", "senderPublicKey": "86RHVxKovtU7yKnepY8wKsd8niDxGAsiwuA1XA1DNqrS", "proofs": [ "39iPoXWQceJ21UkdXAo1b32w32zfiVjQeJUzYcfNEGxXqGU7eCedzN9TBKx6byr17nmKQNA9sU3LGyCmnN9XTFiQ" ], "script": "base64:BgL7IQgCEgMKAQgSAwoBCBIECgIICBIJCgcBERERGAgYEgcKBRERERgIEgcKBQEBAQgIEgASAwoBCBIECgIIARIECgIIARIECgIIARIDCgEIEgYKBAgBCAESBQoDARgYEgMKARgSAwoBCBIAIgZTQ0FMRTgiBU1VTFQ4IgdTQ0FMRTE4IgZNVUxUMTgiA1NFUCIOUE9PTFdFSUdIVE1VTFQiCnplcm9CaWdJbnQiDmlkeFBvb2xBZGRyZXNzIg1pZHhQb29sU3RhdHVzIhBpZHhQb29sTFBBc3NldElkIg1pZHhBbXRBc3NldElkIg9pZHhQcmljZUFzc2V0SWQiDmlkeEFtdEFzc2V0RGNtIhBpZHhQcmljZUFzc2V0RGNtIg5pZHhJQW10QXNzZXRJZCIQaWR4SVByaWNlQXNzZXRJZCINaWR4TFBBc3NldERjbSIPZ2V0U3RyaW5nT3JGYWlsIgNrZXkiGGdldFN0cmluZ0J5QWRkcmVzc09yRmFpbCIHYWRkcmVzcyIMZ2V0SW50T3JaZXJvIgxnZXRJbnRPckZhaWwiCWFzQW55TGlzdCIDdmFsIgckbWF0Y2gwIgp2YWxBbnlM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2VyAwkAAAIFAmVhBQJlYQkAzAgCCQELU3RyaW5nRW50cnkCCQEBRwAJANgEAQkBBXZhbHVlAQUCZFkJAMwIAgkBC0RlbGV0ZUVudHJ5AQkBAUgABQNuaWwJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4BAmViAQJlYwAEAmVkBAF6CQECYngAAwkAAQIFAXoCCkJ5dGVWZWN0b3IEAmJEBQF6BQJiRAMJAAECBQF6AgRVbml0CAUCZWIPc2VuZGVyUHVibGljS2V5CQACAQILTWF0Y2ggZXJyb3IJAPQDAwgFAmViCWJvZHlCeXRlcwkAkQMCCAUCZWIGcHJvb2ZzAAAFAmVk9rsXnA==", "chainId": 84, "height": 2371140, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FqDa9foc3HnAgy7Rs3UQmTzV4mQ5Z49TCVPcGZVxi1Af Next: ySryj12Y1cG5q6MzwgynZLrNQpxcATTW6iAoHMd3hd6 Diff:
OldNewDifferences
228228 func keyAddonAddr () = "%s__addonAddr"
229229
230230
231+func getPoolFee (poolAddress) = {
232+ let feeDefault = fraction(10, MULT8, 10000)
233+ let keyFee = "%s__fee"
234+ valueOrElse(getInteger(poolAddress, keyFee), feeDefault)
235+ }
236+
237+
231238 let factoryDapp = readFactoryAddressOrFail()
232239
233240 let factoryCfg = readFactoryCfgOrFail(factoryDapp)
239246 let gwxRewardDapp = getGwxRewardAddressOrFail(factoryCfg)
240247
241248 let boostingDapp = getBoostingAddressOrFail(factoryCfg)
242-
243-func getPoolInFee (poolAddress) = {
244- let @ = invoke(factoryDapp, "getInFeeREADONLY", [toString(poolAddress)], nil)
245- if ($isInstanceOf(@, "Int"))
246- then @
247- else throw(($getType(@) + " couldn't be cast to Int"))
248- }
249-
250-
251-func getPoolOutFee (poolAddress) = {
252- let @ = invoke(factoryDapp, "getOutFeeREADONLY", [toString(poolAddress)], nil)
253- if ($isInstanceOf(@, "Int"))
254- then @
255- else throw(($getType(@) + " couldn't be cast to Int"))
256- }
257-
258249
259250 func internalCurrentRewardRate (lpAssetId) = {
260251 let poolAddressStr = getStringByAddressOrFail(factoryDapp, keyFactoryLpAssetToPoolContractAddress(lpAssetId))
509500 let lpAmtAssetShare = asInt(invoke(poolAddress, "fromX18WrapperREADONLY", [pricesList[1], MULT8], nil))
510501 let lpPriceAssetShare = asInt(invoke(poolAddress, "fromX18WrapperREADONLY", [pricesList[2], MULT8], nil))
511502 let poolWeight = getIntegerValue(factoryDapp, keyFactoryPoolWeight(toString(poolAddress)))
512- let inFee = getPoolInFee(poolAddress)
513- let outFee = getPoolOutFee(poolAddress)
503+ let fee = getPoolFee(poolAddress)
514504 let poolOneTokenOperationsDisabled = {
515505 let @ = invoke(factoryDapp, "isPoolOneTokenOperationsDisabledREADONLY", [toString(poolAddress)], nil)
516506 if ($isInstanceOf(@, "Boolean"))
518508 else throw(($getType(@) + " couldn't be cast to Boolean"))
519509 }
520510 let poolOneTokenOperationsEnabled = !(poolOneTokenOperationsDisabled)
521- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d%d%s", toString(accAmtAssetBalance), toString(accPriceAssetBalance), toString(poolLPBalance), toString(curPrice), toString(lpAmtAssetShare), toString(lpPriceAssetShare), toString(poolWeight), toString(inFee), toString(outFee), toString(poolOneTokenOperationsEnabled)], SEP))
511+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d%s", toString(accAmtAssetBalance), toString(accPriceAssetBalance), toString(poolLPBalance), toString(curPrice), toString(lpAmtAssetShare), toString(lpPriceAssetShare), toString(poolWeight), toString(fee), toString(poolOneTokenOperationsEnabled)], SEP))
522512 }
523513
524514
548538 let inPrAssetAmtX18 = fraction(inAmAssetAmtX18, curPriceX18, MULT18)
549539 let inPrAssetAmt = asInt(invoke(poolAddress, "fromX18WrapperREADONLY", [toString(inPrAssetAmtX18), priceAssetDcm], nil))
550540 let res = invoke(poolAddress, "estimatePutOperationWrapperREADONLY", ["", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false], nil)
551- let $t02283223185 = match res {
541+ let $t02266623019 = match res {
552542 case _ =>
553543 if (if (if ($isInstanceOf($match0._1, "Int"))
554544 then if ($isInstanceOf($match0._3, "Int"))
571561 }
572562 else throw("Couldn't cast types")
573563 }
574- let calcLpAmt = $t02283223185._1
575- let curPriceCalc = $t02283223185._2
576- let amBalance = $t02283223185._3
577- let prBalance = $t02283223185._4
578- let lpEmission = $t02283223185._5
564+ let calcLpAmt = $t02266623019._1
565+ let curPriceCalc = $t02266623019._2
566+ let amBalance = $t02266623019._3
567+ let prBalance = $t02266623019._4
568+ let lpEmission = $t02266623019._5
579569 $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))
580570 }
581571
606596 let inAmAssetAmtX18 = fraction(inPrAssetAmtX18, MULT18, curPriceX18)
607597 let inAmAssetAmt = asInt(invoke(poolAddress, "fromX18WrapperREADONLY", [toString(inAmAssetAmtX18), amtAssetDcm], nil))
608598 let res = invoke(poolAddress, "estimatePutOperationWrapperREADONLY", ["", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false], nil)
609- let $t02575826111 = match res {
599+ let $t02559225945 = match res {
610600 case _ =>
611601 if (if (if ($isInstanceOf($match0._1, "Int"))
612602 then if ($isInstanceOf($match0._3, "Int"))
629619 }
630620 else throw("Couldn't cast types")
631621 }
632- let calcLpAmt = $t02575826111._1
633- let curPriceCalc = $t02575826111._2
634- let amBalance = $t02575826111._3
635- let prBalance = $t02575826111._4
636- let lpEmission = $t02575826111._5
622+ let calcLpAmt = $t02559225945._1
623+ let curPriceCalc = $t02559225945._2
624+ let amBalance = $t02559225945._3
625+ let prBalance = $t02559225945._4
626+ let lpEmission = $t02559225945._5
637627 $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))
638628 }
639629
643633 func poolEvaluateGetREADONLY (paymentLpAssetId,paymentLpAmt) = {
644634 let poolAddress = addressFromStringValue(getStringByAddressOrFail(factoryDapp, keyFactoryLpAssetToPoolContractAddress(paymentLpAssetId)))
645635 let res = invoke(poolAddress, "estimateGetOperationWrapperREADONLY", ["", paymentLpAssetId, paymentLpAmt, toString(poolAddress)], nil)
646- let $t02680627223 = match res {
636+ let $t02664027057 = match res {
647637 case _ =>
648638 if (if (if ($isInstanceOf($match0._1, "Int"))
649639 then if ($isInstanceOf($match0._2, "Int"))
672662 }
673663 else throw("Couldn't cast types")
674664 }
675- let outAmAmt = $t02680627223._1
676- let outPrAmt = $t02680627223._2
677- let amBalance = $t02680627223._3
678- let prBalance = $t02680627223._4
679- let lpEmission = $t02680627223._5
680- let curPrice = $t02680627223._6
681- let poolStatus = $t02680627223._7
665+ let outAmAmt = $t02664027057._1
666+ let outPrAmt = $t02664027057._2
667+ let amBalance = $t02664027057._3
668+ let prBalance = $t02664027057._4
669+ let lpEmission = $t02664027057._5
670+ let curPrice = $t02664027057._6
671+ let poolStatus = $t02664027057._7
682672 $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(outAmAmt), toString(outPrAmt), toString(amBalance), toString(prBalance), toString(lpEmission), curPrice, poolStatus], SEP))
683673 }
684674
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
231+func getPoolFee (poolAddress) = {
232+ let feeDefault = fraction(10, MULT8, 10000)
233+ let keyFee = "%s__fee"
234+ valueOrElse(getInteger(poolAddress, keyFee), feeDefault)
235+ }
236+
237+
231238 let factoryDapp = readFactoryAddressOrFail()
232239
233240 let factoryCfg = readFactoryCfgOrFail(factoryDapp)
234241
235242 let emissionDapp = getEmissionAddressOrFail(factoryCfg)
236243
237244 let stakingDapp = getStakingAddressOrFail(factoryCfg)
238245
239246 let gwxRewardDapp = getGwxRewardAddressOrFail(factoryCfg)
240247
241248 let boostingDapp = getBoostingAddressOrFail(factoryCfg)
242-
243-func getPoolInFee (poolAddress) = {
244- let @ = invoke(factoryDapp, "getInFeeREADONLY", [toString(poolAddress)], nil)
245- if ($isInstanceOf(@, "Int"))
246- then @
247- else throw(($getType(@) + " couldn't be cast to Int"))
248- }
249-
250-
251-func getPoolOutFee (poolAddress) = {
252- let @ = invoke(factoryDapp, "getOutFeeREADONLY", [toString(poolAddress)], nil)
253- if ($isInstanceOf(@, "Int"))
254- then @
255- else throw(($getType(@) + " couldn't be cast to Int"))
256- }
257-
258249
259250 func internalCurrentRewardRate (lpAssetId) = {
260251 let poolAddressStr = getStringByAddressOrFail(factoryDapp, keyFactoryLpAssetToPoolContractAddress(lpAssetId))
261252 let poolWeightMult = MULT8
262253 let poolWeight = getIntegerValue(factoryDapp, keyFactoryPoolWeight(poolAddressStr))
263254 let wxEmissionPerBlock = getIntOrFail(emissionDapp, keyEmissionRatePerBlockCurrent())
264255 let wxEmissionPerBlockMax = getIntOrFail(emissionDapp, keyEmissionRatePerBlockMaxCurrent())
265256 let boostMaxCoeff = 3
266257 let poolWxEmissionPerBlock = (fraction(wxEmissionPerBlock, poolWeight, poolWeightMult) / boostMaxCoeff)
267258 let poolWxEmissionPerBlockMax = fraction(wxEmissionPerBlockMax, poolWeight, poolWeightMult)
268259 let maxFactor = (boostMaxCoeff * MULT8)
269260 let totalLpStaked = getIntOrZero(stakingDapp, keyStakedTotal(lpAssetId))
270261 [poolWxEmissionPerBlock, maxFactor, totalLpStaked]
271262 }
272263
273264
274265 func calcGwxAmountStartREADONLY (lockAmount,lockDuration,maxLockDuration) = {
275266 let coeffX8 = fraction(lockDuration, MULT8, maxLockDuration)
276267 let gWxAmountStart = fraction(lockAmount, coeffX8, MULT8)
277268 [gWxAmountStart]
278269 }
279270
280271
281272 func getKey (addr,key,type) = if ((type == "string"))
282273 then getStringValue(addr, key)
283274 else if ((type == "integer"))
284275 then toString(getIntegerValue(addr, key))
285276 else if ((type == "boolean"))
286277 then toString(getBooleanValue(addr, key))
287278 else throw("unknown type. expected string/integer/boolean")
288279
289280
290281 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
291282 case s: String =>
292283 fromBase58String(s)
293284 case _: Unit =>
294285 unit
295286 case _ =>
296287 throw("Match error")
297288 }
298289
299290
300291 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
301292 case s: String =>
302293 fromBase58String(s)
303294 case _: Unit =>
304295 unit
305296 case _ =>
306297 throw("Match error")
307298 }
308299
309300
310301 func mustManager (i) = {
311302 let pd = throw("Permission denied")
312303 match managerPublicKeyOrUnit() {
313304 case pk: ByteVector =>
314305 if ((i.callerPublicKey == pk))
315306 then true
316307 else pd
317308 case _: Unit =>
318309 if ((i.caller == this))
319310 then true
320311 else pd
321312 case _ =>
322313 throw("Match error")
323314 }
324315 }
325316
326317
327318 @Callable(i)
328319 func constructor (factoryAddress) = {
329320 let checkCaller = mustManager(i)
330321 if ((checkCaller == checkCaller))
331322 then [StringEntry(keyFactoryAddress(), factoryAddress)]
332323 else throw("Strict value is not equal to itself.")
333324 }
334325
335326
336327
337328 @Callable(i)
338329 func currentRewardRateREADONLY (lpAssetId) = {
339330 let rewardData = internalCurrentRewardRate(lpAssetId)
340331 let wxEmissionPerBlock = rewardData[0]
341332 let maxFactor = rewardData[1]
342333 let totalLpStaked = rewardData[2]
343334 $Tuple2(nil, makeString(["%d%d%d", toString(wxEmissionPerBlock), toString(maxFactor), toString(totalLpStaked)], SEP))
344335 }
345336
346337
347338
348339 @Callable(i)
349340 func currentUserRewardRateREADONLY (lpAssetId,userAddress) = {
350341 let rewardData = internalCurrentRewardRate(lpAssetId)
351342 let wxEmissionPerBlock = rewardData[0]
352343 let maxFactor = rewardData[1]
353344 let totalLpStaked = rewardData[2]
354345 let lpStakedByUser = getIntOrZero(stakingDapp, keyStakedByUser(userAddress, lpAssetId))
355346 let userClaimInfo = split(asString(invoke(stakingDapp, "claimWxREADONLY", [lpAssetId, userAddress], nil)), SEP)
356347 let minRewardPart = valueOrErrorMessage(parseInt(userClaimInfo[5]), "couldn't parse minRewardPart")
357348 let boostRewardPart = valueOrErrorMessage(parseInt(userClaimInfo[6]), "couldn't parse boostRewardPart")
358349 let debug = userClaimInfo[7]
359350 let boostingPower = if ((boostRewardPart == 0))
360351 then (1 * MULT8)
361352 else fraction((minRewardPart + boostRewardPart), MULT8, minRewardPart)
362353 $Tuple2(nil, makeString(["%d%d%d%d%d%s", toString(wxEmissionPerBlock), toString(maxFactor), toString(totalLpStaked), toString(lpStakedByUser), toString(boostingPower), debug], SEP))
363354 }
364355
365356
366357
367358 @Callable(i)
368359 func calcBoostBulkInternalREADONLY (currentIter,deltaWxAmountBulk,deltaLockPeriodInBlocksBulk,deltaLpAmountBulk,lpAssetIdOptBulk,userAddressOpt,resAcc) = if ((currentIter == size(deltaWxAmountBulk)))
369360 then $Tuple2(nil, resAcc)
370361 else {
371362 let deltaWxAmount = deltaWxAmountBulk[currentIter]
372363 let deltaLockPeriodInBlocks = deltaLockPeriodInBlocksBulk[currentIter]
373364 let deltaLpAmount = deltaLpAmountBulk[currentIter]
374365 let lpAssetIdOpt = lpAssetIdOptBulk[currentIter]
375366 let info = {
376367 let @ = invoke(this, "calcBoostREADONLY", [deltaWxAmount, deltaLockPeriodInBlocks, deltaLpAmount, lpAssetIdOpt, userAddressOpt], nil)
377368 if ($isInstanceOf(@, "String"))
378369 then @
379370 else throw(($getType(@) + " couldn't be cast to String"))
380371 }
381372 let res = (resAcc :+ info)
382373 let inv = {
383374 let @ = invoke(this, "calcBoostBulkInternalREADONLY", [(currentIter + 1), deltaWxAmountBulk, deltaLockPeriodInBlocksBulk, deltaLpAmountBulk, lpAssetIdOptBulk, userAddressOpt, res], nil)
384375 if ($isInstanceOf(@, "List[Any]"))
385376 then @
386377 else throw(($getType(@) + " couldn't be cast to List[Any]"))
387378 }
388379 if ((inv == inv))
389380 then $Tuple2(nil, inv)
390381 else throw("Strict value is not equal to itself.")
391382 }
392383
393384
394385
395386 @Callable(i)
396387 func calcBoostBulkREADONLY (deltaWxAmount,deltaLockPeriodInBlocks,deltaLpAmount,lpAssetIdOpt,userAddressOpt) = {
397388 let res = invoke(this, "calcBoostBulkInternalREADONLY", [0, deltaWxAmount, deltaLockPeriodInBlocks, deltaLpAmount, lpAssetIdOpt, userAddressOpt, nil], nil)
398389 $Tuple2(nil, res)
399390 }
400391
401392
402393
403394 @Callable(i)
404395 func calcBoostREADONLY (deltaWxAmount,deltaLockPeriodInBlocks,deltaLpAmount,lpAssetIdOpt,userAddressOpt) = {
405396 let mathDapp = gwxRewardDapp
406397 let EMPTYSTR = "empty"
407398 let maxLockDurationInBlocks = parseIntValue(split(getStringByAddressOrFail(boostingDapp, keyBoostCfg()), SEP)[4])
408399 let lpAssetIdStr = if ((lpAssetIdOpt == ""))
409400 then EMPTYSTR
410401 else lpAssetIdOpt
411402 let userAddressStr = if ((userAddressOpt == ""))
412403 then EMPTYSTR
413404 else userAddressOpt
414405 let userNumStr = valueOrElse(getString(boostingDapp, keyUser2NumMapping(userAddressOpt)), EMPTYSTR)
415406 let userAmount = valueOrElse(getInteger(boostingDapp, keyLockParamUserAmount(userNumStr)), 0)
416407 let lockStart = valueOrElse(getInteger(boostingDapp, keyLockParamStartBlock(userNumStr)), height)
417408 let lockDuration = valueOrElse(getInteger(boostingDapp, keyLockParamDuration(userNumStr)), 0)
418409 let lockEnd = (lockStart + lockDuration)
419410 let remainingDuration = max([(lockEnd - height), 0])
420411 let userAmountNew = (userAmount + deltaWxAmount)
421412 let lockDurationNew = min([(remainingDuration + deltaLockPeriodInBlocks), maxLockDurationInBlocks])
422413 let userCurrgWxAmount = asInt(asAnyList(invoke(boostingDapp, "gwxUserInfoREADONLY", [userAddressStr], nil))[0])
423414 let gWxAmountStartNew = calcGwxAmountStartREADONLY(userAmountNew, lockDurationNew, maxLockDurationInBlocks)[0]
424415 let gWxParamsResultList = asAnyList(invoke(mathDapp, "calcGwxParamsREADONLY", [gWxAmountStartNew, height, lockDurationNew], nil))
425416 let gWxAmountDiff = (gWxAmountStartNew - userCurrgWxAmount)
426417 let k = asInt(gWxParamsResultList[0])
427418 let b = asInt(gWxParamsResultList[1])
428419 let period = toString(asInt(gWxParamsResultList[2]))
429420 let totalMaxBoostIntegralKEY = keyTotalMaxBoostINTEGRAL()
430421 let userMaxBoostIntNew = ((gWxAmountStartNew * lockDurationNew) / 2)
431422 let totalMaxBoostInt = getIntOrZero(boostingDapp, totalMaxBoostIntegralKEY)
432423 let totalCachedGwx = {
433424 let @ = invoke(boostingDapp, "getTotalCachedGwxREADONLY", nil, nil)
434425 if ($isInstanceOf(@, "Int"))
435426 then @
436427 else throw(($getType(@) + " couldn't be cast to Int"))
437428 }
438429 let MULT3 = 1000
439430 let wxEmissionPerBlockX3 = (getIntOrFail(emissionDapp, keyEmissionRatePerBlockCurrent()) * MULT3)
440431 let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
441432 let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
442433 let stakedByUser = readStaked(stakingDapp, stakedByUserKEY)
443434 let stakedTotal = readStaked(stakingDapp, stakedTotalKEY)
444435 let stakedByUserNew = (stakedByUser + deltaLpAmount)
445436 let stakedTotalNew = (stakedTotal + deltaLpAmount)
446437 let poolWeight = if ((lpAssetIdStr != EMPTYSTR))
447438 then {
448439 let poolAddressStr = valueOrErrorMessage(getString(factoryDapp, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr))
449440 getIntegerValue(factoryDapp, keyFactoryPoolWeight(poolAddressStr))
450441 }
451442 else 0
452443 let poolWxEmissionPerBlockX3 = fraction(wxEmissionPerBlockX3, poolWeight, (POOLWEIGHTMULT * 3))
453444 let wxPerLpX3 = if ((stakedTotalNew != 0))
454445 then fraction(poolWxEmissionPerBlockX3, MULT8, stakedTotalNew)
455446 else 0
456447 let userWxPerBlockX3 = fraction(wxPerLpX3, stakedByUserNew, MULT8)
457448 let boostEmissionPerBlockX3 = (poolWxEmissionPerBlockX3 * 2)
458449 let tmpUserBoostPerBlockX3 = fraction(gWxAmountStartNew, boostEmissionPerBlockX3, (totalCachedGwx + gWxAmountDiff))
459450 let userBoostPerBlockX3 = min([tmpUserBoostPerBlockX3, (userWxPerBlockX3 * 2)])
460451 let boostCoeff = if ((userWxPerBlockX3 == 0))
461452 then (1 * MULT8)
462453 else fraction((userBoostPerBlockX3 + userWxPerBlockX3), MULT8, userWxPerBlockX3)
463454 $Tuple2(nil, makeString(["%d%d%s", toString(gWxAmountStartNew), toString(boostCoeff), "d"], SEP))
464455 }
465456
466457
467458
468459 @Callable(i)
469460 func wxEmissionStatsREADONLY () = {
470461 let ONEMULT = toString(MULT8)
471462 let ONE = "1"
472463 let wxEmissionPerBlock = getIntOrFail(emissionDapp, keyEmissionRatePerBlockCurrent())
473464 let emissionStartBlock = getIntOrFail(emissionDapp, keyEmissionStartBlock())
474465 let passedBlocks = if ((emissionStartBlock > height))
475466 then 0
476467 else (height - emissionStartBlock)
477468 let teamEmDuration = (1440 * 365)
478469 let teamEmMax = (201000000 * MULT8)
479470 let teamEm = if ((passedBlocks > teamEmDuration))
480471 then teamEmMax
481472 else fraction(teamEmMax, passedBlocks, teamEmDuration)
482473 let totalWxReleased = ((wxEmissionPerBlock * passedBlocks) + teamEm)
483474 let totalWxLocked = getIntOrZero(boostingDapp, keyBoostingLockParamTotalAmount())
484475 let locksDurationSumInBlocks = getIntOrZero(boostingDapp, keyBoostingStatsLocksDurationSumInBlocks())
485476 let locksCount = getIntOrZero(boostingDapp, keyBoostingStatsLocksCount())
486477 $Tuple2(nil, makeString(["%d%d%d%d", toString(totalWxReleased), toString(totalWxLocked), toString(locksDurationSumInBlocks), toString(locksCount)], SEP))
487478 }
488479
489480
490481
491482 @Callable(i)
492483 func poolStatsREADONLY (lpAsset) = {
493484 let poolAddress = addressFromStringValue(getStringByAddressOrFail(factoryDapp, keyFactoryLpAssetToPoolContractAddress(lpAsset)))
494485 let cfg = asAnyList(invoke(poolAddress, "getPoolConfigWrapperREADONLY", nil, nil))
495486 let lpAssetId = fromBase58String(asString(cfg[idxPoolLPAssetId]))
496487 let amtAssetId = asString(cfg[idxAmtAssetId])
497488 let priceAssetId = asString(cfg[idxPriceAssetId])
498489 let iAmtAssetId = asString(cfg[idxIAmtAssetId])
499490 let iPriceAssetId = asString(cfg[idxIPriceAssetId])
500491 let amtAssetDcm = parseIntValue(asString(cfg[idxAmtAssetDcm]))
501492 let priceAssetDcm = parseIntValue(asString(cfg[idxPriceAssetDcm]))
502493 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
503494 let accAmtAssetBalance = asInt(invoke(poolAddress, "getAccBalanceWrapperREADONLY", [amtAssetId], nil))
504495 let accPriceAssetBalance = asInt(invoke(poolAddress, "getAccBalanceWrapperREADONLY", [priceAssetId], nil))
505496 let pricesList = if ((poolLPBalance == 0))
506497 then [toString(zeroBigInt), toString(zeroBigInt), toString(zeroBigInt)]
507498 else asAnyList(invoke(poolAddress, "calcPricesWrapperREADONLY", [accAmtAssetBalance, accPriceAssetBalance, poolLPBalance], nil))
508499 let curPrice = 0
509500 let lpAmtAssetShare = asInt(invoke(poolAddress, "fromX18WrapperREADONLY", [pricesList[1], MULT8], nil))
510501 let lpPriceAssetShare = asInt(invoke(poolAddress, "fromX18WrapperREADONLY", [pricesList[2], MULT8], nil))
511502 let poolWeight = getIntegerValue(factoryDapp, keyFactoryPoolWeight(toString(poolAddress)))
512- let inFee = getPoolInFee(poolAddress)
513- let outFee = getPoolOutFee(poolAddress)
503+ let fee = getPoolFee(poolAddress)
514504 let poolOneTokenOperationsDisabled = {
515505 let @ = invoke(factoryDapp, "isPoolOneTokenOperationsDisabledREADONLY", [toString(poolAddress)], nil)
516506 if ($isInstanceOf(@, "Boolean"))
517507 then @
518508 else throw(($getType(@) + " couldn't be cast to Boolean"))
519509 }
520510 let poolOneTokenOperationsEnabled = !(poolOneTokenOperationsDisabled)
521- $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d%d%s", toString(accAmtAssetBalance), toString(accPriceAssetBalance), toString(poolLPBalance), toString(curPrice), toString(lpAmtAssetShare), toString(lpPriceAssetShare), toString(poolWeight), toString(inFee), toString(outFee), toString(poolOneTokenOperationsEnabled)], SEP))
511+ $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d%s", toString(accAmtAssetBalance), toString(accPriceAssetBalance), toString(poolLPBalance), toString(curPrice), toString(lpAmtAssetShare), toString(lpPriceAssetShare), toString(poolWeight), toString(fee), toString(poolOneTokenOperationsEnabled)], SEP))
522512 }
523513
524514
525515
526516 @Callable(i)
527517 func poolEvaluatePutByAmountAssetREADONLY (lpAsset,inAmAssetAmt) = {
528518 let poolAddress = addressFromStringValue(getStringByAddressOrFail(factoryDapp, keyFactoryLpAssetToPoolContractAddress(lpAsset)))
529519 let cfg = asAnyList(invoke(poolAddress, "getPoolConfigWrapperREADONLY", nil, nil))
530520 let lpAssetId = fromBase58String(asString(cfg[idxPoolLPAssetId]))
531521 let amAssetIdStr = asString(cfg[idxAmtAssetId])
532522 let amAssetId = fromBase58String(amAssetIdStr)
533523 let prAssetIdStr = asString(cfg[idxPriceAssetId])
534524 let prAssetId = fromBase58String(prAssetIdStr)
535525 let amtAssetDcm = parseIntValue(asString(cfg[idxAmtAssetDcm]))
536526 let priceAssetDcm = parseIntValue(asString(cfg[idxPriceAssetDcm]))
537527 let poolStatus = asString(cfg[idxPoolStatus])
538528 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
539529 let accAmtAssetBalance = asInt(invoke(poolAddress, "getAccBalanceWrapperREADONLY", [amAssetIdStr], nil))
540530 let accPriceAssetBalance = asInt(invoke(poolAddress, "getAccBalanceWrapperREADONLY", [prAssetIdStr], nil))
541531 let amtAssetAmtX18 = parseBigIntValue(asString(invoke(poolAddress, "toX18WrapperREADONLY", [accAmtAssetBalance, amtAssetDcm], nil)))
542532 let priceAssetAmtX18 = parseBigIntValue(asString(invoke(poolAddress, "toX18WrapperREADONLY", [accPriceAssetBalance, priceAssetDcm], nil)))
543533 let curPriceX18 = if ((poolLPBalance == 0))
544534 then zeroBigInt
545535 else parseBigIntValue(asString(invoke(poolAddress, "calcPriceBigIntWrapperREADONLY", [toString(priceAssetAmtX18), toString(amtAssetAmtX18)], nil)))
546536 let curPrice = asInt(invoke(poolAddress, "fromX18WrapperREADONLY", [toString(curPriceX18), MULT8], nil))
547537 let inAmAssetAmtX18 = parseBigIntValue(asString(invoke(poolAddress, "toX18WrapperREADONLY", [inAmAssetAmt, amtAssetDcm], nil)))
548538 let inPrAssetAmtX18 = fraction(inAmAssetAmtX18, curPriceX18, MULT18)
549539 let inPrAssetAmt = asInt(invoke(poolAddress, "fromX18WrapperREADONLY", [toString(inPrAssetAmtX18), priceAssetDcm], nil))
550540 let res = invoke(poolAddress, "estimatePutOperationWrapperREADONLY", ["", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false], nil)
551- let $t02283223185 = match res {
541+ let $t02266623019 = match res {
552542 case _ =>
553543 if (if (if ($isInstanceOf($match0._1, "Int"))
554544 then if ($isInstanceOf($match0._3, "Int"))
555545 then if ($isInstanceOf($match0._4, "Int"))
556546 then if ($isInstanceOf($match0._5, "Int"))
557547 then $isInstanceOf($match0._6, "Int")
558548 else false
559549 else false
560550 else false
561551 else false)
562552 then (size($match0) == 13)
563553 else false)
564554 then {
565555 let calcLpAmt = $match0._1
566556 let curPriceCalc = $match0._3
567557 let amBalance = $match0._4
568558 let prBalance = $match0._5
569559 let lpEmission = $match0._6
570560 $Tuple5(calcLpAmt, curPriceCalc, amBalance, prBalance, lpEmission)
571561 }
572562 else throw("Couldn't cast types")
573563 }
574- let calcLpAmt = $t02283223185._1
575- let curPriceCalc = $t02283223185._2
576- let amBalance = $t02283223185._3
577- let prBalance = $t02283223185._4
578- let lpEmission = $t02283223185._5
564+ let calcLpAmt = $t02266623019._1
565+ let curPriceCalc = $t02266623019._2
566+ let amBalance = $t02266623019._3
567+ let prBalance = $t02266623019._4
568+ let lpEmission = $t02266623019._5
579569 $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))
580570 }
581571
582572
583573
584574 @Callable(i)
585575 func poolEvaluatePutByPriceAssetREADONLY (lpAsset,inPrAssetAmt) = {
586576 let poolAddress = addressFromStringValue(getStringByAddressOrFail(factoryDapp, keyFactoryLpAssetToPoolContractAddress(lpAsset)))
587577 let cfg = asAnyList(invoke(poolAddress, "getPoolConfigWrapperREADONLY", nil, nil))
588578 let lpAssetId = fromBase58String(asString(cfg[idxPoolLPAssetId]))
589579 let amAssetIdStr = asString(cfg[idxAmtAssetId])
590580 let amAssetId = fromBase58String(amAssetIdStr)
591581 let prAssetIdStr = asString(cfg[idxPriceAssetId])
592582 let prAssetId = fromBase58String(prAssetIdStr)
593583 let amtAssetDcm = parseIntValue(asString(cfg[idxAmtAssetDcm]))
594584 let priceAssetDcm = parseIntValue(asString(cfg[idxPriceAssetDcm]))
595585 let poolStatus = asString(cfg[idxPoolStatus])
596586 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
597587 let amBalanceRaw = asInt(invoke(poolAddress, "getAccBalanceWrapperREADONLY", [amAssetIdStr], nil))
598588 let prBalanceRaw = asInt(invoke(poolAddress, "getAccBalanceWrapperREADONLY", [prAssetIdStr], nil))
599589 let amBalanceRawX18 = parseBigIntValue(asString(invoke(poolAddress, "toX18WrapperREADONLY", [amBalanceRaw, amtAssetDcm], nil)))
600590 let prBalanceRawX18 = parseBigIntValue(asString(invoke(poolAddress, "toX18WrapperREADONLY", [prBalanceRaw, priceAssetDcm], nil)))
601591 let curPriceX18 = if ((poolLPBalance == 0))
602592 then zeroBigInt
603593 else parseBigIntValue(asString(invoke(poolAddress, "calcPriceBigIntWrapperREADONLY", [toString(prBalanceRawX18), toString(amBalanceRawX18)], nil)))
604594 let curPrice = asInt(invoke(poolAddress, "fromX18WrapperREADONLY", [toString(curPriceX18), MULT8], nil))
605595 let inPrAssetAmtX18 = parseBigIntValue(asString(invoke(poolAddress, "toX18WrapperREADONLY", [inPrAssetAmt, priceAssetDcm], nil)))
606596 let inAmAssetAmtX18 = fraction(inPrAssetAmtX18, MULT18, curPriceX18)
607597 let inAmAssetAmt = asInt(invoke(poolAddress, "fromX18WrapperREADONLY", [toString(inAmAssetAmtX18), amtAssetDcm], nil))
608598 let res = invoke(poolAddress, "estimatePutOperationWrapperREADONLY", ["", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false], nil)
609- let $t02575826111 = match res {
599+ let $t02559225945 = match res {
610600 case _ =>
611601 if (if (if ($isInstanceOf($match0._1, "Int"))
612602 then if ($isInstanceOf($match0._3, "Int"))
613603 then if ($isInstanceOf($match0._4, "Int"))
614604 then if ($isInstanceOf($match0._5, "Int"))
615605 then $isInstanceOf($match0._6, "Int")
616606 else false
617607 else false
618608 else false
619609 else false)
620610 then (size($match0) == 13)
621611 else false)
622612 then {
623613 let calcLpAmt = $match0._1
624614 let curPriceCalc = $match0._3
625615 let amBalance = $match0._4
626616 let prBalance = $match0._5
627617 let lpEmission = $match0._6
628618 $Tuple5(calcLpAmt, curPriceCalc, amBalance, prBalance, lpEmission)
629619 }
630620 else throw("Couldn't cast types")
631621 }
632- let calcLpAmt = $t02575826111._1
633- let curPriceCalc = $t02575826111._2
634- let amBalance = $t02575826111._3
635- let prBalance = $t02575826111._4
636- let lpEmission = $t02575826111._5
622+ let calcLpAmt = $t02559225945._1
623+ let curPriceCalc = $t02559225945._2
624+ let amBalance = $t02559225945._3
625+ let prBalance = $t02559225945._4
626+ let lpEmission = $t02559225945._5
637627 $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))
638628 }
639629
640630
641631
642632 @Callable(i)
643633 func poolEvaluateGetREADONLY (paymentLpAssetId,paymentLpAmt) = {
644634 let poolAddress = addressFromStringValue(getStringByAddressOrFail(factoryDapp, keyFactoryLpAssetToPoolContractAddress(paymentLpAssetId)))
645635 let res = invoke(poolAddress, "estimateGetOperationWrapperREADONLY", ["", paymentLpAssetId, paymentLpAmt, toString(poolAddress)], nil)
646- let $t02680627223 = match res {
636+ let $t02664027057 = match res {
647637 case _ =>
648638 if (if (if ($isInstanceOf($match0._1, "Int"))
649639 then if ($isInstanceOf($match0._2, "Int"))
650640 then if ($isInstanceOf($match0._5, "Int"))
651641 then if ($isInstanceOf($match0._6, "Int"))
652642 then if ($isInstanceOf($match0._7, "Int"))
653643 then if ($isInstanceOf($match0._8, "String"))
654644 then $isInstanceOf($match0._9, "String")
655645 else false
656646 else false
657647 else false
658648 else false
659649 else false
660650 else false)
661651 then (size($match0) == 10)
662652 else false)
663653 then {
664654 let outAmAmt = $match0._1
665655 let outPrAmt = $match0._2
666656 let amBalance = $match0._5
667657 let prBalance = $match0._6
668658 let lpEmission = $match0._7
669659 let curPrice = $match0._8
670660 let poolStatus = $match0._9
671661 $Tuple7(outAmAmt, outPrAmt, amBalance, prBalance, lpEmission, curPrice, poolStatus)
672662 }
673663 else throw("Couldn't cast types")
674664 }
675- let outAmAmt = $t02680627223._1
676- let outPrAmt = $t02680627223._2
677- let amBalance = $t02680627223._3
678- let prBalance = $t02680627223._4
679- let lpEmission = $t02680627223._5
680- let curPrice = $t02680627223._6
681- let poolStatus = $t02680627223._7
665+ let outAmAmt = $t02664027057._1
666+ let outPrAmt = $t02664027057._2
667+ let amBalance = $t02664027057._3
668+ let prBalance = $t02664027057._4
669+ let lpEmission = $t02664027057._5
670+ let curPrice = $t02664027057._6
671+ let poolStatus = $t02664027057._7
682672 $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(outAmAmt), toString(outPrAmt), toString(amBalance), toString(prBalance), toString(lpEmission), curPrice, poolStatus], SEP))
683673 }
684674
685675
686676
687677 @Callable(i)
688678 func gwxUserInfoREADONLY (userAddress) = {
689679 let gwxUserInfoLIST = asAnyList(invoke(boostingDapp, "gwxUserInfoREADONLY", [userAddress], nil))
690680 let gwxAmount = asInt(gwxUserInfoLIST[0])
691681 $Tuple2(nil, makeString(["%d", toString(gwxAmount)], SEP))
692682 }
693683
694684
695685
696686 @Callable(i)
697687 func unstakeAndGetOneTknV2 (poolAddress,unstakeAmount,outAssetId,minOutAmount) = {
698688 let inv = invoke(addressFromStringValue(poolAddress), "unstakeAndGetOneTknV2", [unstakeAmount, outAssetId, minOutAmount], nil)
699689 if ((inv == inv))
700690 then $Tuple2(nil, unit)
701691 else throw("Strict value is not equal to itself.")
702692 }
703693
704694
705695
706696 @Callable(i)
707697 func getKeysBulkInternal (currentIter,keys,resAcc) = if ((currentIter == size(keys)))
708698 then $Tuple2(nil, resAcc)
709699 else {
710700 let k = split(keys[currentIter], "++")
711701 let addr = addressFromStringValue(k[0])
712702 let key = k[1]
713703 let type = k[2]
714704 let val = getKey(addr, key, type)
715705 let res = (resAcc :+ val)
716706 let inv = invoke(this, "getKeysBulkInternal", [(currentIter + 1), keys, res], nil)
717707 if ((inv == inv))
718708 then $Tuple2(nil, inv)
719709 else throw("Strict value is not equal to itself.")
720710 }
721711
722712
723713
724714 @Callable(i)
725715 func getKeysBulk (keys) = {
726716 let res = invoke(this, "getKeysBulkInternal", [0, keys, nil], nil)
727717 $Tuple2(nil, res)
728718 }
729719
730720
731721
732722 @Callable(i)
733723 func setManager (pendingManagerPublicKey) = {
734724 let checkCaller = mustManager(i)
735725 if ((checkCaller == checkCaller))
736726 then {
737727 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
738728 if ((checkManagerPublicKey == checkManagerPublicKey))
739729 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
740730 else throw("Strict value is not equal to itself.")
741731 }
742732 else throw("Strict value is not equal to itself.")
743733 }
744734
745735
746736
747737 @Callable(i)
748738 func confirmManager () = {
749739 let pm = pendingManagerPublicKeyOrUnit()
750740 let hasPM = if (isDefined(pm))
751741 then true
752742 else throw("No pending manager")
753743 if ((hasPM == hasPM))
754744 then {
755745 let checkPM = if ((i.callerPublicKey == value(pm)))
756746 then true
757747 else throw("You are not pending manager")
758748 if ((checkPM == checkPM))
759749 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
760750 else throw("Strict value is not equal to itself.")
761751 }
762752 else throw("Strict value is not equal to itself.")
763753 }
764754
765755
766756 @Verifier(tx)
767757 func verify () = {
768758 let targetPublicKey = match managerPublicKeyOrUnit() {
769759 case pk: ByteVector =>
770760 pk
771761 case _: Unit =>
772762 tx.senderPublicKey
773763 case _ =>
774764 throw("Match error")
775765 }
776766 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
777767 }
778768

github/deemru/w8io/026f985 
86.02 ms