tx · 617TnknFNAwzizwCivsmUUzV6gsPn5JUdC7pZg7jrRtZ

3MsNhK6uve98J6DeqbuwGFBRh9GoHPGUFgp:  -0.02300000 Waves

2023.05.02 09:54 [2559810] smart account 3MsNhK6uve98J6DeqbuwGFBRh9GoHPGUFgp > SELF 0.00000000 Waves

{ "type": 13, "id": "617TnknFNAwzizwCivsmUUzV6gsPn5JUdC7pZg7jrRtZ", "fee": 2300000, "feeAssetId": null, "timestamp": 1683010485139, "version": 2, "chainId": 84, "sender": "3MsNhK6uve98J6DeqbuwGFBRh9GoHPGUFgp", "senderPublicKey": "86RHVxKovtU7yKnepY8wKsd8niDxGAsiwuA1XA1DNqrS", "proofs": [ "4HjPk7Pdty2C4yTZrQDeACzsmcYfpoAvSAEAuSPLqusyR9sh2D7r2bipLGSTx3wyzsLcURtHgYKGmPGZy8cDADt1" ], "script": "base64:BgLyIAgCEgMKAQgSAwoBCBIECgIICBIJCgcBERERGAgYEgcKBRERERgIEgcKBQEBAQgIEgASAwoBCBIECgIIARIECgIIARIECgIIARIDCgEIEgYKBAgBCAESBQoDARgYEgMKARgiBlNDQUxFOCIFTVVMVDgiB1NDQUxFMTgiBk1VTFQxOCIDU0VQIg5QT09MV0VJR0hUTVVMVCIKemVyb0JpZ0ludCIOaWR4UG9vbEFkZHJlc3MiDWlkeFBvb2xTdGF0dXMiEGlkeFBvb2xMUEFzc2V0SWQiDWlkeEFtdEFzc2V0SWQiD2lkeFByaWNlQXNzZXRJZCIOaWR4QW10QXNzZXREY20iEGlkeFByaWNlQXNzZXREY20iDmlkeElBbXRBc3NldElkIhBpZHhJUHJpY2VBc3NldElkIg1pZHhMUEFzc2V0RGNtIg9nZXRTdHJpbmdPckZhaWwiA2tleSIYZ2V0U3RyaW5nQnlBZGRyZXNzT3JGYWlsIgdhZGRyZXNzIgxnZXRJbnRPclplcm8iDGdldEludE9yRmFpbCIJYXNBbnlMaXN0IgN2YWwiByRtYXRjaDAiCnZhbEFueUx5c3QiBWFzSW50Ig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mLgJiQwELZ2V0S2V5c0J1bGsBAmRSBAJjYgkA/AcEBQR0aGlzAhNnZXRLZXlzQnVsa0ludGVybmFsCQDMCAIAAAkAzAgCBQJkUgkAzAgCBQNuaWwFA25pbAUDbmlsCQCUCgIFA25pbAUCY2IBAmRUAQJkVQAEAmRWBAF6CQECYnkAAwkAAQIFAXoCCkJ5dGVWZWN0b3IEAmJEBQF6BQJiRAMJAAECBQF6AgRVbml0CAUCZFQPc2VuZGVyUHVibGljS2V5CQACAQILTWF0Y2ggZXJyb3IJAPQDAwgFAmRUCWJvZHlCeXRlcwkAkQMCCAUCZFQGcHJvb2ZzAAAFAmRWLDV5sg==", "height": 2559810, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EXTGNy5Fr5SyrRygF4rQ9pwrcGmJWv5Saq1sAgx6d9qA Next: FYMgaBisNouzjQoPkZXzt89ineHNvhD7b7Q3ZBhh71aZ Diff:
OldNewDifferences
7474 func keyFactoryAddress () = "%s%s__config__factoryAddress"
7575
7676
77-func keyManagerPublicKey () = "%s__managerPublicKey"
78-
79-
80-func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
81-
82-
8377 let IdxFactoryCfgStakingDapp = 1
8478
8579 let IdxFactoryCfgBoostingDapp = 2
111105 func keyFactoryPoolWeight (contractAddress) = makeString(["%s%s", "poolWeight", contractAddress], SEP)
112106
113107
108+func keyManagerVaultAddress () = "%s__managerVaultAddress"
109+
110+
111+func keyManagerPublicKey () = "%s__managerPublicKey"
112+
113+
114114 func readFactoryAddressOrFail () = addressFromStringValue(getStringOrFail(keyFactoryAddress()))
115115
116116
130130
131131
132132 func getGwxRewardAddressOrFail (fCfg) = addressFromStringValue(fCfg[IdxFactoryCfgGwxRewardDapp])
133+
134+
135+func getManagerAddressOrFail () = addressFromStringValue(getStringValue(keyManagerVaultAddress()))
133136
134137
135138 func keyBoostCfg () = "%s__config"
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+func managerPublicKeyOrUnit () = {
299+ let managerVaultAddress = getManagerAddressOrFail()
300+ match getString(managerVaultAddress, keyManagerPublicKey()) {
301+ case s: String =>
302+ fromBase58String(s)
303+ case _: Unit =>
304+ unit
305+ case _ =>
306+ throw("Match error")
307+ }
308+ }
309+
310+
311+func isManager (i) = match managerPublicKeyOrUnit() {
312+ case pk: ByteVector =>
313+ (i.callerPublicKey == pk)
298314 case _: Unit =>
299- unit
315+ (i.caller == this)
300316 case _ =>
301317 throw("Match error")
302318 }
303319
304320
305-func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
306- case s: String =>
307- fromBase58String(s)
308- case _: Unit =>
309- unit
310- case _ =>
311- throw("Match error")
312-}
313-
314-
315-func mustManager (i) = {
316- let pd = throw("Permission denied")
317- match managerPublicKeyOrUnit() {
318- case pk: ByteVector =>
319- if ((i.callerPublicKey == pk))
320- then true
321- else pd
322- case _: Unit =>
323- if ((i.caller == this))
324- then true
325- else pd
326- case _ =>
327- throw("Match error")
328- }
329- }
321+func mustManager (i) = if (isManager(i))
322+ then true
323+ else throw("permission denied")
330324
331325
332326 @Callable(i)
566560 let inPrAssetAmtX18 = fraction(inAmAssetAmtX18, curPriceX18, MULT18)
567561 let inPrAssetAmt = asInt(invoke(poolAddress, "fromX18WrapperREADONLY", [toString(inPrAssetAmtX18), priceAssetDcm], nil))
568562 let res = invoke(poolAddress, "estimatePutOperationWrapperREADONLY", ["", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false], nil)
569- let $t02263122984 = match res {
563+ let $t02268423037 = match res {
570564 case _ =>
571565 if (if (if ($isInstanceOf($match0._1, "Int"))
572566 then if ($isInstanceOf($match0._3, "Int"))
589583 }
590584 else throw("Couldn't cast types")
591585 }
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
586+ let calcLpAmt = $t02268423037._1
587+ let curPriceCalc = $t02268423037._2
588+ let amBalance = $t02268423037._3
589+ let prBalance = $t02268423037._4
590+ let lpEmission = $t02268423037._5
597591 $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))
598592 }
599593
624618 let inAmAssetAmtX18 = fraction(inPrAssetAmtX18, MULT18, curPriceX18)
625619 let inAmAssetAmt = asInt(invoke(poolAddress, "fromX18WrapperREADONLY", [toString(inAmAssetAmtX18), amtAssetDcm], nil))
626620 let res = invoke(poolAddress, "estimatePutOperationWrapperREADONLY", ["", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false], nil)
627- let $t02555725910 = match res {
621+ let $t02561025963 = match res {
628622 case _ =>
629623 if (if (if ($isInstanceOf($match0._1, "Int"))
630624 then if ($isInstanceOf($match0._3, "Int"))
647641 }
648642 else throw("Couldn't cast types")
649643 }
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
644+ let calcLpAmt = $t02561025963._1
645+ let curPriceCalc = $t02561025963._2
646+ let amBalance = $t02561025963._3
647+ let prBalance = $t02561025963._4
648+ let lpEmission = $t02561025963._5
655649 $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))
656650 }
657651
661655 func poolEvaluateGetREADONLY (paymentLpAssetId,paymentLpAmt) = {
662656 let poolAddress = addressFromStringValue(getStringByAddressOrFail(factoryDapp, keyFactoryLpAssetToPoolContractAddress(paymentLpAssetId)))
663657 let res = invoke(poolAddress, "estimateGetOperationWrapperREADONLY", ["", paymentLpAssetId, paymentLpAmt, toString(poolAddress)], nil)
664- let $t02660527022 = match res {
658+ let $t02665827075 = match res {
665659 case _ =>
666660 if (if (if ($isInstanceOf($match0._1, "Int"))
667661 then if ($isInstanceOf($match0._2, "Int"))
690684 }
691685 else throw("Couldn't cast types")
692686 }
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
687+ let outAmAmt = $t02665827075._1
688+ let outPrAmt = $t02665827075._2
689+ let amBalance = $t02665827075._3
690+ let prBalance = $t02665827075._4
691+ let lpEmission = $t02665827075._5
692+ let curPrice = $t02665827075._6
693+ let poolStatus = $t02665827075._7
700694 $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(outAmAmt), toString(outPrAmt), toString(amBalance), toString(prBalance), toString(lpEmission), curPrice, poolStatus], SEP))
701695 }
702696
746740 }
747741
748742
749-
750-@Callable(i)
751-func setManager (pendingManagerPublicKey) = {
752- let checkCaller = mustManager(i)
753- if ((checkCaller == checkCaller))
754- then {
755- let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
756- if ((checkManagerPublicKey == checkManagerPublicKey))
757- then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
758- else throw("Strict value is not equal to itself.")
759- }
760- else throw("Strict value is not equal to itself.")
761- }
762-
763-
764-
765-@Callable(i)
766-func confirmManager () = {
767- let pm = pendingManagerPublicKeyOrUnit()
768- let hasPM = if (isDefined(pm))
769- then true
770- else throw("No pending manager")
771- if ((hasPM == hasPM))
772- then {
773- let checkPM = if ((i.callerPublicKey == value(pm)))
774- then true
775- else throw("You are not pending manager")
776- if ((checkPM == checkPM))
777- then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
778- else throw("Strict value is not equal to itself.")
779- }
780- else throw("Strict value is not equal to itself.")
781- }
782-
783-
784743 @Verifier(tx)
785744 func verify () = {
786745 let targetPublicKey = match managerPublicKeyOrUnit() {
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
77-func keyManagerPublicKey () = "%s__managerPublicKey"
78-
79-
80-func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
81-
82-
8377 let IdxFactoryCfgStakingDapp = 1
8478
8579 let IdxFactoryCfgBoostingDapp = 2
8680
8781 let IdxFactoryCfgIdoDapp = 3
8882
8983 let IdxFactoryCfgTeamDapp = 4
9084
9185 let IdxFactoryCfgEmissionDapp = 5
9286
9387 let IdxFactoryCfgRestDapp = 6
9488
9589 let IdxFactoryCfgSlippageDapp = 7
9690
9791 let IdxFactoryCfgGwxRewardDapp = 8
9892
9993 func keyFactoryCfg () = "%s__factoryConfig"
10094
10195
10296 func keyFactoryLp2AssetsMapping (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP)
10397
10498
10599 func keyFactoryLpList () = "%s__lpTokensList"
106100
107101
108102 func keyFactoryLpAssetToPoolContractAddress (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP)
109103
110104
111105 func keyFactoryPoolWeight (contractAddress) = makeString(["%s%s", "poolWeight", contractAddress], SEP)
112106
113107
108+func keyManagerVaultAddress () = "%s__managerVaultAddress"
109+
110+
111+func keyManagerPublicKey () = "%s__managerPublicKey"
112+
113+
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])
133+
134+
135+func getManagerAddressOrFail () = addressFromStringValue(getStringValue(keyManagerVaultAddress()))
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+func managerPublicKeyOrUnit () = {
299+ let managerVaultAddress = getManagerAddressOrFail()
300+ match getString(managerVaultAddress, keyManagerPublicKey()) {
301+ case s: String =>
302+ fromBase58String(s)
303+ case _: Unit =>
304+ unit
305+ case _ =>
306+ throw("Match error")
307+ }
308+ }
309+
310+
311+func isManager (i) = match managerPublicKeyOrUnit() {
312+ case pk: ByteVector =>
313+ (i.callerPublicKey == pk)
298314 case _: Unit =>
299- unit
315+ (i.caller == this)
300316 case _ =>
301317 throw("Match error")
302318 }
303319
304320
305-func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
306- case s: String =>
307- fromBase58String(s)
308- case _: Unit =>
309- unit
310- case _ =>
311- throw("Match error")
312-}
313-
314-
315-func mustManager (i) = {
316- let pd = throw("Permission denied")
317- match managerPublicKeyOrUnit() {
318- case pk: ByteVector =>
319- if ((i.callerPublicKey == pk))
320- then true
321- else pd
322- case _: Unit =>
323- if ((i.caller == this))
324- then true
325- else pd
326- case _ =>
327- throw("Match error")
328- }
329- }
321+func mustManager (i) = if (isManager(i))
322+ then true
323+ else throw("permission denied")
330324
331325
332326 @Callable(i)
333327 func constructor (factoryAddress) = {
334328 let checkCaller = mustManager(i)
335329 if ((checkCaller == checkCaller))
336330 then [StringEntry(keyFactoryAddress(), factoryAddress)]
337331 else throw("Strict value is not equal to itself.")
338332 }
339333
340334
341335
342336 @Callable(i)
343337 func currentRewardRateREADONLY (lpAssetId) = {
344338 let rewardData = internalCurrentRewardRate(lpAssetId)
345339 let wxEmissionPerBlock = rewardData[0]
346340 let maxFactor = rewardData[1]
347341 let totalLpStaked = rewardData[2]
348342 let votingResultStaked = {
349343 let @ = invoke(boostingDapp, "getVotingResultStakedREADONLY", [lpAssetId], nil)
350344 if ($isInstanceOf(@, "Int"))
351345 then @
352346 else throw(($getType(@) + " couldn't be cast to Int"))
353347 }
354348 $Tuple2(nil, makeString(["%d%d%d%d", toString(wxEmissionPerBlock), toString(maxFactor), toString(totalLpStaked), toString(votingResultStaked)], SEP))
355349 }
356350
357351
358352
359353 @Callable(i)
360354 func currentUserRewardRateREADONLY (lpAssetId,userAddress) = {
361355 let rewardData = internalCurrentRewardRate(lpAssetId)
362356 let wxEmissionPerBlock = rewardData[0]
363357 let maxFactor = rewardData[1]
364358 let totalLpStaked = rewardData[2]
365359 let lpStakedByUser = getIntOrZero(stakingDapp, keyStakedByUser(userAddress, lpAssetId))
366360 let userClaimInfo = split(asString(invoke(stakingDapp, "claimWxREADONLY", [lpAssetId, userAddress], nil)), SEP)
367361 let minRewardPart = valueOrErrorMessage(parseInt(userClaimInfo[5]), "couldn't parse minRewardPart")
368362 let boostRewardPart = valueOrErrorMessage(parseInt(userClaimInfo[6]), "couldn't parse boostRewardPart")
369363 let debug = userClaimInfo[7]
370364 let boostingPower = if ((boostRewardPart == 0))
371365 then (1 * MULT8)
372366 else fraction((minRewardPart + boostRewardPart), MULT8, minRewardPart)
373367 $Tuple2(nil, makeString(["%d%d%d%d%d%s", toString(wxEmissionPerBlock), toString(maxFactor), toString(totalLpStaked), toString(lpStakedByUser), toString(boostingPower), debug], SEP))
374368 }
375369
376370
377371
378372 @Callable(i)
379373 func calcBoostBulkInternalREADONLY (currentIter,deltaWxAmountBulk,deltaLockPeriodInBlocksBulk,deltaLpAmountBulk,lpAssetIdOptBulk,userAddressOpt,resAcc) = if ((currentIter == size(deltaWxAmountBulk)))
380374 then $Tuple2(nil, resAcc)
381375 else {
382376 let deltaWxAmount = deltaWxAmountBulk[currentIter]
383377 let deltaLockPeriodInBlocks = deltaLockPeriodInBlocksBulk[currentIter]
384378 let deltaLpAmount = deltaLpAmountBulk[currentIter]
385379 let lpAssetIdOpt = lpAssetIdOptBulk[currentIter]
386380 let info = {
387381 let @ = invoke(this, "calcBoostREADONLY", [deltaWxAmount, deltaLockPeriodInBlocks, deltaLpAmount, lpAssetIdOpt, userAddressOpt], nil)
388382 if ($isInstanceOf(@, "String"))
389383 then @
390384 else throw(($getType(@) + " couldn't be cast to String"))
391385 }
392386 let res = (resAcc :+ info)
393387 let inv = {
394388 let @ = invoke(this, "calcBoostBulkInternalREADONLY", [(currentIter + 1), deltaWxAmountBulk, deltaLockPeriodInBlocksBulk, deltaLpAmountBulk, lpAssetIdOptBulk, userAddressOpt, res], nil)
395389 if ($isInstanceOf(@, "List[Any]"))
396390 then @
397391 else throw(($getType(@) + " couldn't be cast to List[Any]"))
398392 }
399393 if ((inv == inv))
400394 then $Tuple2(nil, inv)
401395 else throw("Strict value is not equal to itself.")
402396 }
403397
404398
405399
406400 @Callable(i)
407401 func calcBoostBulkREADONLY (deltaWxAmount,deltaLockPeriodInBlocks,deltaLpAmount,lpAssetIdOpt,userAddressOpt) = {
408402 let res = invoke(this, "calcBoostBulkInternalREADONLY", [0, deltaWxAmount, deltaLockPeriodInBlocks, deltaLpAmount, lpAssetIdOpt, userAddressOpt, nil], nil)
409403 $Tuple2(nil, res)
410404 }
411405
412406
413407
414408 @Callable(i)
415409 func calcBoostREADONLY (deltaWxAmount,deltaLockPeriodInBlocks,deltaLpAmount,lpAssetIdOpt,userAddressOpt) = {
416410 let boostCoeff = {
417411 let @ = invoke(emissionDapp, "getBoostCoeffREADONLY", nil, nil)
418412 if ($isInstanceOf(@, "Int"))
419413 then @
420414 else throw(($getType(@) + " couldn't be cast to Int"))
421415 }
422416 let mathDapp = gwxRewardDapp
423417 let EMPTYSTR = "empty"
424418 let maxLockDurationInBlocks = parseIntValue(split(getStringByAddressOrFail(boostingDapp, keyBoostCfg()), SEP)[4])
425419 let lpAssetIdStr = if ((lpAssetIdOpt == ""))
426420 then EMPTYSTR
427421 else lpAssetIdOpt
428422 let userAddressStr = if ((userAddressOpt == ""))
429423 then EMPTYSTR
430424 else userAddressOpt
431425 let userNumStr = valueOrElse(getString(boostingDapp, keyUser2NumMapping(userAddressOpt)), EMPTYSTR)
432426 let userAmount = valueOrElse(getInteger(boostingDapp, keyLockParamUserAmount(userNumStr)), 0)
433427 let lockStart = valueOrElse(getInteger(boostingDapp, keyLockParamStartBlock(userNumStr)), height)
434428 let lockDuration = valueOrElse(getInteger(boostingDapp, keyLockParamDuration(userNumStr)), 0)
435429 let lockEnd = (lockStart + lockDuration)
436430 let remainingDuration = max([(lockEnd - height), 0])
437431 let userAmountNew = (userAmount + deltaWxAmount)
438432 let lockDurationNew = min([(remainingDuration + deltaLockPeriodInBlocks), maxLockDurationInBlocks])
439433 let userCurrgWxAmount = asInt(asAnyList(invoke(boostingDapp, "gwxUserInfoREADONLY", [userAddressStr], nil))[0])
440434 let gWxAmountStartNew = calcGwxAmountStartREADONLY(userAmountNew, lockDurationNew, maxLockDurationInBlocks)[0]
441435 let totalCachedGwx = {
442436 let @ = invoke(boostingDapp, "getTotalCachedGwxREADONLY", nil, nil)
443437 if ($isInstanceOf(@, "Int"))
444438 then @
445439 else throw(($getType(@) + " couldn't be cast to Int"))
446440 }
447441 let MULT3 = 1000
448442 let wxEmissionPerBlockX3 = (getIntOrFail(emissionDapp, keyEmissionRatePerBlockCurrent()) * MULT3)
449443 let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr)
450444 let stakedTotalKEY = keyStakedTotal(lpAssetIdStr)
451445 let stakedByUser = readStaked(stakingDapp, stakedByUserKEY)
452446 let stakedTotal = readStaked(stakingDapp, stakedTotalKEY)
453447 let poolWeight = if ((lpAssetIdStr != EMPTYSTR))
454448 then {
455449 let poolAddressStr = valueOrErrorMessage(getString(factoryDapp, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr))
456450 getIntegerValue(factoryDapp, keyFactoryPoolWeight(poolAddressStr))
457451 }
458452 else 0
459453 let poolWxEmissionPerBlockX3 = fraction(wxEmissionPerBlockX3, poolWeight, (POOLWEIGHTMULT * boostCoeff))
460454 let wxPerLpX3 = if ((stakedTotal != 0))
461455 then fraction(poolWxEmissionPerBlockX3, MULT8, stakedTotal)
462456 else 0
463457 let userWxPerBlockX3 = fraction(wxPerLpX3, stakedByUser, MULT8)
464458 let boostEmissionPerBlockX3 = (poolWxEmissionPerBlockX3 * (boostCoeff - 1))
465459 let tmpUserBoostPerBlockX3 = fraction(userCurrgWxAmount, boostEmissionPerBlockX3, totalCachedGwx)
466460 let userBoostPerBlockX3 = min([tmpUserBoostPerBlockX3, (userWxPerBlockX3 * (boostCoeff - 1))])
467461 let userBoostCoeff = if ((userWxPerBlockX3 == 0))
468462 then (1 * MULT8)
469463 else fraction((userBoostPerBlockX3 + userWxPerBlockX3), MULT8, userWxPerBlockX3)
470464 $Tuple2(nil, makeString(["%d%d%s", toString(gWxAmountStartNew), toString(userBoostCoeff), "d"], SEP))
471465 }
472466
473467
474468
475469 @Callable(i)
476470 func wxEmissionStatsREADONLY () = {
477471 let ONEMULT = toString(MULT8)
478472 let ONE = "1"
479473 let wxEmissionPerBlock = getIntOrFail(emissionDapp, keyEmissionRatePerBlockCurrent())
480474 let emissionStartBlock = getIntOrFail(emissionDapp, keyEmissionStartBlock())
481475 let passedBlocks = if ((emissionStartBlock > height))
482476 then 0
483477 else (height - emissionStartBlock)
484478 let teamEmDuration = (1440 * 365)
485479 let teamEmMax = (201000000 * MULT8)
486480 let teamEm = if ((passedBlocks > teamEmDuration))
487481 then teamEmMax
488482 else fraction(teamEmMax, passedBlocks, teamEmDuration)
489483 let totalWxReleased = ((wxEmissionPerBlock * passedBlocks) + teamEm)
490484 let totalWxLocked = getIntOrZero(boostingDapp, keyBoostingLockParamTotalAmount())
491485 let locksDurationSumInBlocks = getIntOrZero(boostingDapp, keyBoostingStatsLocksDurationSumInBlocks())
492486 let locksCount = getIntOrZero(boostingDapp, keyBoostingStatsLocksCount())
493487 $Tuple2(nil, makeString(["%d%d%d%d", toString(totalWxReleased), toString(totalWxLocked), toString(locksDurationSumInBlocks), toString(locksCount)], SEP))
494488 }
495489
496490
497491
498492 @Callable(i)
499493 func poolStatsREADONLY (lpAsset) = {
500494 let poolAddress = addressFromStringValue(getStringByAddressOrFail(factoryDapp, keyFactoryLpAssetToPoolContractAddress(lpAsset)))
501495 let status = {
502496 let @ = invoke(factoryDapp, "getPoolStatusREADONLY", [toString(poolAddress)], nil)
503497 if ($isInstanceOf(@, "Int"))
504498 then @
505499 else throw(($getType(@) + " couldn't be cast to Int"))
506500 }
507501 let tpl = "%d%d%d%d%d%d%d%d%d%s"
508502 if ((status == 4))
509503 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))
510504 else {
511505 let cfg = asAnyList(invoke(poolAddress, "getPoolConfigWrapperREADONLY", nil, nil))
512506 let lpAssetId = fromBase58String(asString(cfg[idxPoolLPAssetId]))
513507 let amtAssetId = asString(cfg[idxAmtAssetId])
514508 let priceAssetId = asString(cfg[idxPriceAssetId])
515509 let iAmtAssetId = asString(cfg[idxIAmtAssetId])
516510 let iPriceAssetId = asString(cfg[idxIPriceAssetId])
517511 let amtAssetDcm = parseIntValue(asString(cfg[idxAmtAssetDcm]))
518512 let priceAssetDcm = parseIntValue(asString(cfg[idxPriceAssetDcm]))
519513 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
520514 let accAmtAssetBalance = asInt(invoke(poolAddress, "getAccBalanceWrapperREADONLY", [amtAssetId], nil))
521515 let accPriceAssetBalance = asInt(invoke(poolAddress, "getAccBalanceWrapperREADONLY", [priceAssetId], nil))
522516 let pricesList = if ((poolLPBalance == 0))
523517 then [toString(zeroBigInt), toString(zeroBigInt), toString(zeroBigInt)]
524518 else asAnyList(invoke(poolAddress, "calcPricesWrapperREADONLY", [accAmtAssetBalance, accPriceAssetBalance, poolLPBalance], nil))
525519 let curPrice = 0
526520 let lpAmtAssetShare = asInt(invoke(poolAddress, "fromX18WrapperREADONLY", [pricesList[1], MULT8], nil))
527521 let lpPriceAssetShare = asInt(invoke(poolAddress, "fromX18WrapperREADONLY", [pricesList[2], MULT8], nil))
528522 let poolWeight = getIntegerValue(factoryDapp, keyFactoryPoolWeight(toString(poolAddress)))
529523 let inFee = getPoolInFee(poolAddress)
530524 let outFee = getPoolOutFee(poolAddress)
531525 let poolOneTokenOperationsDisabled = {
532526 let @ = invoke(factoryDapp, "isPoolOneTokenOperationsDisabledREADONLY", [toString(poolAddress)], nil)
533527 if ($isInstanceOf(@, "Boolean"))
534528 then @
535529 else throw(($getType(@) + " couldn't be cast to Boolean"))
536530 }
537531 let poolOneTokenOperationsEnabled = !(poolOneTokenOperationsDisabled)
538532 $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))
539533 }
540534 }
541535
542536
543537
544538 @Callable(i)
545539 func poolEvaluatePutByAmountAssetREADONLY (lpAsset,inAmAssetAmt) = {
546540 let poolAddress = addressFromStringValue(getStringByAddressOrFail(factoryDapp, keyFactoryLpAssetToPoolContractAddress(lpAsset)))
547541 let cfg = asAnyList(invoke(poolAddress, "getPoolConfigWrapperREADONLY", nil, nil))
548542 let lpAssetId = fromBase58String(asString(cfg[idxPoolLPAssetId]))
549543 let amAssetIdStr = asString(cfg[idxAmtAssetId])
550544 let amAssetId = fromBase58String(amAssetIdStr)
551545 let prAssetIdStr = asString(cfg[idxPriceAssetId])
552546 let prAssetId = fromBase58String(prAssetIdStr)
553547 let amtAssetDcm = parseIntValue(asString(cfg[idxAmtAssetDcm]))
554548 let priceAssetDcm = parseIntValue(asString(cfg[idxPriceAssetDcm]))
555549 let poolStatus = asString(cfg[idxPoolStatus])
556550 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
557551 let accAmtAssetBalance = asInt(invoke(poolAddress, "getAccBalanceWrapperREADONLY", [amAssetIdStr], nil))
558552 let accPriceAssetBalance = asInt(invoke(poolAddress, "getAccBalanceWrapperREADONLY", [prAssetIdStr], nil))
559553 let amtAssetAmtX18 = parseBigIntValue(asString(invoke(poolAddress, "toX18WrapperREADONLY", [accAmtAssetBalance, amtAssetDcm], nil)))
560554 let priceAssetAmtX18 = parseBigIntValue(asString(invoke(poolAddress, "toX18WrapperREADONLY", [accPriceAssetBalance, priceAssetDcm], nil)))
561555 let curPriceX18 = if ((poolLPBalance == 0))
562556 then zeroBigInt
563557 else parseBigIntValue(asString(invoke(poolAddress, "calcPriceBigIntWrapperREADONLY", [toString(priceAssetAmtX18), toString(amtAssetAmtX18)], nil)))
564558 let curPrice = asInt(invoke(poolAddress, "fromX18WrapperREADONLY", [toString(curPriceX18), MULT8], nil))
565559 let inAmAssetAmtX18 = parseBigIntValue(asString(invoke(poolAddress, "toX18WrapperREADONLY", [inAmAssetAmt, amtAssetDcm], nil)))
566560 let inPrAssetAmtX18 = fraction(inAmAssetAmtX18, curPriceX18, MULT18)
567561 let inPrAssetAmt = asInt(invoke(poolAddress, "fromX18WrapperREADONLY", [toString(inPrAssetAmtX18), priceAssetDcm], nil))
568562 let res = invoke(poolAddress, "estimatePutOperationWrapperREADONLY", ["", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false], nil)
569- let $t02263122984 = match res {
563+ let $t02268423037 = match res {
570564 case _ =>
571565 if (if (if ($isInstanceOf($match0._1, "Int"))
572566 then if ($isInstanceOf($match0._3, "Int"))
573567 then if ($isInstanceOf($match0._4, "Int"))
574568 then if ($isInstanceOf($match0._5, "Int"))
575569 then $isInstanceOf($match0._6, "Int")
576570 else false
577571 else false
578572 else false
579573 else false)
580574 then (size($match0) == 13)
581575 else false)
582576 then {
583577 let calcLpAmt = $match0._1
584578 let curPriceCalc = $match0._3
585579 let amBalance = $match0._4
586580 let prBalance = $match0._5
587581 let lpEmission = $match0._6
588582 $Tuple5(calcLpAmt, curPriceCalc, amBalance, prBalance, lpEmission)
589583 }
590584 else throw("Couldn't cast types")
591585 }
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
586+ let calcLpAmt = $t02268423037._1
587+ let curPriceCalc = $t02268423037._2
588+ let amBalance = $t02268423037._3
589+ let prBalance = $t02268423037._4
590+ let lpEmission = $t02268423037._5
597591 $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))
598592 }
599593
600594
601595
602596 @Callable(i)
603597 func poolEvaluatePutByPriceAssetREADONLY (lpAsset,inPrAssetAmt) = {
604598 let poolAddress = addressFromStringValue(getStringByAddressOrFail(factoryDapp, keyFactoryLpAssetToPoolContractAddress(lpAsset)))
605599 let cfg = asAnyList(invoke(poolAddress, "getPoolConfigWrapperREADONLY", nil, nil))
606600 let lpAssetId = fromBase58String(asString(cfg[idxPoolLPAssetId]))
607601 let amAssetIdStr = asString(cfg[idxAmtAssetId])
608602 let amAssetId = fromBase58String(amAssetIdStr)
609603 let prAssetIdStr = asString(cfg[idxPriceAssetId])
610604 let prAssetId = fromBase58String(prAssetIdStr)
611605 let amtAssetDcm = parseIntValue(asString(cfg[idxAmtAssetDcm]))
612606 let priceAssetDcm = parseIntValue(asString(cfg[idxPriceAssetDcm]))
613607 let poolStatus = asString(cfg[idxPoolStatus])
614608 let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity
615609 let amBalanceRaw = asInt(invoke(poolAddress, "getAccBalanceWrapperREADONLY", [amAssetIdStr], nil))
616610 let prBalanceRaw = asInt(invoke(poolAddress, "getAccBalanceWrapperREADONLY", [prAssetIdStr], nil))
617611 let amBalanceRawX18 = parseBigIntValue(asString(invoke(poolAddress, "toX18WrapperREADONLY", [amBalanceRaw, amtAssetDcm], nil)))
618612 let prBalanceRawX18 = parseBigIntValue(asString(invoke(poolAddress, "toX18WrapperREADONLY", [prBalanceRaw, priceAssetDcm], nil)))
619613 let curPriceX18 = if ((poolLPBalance == 0))
620614 then zeroBigInt
621615 else parseBigIntValue(asString(invoke(poolAddress, "calcPriceBigIntWrapperREADONLY", [toString(prBalanceRawX18), toString(amBalanceRawX18)], nil)))
622616 let curPrice = asInt(invoke(poolAddress, "fromX18WrapperREADONLY", [toString(curPriceX18), MULT8], nil))
623617 let inPrAssetAmtX18 = parseBigIntValue(asString(invoke(poolAddress, "toX18WrapperREADONLY", [inPrAssetAmt, priceAssetDcm], nil)))
624618 let inAmAssetAmtX18 = fraction(inPrAssetAmtX18, MULT18, curPriceX18)
625619 let inAmAssetAmt = asInt(invoke(poolAddress, "fromX18WrapperREADONLY", [toString(inAmAssetAmtX18), amtAssetDcm], nil))
626620 let res = invoke(poolAddress, "estimatePutOperationWrapperREADONLY", ["", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false], nil)
627- let $t02555725910 = match res {
621+ let $t02561025963 = match res {
628622 case _ =>
629623 if (if (if ($isInstanceOf($match0._1, "Int"))
630624 then if ($isInstanceOf($match0._3, "Int"))
631625 then if ($isInstanceOf($match0._4, "Int"))
632626 then if ($isInstanceOf($match0._5, "Int"))
633627 then $isInstanceOf($match0._6, "Int")
634628 else false
635629 else false
636630 else false
637631 else false)
638632 then (size($match0) == 13)
639633 else false)
640634 then {
641635 let calcLpAmt = $match0._1
642636 let curPriceCalc = $match0._3
643637 let amBalance = $match0._4
644638 let prBalance = $match0._5
645639 let lpEmission = $match0._6
646640 $Tuple5(calcLpAmt, curPriceCalc, amBalance, prBalance, lpEmission)
647641 }
648642 else throw("Couldn't cast types")
649643 }
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
644+ let calcLpAmt = $t02561025963._1
645+ let curPriceCalc = $t02561025963._2
646+ let amBalance = $t02561025963._3
647+ let prBalance = $t02561025963._4
648+ let lpEmission = $t02561025963._5
655649 $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))
656650 }
657651
658652
659653
660654 @Callable(i)
661655 func poolEvaluateGetREADONLY (paymentLpAssetId,paymentLpAmt) = {
662656 let poolAddress = addressFromStringValue(getStringByAddressOrFail(factoryDapp, keyFactoryLpAssetToPoolContractAddress(paymentLpAssetId)))
663657 let res = invoke(poolAddress, "estimateGetOperationWrapperREADONLY", ["", paymentLpAssetId, paymentLpAmt, toString(poolAddress)], nil)
664- let $t02660527022 = match res {
658+ let $t02665827075 = match res {
665659 case _ =>
666660 if (if (if ($isInstanceOf($match0._1, "Int"))
667661 then if ($isInstanceOf($match0._2, "Int"))
668662 then if ($isInstanceOf($match0._5, "Int"))
669663 then if ($isInstanceOf($match0._6, "Int"))
670664 then if ($isInstanceOf($match0._7, "Int"))
671665 then if ($isInstanceOf($match0._8, "String"))
672666 then $isInstanceOf($match0._9, "String")
673667 else false
674668 else false
675669 else false
676670 else false
677671 else false
678672 else false)
679673 then (size($match0) == 10)
680674 else false)
681675 then {
682676 let outAmAmt = $match0._1
683677 let outPrAmt = $match0._2
684678 let amBalance = $match0._5
685679 let prBalance = $match0._6
686680 let lpEmission = $match0._7
687681 let curPrice = $match0._8
688682 let poolStatus = $match0._9
689683 $Tuple7(outAmAmt, outPrAmt, amBalance, prBalance, lpEmission, curPrice, poolStatus)
690684 }
691685 else throw("Couldn't cast types")
692686 }
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
687+ let outAmAmt = $t02665827075._1
688+ let outPrAmt = $t02665827075._2
689+ let amBalance = $t02665827075._3
690+ let prBalance = $t02665827075._4
691+ let lpEmission = $t02665827075._5
692+ let curPrice = $t02665827075._6
693+ let poolStatus = $t02665827075._7
700694 $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(outAmAmt), toString(outPrAmt), toString(amBalance), toString(prBalance), toString(lpEmission), curPrice, poolStatus], SEP))
701695 }
702696
703697
704698
705699 @Callable(i)
706700 func gwxUserInfoREADONLY (userAddress) = {
707701 let gwxUserInfoLIST = asAnyList(invoke(boostingDapp, "gwxUserInfoREADONLY", [userAddress], nil))
708702 let gwxAmount = asInt(gwxUserInfoLIST[0])
709703 $Tuple2(nil, makeString(["%d", toString(gwxAmount)], SEP))
710704 }
711705
712706
713707
714708 @Callable(i)
715709 func unstakeAndGetOneTknV2 (poolAddress,unstakeAmount,outAssetId,minOutAmount) = {
716710 let inv = invoke(addressFromStringValue(poolAddress), "unstakeAndGetOneTknV2", [unstakeAmount, outAssetId, minOutAmount], nil)
717711 if ((inv == inv))
718712 then $Tuple2(nil, unit)
719713 else throw("Strict value is not equal to itself.")
720714 }
721715
722716
723717
724718 @Callable(i)
725719 func getKeysBulkInternal (currentIter,keys,resAcc) = if ((currentIter == size(keys)))
726720 then $Tuple2(nil, resAcc)
727721 else {
728722 let k = split(keys[currentIter], "++")
729723 let addr = addressFromStringValue(k[0])
730724 let key = k[1]
731725 let type = k[2]
732726 let val = getKey(addr, key, type)
733727 let res = (resAcc :+ val)
734728 let inv = invoke(this, "getKeysBulkInternal", [(currentIter + 1), keys, res], nil)
735729 if ((inv == inv))
736730 then $Tuple2(nil, inv)
737731 else throw("Strict value is not equal to itself.")
738732 }
739733
740734
741735
742736 @Callable(i)
743737 func getKeysBulk (keys) = {
744738 let res = invoke(this, "getKeysBulkInternal", [0, keys, nil], nil)
745739 $Tuple2(nil, res)
746740 }
747741
748742
749-
750-@Callable(i)
751-func setManager (pendingManagerPublicKey) = {
752- let checkCaller = mustManager(i)
753- if ((checkCaller == checkCaller))
754- then {
755- let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
756- if ((checkManagerPublicKey == checkManagerPublicKey))
757- then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
758- else throw("Strict value is not equal to itself.")
759- }
760- else throw("Strict value is not equal to itself.")
761- }
762-
763-
764-
765-@Callable(i)
766-func confirmManager () = {
767- let pm = pendingManagerPublicKeyOrUnit()
768- let hasPM = if (isDefined(pm))
769- then true
770- else throw("No pending manager")
771- if ((hasPM == hasPM))
772- then {
773- let checkPM = if ((i.callerPublicKey == value(pm)))
774- then true
775- else throw("You are not pending manager")
776- if ((checkPM == checkPM))
777- then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
778- else throw("Strict value is not equal to itself.")
779- }
780- else throw("Strict value is not equal to itself.")
781- }
782-
783-
784743 @Verifier(tx)
785744 func verify () = {
786745 let targetPublicKey = match managerPublicKeyOrUnit() {
787746 case pk: ByteVector =>
788747 pk
789748 case _: Unit =>
790749 tx.senderPublicKey
791750 case _ =>
792751 throw("Match error")
793752 }
794753 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
795754 }
796755

github/deemru/w8io/169f3d6 
115.84 ms