tx · 3F8svdZKqfrHECRNtLPTT2My2L9DSe5mKLDme55aQQHG

3MsNhK6uve98J6DeqbuwGFBRh9GoHPGUFgp:  -0.02400000 Waves

2023.04.24 15:32 [2548634] smart account 3MsNhK6uve98J6DeqbuwGFBRh9GoHPGUFgp > SELF 0.00000000 Waves

{ "type": 13, "id": "3F8svdZKqfrHECRNtLPTT2My2L9DSe5mKLDme55aQQHG", "fee": 2400000, "feeAssetId": null, "timestamp": 1682339611690, "version": 2, "chainId": 84, "sender": "3MsNhK6uve98J6DeqbuwGFBRh9GoHPGUFgp", "senderPublicKey": "86RHVxKovtU7yKnepY8wKsd8niDxGAsiwuA1XA1DNqrS", "proofs": [ "3mz2QHy8GtFJREhFzLyq6pL9ju2r6ainnwpZCzoZaNwwezVdLA6kKnJRU5Mf9quTtFNgYqKpGJXgiWE4J2G2C9us" ], "script": "base64:BgLqIQgCEgMKAQgSAwoBCBIECgIICBIJCgcBERERGAgYEgcKBRERERgIEgcKBQEBAQgIEgASAwoBCBIECgIIARIECgIIARIECgIIARIDCgEIEgYKBAgBCAESBQoDARgYEgMKARgSAwoBCBIAIgZTQ0FMRTgiBU1VTFQ4IgdTQ0FMRTE4IgZNVUxUMTgiA1NFUCIOUE9PTFdFSUdIVE1VTFQiCnplcm9CaWdJbnQiDmlkeFBvb2xBZGRyZXNzIg1pZHhQb29sU3RhdHVzIhBpZHhQb29sTFBBc3NldElkIg1pZHhBbXRBc3NldElkIg9pZHhQcmljZUFzc2V0SWQiDmlkeEFtdEFzc2V0RGNtIhBpZHhQcmljZUFzc2V0RGNtIg5pZHhJQW10QXNzZXRJZCIQaWR4SVByaWNlQXNzZXRJZCINaWR4TFBBc3NldERjbSIPZ2V0U3RyaW5nT3JGYWlsIgNrZXkiGGdldFN0cmluZ0J5QWRkcmVzc09yRmFpbCIHYWRkcmVzcyIMZ2V0SW50T3JaZXJvIgxnZXRJbnRPckZhaWwiCWFzQW55TGlzdCIDdmFsIgckbWF0Y2gwIgp2YWxBbn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BpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgkAAgECJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgECZWEBAmViAAQCZWMEAXoJAQJieQADCQABAgUBegIKQnl0ZVZlY3RvcgQCYkcFAXoFAmJHAwkAAQIFAXoCBFVuaXQIBQJlYQ9zZW5kZXJQdWJsaWNLZXkJAAIBAgtNYXRjaCBlcnJvcgkA9AMDCAUCZWEJYm9keUJ5dGVzCQCRAwIIBQJlYQZwcm9vZnMAAAUCZWMMj6X7", "height": 2548634, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Cd4pK1LVmG87fzL3FZmTucckrDB6pBAUrnXXB6TSvakg Next: EXTGNy5Fr5SyrRygF4rQ9pwrcGmJWv5Saq1sAgx6d9qA Diff:
OldNewDifferences
7878
7979
8080 func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
81+
82+
83+func keyManagerVaultAddress () = "%s__managerVaultAddress"
8184
8285
8386 let IdxFactoryCfgStakingDapp = 1
292295 else throw("unknown type. expected string/integer/boolean")
293296
294297
295-func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
296- case s: String =>
297- fromBase58String(s)
298- case _: Unit =>
299- unit
300- case _ =>
301- throw("Match error")
302-}
298+func managerPublicKeyOrUnit () = {
299+ let managerVaultAddress = addressFromStringValue(getStringByAddressOrFail(this, keyManagerVaultAddress()))
300+ let managerPublicKey = getString(managerVaultAddress, keyManagerPublicKey())
301+ match managerPublicKey {
302+ case s: String =>
303+ fromBase58String(s)
304+ case _: Unit =>
305+ unit
306+ case _ =>
307+ throw("Match error")
308+ }
309+ }
303310
304311
305312 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
566573 let inPrAssetAmtX18 = fraction(inAmAssetAmtX18, curPriceX18, MULT18)
567574 let inPrAssetAmt = asInt(invoke(poolAddress, "fromX18WrapperREADONLY", [toString(inPrAssetAmtX18), priceAssetDcm], nil))
568575 let res = invoke(poolAddress, "estimatePutOperationWrapperREADONLY", ["", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false], nil)
569- let $t02263122984 = match res {
576+ let $t02287323226 = match res {
570577 case _ =>
571578 if (if (if ($isInstanceOf($match0._1, "Int"))
572579 then if ($isInstanceOf($match0._3, "Int"))
589596 }
590597 else throw("Couldn't cast types")
591598 }
592- let calcLpAmt = $t02263122984._1
593- let curPriceCalc = $t02263122984._2
594- let amBalance = $t02263122984._3
595- let prBalance = $t02263122984._4
596- let lpEmission = $t02263122984._5
599+ let calcLpAmt = $t02287323226._1
600+ let curPriceCalc = $t02287323226._2
601+ let amBalance = $t02287323226._3
602+ let prBalance = $t02287323226._4
603+ let lpEmission = $t02287323226._5
597604 $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))
598605 }
599606
624631 let inAmAssetAmtX18 = fraction(inPrAssetAmtX18, MULT18, curPriceX18)
625632 let inAmAssetAmt = asInt(invoke(poolAddress, "fromX18WrapperREADONLY", [toString(inAmAssetAmtX18), amtAssetDcm], nil))
626633 let res = invoke(poolAddress, "estimatePutOperationWrapperREADONLY", ["", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false], nil)
627- let $t02555725910 = match res {
634+ let $t02579926152 = match res {
628635 case _ =>
629636 if (if (if ($isInstanceOf($match0._1, "Int"))
630637 then if ($isInstanceOf($match0._3, "Int"))
647654 }
648655 else throw("Couldn't cast types")
649656 }
650- let calcLpAmt = $t02555725910._1
651- let curPriceCalc = $t02555725910._2
652- let amBalance = $t02555725910._3
653- let prBalance = $t02555725910._4
654- let lpEmission = $t02555725910._5
657+ let calcLpAmt = $t02579926152._1
658+ let curPriceCalc = $t02579926152._2
659+ let amBalance = $t02579926152._3
660+ let prBalance = $t02579926152._4
661+ let lpEmission = $t02579926152._5
655662 $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))
656663 }
657664
661668 func poolEvaluateGetREADONLY (paymentLpAssetId,paymentLpAmt) = {
662669 let poolAddress = addressFromStringValue(getStringByAddressOrFail(factoryDapp, keyFactoryLpAssetToPoolContractAddress(paymentLpAssetId)))
663670 let res = invoke(poolAddress, "estimateGetOperationWrapperREADONLY", ["", paymentLpAssetId, paymentLpAmt, toString(poolAddress)], nil)
664- let $t02660527022 = match res {
671+ let $t02684727264 = match res {
665672 case _ =>
666673 if (if (if ($isInstanceOf($match0._1, "Int"))
667674 then if ($isInstanceOf($match0._2, "Int"))
690697 }
691698 else throw("Couldn't cast types")
692699 }
693- let outAmAmt = $t02660527022._1
694- let outPrAmt = $t02660527022._2
695- let amBalance = $t02660527022._3
696- let prBalance = $t02660527022._4
697- let lpEmission = $t02660527022._5
698- let curPrice = $t02660527022._6
699- let poolStatus = $t02660527022._7
700+ let outAmAmt = $t02684727264._1
701+ let outPrAmt = $t02684727264._2
702+ let amBalance = $t02684727264._3
703+ let prBalance = $t02684727264._4
704+ let lpEmission = $t02684727264._5
705+ let curPrice = $t02684727264._6
706+ let poolStatus = $t02684727264._7
700707 $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(outAmAmt), toString(outPrAmt), toString(amBalance), toString(prBalance), toString(lpEmission), curPrice, poolStatus], SEP))
701708 }
702709
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"
81+
82+
83+func keyManagerVaultAddress () = "%s__managerVaultAddress"
8184
8285
8386 let IdxFactoryCfgStakingDapp = 1
8487
8588 let IdxFactoryCfgBoostingDapp = 2
8689
8790 let IdxFactoryCfgIdoDapp = 3
8891
8992 let IdxFactoryCfgTeamDapp = 4
9093
9194 let IdxFactoryCfgEmissionDapp = 5
9295
9396 let IdxFactoryCfgRestDapp = 6
9497
9598 let IdxFactoryCfgSlippageDapp = 7
9699
97100 let IdxFactoryCfgGwxRewardDapp = 8
98101
99102 func keyFactoryCfg () = "%s__factoryConfig"
100103
101104
102105 func keyFactoryLp2AssetsMapping (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP)
103106
104107
105108 func keyFactoryLpList () = "%s__lpTokensList"
106109
107110
108111 func keyFactoryLpAssetToPoolContractAddress (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP)
109112
110113
111114 func keyFactoryPoolWeight (contractAddress) = makeString(["%s%s", "poolWeight", contractAddress], SEP)
112115
113116
114117 func readFactoryAddressOrFail () = addressFromStringValue(getStringOrFail(keyFactoryAddress()))
115118
116119
117120 func readLpList () = split(valueOrElse(getString(readFactoryAddressOrFail(), keyFactoryLpList()), ""), SEP)
118121
119122
120123 func readFactoryCfgOrFail (factory) = split(getStringByAddressOrFail(factory, keyFactoryCfg()), SEP)
121124
122125
123126 func getBoostingAddressOrFail (fCfg) = addressFromStringValue(fCfg[IdxFactoryCfgBoostingDapp])
124127
125128
126129 func getEmissionAddressOrFail (fCfg) = addressFromStringValue(fCfg[IdxFactoryCfgEmissionDapp])
127130
128131
129132 func getStakingAddressOrFail (fCfg) = addressFromStringValue(fCfg[IdxFactoryCfgStakingDapp])
130133
131134
132135 func getGwxRewardAddressOrFail (fCfg) = addressFromStringValue(fCfg[IdxFactoryCfgGwxRewardDapp])
133136
134137
135138 func keyBoostCfg () = "%s__config"
136139
137140
138141 func keyBoostingLockParamTotalAmount () = "%s%s__stats__activeTotalLocked"
139142
140143
141144 func keyBoostingStatsLocksDurationSumInBlocks () = "%s%s__stats__locksDurationSumInBlocks"
142145
143146
144147 func keyBoostingStatsLocksCount () = "%s%s__stats__locksCount"
145148
146149
147150 func keyBoostingStatsUsersCount () = "%s%s__stats__activeUsersCount"
148151
149152
150153 func keyUser2NumMapping (userAddress) = makeString(["%s%s%s__mapping__user2num", userAddress], SEP)
151154
152155
153156 func keyNum2UserMapping (num) = makeString(["%s%s%s__mapping__num2user", num], SEP)
154157
155158
156159 func keyLockParamUserAmount (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "amount"], SEP)
157160
158161
159162 func keyLockParamStartBlock (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "start"], SEP)
160163
161164
162165 func keyLockParamDuration (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "duration"], SEP)
163166
164167
165168 func keyLockParamK (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "k"], SEP)
166169
167170
168171 func keyLockParamB (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "b"], SEP)
169172
170173
171174 func keyLockParamByPeriodK (userNum,period) = makeString(["%s%d%s%d__paramByPeriod", userNum, "k", period], SEP)
172175
173176
174177 func keyLockParamByPeriodB (userNum,period) = makeString(["%s%d%s%d__paramByPeriod", userNum, "b", period], SEP)
175178
176179
177180 func keyUserBoostEmissionLastINTEGRAL (userNum) = makeString(["%s%d__userBoostEmissionLastInt", userNum], SEP)
178181
179182
180183 func keyUserMaxBoostINTEGRAL (userNum) = makeString(["%s%d__maxBoostInt", userNum], SEP)
181184
182185
183186 func keyTotalMaxBoostINTEGRAL () = "%s%s__maxBoostInt__total"
184187
185188
186189 func keyUserBoostAvalaibleToClaimTotal (userNum) = makeString(["%s%d__userBoostAvaliableToClaimTotal", userNum], SEP)
187190
188191
189192 func keyUserBoostClaimed (userNum) = makeString(["%s%d__userBoostClaimed", userNum], SEP)
190193
191194
192195 func keyTotalCachedGwx () = "%s%s__gwxCached__total"
193196
194197
195198 func keyStakedByUser (userAddressStr,lpAssetIdStr) = makeString(["%s%s%s__staked", userAddressStr, lpAssetIdStr], SEP)
196199
197200
198201 func keyStakedTotal (lpAssetIdStr) = ("%s%s%s__staked__total__" + lpAssetIdStr)
199202
200203
201204 func keyClaimedByUser (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimed", userAddressStr, lpAssetIdStr], SEP)
202205
203206
204207 func keyClaimedByUserMinReward (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimedMinReward", userAddressStr, lpAssetIdStr], SEP)
205208
206209
207210 func keyClaimedByUserBoostReward (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimedBoostReward", userAddressStr, lpAssetIdStr], SEP)
208211
209212
210213 func readStaked (stakingDapp,key) = valueOrElse(getInteger(stakingDapp, key), 0)
211214
212215
213216 func keyEmissionRatePerBlockCurrent () = "%s%s__ratePerBlock__current"
214217
215218
216219 func keyEmissionRatePerBlockMaxCurrent () = "%s%s__ratePerBlockMax__current"
217220
218221
219222 func keyEmissionStartBlock () = "%s%s__emission__startBlock"
220223
221224
222225 func keyEmissionDurationInBlocks () = "%s%s__emission__duration"
223226
224227
225228 func keyEmissionEndBlock () = "%s%s__emission__endBlock"
226229
227230
228231 func keyAddonAddr () = "%s__addonAddr"
229232
230233
231234 let factoryDapp = readFactoryAddressOrFail()
232235
233236 let factoryCfg = readFactoryCfgOrFail(factoryDapp)
234237
235238 let emissionDapp = getEmissionAddressOrFail(factoryCfg)
236239
237240 let stakingDapp = getStakingAddressOrFail(factoryCfg)
238241
239242 let gwxRewardDapp = getGwxRewardAddressOrFail(factoryCfg)
240243
241244 let boostingDapp = getBoostingAddressOrFail(factoryCfg)
242245
243246 func getPoolInFee (poolAddress) = {
244247 let @ = invoke(factoryDapp, "getInFeeREADONLY", [toString(poolAddress)], nil)
245248 if ($isInstanceOf(@, "Int"))
246249 then @
247250 else throw(($getType(@) + " couldn't be cast to Int"))
248251 }
249252
250253
251254 func getPoolOutFee (poolAddress) = {
252255 let @ = invoke(factoryDapp, "getOutFeeREADONLY", [toString(poolAddress)], nil)
253256 if ($isInstanceOf(@, "Int"))
254257 then @
255258 else throw(($getType(@) + " couldn't be cast to Int"))
256259 }
257260
258261
259262 func internalCurrentRewardRate (lpAssetId) = {
260263 let poolAddressStr = getStringByAddressOrFail(factoryDapp, keyFactoryLpAssetToPoolContractAddress(lpAssetId))
261264 let poolWeightMult = MULT8
262265 let poolWeight = getIntegerValue(factoryDapp, keyFactoryPoolWeight(poolAddressStr))
263266 let wxEmissionPerBlock = getIntOrFail(emissionDapp, keyEmissionRatePerBlockCurrent())
264267 let wxEmissionPerBlockMax = getIntOrFail(emissionDapp, keyEmissionRatePerBlockMaxCurrent())
265268 let boostMaxCoeff = {
266269 let @ = invoke(emissionDapp, "getBoostCoeffREADONLY", nil, nil)
267270 if ($isInstanceOf(@, "Int"))
268271 then @
269272 else throw(($getType(@) + " couldn't be cast to Int"))
270273 }
271274 let poolWxEmissionPerBlock = (fraction(wxEmissionPerBlock, poolWeight, poolWeightMult) / boostMaxCoeff)
272275 let poolWxEmissionPerBlockMax = fraction(wxEmissionPerBlockMax, poolWeight, poolWeightMult)
273276 let maxFactor = (boostMaxCoeff * MULT8)
274277 let totalLpStaked = getIntOrZero(stakingDapp, keyStakedTotal(lpAssetId))
275278 [poolWxEmissionPerBlock, maxFactor, totalLpStaked]
276279 }
277280
278281
279282 func calcGwxAmountStartREADONLY (lockAmount,lockDuration,maxLockDuration) = {
280283 let coeffX8 = fraction(lockDuration, MULT8, maxLockDuration)
281284 let gWxAmountStart = fraction(lockAmount, coeffX8, MULT8)
282285 [gWxAmountStart]
283286 }
284287
285288
286289 func getKey (addr,key,type) = if ((type == "string"))
287290 then getStringValue(addr, key)
288291 else if ((type == "integer"))
289292 then toString(getIntegerValue(addr, key))
290293 else if ((type == "boolean"))
291294 then toString(getBooleanValue(addr, key))
292295 else throw("unknown type. expected string/integer/boolean")
293296
294297
295-func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
296- case s: String =>
297- fromBase58String(s)
298- case _: Unit =>
299- unit
300- case _ =>
301- throw("Match error")
302-}
298+func managerPublicKeyOrUnit () = {
299+ let managerVaultAddress = addressFromStringValue(getStringByAddressOrFail(this, keyManagerVaultAddress()))
300+ let managerPublicKey = getString(managerVaultAddress, keyManagerPublicKey())
301+ match managerPublicKey {
302+ case s: String =>
303+ fromBase58String(s)
304+ case _: Unit =>
305+ unit
306+ case _ =>
307+ throw("Match error")
308+ }
309+ }
303310
304311
305312 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
306313 case s: String =>
307314 fromBase58String(s)
308315 case _: Unit =>
309316 unit
310317 case _ =>
311318 throw("Match error")
312319 }
313320
314321
315322 func mustManager (i) = {
316323 let pd = throw("Permission denied")
317324 match managerPublicKeyOrUnit() {
318325 case pk: ByteVector =>
319326 if ((i.callerPublicKey == pk))
320327 then true
321328 else pd
322329 case _: Unit =>
323330 if ((i.caller == this))
324331 then true
325332 else pd
326333 case _ =>
327334 throw("Match error")
328335 }
329336 }
330337
331338
332339 @Callable(i)
333340 func constructor (factoryAddress) = {
334341 let checkCaller = mustManager(i)
335342 if ((checkCaller == checkCaller))
336343 then [StringEntry(keyFactoryAddress(), factoryAddress)]
337344 else throw("Strict value is not equal to itself.")
338345 }
339346
340347
341348
342349 @Callable(i)
343350 func currentRewardRateREADONLY (lpAssetId) = {
344351 let rewardData = internalCurrentRewardRate(lpAssetId)
345352 let wxEmissionPerBlock = rewardData[0]
346353 let maxFactor = rewardData[1]
347354 let totalLpStaked = rewardData[2]
348355 let votingResultStaked = {
349356 let @ = invoke(boostingDapp, "getVotingResultStakedREADONLY", [lpAssetId], nil)
350357 if ($isInstanceOf(@, "Int"))
351358 then @
352359 else throw(($getType(@) + " couldn't be cast to Int"))
353360 }
354361 $Tuple2(nil, makeString(["%d%d%d%d", toString(wxEmissionPerBlock), toString(maxFactor), toString(totalLpStaked), toString(votingResultStaked)], SEP))
355362 }
356363
357364
358365
359366 @Callable(i)
360367 func currentUserRewardRateREADONLY (lpAssetId,userAddress) = {
361368 let rewardData = internalCurrentRewardRate(lpAssetId)
362369 let wxEmissionPerBlock = rewardData[0]
363370 let maxFactor = rewardData[1]
364371 let totalLpStaked = rewardData[2]
365372 let lpStakedByUser = getIntOrZero(stakingDapp, keyStakedByUser(userAddress, lpAssetId))
366373 let userClaimInfo = split(asString(invoke(stakingDapp, "claimWxREADONLY", [lpAssetId, userAddress], nil)), SEP)
367374 let minRewardPart = valueOrErrorMessage(parseInt(userClaimInfo[5]), "couldn't parse minRewardPart")
368375 let boostRewardPart = valueOrErrorMessage(parseInt(userClaimInfo[6]), "couldn't parse boostRewardPart")
369376 let debug = userClaimInfo[7]
370377 let boostingPower = if ((boostRewardPart == 0))
371378 then (1 * MULT8)
372379 else fraction((minRewardPart + boostRewardPart), MULT8, minRewardPart)
373380 $Tuple2(nil, makeString(["%d%d%d%d%d%s", toString(wxEmissionPerBlock), toString(maxFactor), toString(totalLpStaked), toString(lpStakedByUser), toString(boostingPower), debug], SEP))
374381 }
375382
376383
377384
378385 @Callable(i)
379386 func calcBoostBulkInternalREADONLY (currentIter,deltaWxAmountBulk,deltaLockPeriodInBlocksBulk,deltaLpAmountBulk,lpAssetIdOptBulk,userAddressOpt,resAcc) = if ((currentIter == size(deltaWxAmountBulk)))
380387 then $Tuple2(nil, resAcc)
381388 else {
382389 let deltaWxAmount = deltaWxAmountBulk[currentIter]
383390 let deltaLockPeriodInBlocks = deltaLockPeriodInBlocksBulk[currentIter]
384391 let deltaLpAmount = deltaLpAmountBulk[currentIter]
385392 let lpAssetIdOpt = lpAssetIdOptBulk[currentIter]
386393 let info = {
387394 let @ = invoke(this, "calcBoostREADONLY", [deltaWxAmount, deltaLockPeriodInBlocks, deltaLpAmount, lpAssetIdOpt, userAddressOpt], nil)
388395 if ($isInstanceOf(@, "String"))
389396 then @
390397 else throw(($getType(@) + " couldn't be cast to String"))
391398 }
392399 let res = (resAcc :+ info)
393400 let inv = {
394401 let @ = invoke(this, "calcBoostBulkInternalREADONLY", [(currentIter + 1), deltaWxAmountBulk, deltaLockPeriodInBlocksBulk, deltaLpAmountBulk, lpAssetIdOptBulk, userAddressOpt, res], nil)
395402 if ($isInstanceOf(@, "List[Any]"))
396403 then @
397404 else throw(($getType(@) + " couldn't be cast to List[Any]"))
398405 }
399406 if ((inv == inv))
400407 then $Tuple2(nil, inv)
401408 else throw("Strict value is not equal to itself.")
402409 }
403410
404411
405412
406413 @Callable(i)
407414 func calcBoostBulkREADONLY (deltaWxAmount,deltaLockPeriodInBlocks,deltaLpAmount,lpAssetIdOpt,userAddressOpt) = {
408415 let res = invoke(this, "calcBoostBulkInternalREADONLY", [0, deltaWxAmount, deltaLockPeriodInBlocks, deltaLpAmount, lpAssetIdOpt, userAddressOpt, nil], nil)
409416 $Tuple2(nil, res)
410417 }
411418
412419
413420
414421 @Callable(i)
415422 func calcBoostREADONLY (deltaWxAmount,deltaLockPeriodInBlocks,deltaLpAmount,lpAssetIdOpt,userAddressOpt) = {
416423 let boostCoeff = {
417424 let @ = invoke(emissionDapp, "getBoostCoeffREADONLY", nil, nil)
418425 if ($isInstanceOf(@, "Int"))
419426 then @
420427 else throw(($getType(@) + " couldn't be cast to Int"))
421428 }
422429 let mathDapp = gwxRewardDapp
423430 let EMPTYSTR = "empty"
424431 let maxLockDurationInBlocks = parseIntValue(split(getStringByAddressOrFail(boostingDapp, keyBoostCfg()), SEP)[4])
425432 let lpAssetIdStr = if ((lpAssetIdOpt == ""))
426433 then EMPTYSTR
427434 else lpAssetIdOpt
428435 let userAddressStr = if ((userAddressOpt == ""))
429436 then EMPTYSTR
430437 else userAddressOpt
431438 let userNumStr = valueOrElse(getString(boostingDapp, keyUser2NumMapping(userAddressOpt)), EMPTYSTR)
432439 let userAmount = valueOrElse(getInteger(boostingDapp, keyLockParamUserAmount(userNumStr)), 0)
433440 let lockStart = valueOrElse(getInteger(boostingDapp, keyLockParamStartBlock(userNumStr)), height)
434441 let lockDuration = valueOrElse(getInteger(boostingDapp, keyLockParamDuration(userNumStr)), 0)
435442 let lockEnd = (lockStart + lockDuration)
436443 let remainingDuration = max([(lockEnd - height), 0])
437444 let userAmountNew = (userAmount + deltaWxAmount)
438445 let lockDurationNew = min([(remainingDuration + deltaLockPeriodInBlocks), maxLockDurationInBlocks])
439446 let userCurrgWxAmount = asInt(asAnyList(invoke(boostingDapp, "gwxUserInfoREADONLY", [userAddressStr], nil))[0])
440447 let gWxAmountStartNew = calcGwxAmountStartREADONLY(userAmountNew, lockDurationNew, maxLockDurationInBlocks)[0]
441448 let totalCachedGwx = {
442449 let @ = invoke(boostingDapp, "getTotalCachedGwxREADONLY", nil, nil)
443450 if ($isInstanceOf(@, "Int"))
444451 then @
445452 else throw(($getType(@) + " couldn't be cast to Int"))
446453 }
447454 let MULT3 = 1000
448455 let wxEmissionPerBlockX3 = (getIntOrFail(emissionDapp, keyEmissionRatePerBlockCurrent()) * MULT3)
449456 let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
450457 let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
451458 let stakedByUser = readStaked(stakingDapp, stakedByUserKEY)
452459 let stakedTotal = readStaked(stakingDapp, stakedTotalKEY)
453460 let poolWeight = if ((lpAssetIdStr != EMPTYSTR))
454461 then {
455462 let poolAddressStr = valueOrErrorMessage(getString(factoryDapp, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr))
456463 getIntegerValue(factoryDapp, keyFactoryPoolWeight(poolAddressStr))
457464 }
458465 else 0
459466 let poolWxEmissionPerBlockX3 = fraction(wxEmissionPerBlockX3, poolWeight, (POOLWEIGHTMULT * boostCoeff))
460467 let wxPerLpX3 = if ((stakedTotal != 0))
461468 then fraction(poolWxEmissionPerBlockX3, MULT8, stakedTotal)
462469 else 0
463470 let userWxPerBlockX3 = fraction(wxPerLpX3, stakedByUser, MULT8)
464471 let boostEmissionPerBlockX3 = (poolWxEmissionPerBlockX3 * (boostCoeff - 1))
465472 let tmpUserBoostPerBlockX3 = fraction(userCurrgWxAmount, boostEmissionPerBlockX3, totalCachedGwx)
466473 let userBoostPerBlockX3 = min([tmpUserBoostPerBlockX3, (userWxPerBlockX3 * (boostCoeff - 1))])
467474 let userBoostCoeff = if ((userWxPerBlockX3 == 0))
468475 then (1 * MULT8)
469476 else fraction((userBoostPerBlockX3 + userWxPerBlockX3), MULT8, userWxPerBlockX3)
470477 $Tuple2(nil, makeString(["%d%d%s", toString(gWxAmountStartNew), toString(userBoostCoeff), "d"], SEP))
471478 }
472479
473480
474481
475482 @Callable(i)
476483 func wxEmissionStatsREADONLY () = {
477484 let ONEMULT = toString(MULT8)
478485 let ONE = "1"
479486 let wxEmissionPerBlock = getIntOrFail(emissionDapp, keyEmissionRatePerBlockCurrent())
480487 let emissionStartBlock = getIntOrFail(emissionDapp, keyEmissionStartBlock())
481488 let passedBlocks = if ((emissionStartBlock > height))
482489 then 0
483490 else (height - emissionStartBlock)
484491 let teamEmDuration = (1440 * 365)
485492 let teamEmMax = (201000000 * MULT8)
486493 let teamEm = if ((passedBlocks > teamEmDuration))
487494 then teamEmMax
488495 else fraction(teamEmMax, passedBlocks, teamEmDuration)
489496 let totalWxReleased = ((wxEmissionPerBlock * passedBlocks) + teamEm)
490497 let totalWxLocked = getIntOrZero(boostingDapp, keyBoostingLockParamTotalAmount())
491498 let locksDurationSumInBlocks = getIntOrZero(boostingDapp, keyBoostingStatsLocksDurationSumInBlocks())
492499 let locksCount = getIntOrZero(boostingDapp, keyBoostingStatsLocksCount())
493500 $Tuple2(nil, makeString(["%d%d%d%d", toString(totalWxReleased), toString(totalWxLocked), toString(locksDurationSumInBlocks), toString(locksCount)], SEP))
494501 }
495502
496503
497504
498505 @Callable(i)
499506 func poolStatsREADONLY (lpAsset) = {
500507 let poolAddress = addressFromStringValue(getStringByAddressOrFail(factoryDapp, keyFactoryLpAssetToPoolContractAddress(lpAsset)))
501508 let status = {
502509 let @ = invoke(factoryDapp, "getPoolStatusREADONLY", [toString(poolAddress)], nil)
503510 if ($isInstanceOf(@, "Int"))
504511 then @
505512 else throw(($getType(@) + " couldn't be cast to Int"))
506513 }
507514 let tpl = "%d%d%d%d%d%d%d%d%d%s"
508515 if ((status == 4))
509516 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))
510517 else {
511518 let cfg = asAnyList(invoke(poolAddress, "getPoolConfigWrapperREADONLY", nil, nil))
512519 let lpAssetId = fromBase58String(asString(cfg[idxPoolLPAssetId]))
513520 let amtAssetId = asString(cfg[idxAmtAssetId])
514521 let priceAssetId = asString(cfg[idxPriceAssetId])
515522 let iAmtAssetId = asString(cfg[idxIAmtAssetId])
516523 let iPriceAssetId = asString(cfg[idxIPriceAssetId])
517524 let amtAssetDcm = parseIntValue(asString(cfg[idxAmtAssetDcm]))
518525 let priceAssetDcm = parseIntValue(asString(cfg[idxPriceAssetDcm]))
519526 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
520527 let accAmtAssetBalance = asInt(invoke(poolAddress, "getAccBalanceWrapperREADONLY", [amtAssetId], nil))
521528 let accPriceAssetBalance = asInt(invoke(poolAddress, "getAccBalanceWrapperREADONLY", [priceAssetId], nil))
522529 let pricesList = if ((poolLPBalance == 0))
523530 then [toString(zeroBigInt), toString(zeroBigInt), toString(zeroBigInt)]
524531 else asAnyList(invoke(poolAddress, "calcPricesWrapperREADONLY", [accAmtAssetBalance, accPriceAssetBalance, poolLPBalance], nil))
525532 let curPrice = 0
526533 let lpAmtAssetShare = asInt(invoke(poolAddress, "fromX18WrapperREADONLY", [pricesList[1], MULT8], nil))
527534 let lpPriceAssetShare = asInt(invoke(poolAddress, "fromX18WrapperREADONLY", [pricesList[2], MULT8], nil))
528535 let poolWeight = getIntegerValue(factoryDapp, keyFactoryPoolWeight(toString(poolAddress)))
529536 let inFee = getPoolInFee(poolAddress)
530537 let outFee = getPoolOutFee(poolAddress)
531538 let poolOneTokenOperationsDisabled = {
532539 let @ = invoke(factoryDapp, "isPoolOneTokenOperationsDisabledREADONLY", [toString(poolAddress)], nil)
533540 if ($isInstanceOf(@, "Boolean"))
534541 then @
535542 else throw(($getType(@) + " couldn't be cast to Boolean"))
536543 }
537544 let poolOneTokenOperationsEnabled = !(poolOneTokenOperationsDisabled)
538545 $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))
539546 }
540547 }
541548
542549
543550
544551 @Callable(i)
545552 func poolEvaluatePutByAmountAssetREADONLY (lpAsset,inAmAssetAmt) = {
546553 let poolAddress = addressFromStringValue(getStringByAddressOrFail(factoryDapp, keyFactoryLpAssetToPoolContractAddress(lpAsset)))
547554 let cfg = asAnyList(invoke(poolAddress, "getPoolConfigWrapperREADONLY", nil, nil))
548555 let lpAssetId = fromBase58String(asString(cfg[idxPoolLPAssetId]))
549556 let amAssetIdStr = asString(cfg[idxAmtAssetId])
550557 let amAssetId = fromBase58String(amAssetIdStr)
551558 let prAssetIdStr = asString(cfg[idxPriceAssetId])
552559 let prAssetId = fromBase58String(prAssetIdStr)
553560 let amtAssetDcm = parseIntValue(asString(cfg[idxAmtAssetDcm]))
554561 let priceAssetDcm = parseIntValue(asString(cfg[idxPriceAssetDcm]))
555562 let poolStatus = asString(cfg[idxPoolStatus])
556563 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
557564 let accAmtAssetBalance = asInt(invoke(poolAddress, "getAccBalanceWrapperREADONLY", [amAssetIdStr], nil))
558565 let accPriceAssetBalance = asInt(invoke(poolAddress, "getAccBalanceWrapperREADONLY", [prAssetIdStr], nil))
559566 let amtAssetAmtX18 = parseBigIntValue(asString(invoke(poolAddress, "toX18WrapperREADONLY", [accAmtAssetBalance, amtAssetDcm], nil)))
560567 let priceAssetAmtX18 = parseBigIntValue(asString(invoke(poolAddress, "toX18WrapperREADONLY", [accPriceAssetBalance, priceAssetDcm], nil)))
561568 let curPriceX18 = if ((poolLPBalance == 0))
562569 then zeroBigInt
563570 else parseBigIntValue(asString(invoke(poolAddress, "calcPriceBigIntWrapperREADONLY", [toString(priceAssetAmtX18), toString(amtAssetAmtX18)], nil)))
564571 let curPrice = asInt(invoke(poolAddress, "fromX18WrapperREADONLY", [toString(curPriceX18), MULT8], nil))
565572 let inAmAssetAmtX18 = parseBigIntValue(asString(invoke(poolAddress, "toX18WrapperREADONLY", [inAmAssetAmt, amtAssetDcm], nil)))
566573 let inPrAssetAmtX18 = fraction(inAmAssetAmtX18, curPriceX18, MULT18)
567574 let inPrAssetAmt = asInt(invoke(poolAddress, "fromX18WrapperREADONLY", [toString(inPrAssetAmtX18), priceAssetDcm], nil))
568575 let res = invoke(poolAddress, "estimatePutOperationWrapperREADONLY", ["", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false], nil)
569- let $t02263122984 = match res {
576+ let $t02287323226 = match res {
570577 case _ =>
571578 if (if (if ($isInstanceOf($match0._1, "Int"))
572579 then if ($isInstanceOf($match0._3, "Int"))
573580 then if ($isInstanceOf($match0._4, "Int"))
574581 then if ($isInstanceOf($match0._5, "Int"))
575582 then $isInstanceOf($match0._6, "Int")
576583 else false
577584 else false
578585 else false
579586 else false)
580587 then (size($match0) == 13)
581588 else false)
582589 then {
583590 let calcLpAmt = $match0._1
584591 let curPriceCalc = $match0._3
585592 let amBalance = $match0._4
586593 let prBalance = $match0._5
587594 let lpEmission = $match0._6
588595 $Tuple5(calcLpAmt, curPriceCalc, amBalance, prBalance, lpEmission)
589596 }
590597 else throw("Couldn't cast types")
591598 }
592- let calcLpAmt = $t02263122984._1
593- let curPriceCalc = $t02263122984._2
594- let amBalance = $t02263122984._3
595- let prBalance = $t02263122984._4
596- let lpEmission = $t02263122984._5
599+ let calcLpAmt = $t02287323226._1
600+ let curPriceCalc = $t02287323226._2
601+ let amBalance = $t02287323226._3
602+ let prBalance = $t02287323226._4
603+ let lpEmission = $t02287323226._5
597604 $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))
598605 }
599606
600607
601608
602609 @Callable(i)
603610 func poolEvaluatePutByPriceAssetREADONLY (lpAsset,inPrAssetAmt) = {
604611 let poolAddress = addressFromStringValue(getStringByAddressOrFail(factoryDapp, keyFactoryLpAssetToPoolContractAddress(lpAsset)))
605612 let cfg = asAnyList(invoke(poolAddress, "getPoolConfigWrapperREADONLY", nil, nil))
606613 let lpAssetId = fromBase58String(asString(cfg[idxPoolLPAssetId]))
607614 let amAssetIdStr = asString(cfg[idxAmtAssetId])
608615 let amAssetId = fromBase58String(amAssetIdStr)
609616 let prAssetIdStr = asString(cfg[idxPriceAssetId])
610617 let prAssetId = fromBase58String(prAssetIdStr)
611618 let amtAssetDcm = parseIntValue(asString(cfg[idxAmtAssetDcm]))
612619 let priceAssetDcm = parseIntValue(asString(cfg[idxPriceAssetDcm]))
613620 let poolStatus = asString(cfg[idxPoolStatus])
614621 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
615622 let amBalanceRaw = asInt(invoke(poolAddress, "getAccBalanceWrapperREADONLY", [amAssetIdStr], nil))
616623 let prBalanceRaw = asInt(invoke(poolAddress, "getAccBalanceWrapperREADONLY", [prAssetIdStr], nil))
617624 let amBalanceRawX18 = parseBigIntValue(asString(invoke(poolAddress, "toX18WrapperREADONLY", [amBalanceRaw, amtAssetDcm], nil)))
618625 let prBalanceRawX18 = parseBigIntValue(asString(invoke(poolAddress, "toX18WrapperREADONLY", [prBalanceRaw, priceAssetDcm], nil)))
619626 let curPriceX18 = if ((poolLPBalance == 0))
620627 then zeroBigInt
621628 else parseBigIntValue(asString(invoke(poolAddress, "calcPriceBigIntWrapperREADONLY", [toString(prBalanceRawX18), toString(amBalanceRawX18)], nil)))
622629 let curPrice = asInt(invoke(poolAddress, "fromX18WrapperREADONLY", [toString(curPriceX18), MULT8], nil))
623630 let inPrAssetAmtX18 = parseBigIntValue(asString(invoke(poolAddress, "toX18WrapperREADONLY", [inPrAssetAmt, priceAssetDcm], nil)))
624631 let inAmAssetAmtX18 = fraction(inPrAssetAmtX18, MULT18, curPriceX18)
625632 let inAmAssetAmt = asInt(invoke(poolAddress, "fromX18WrapperREADONLY", [toString(inAmAssetAmtX18), amtAssetDcm], nil))
626633 let res = invoke(poolAddress, "estimatePutOperationWrapperREADONLY", ["", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false], nil)
627- let $t02555725910 = match res {
634+ let $t02579926152 = match res {
628635 case _ =>
629636 if (if (if ($isInstanceOf($match0._1, "Int"))
630637 then if ($isInstanceOf($match0._3, "Int"))
631638 then if ($isInstanceOf($match0._4, "Int"))
632639 then if ($isInstanceOf($match0._5, "Int"))
633640 then $isInstanceOf($match0._6, "Int")
634641 else false
635642 else false
636643 else false
637644 else false)
638645 then (size($match0) == 13)
639646 else false)
640647 then {
641648 let calcLpAmt = $match0._1
642649 let curPriceCalc = $match0._3
643650 let amBalance = $match0._4
644651 let prBalance = $match0._5
645652 let lpEmission = $match0._6
646653 $Tuple5(calcLpAmt, curPriceCalc, amBalance, prBalance, lpEmission)
647654 }
648655 else throw("Couldn't cast types")
649656 }
650- let calcLpAmt = $t02555725910._1
651- let curPriceCalc = $t02555725910._2
652- let amBalance = $t02555725910._3
653- let prBalance = $t02555725910._4
654- let lpEmission = $t02555725910._5
657+ let calcLpAmt = $t02579926152._1
658+ let curPriceCalc = $t02579926152._2
659+ let amBalance = $t02579926152._3
660+ let prBalance = $t02579926152._4
661+ let lpEmission = $t02579926152._5
655662 $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))
656663 }
657664
658665
659666
660667 @Callable(i)
661668 func poolEvaluateGetREADONLY (paymentLpAssetId,paymentLpAmt) = {
662669 let poolAddress = addressFromStringValue(getStringByAddressOrFail(factoryDapp, keyFactoryLpAssetToPoolContractAddress(paymentLpAssetId)))
663670 let res = invoke(poolAddress, "estimateGetOperationWrapperREADONLY", ["", paymentLpAssetId, paymentLpAmt, toString(poolAddress)], nil)
664- let $t02660527022 = match res {
671+ let $t02684727264 = match res {
665672 case _ =>
666673 if (if (if ($isInstanceOf($match0._1, "Int"))
667674 then if ($isInstanceOf($match0._2, "Int"))
668675 then if ($isInstanceOf($match0._5, "Int"))
669676 then if ($isInstanceOf($match0._6, "Int"))
670677 then if ($isInstanceOf($match0._7, "Int"))
671678 then if ($isInstanceOf($match0._8, "String"))
672679 then $isInstanceOf($match0._9, "String")
673680 else false
674681 else false
675682 else false
676683 else false
677684 else false
678685 else false)
679686 then (size($match0) == 10)
680687 else false)
681688 then {
682689 let outAmAmt = $match0._1
683690 let outPrAmt = $match0._2
684691 let amBalance = $match0._5
685692 let prBalance = $match0._6
686693 let lpEmission = $match0._7
687694 let curPrice = $match0._8
688695 let poolStatus = $match0._9
689696 $Tuple7(outAmAmt, outPrAmt, amBalance, prBalance, lpEmission, curPrice, poolStatus)
690697 }
691698 else throw("Couldn't cast types")
692699 }
693- let outAmAmt = $t02660527022._1
694- let outPrAmt = $t02660527022._2
695- let amBalance = $t02660527022._3
696- let prBalance = $t02660527022._4
697- let lpEmission = $t02660527022._5
698- let curPrice = $t02660527022._6
699- let poolStatus = $t02660527022._7
700+ let outAmAmt = $t02684727264._1
701+ let outPrAmt = $t02684727264._2
702+ let amBalance = $t02684727264._3
703+ let prBalance = $t02684727264._4
704+ let lpEmission = $t02684727264._5
705+ let curPrice = $t02684727264._6
706+ let poolStatus = $t02684727264._7
700707 $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(outAmAmt), toString(outPrAmt), toString(amBalance), toString(prBalance), toString(lpEmission), curPrice, poolStatus], SEP))
701708 }
702709
703710
704711
705712 @Callable(i)
706713 func gwxUserInfoREADONLY (userAddress) = {
707714 let gwxUserInfoLIST = asAnyList(invoke(boostingDapp, "gwxUserInfoREADONLY", [userAddress], nil))
708715 let gwxAmount = asInt(gwxUserInfoLIST[0])
709716 $Tuple2(nil, makeString(["%d", toString(gwxAmount)], SEP))
710717 }
711718
712719
713720
714721 @Callable(i)
715722 func unstakeAndGetOneTknV2 (poolAddress,unstakeAmount,outAssetId,minOutAmount) = {
716723 let inv = invoke(addressFromStringValue(poolAddress), "unstakeAndGetOneTknV2", [unstakeAmount, outAssetId, minOutAmount], nil)
717724 if ((inv == inv))
718725 then $Tuple2(nil, unit)
719726 else throw("Strict value is not equal to itself.")
720727 }
721728
722729
723730
724731 @Callable(i)
725732 func getKeysBulkInternal (currentIter,keys,resAcc) = if ((currentIter == size(keys)))
726733 then $Tuple2(nil, resAcc)
727734 else {
728735 let k = split(keys[currentIter], "++")
729736 let addr = addressFromStringValue(k[0])
730737 let key = k[1]
731738 let type = k[2]
732739 let val = getKey(addr, key, type)
733740 let res = (resAcc :+ val)
734741 let inv = invoke(this, "getKeysBulkInternal", [(currentIter + 1), keys, res], nil)
735742 if ((inv == inv))
736743 then $Tuple2(nil, inv)
737744 else throw("Strict value is not equal to itself.")
738745 }
739746
740747
741748
742749 @Callable(i)
743750 func getKeysBulk (keys) = {
744751 let res = invoke(this, "getKeysBulkInternal", [0, keys, nil], nil)
745752 $Tuple2(nil, res)
746753 }
747754
748755
749756
750757 @Callable(i)
751758 func setManager (pendingManagerPublicKey) = {
752759 let checkCaller = mustManager(i)
753760 if ((checkCaller == checkCaller))
754761 then {
755762 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
756763 if ((checkManagerPublicKey == checkManagerPublicKey))
757764 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
758765 else throw("Strict value is not equal to itself.")
759766 }
760767 else throw("Strict value is not equal to itself.")
761768 }
762769
763770
764771
765772 @Callable(i)
766773 func confirmManager () = {
767774 let pm = pendingManagerPublicKeyOrUnit()
768775 let hasPM = if (isDefined(pm))
769776 then true
770777 else throw("No pending manager")
771778 if ((hasPM == hasPM))
772779 then {
773780 let checkPM = if ((i.callerPublicKey == value(pm)))
774781 then true
775782 else throw("You are not pending manager")
776783 if ((checkPM == checkPM))
777784 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
778785 else throw("Strict value is not equal to itself.")
779786 }
780787 else throw("Strict value is not equal to itself.")
781788 }
782789
783790
784791 @Verifier(tx)
785792 func verify () = {
786793 let targetPublicKey = match managerPublicKeyOrUnit() {
787794 case pk: ByteVector =>
788795 pk
789796 case _: Unit =>
790797 tx.senderPublicKey
791798 case _ =>
792799 throw("Match error")
793800 }
794801 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
795802 }
796803

github/deemru/w8io/169f3d6 
121.97 ms