tx · FYMgaBisNouzjQoPkZXzt89ineHNvhD7b7Q3ZBhh71aZ 3MsNhK6uve98J6DeqbuwGFBRh9GoHPGUFgp: -0.02300000 Waves 2023.05.02 14:32 [2560086] smart account 3MsNhK6uve98J6DeqbuwGFBRh9GoHPGUFgp > SELF 0.00000000 Waves
{ "type": 13, "id": "FYMgaBisNouzjQoPkZXzt89ineHNvhD7b7Q3ZBhh71aZ", "fee": 2300000, "feeAssetId": null, "timestamp": 1683027169477, "version": 2, "chainId": 84, "sender": "3MsNhK6uve98J6DeqbuwGFBRh9GoHPGUFgp", "senderPublicKey": "86RHVxKovtU7yKnepY8wKsd8niDxGAsiwuA1XA1DNqrS", "proofs": [ "5QsCpRZV6GBxKYsiqUF9Jsc2SYy3S1uVsTrGgrmHRXSGbF4xangRVJwqYwvLsssintjHZ4UUqn8Cb9DF4HmPJsE2" ], "script": "base64:BgLkIAgCEgMKAQgSAwoBCBIECgIICBIJCgcBERERGAgYEgcKBRERERgIEgcKBQEBAQgIEgASAwoBCBIECgIIARIECgIIARIECgIIARIDCgEIEgYKBAgBCAESBQoDARgYEgMKARgiBlNDQUxFOCIFTVVMVDgiB1NDQUxFMTgiBk1VTFQxOCIDU0VQIg5QT09MV0VJR0hUTVVMVCIKemVyb0JpZ0ludCIOaWR4UG9vbEFkZHJlc3MiDWlkeFBvb2xTdGF0dXMiEGlkeFBvb2xMUEFzc2V0SWQiDWlkeEFtdEFzc2V0SWQiD2lkeFByaWNlQXNzZXRJZCIOaWR4QW10QXNzZXREY20iEGlkeFByaWNlQXNzZXREY20iDmlkeElBbXRBc3NldElkIhBpZHhJUHJpY2VBc3NldElkIg1pZHhMUEFzc2V0RGNtIg9nZXRTdHJpbmdPckZhaWwiA2tleSIYZ2V0U3RyaW5nQnlBZGRyZXNzT3JGYWlsIgdhZGRyZXNzIgxnZXRJbnRPclplcm8iDGdldEludE9yRmFpbCIJYXNBbnlMaXN0IgN2YWwiByRtYXRjaDAiCnZhbEFueUx5c3QiBWFz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tnZXRLZXlzQnVsawECZFEEAmNhCQD8BwQFBHRoaXMCE2dldEtleXNCdWxrSW50ZXJuYWwJAMwIAgAACQDMCAIFAmRRCQDMCAIFA25pbAUDbmlsBQNuaWwJAJQKAgUDbmlsBQJjYQECZFMBAmRUAAQCZFUEAXoJAQJieAADCQABAgUBegIKQnl0ZVZlY3RvcgQCYkMFAXoFAmJDAwkAAQIFAXoCBFVuaXQIBQJkUw9zZW5kZXJQdWJsaWNLZXkJAAIBAgtNYXRjaCBlcnJvcgkA9AMDCAUCZFMJYm9keUJ5dGVzCQCRAwIIBQJkUwZwcm9vZnMAAAUCZFVvoN1x", "height": 2560086, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 617TnknFNAwzizwCivsmUUzV6gsPn5JUdC7pZg7jrRtZ Next: Hwgqr3CcNxEPcWdrLTREmK4tEcDnk1i1XqYTnQ9siYip Diff:
Old | New | Differences | |
---|---|---|---|
226 | 226 | ||
227 | 227 | ||
228 | 228 | func keyEmissionEndBlock () = "%s%s__emission__endBlock" | |
229 | - | ||
230 | - | ||
231 | - | func keyAddonAddr () = "%s__addonAddr" | |
232 | 229 | ||
233 | 230 | ||
234 | 231 | let factoryDapp = readFactoryAddressOrFail() | |
560 | 557 | let inPrAssetAmtX18 = fraction(inAmAssetAmtX18, curPriceX18, MULT18) | |
561 | 558 | let inPrAssetAmt = asInt(invoke(poolAddress, "fromX18WrapperREADONLY", [toString(inPrAssetAmtX18), priceAssetDcm], nil)) | |
562 | 559 | let res = invoke(poolAddress, "estimatePutOperationWrapperREADONLY", ["", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false], nil) | |
563 | - | let $ | |
560 | + | let $t02262722980 = match res { | |
564 | 561 | case _ => | |
565 | 562 | if (if (if ($isInstanceOf($match0._1, "Int")) | |
566 | 563 | then if ($isInstanceOf($match0._3, "Int")) | |
583 | 580 | } | |
584 | 581 | else throw("Couldn't cast types") | |
585 | 582 | } | |
586 | - | let calcLpAmt = $ | |
587 | - | let curPriceCalc = $ | |
588 | - | let amBalance = $ | |
589 | - | let prBalance = $ | |
590 | - | let lpEmission = $ | |
583 | + | let calcLpAmt = $t02262722980._1 | |
584 | + | let curPriceCalc = $t02262722980._2 | |
585 | + | let amBalance = $t02262722980._3 | |
586 | + | let prBalance = $t02262722980._4 | |
587 | + | let lpEmission = $t02262722980._5 | |
591 | 588 | $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)) | |
592 | 589 | } | |
593 | 590 | ||
618 | 615 | let inAmAssetAmtX18 = fraction(inPrAssetAmtX18, MULT18, curPriceX18) | |
619 | 616 | let inAmAssetAmt = asInt(invoke(poolAddress, "fromX18WrapperREADONLY", [toString(inAmAssetAmtX18), amtAssetDcm], nil)) | |
620 | 617 | let res = invoke(poolAddress, "estimatePutOperationWrapperREADONLY", ["", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false], nil) | |
621 | - | let $ | |
618 | + | let $t02555325906 = match res { | |
622 | 619 | case _ => | |
623 | 620 | if (if (if ($isInstanceOf($match0._1, "Int")) | |
624 | 621 | then if ($isInstanceOf($match0._3, "Int")) | |
641 | 638 | } | |
642 | 639 | else throw("Couldn't cast types") | |
643 | 640 | } | |
644 | - | let calcLpAmt = $ | |
645 | - | let curPriceCalc = $ | |
646 | - | let amBalance = $ | |
647 | - | let prBalance = $ | |
648 | - | let lpEmission = $ | |
641 | + | let calcLpAmt = $t02555325906._1 | |
642 | + | let curPriceCalc = $t02555325906._2 | |
643 | + | let amBalance = $t02555325906._3 | |
644 | + | let prBalance = $t02555325906._4 | |
645 | + | let lpEmission = $t02555325906._5 | |
649 | 646 | $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)) | |
650 | 647 | } | |
651 | 648 | ||
655 | 652 | func poolEvaluateGetREADONLY (paymentLpAssetId,paymentLpAmt) = { | |
656 | 653 | let poolAddress = addressFromStringValue(getStringByAddressOrFail(factoryDapp, keyFactoryLpAssetToPoolContractAddress(paymentLpAssetId))) | |
657 | 654 | let res = invoke(poolAddress, "estimateGetOperationWrapperREADONLY", ["", paymentLpAssetId, paymentLpAmt, toString(poolAddress)], nil) | |
658 | - | let $ | |
655 | + | let $t02660127018 = match res { | |
659 | 656 | case _ => | |
660 | 657 | if (if (if ($isInstanceOf($match0._1, "Int")) | |
661 | 658 | then if ($isInstanceOf($match0._2, "Int")) | |
684 | 681 | } | |
685 | 682 | else throw("Couldn't cast types") | |
686 | 683 | } | |
687 | - | let outAmAmt = $ | |
688 | - | let outPrAmt = $ | |
689 | - | let amBalance = $ | |
690 | - | let prBalance = $ | |
691 | - | let lpEmission = $ | |
692 | - | let curPrice = $ | |
693 | - | let poolStatus = $ | |
684 | + | let outAmAmt = $t02660127018._1 | |
685 | + | let outPrAmt = $t02660127018._2 | |
686 | + | let amBalance = $t02660127018._3 | |
687 | + | let prBalance = $t02660127018._4 | |
688 | + | let lpEmission = $t02660127018._5 | |
689 | + | let curPrice = $t02660127018._6 | |
690 | + | let poolStatus = $t02660127018._7 | |
694 | 691 | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(outAmAmt), toString(outPrAmt), toString(amBalance), toString(prBalance), toString(lpEmission), curPrice, poolStatus], SEP)) | |
695 | 692 | } | |
696 | 693 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let SCALE8 = 8 | |
5 | 5 | ||
6 | 6 | let MULT8 = 100000000 | |
7 | 7 | ||
8 | 8 | let SCALE18 = 18 | |
9 | 9 | ||
10 | 10 | let MULT18 = toBigInt(1000000000000000000) | |
11 | 11 | ||
12 | 12 | let SEP = "__" | |
13 | 13 | ||
14 | 14 | let POOLWEIGHTMULT = MULT8 | |
15 | 15 | ||
16 | 16 | let zeroBigInt = toBigInt(0) | |
17 | 17 | ||
18 | 18 | let idxPoolAddress = 1 | |
19 | 19 | ||
20 | 20 | let idxPoolStatus = 2 | |
21 | 21 | ||
22 | 22 | let idxPoolLPAssetId = 3 | |
23 | 23 | ||
24 | 24 | let idxAmtAssetId = 4 | |
25 | 25 | ||
26 | 26 | let idxPriceAssetId = 5 | |
27 | 27 | ||
28 | 28 | let idxAmtAssetDcm = 6 | |
29 | 29 | ||
30 | 30 | let idxPriceAssetDcm = 7 | |
31 | 31 | ||
32 | 32 | let idxIAmtAssetId = 8 | |
33 | 33 | ||
34 | 34 | let idxIPriceAssetId = 9 | |
35 | 35 | ||
36 | 36 | let idxLPAssetDcm = 10 | |
37 | 37 | ||
38 | 38 | func getStringOrFail (key) = valueOrErrorMessage(getString(key), (("mandatory this." + key) + " is not defined")) | |
39 | 39 | ||
40 | 40 | ||
41 | 41 | func getStringByAddressOrFail (address,key) = valueOrErrorMessage(getString(address, key), (((("mandatory " + toString(address)) + ".") + key) + " is not defined")) | |
42 | 42 | ||
43 | 43 | ||
44 | 44 | func getIntOrZero (address,key) = valueOrElse(getInteger(address, key), 0) | |
45 | 45 | ||
46 | 46 | ||
47 | 47 | func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), (("mandatory this." + key) + " is not defined")) | |
48 | 48 | ||
49 | 49 | ||
50 | 50 | func asAnyList (val) = match val { | |
51 | 51 | case valAnyLyst: List[Any] => | |
52 | 52 | valAnyLyst | |
53 | 53 | case _ => | |
54 | 54 | throw("fail to cast into List[Any]") | |
55 | 55 | } | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | func asInt (val) = match val { | |
59 | 59 | case valInt: Int => | |
60 | 60 | valInt | |
61 | 61 | case _ => | |
62 | 62 | throw("fail to cast into Int") | |
63 | 63 | } | |
64 | 64 | ||
65 | 65 | ||
66 | 66 | func asString (val) = match val { | |
67 | 67 | case valStr: String => | |
68 | 68 | valStr | |
69 | 69 | case _ => | |
70 | 70 | throw("fail to cast into String") | |
71 | 71 | } | |
72 | 72 | ||
73 | 73 | ||
74 | 74 | func keyFactoryAddress () = "%s%s__config__factoryAddress" | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | let IdxFactoryCfgStakingDapp = 1 | |
78 | 78 | ||
79 | 79 | let IdxFactoryCfgBoostingDapp = 2 | |
80 | 80 | ||
81 | 81 | let IdxFactoryCfgIdoDapp = 3 | |
82 | 82 | ||
83 | 83 | let IdxFactoryCfgTeamDapp = 4 | |
84 | 84 | ||
85 | 85 | let IdxFactoryCfgEmissionDapp = 5 | |
86 | 86 | ||
87 | 87 | let IdxFactoryCfgRestDapp = 6 | |
88 | 88 | ||
89 | 89 | let IdxFactoryCfgSlippageDapp = 7 | |
90 | 90 | ||
91 | 91 | let IdxFactoryCfgGwxRewardDapp = 8 | |
92 | 92 | ||
93 | 93 | func keyFactoryCfg () = "%s__factoryConfig" | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | func keyFactoryLp2AssetsMapping (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP) | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | func keyFactoryLpList () = "%s__lpTokensList" | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func keyFactoryLpAssetToPoolContractAddress (lpAssetStr) = makeString(["%s%s%s", lpAssetStr, "mappings__lpAsset2PoolContract"], SEP) | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func keyFactoryPoolWeight (contractAddress) = makeString(["%s%s", "poolWeight", contractAddress], SEP) | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | func keyManagerVaultAddress () = "%s__managerVaultAddress" | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | func keyManagerPublicKey () = "%s__managerPublicKey" | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | func readFactoryAddressOrFail () = addressFromStringValue(getStringOrFail(keyFactoryAddress())) | |
115 | 115 | ||
116 | 116 | ||
117 | 117 | func readLpList () = split(valueOrElse(getString(readFactoryAddressOrFail(), keyFactoryLpList()), ""), SEP) | |
118 | 118 | ||
119 | 119 | ||
120 | 120 | func readFactoryCfgOrFail (factory) = split(getStringByAddressOrFail(factory, keyFactoryCfg()), SEP) | |
121 | 121 | ||
122 | 122 | ||
123 | 123 | func getBoostingAddressOrFail (fCfg) = addressFromStringValue(fCfg[IdxFactoryCfgBoostingDapp]) | |
124 | 124 | ||
125 | 125 | ||
126 | 126 | func getEmissionAddressOrFail (fCfg) = addressFromStringValue(fCfg[IdxFactoryCfgEmissionDapp]) | |
127 | 127 | ||
128 | 128 | ||
129 | 129 | func getStakingAddressOrFail (fCfg) = addressFromStringValue(fCfg[IdxFactoryCfgStakingDapp]) | |
130 | 130 | ||
131 | 131 | ||
132 | 132 | func getGwxRewardAddressOrFail (fCfg) = addressFromStringValue(fCfg[IdxFactoryCfgGwxRewardDapp]) | |
133 | 133 | ||
134 | 134 | ||
135 | 135 | func getManagerAddressOrFail () = addressFromStringValue(getStringValue(keyManagerVaultAddress())) | |
136 | 136 | ||
137 | 137 | ||
138 | 138 | func keyBoostCfg () = "%s__config" | |
139 | 139 | ||
140 | 140 | ||
141 | 141 | func keyBoostingLockParamTotalAmount () = "%s%s__stats__activeTotalLocked" | |
142 | 142 | ||
143 | 143 | ||
144 | 144 | func keyBoostingStatsLocksDurationSumInBlocks () = "%s%s__stats__locksDurationSumInBlocks" | |
145 | 145 | ||
146 | 146 | ||
147 | 147 | func keyBoostingStatsLocksCount () = "%s%s__stats__locksCount" | |
148 | 148 | ||
149 | 149 | ||
150 | 150 | func keyBoostingStatsUsersCount () = "%s%s__stats__activeUsersCount" | |
151 | 151 | ||
152 | 152 | ||
153 | 153 | func keyUser2NumMapping (userAddress) = makeString(["%s%s%s__mapping__user2num", userAddress], SEP) | |
154 | 154 | ||
155 | 155 | ||
156 | 156 | func keyNum2UserMapping (num) = makeString(["%s%s%s__mapping__num2user", num], SEP) | |
157 | 157 | ||
158 | 158 | ||
159 | 159 | func keyLockParamUserAmount (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "amount"], SEP) | |
160 | 160 | ||
161 | 161 | ||
162 | 162 | func keyLockParamStartBlock (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "start"], SEP) | |
163 | 163 | ||
164 | 164 | ||
165 | 165 | func keyLockParamDuration (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "duration"], SEP) | |
166 | 166 | ||
167 | 167 | ||
168 | 168 | func keyLockParamK (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "k"], SEP) | |
169 | 169 | ||
170 | 170 | ||
171 | 171 | func keyLockParamB (userNum) = makeString(["%s%d%s__paramByUserNum", userNum, "b"], SEP) | |
172 | 172 | ||
173 | 173 | ||
174 | 174 | func keyLockParamByPeriodK (userNum,period) = makeString(["%s%d%s%d__paramByPeriod", userNum, "k", period], SEP) | |
175 | 175 | ||
176 | 176 | ||
177 | 177 | func keyLockParamByPeriodB (userNum,period) = makeString(["%s%d%s%d__paramByPeriod", userNum, "b", period], SEP) | |
178 | 178 | ||
179 | 179 | ||
180 | 180 | func keyUserBoostEmissionLastINTEGRAL (userNum) = makeString(["%s%d__userBoostEmissionLastInt", userNum], SEP) | |
181 | 181 | ||
182 | 182 | ||
183 | 183 | func keyUserMaxBoostINTEGRAL (userNum) = makeString(["%s%d__maxBoostInt", userNum], SEP) | |
184 | 184 | ||
185 | 185 | ||
186 | 186 | func keyTotalMaxBoostINTEGRAL () = "%s%s__maxBoostInt__total" | |
187 | 187 | ||
188 | 188 | ||
189 | 189 | func keyUserBoostAvalaibleToClaimTotal (userNum) = makeString(["%s%d__userBoostAvaliableToClaimTotal", userNum], SEP) | |
190 | 190 | ||
191 | 191 | ||
192 | 192 | func keyUserBoostClaimed (userNum) = makeString(["%s%d__userBoostClaimed", userNum], SEP) | |
193 | 193 | ||
194 | 194 | ||
195 | 195 | func keyTotalCachedGwx () = "%s%s__gwxCached__total" | |
196 | 196 | ||
197 | 197 | ||
198 | 198 | func keyStakedByUser (userAddressStr,lpAssetIdStr) = makeString(["%s%s%s__staked", userAddressStr, lpAssetIdStr], SEP) | |
199 | 199 | ||
200 | 200 | ||
201 | 201 | func keyStakedTotal (lpAssetIdStr) = ("%s%s%s__staked__total__" + lpAssetIdStr) | |
202 | 202 | ||
203 | 203 | ||
204 | 204 | func keyClaimedByUser (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimed", userAddressStr, lpAssetIdStr], SEP) | |
205 | 205 | ||
206 | 206 | ||
207 | 207 | func keyClaimedByUserMinReward (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimedMinReward", userAddressStr, lpAssetIdStr], SEP) | |
208 | 208 | ||
209 | 209 | ||
210 | 210 | func keyClaimedByUserBoostReward (lpAssetIdStr,userAddressStr) = makeString(["%s%s%s__claimedBoostReward", userAddressStr, lpAssetIdStr], SEP) | |
211 | 211 | ||
212 | 212 | ||
213 | 213 | func readStaked (stakingDapp,key) = valueOrElse(getInteger(stakingDapp, key), 0) | |
214 | 214 | ||
215 | 215 | ||
216 | 216 | func keyEmissionRatePerBlockCurrent () = "%s%s__ratePerBlock__current" | |
217 | 217 | ||
218 | 218 | ||
219 | 219 | func keyEmissionRatePerBlockMaxCurrent () = "%s%s__ratePerBlockMax__current" | |
220 | 220 | ||
221 | 221 | ||
222 | 222 | func keyEmissionStartBlock () = "%s%s__emission__startBlock" | |
223 | 223 | ||
224 | 224 | ||
225 | 225 | func keyEmissionDurationInBlocks () = "%s%s__emission__duration" | |
226 | 226 | ||
227 | 227 | ||
228 | 228 | func keyEmissionEndBlock () = "%s%s__emission__endBlock" | |
229 | - | ||
230 | - | ||
231 | - | func keyAddonAddr () = "%s__addonAddr" | |
232 | 229 | ||
233 | 230 | ||
234 | 231 | let factoryDapp = readFactoryAddressOrFail() | |
235 | 232 | ||
236 | 233 | let factoryCfg = readFactoryCfgOrFail(factoryDapp) | |
237 | 234 | ||
238 | 235 | let emissionDapp = getEmissionAddressOrFail(factoryCfg) | |
239 | 236 | ||
240 | 237 | let stakingDapp = getStakingAddressOrFail(factoryCfg) | |
241 | 238 | ||
242 | 239 | let gwxRewardDapp = getGwxRewardAddressOrFail(factoryCfg) | |
243 | 240 | ||
244 | 241 | let boostingDapp = getBoostingAddressOrFail(factoryCfg) | |
245 | 242 | ||
246 | 243 | func getPoolInFee (poolAddress) = { | |
247 | 244 | let @ = invoke(factoryDapp, "getInFeeREADONLY", [toString(poolAddress)], nil) | |
248 | 245 | if ($isInstanceOf(@, "Int")) | |
249 | 246 | then @ | |
250 | 247 | else throw(($getType(@) + " couldn't be cast to Int")) | |
251 | 248 | } | |
252 | 249 | ||
253 | 250 | ||
254 | 251 | func getPoolOutFee (poolAddress) = { | |
255 | 252 | let @ = invoke(factoryDapp, "getOutFeeREADONLY", [toString(poolAddress)], nil) | |
256 | 253 | if ($isInstanceOf(@, "Int")) | |
257 | 254 | then @ | |
258 | 255 | else throw(($getType(@) + " couldn't be cast to Int")) | |
259 | 256 | } | |
260 | 257 | ||
261 | 258 | ||
262 | 259 | func internalCurrentRewardRate (lpAssetId) = { | |
263 | 260 | let poolAddressStr = getStringByAddressOrFail(factoryDapp, keyFactoryLpAssetToPoolContractAddress(lpAssetId)) | |
264 | 261 | let poolWeightMult = MULT8 | |
265 | 262 | let poolWeight = getIntegerValue(factoryDapp, keyFactoryPoolWeight(poolAddressStr)) | |
266 | 263 | let wxEmissionPerBlock = getIntOrFail(emissionDapp, keyEmissionRatePerBlockCurrent()) | |
267 | 264 | let wxEmissionPerBlockMax = getIntOrFail(emissionDapp, keyEmissionRatePerBlockMaxCurrent()) | |
268 | 265 | let boostMaxCoeff = { | |
269 | 266 | let @ = invoke(emissionDapp, "getBoostCoeffREADONLY", nil, nil) | |
270 | 267 | if ($isInstanceOf(@, "Int")) | |
271 | 268 | then @ | |
272 | 269 | else throw(($getType(@) + " couldn't be cast to Int")) | |
273 | 270 | } | |
274 | 271 | let poolWxEmissionPerBlock = (fraction(wxEmissionPerBlock, poolWeight, poolWeightMult) / boostMaxCoeff) | |
275 | 272 | let poolWxEmissionPerBlockMax = fraction(wxEmissionPerBlockMax, poolWeight, poolWeightMult) | |
276 | 273 | let maxFactor = (boostMaxCoeff * MULT8) | |
277 | 274 | let totalLpStaked = getIntOrZero(stakingDapp, keyStakedTotal(lpAssetId)) | |
278 | 275 | [poolWxEmissionPerBlock, maxFactor, totalLpStaked] | |
279 | 276 | } | |
280 | 277 | ||
281 | 278 | ||
282 | 279 | func calcGwxAmountStartREADONLY (lockAmount,lockDuration,maxLockDuration) = { | |
283 | 280 | let coeffX8 = fraction(lockDuration, MULT8, maxLockDuration) | |
284 | 281 | let gWxAmountStart = fraction(lockAmount, coeffX8, MULT8) | |
285 | 282 | [gWxAmountStart] | |
286 | 283 | } | |
287 | 284 | ||
288 | 285 | ||
289 | 286 | func getKey (addr,key,type) = if ((type == "string")) | |
290 | 287 | then getStringValue(addr, key) | |
291 | 288 | else if ((type == "integer")) | |
292 | 289 | then toString(getIntegerValue(addr, key)) | |
293 | 290 | else if ((type == "boolean")) | |
294 | 291 | then toString(getBooleanValue(addr, key)) | |
295 | 292 | else throw("unknown type. expected string/integer/boolean") | |
296 | 293 | ||
297 | 294 | ||
298 | 295 | func managerPublicKeyOrUnit () = { | |
299 | 296 | let managerVaultAddress = getManagerAddressOrFail() | |
300 | 297 | match getString(managerVaultAddress, keyManagerPublicKey()) { | |
301 | 298 | case s: String => | |
302 | 299 | fromBase58String(s) | |
303 | 300 | case _: Unit => | |
304 | 301 | unit | |
305 | 302 | case _ => | |
306 | 303 | throw("Match error") | |
307 | 304 | } | |
308 | 305 | } | |
309 | 306 | ||
310 | 307 | ||
311 | 308 | func isManager (i) = match managerPublicKeyOrUnit() { | |
312 | 309 | case pk: ByteVector => | |
313 | 310 | (i.callerPublicKey == pk) | |
314 | 311 | case _: Unit => | |
315 | 312 | (i.caller == this) | |
316 | 313 | case _ => | |
317 | 314 | throw("Match error") | |
318 | 315 | } | |
319 | 316 | ||
320 | 317 | ||
321 | 318 | func mustManager (i) = if (isManager(i)) | |
322 | 319 | then true | |
323 | 320 | else throw("permission denied") | |
324 | 321 | ||
325 | 322 | ||
326 | 323 | @Callable(i) | |
327 | 324 | func constructor (factoryAddress) = { | |
328 | 325 | let checkCaller = mustManager(i) | |
329 | 326 | if ((checkCaller == checkCaller)) | |
330 | 327 | then [StringEntry(keyFactoryAddress(), factoryAddress)] | |
331 | 328 | else throw("Strict value is not equal to itself.") | |
332 | 329 | } | |
333 | 330 | ||
334 | 331 | ||
335 | 332 | ||
336 | 333 | @Callable(i) | |
337 | 334 | func currentRewardRateREADONLY (lpAssetId) = { | |
338 | 335 | let rewardData = internalCurrentRewardRate(lpAssetId) | |
339 | 336 | let wxEmissionPerBlock = rewardData[0] | |
340 | 337 | let maxFactor = rewardData[1] | |
341 | 338 | let totalLpStaked = rewardData[2] | |
342 | 339 | let votingResultStaked = { | |
343 | 340 | let @ = invoke(boostingDapp, "getVotingResultStakedREADONLY", [lpAssetId], nil) | |
344 | 341 | if ($isInstanceOf(@, "Int")) | |
345 | 342 | then @ | |
346 | 343 | else throw(($getType(@) + " couldn't be cast to Int")) | |
347 | 344 | } | |
348 | 345 | $Tuple2(nil, makeString(["%d%d%d%d", toString(wxEmissionPerBlock), toString(maxFactor), toString(totalLpStaked), toString(votingResultStaked)], SEP)) | |
349 | 346 | } | |
350 | 347 | ||
351 | 348 | ||
352 | 349 | ||
353 | 350 | @Callable(i) | |
354 | 351 | func currentUserRewardRateREADONLY (lpAssetId,userAddress) = { | |
355 | 352 | let rewardData = internalCurrentRewardRate(lpAssetId) | |
356 | 353 | let wxEmissionPerBlock = rewardData[0] | |
357 | 354 | let maxFactor = rewardData[1] | |
358 | 355 | let totalLpStaked = rewardData[2] | |
359 | 356 | let lpStakedByUser = getIntOrZero(stakingDapp, keyStakedByUser(userAddress, lpAssetId)) | |
360 | 357 | let userClaimInfo = split(asString(invoke(stakingDapp, "claimWxREADONLY", [lpAssetId, userAddress], nil)), SEP) | |
361 | 358 | let minRewardPart = valueOrErrorMessage(parseInt(userClaimInfo[5]), "couldn't parse minRewardPart") | |
362 | 359 | let boostRewardPart = valueOrErrorMessage(parseInt(userClaimInfo[6]), "couldn't parse boostRewardPart") | |
363 | 360 | let debug = userClaimInfo[7] | |
364 | 361 | let boostingPower = if ((boostRewardPart == 0)) | |
365 | 362 | then (1 * MULT8) | |
366 | 363 | else fraction((minRewardPart + boostRewardPart), MULT8, minRewardPart) | |
367 | 364 | $Tuple2(nil, makeString(["%d%d%d%d%d%s", toString(wxEmissionPerBlock), toString(maxFactor), toString(totalLpStaked), toString(lpStakedByUser), toString(boostingPower), debug], SEP)) | |
368 | 365 | } | |
369 | 366 | ||
370 | 367 | ||
371 | 368 | ||
372 | 369 | @Callable(i) | |
373 | 370 | func calcBoostBulkInternalREADONLY (currentIter,deltaWxAmountBulk,deltaLockPeriodInBlocksBulk,deltaLpAmountBulk,lpAssetIdOptBulk,userAddressOpt,resAcc) = if ((currentIter == size(deltaWxAmountBulk))) | |
374 | 371 | then $Tuple2(nil, resAcc) | |
375 | 372 | else { | |
376 | 373 | let deltaWxAmount = deltaWxAmountBulk[currentIter] | |
377 | 374 | let deltaLockPeriodInBlocks = deltaLockPeriodInBlocksBulk[currentIter] | |
378 | 375 | let deltaLpAmount = deltaLpAmountBulk[currentIter] | |
379 | 376 | let lpAssetIdOpt = lpAssetIdOptBulk[currentIter] | |
380 | 377 | let info = { | |
381 | 378 | let @ = invoke(this, "calcBoostREADONLY", [deltaWxAmount, deltaLockPeriodInBlocks, deltaLpAmount, lpAssetIdOpt, userAddressOpt], nil) | |
382 | 379 | if ($isInstanceOf(@, "String")) | |
383 | 380 | then @ | |
384 | 381 | else throw(($getType(@) + " couldn't be cast to String")) | |
385 | 382 | } | |
386 | 383 | let res = (resAcc :+ info) | |
387 | 384 | let inv = { | |
388 | 385 | let @ = invoke(this, "calcBoostBulkInternalREADONLY", [(currentIter + 1), deltaWxAmountBulk, deltaLockPeriodInBlocksBulk, deltaLpAmountBulk, lpAssetIdOptBulk, userAddressOpt, res], nil) | |
389 | 386 | if ($isInstanceOf(@, "List[Any]")) | |
390 | 387 | then @ | |
391 | 388 | else throw(($getType(@) + " couldn't be cast to List[Any]")) | |
392 | 389 | } | |
393 | 390 | if ((inv == inv)) | |
394 | 391 | then $Tuple2(nil, inv) | |
395 | 392 | else throw("Strict value is not equal to itself.") | |
396 | 393 | } | |
397 | 394 | ||
398 | 395 | ||
399 | 396 | ||
400 | 397 | @Callable(i) | |
401 | 398 | func calcBoostBulkREADONLY (deltaWxAmount,deltaLockPeriodInBlocks,deltaLpAmount,lpAssetIdOpt,userAddressOpt) = { | |
402 | 399 | let res = invoke(this, "calcBoostBulkInternalREADONLY", [0, deltaWxAmount, deltaLockPeriodInBlocks, deltaLpAmount, lpAssetIdOpt, userAddressOpt, nil], nil) | |
403 | 400 | $Tuple2(nil, res) | |
404 | 401 | } | |
405 | 402 | ||
406 | 403 | ||
407 | 404 | ||
408 | 405 | @Callable(i) | |
409 | 406 | func calcBoostREADONLY (deltaWxAmount,deltaLockPeriodInBlocks,deltaLpAmount,lpAssetIdOpt,userAddressOpt) = { | |
410 | 407 | let boostCoeff = { | |
411 | 408 | let @ = invoke(emissionDapp, "getBoostCoeffREADONLY", nil, nil) | |
412 | 409 | if ($isInstanceOf(@, "Int")) | |
413 | 410 | then @ | |
414 | 411 | else throw(($getType(@) + " couldn't be cast to Int")) | |
415 | 412 | } | |
416 | 413 | let mathDapp = gwxRewardDapp | |
417 | 414 | let EMPTYSTR = "empty" | |
418 | 415 | let maxLockDurationInBlocks = parseIntValue(split(getStringByAddressOrFail(boostingDapp, keyBoostCfg()), SEP)[4]) | |
419 | 416 | let lpAssetIdStr = if ((lpAssetIdOpt == "")) | |
420 | 417 | then EMPTYSTR | |
421 | 418 | else lpAssetIdOpt | |
422 | 419 | let userAddressStr = if ((userAddressOpt == "")) | |
423 | 420 | then EMPTYSTR | |
424 | 421 | else userAddressOpt | |
425 | 422 | let userNumStr = valueOrElse(getString(boostingDapp, keyUser2NumMapping(userAddressOpt)), EMPTYSTR) | |
426 | 423 | let userAmount = valueOrElse(getInteger(boostingDapp, keyLockParamUserAmount(userNumStr)), 0) | |
427 | 424 | let lockStart = valueOrElse(getInteger(boostingDapp, keyLockParamStartBlock(userNumStr)), height) | |
428 | 425 | let lockDuration = valueOrElse(getInteger(boostingDapp, keyLockParamDuration(userNumStr)), 0) | |
429 | 426 | let lockEnd = (lockStart + lockDuration) | |
430 | 427 | let remainingDuration = max([(lockEnd - height), 0]) | |
431 | 428 | let userAmountNew = (userAmount + deltaWxAmount) | |
432 | 429 | let lockDurationNew = min([(remainingDuration + deltaLockPeriodInBlocks), maxLockDurationInBlocks]) | |
433 | 430 | let userCurrgWxAmount = asInt(asAnyList(invoke(boostingDapp, "gwxUserInfoREADONLY", [userAddressStr], nil))[0]) | |
434 | 431 | let gWxAmountStartNew = calcGwxAmountStartREADONLY(userAmountNew, lockDurationNew, maxLockDurationInBlocks)[0] | |
435 | 432 | let totalCachedGwx = { | |
436 | 433 | let @ = invoke(boostingDapp, "getTotalCachedGwxREADONLY", nil, nil) | |
437 | 434 | if ($isInstanceOf(@, "Int")) | |
438 | 435 | then @ | |
439 | 436 | else throw(($getType(@) + " couldn't be cast to Int")) | |
440 | 437 | } | |
441 | 438 | let MULT3 = 1000 | |
442 | 439 | let wxEmissionPerBlockX3 = (getIntOrFail(emissionDapp, keyEmissionRatePerBlockCurrent()) * MULT3) | |
443 | 440 | let stakedByUserKEY = keyStakedByUser(userAddressStr, lpAssetIdStr) | |
444 | 441 | let stakedTotalKEY = keyStakedTotal(lpAssetIdStr) | |
445 | 442 | let stakedByUser = readStaked(stakingDapp, stakedByUserKEY) | |
446 | 443 | let stakedTotal = readStaked(stakingDapp, stakedTotalKEY) | |
447 | 444 | let poolWeight = if ((lpAssetIdStr != EMPTYSTR)) | |
448 | 445 | then { | |
449 | 446 | let poolAddressStr = valueOrErrorMessage(getString(factoryDapp, keyFactoryLp2AssetsMapping(lpAssetIdStr)), ("unsupported lp asset " + lpAssetIdStr)) | |
450 | 447 | getIntegerValue(factoryDapp, keyFactoryPoolWeight(poolAddressStr)) | |
451 | 448 | } | |
452 | 449 | else 0 | |
453 | 450 | let poolWxEmissionPerBlockX3 = fraction(wxEmissionPerBlockX3, poolWeight, (POOLWEIGHTMULT * boostCoeff)) | |
454 | 451 | let wxPerLpX3 = if ((stakedTotal != 0)) | |
455 | 452 | then fraction(poolWxEmissionPerBlockX3, MULT8, stakedTotal) | |
456 | 453 | else 0 | |
457 | 454 | let userWxPerBlockX3 = fraction(wxPerLpX3, stakedByUser, MULT8) | |
458 | 455 | let boostEmissionPerBlockX3 = (poolWxEmissionPerBlockX3 * (boostCoeff - 1)) | |
459 | 456 | let tmpUserBoostPerBlockX3 = fraction(userCurrgWxAmount, boostEmissionPerBlockX3, totalCachedGwx) | |
460 | 457 | let userBoostPerBlockX3 = min([tmpUserBoostPerBlockX3, (userWxPerBlockX3 * (boostCoeff - 1))]) | |
461 | 458 | let userBoostCoeff = if ((userWxPerBlockX3 == 0)) | |
462 | 459 | then (1 * MULT8) | |
463 | 460 | else fraction((userBoostPerBlockX3 + userWxPerBlockX3), MULT8, userWxPerBlockX3) | |
464 | 461 | $Tuple2(nil, makeString(["%d%d%s", toString(gWxAmountStartNew), toString(userBoostCoeff), "d"], SEP)) | |
465 | 462 | } | |
466 | 463 | ||
467 | 464 | ||
468 | 465 | ||
469 | 466 | @Callable(i) | |
470 | 467 | func wxEmissionStatsREADONLY () = { | |
471 | 468 | let ONEMULT = toString(MULT8) | |
472 | 469 | let ONE = "1" | |
473 | 470 | let wxEmissionPerBlock = getIntOrFail(emissionDapp, keyEmissionRatePerBlockCurrent()) | |
474 | 471 | let emissionStartBlock = getIntOrFail(emissionDapp, keyEmissionStartBlock()) | |
475 | 472 | let passedBlocks = if ((emissionStartBlock > height)) | |
476 | 473 | then 0 | |
477 | 474 | else (height - emissionStartBlock) | |
478 | 475 | let teamEmDuration = (1440 * 365) | |
479 | 476 | let teamEmMax = (201000000 * MULT8) | |
480 | 477 | let teamEm = if ((passedBlocks > teamEmDuration)) | |
481 | 478 | then teamEmMax | |
482 | 479 | else fraction(teamEmMax, passedBlocks, teamEmDuration) | |
483 | 480 | let totalWxReleased = ((wxEmissionPerBlock * passedBlocks) + teamEm) | |
484 | 481 | let totalWxLocked = getIntOrZero(boostingDapp, keyBoostingLockParamTotalAmount()) | |
485 | 482 | let locksDurationSumInBlocks = getIntOrZero(boostingDapp, keyBoostingStatsLocksDurationSumInBlocks()) | |
486 | 483 | let locksCount = getIntOrZero(boostingDapp, keyBoostingStatsLocksCount()) | |
487 | 484 | $Tuple2(nil, makeString(["%d%d%d%d", toString(totalWxReleased), toString(totalWxLocked), toString(locksDurationSumInBlocks), toString(locksCount)], SEP)) | |
488 | 485 | } | |
489 | 486 | ||
490 | 487 | ||
491 | 488 | ||
492 | 489 | @Callable(i) | |
493 | 490 | func poolStatsREADONLY (lpAsset) = { | |
494 | 491 | let poolAddress = addressFromStringValue(getStringByAddressOrFail(factoryDapp, keyFactoryLpAssetToPoolContractAddress(lpAsset))) | |
495 | 492 | let status = { | |
496 | 493 | let @ = invoke(factoryDapp, "getPoolStatusREADONLY", [toString(poolAddress)], nil) | |
497 | 494 | if ($isInstanceOf(@, "Int")) | |
498 | 495 | then @ | |
499 | 496 | else throw(($getType(@) + " couldn't be cast to Int")) | |
500 | 497 | } | |
501 | 498 | let tpl = "%d%d%d%d%d%d%d%d%d%s" | |
502 | 499 | if ((status == 4)) | |
503 | 500 | 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)) | |
504 | 501 | else { | |
505 | 502 | let cfg = asAnyList(invoke(poolAddress, "getPoolConfigWrapperREADONLY", nil, nil)) | |
506 | 503 | let lpAssetId = fromBase58String(asString(cfg[idxPoolLPAssetId])) | |
507 | 504 | let amtAssetId = asString(cfg[idxAmtAssetId]) | |
508 | 505 | let priceAssetId = asString(cfg[idxPriceAssetId]) | |
509 | 506 | let iAmtAssetId = asString(cfg[idxIAmtAssetId]) | |
510 | 507 | let iPriceAssetId = asString(cfg[idxIPriceAssetId]) | |
511 | 508 | let amtAssetDcm = parseIntValue(asString(cfg[idxAmtAssetDcm])) | |
512 | 509 | let priceAssetDcm = parseIntValue(asString(cfg[idxPriceAssetDcm])) | |
513 | 510 | let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity | |
514 | 511 | let accAmtAssetBalance = asInt(invoke(poolAddress, "getAccBalanceWrapperREADONLY", [amtAssetId], nil)) | |
515 | 512 | let accPriceAssetBalance = asInt(invoke(poolAddress, "getAccBalanceWrapperREADONLY", [priceAssetId], nil)) | |
516 | 513 | let pricesList = if ((poolLPBalance == 0)) | |
517 | 514 | then [toString(zeroBigInt), toString(zeroBigInt), toString(zeroBigInt)] | |
518 | 515 | else asAnyList(invoke(poolAddress, "calcPricesWrapperREADONLY", [accAmtAssetBalance, accPriceAssetBalance, poolLPBalance], nil)) | |
519 | 516 | let curPrice = 0 | |
520 | 517 | let lpAmtAssetShare = asInt(invoke(poolAddress, "fromX18WrapperREADONLY", [pricesList[1], MULT8], nil)) | |
521 | 518 | let lpPriceAssetShare = asInt(invoke(poolAddress, "fromX18WrapperREADONLY", [pricesList[2], MULT8], nil)) | |
522 | 519 | let poolWeight = getIntegerValue(factoryDapp, keyFactoryPoolWeight(toString(poolAddress))) | |
523 | 520 | let inFee = getPoolInFee(poolAddress) | |
524 | 521 | let outFee = getPoolOutFee(poolAddress) | |
525 | 522 | let poolOneTokenOperationsDisabled = { | |
526 | 523 | let @ = invoke(factoryDapp, "isPoolOneTokenOperationsDisabledREADONLY", [toString(poolAddress)], nil) | |
527 | 524 | if ($isInstanceOf(@, "Boolean")) | |
528 | 525 | then @ | |
529 | 526 | else throw(($getType(@) + " couldn't be cast to Boolean")) | |
530 | 527 | } | |
531 | 528 | let poolOneTokenOperationsEnabled = !(poolOneTokenOperationsDisabled) | |
532 | 529 | $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)) | |
533 | 530 | } | |
534 | 531 | } | |
535 | 532 | ||
536 | 533 | ||
537 | 534 | ||
538 | 535 | @Callable(i) | |
539 | 536 | func poolEvaluatePutByAmountAssetREADONLY (lpAsset,inAmAssetAmt) = { | |
540 | 537 | let poolAddress = addressFromStringValue(getStringByAddressOrFail(factoryDapp, keyFactoryLpAssetToPoolContractAddress(lpAsset))) | |
541 | 538 | let cfg = asAnyList(invoke(poolAddress, "getPoolConfigWrapperREADONLY", nil, nil)) | |
542 | 539 | let lpAssetId = fromBase58String(asString(cfg[idxPoolLPAssetId])) | |
543 | 540 | let amAssetIdStr = asString(cfg[idxAmtAssetId]) | |
544 | 541 | let amAssetId = fromBase58String(amAssetIdStr) | |
545 | 542 | let prAssetIdStr = asString(cfg[idxPriceAssetId]) | |
546 | 543 | let prAssetId = fromBase58String(prAssetIdStr) | |
547 | 544 | let amtAssetDcm = parseIntValue(asString(cfg[idxAmtAssetDcm])) | |
548 | 545 | let priceAssetDcm = parseIntValue(asString(cfg[idxPriceAssetDcm])) | |
549 | 546 | let poolStatus = asString(cfg[idxPoolStatus]) | |
550 | 547 | let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity | |
551 | 548 | let accAmtAssetBalance = asInt(invoke(poolAddress, "getAccBalanceWrapperREADONLY", [amAssetIdStr], nil)) | |
552 | 549 | let accPriceAssetBalance = asInt(invoke(poolAddress, "getAccBalanceWrapperREADONLY", [prAssetIdStr], nil)) | |
553 | 550 | let amtAssetAmtX18 = parseBigIntValue(asString(invoke(poolAddress, "toX18WrapperREADONLY", [accAmtAssetBalance, amtAssetDcm], nil))) | |
554 | 551 | let priceAssetAmtX18 = parseBigIntValue(asString(invoke(poolAddress, "toX18WrapperREADONLY", [accPriceAssetBalance, priceAssetDcm], nil))) | |
555 | 552 | let curPriceX18 = if ((poolLPBalance == 0)) | |
556 | 553 | then zeroBigInt | |
557 | 554 | else parseBigIntValue(asString(invoke(poolAddress, "calcPriceBigIntWrapperREADONLY", [toString(priceAssetAmtX18), toString(amtAssetAmtX18)], nil))) | |
558 | 555 | let curPrice = asInt(invoke(poolAddress, "fromX18WrapperREADONLY", [toString(curPriceX18), MULT8], nil)) | |
559 | 556 | let inAmAssetAmtX18 = parseBigIntValue(asString(invoke(poolAddress, "toX18WrapperREADONLY", [inAmAssetAmt, amtAssetDcm], nil))) | |
560 | 557 | let inPrAssetAmtX18 = fraction(inAmAssetAmtX18, curPriceX18, MULT18) | |
561 | 558 | let inPrAssetAmt = asInt(invoke(poolAddress, "fromX18WrapperREADONLY", [toString(inPrAssetAmtX18), priceAssetDcm], nil)) | |
562 | 559 | let res = invoke(poolAddress, "estimatePutOperationWrapperREADONLY", ["", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false], nil) | |
563 | - | let $ | |
560 | + | let $t02262722980 = match res { | |
564 | 561 | case _ => | |
565 | 562 | if (if (if ($isInstanceOf($match0._1, "Int")) | |
566 | 563 | then if ($isInstanceOf($match0._3, "Int")) | |
567 | 564 | then if ($isInstanceOf($match0._4, "Int")) | |
568 | 565 | then if ($isInstanceOf($match0._5, "Int")) | |
569 | 566 | then $isInstanceOf($match0._6, "Int") | |
570 | 567 | else false | |
571 | 568 | else false | |
572 | 569 | else false | |
573 | 570 | else false) | |
574 | 571 | then (size($match0) == 13) | |
575 | 572 | else false) | |
576 | 573 | then { | |
577 | 574 | let calcLpAmt = $match0._1 | |
578 | 575 | let curPriceCalc = $match0._3 | |
579 | 576 | let amBalance = $match0._4 | |
580 | 577 | let prBalance = $match0._5 | |
581 | 578 | let lpEmission = $match0._6 | |
582 | 579 | $Tuple5(calcLpAmt, curPriceCalc, amBalance, prBalance, lpEmission) | |
583 | 580 | } | |
584 | 581 | else throw("Couldn't cast types") | |
585 | 582 | } | |
586 | - | let calcLpAmt = $ | |
587 | - | let curPriceCalc = $ | |
588 | - | let amBalance = $ | |
589 | - | let prBalance = $ | |
590 | - | let lpEmission = $ | |
583 | + | let calcLpAmt = $t02262722980._1 | |
584 | + | let curPriceCalc = $t02262722980._2 | |
585 | + | let amBalance = $t02262722980._3 | |
586 | + | let prBalance = $t02262722980._4 | |
587 | + | let lpEmission = $t02262722980._5 | |
591 | 588 | $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)) | |
592 | 589 | } | |
593 | 590 | ||
594 | 591 | ||
595 | 592 | ||
596 | 593 | @Callable(i) | |
597 | 594 | func poolEvaluatePutByPriceAssetREADONLY (lpAsset,inPrAssetAmt) = { | |
598 | 595 | let poolAddress = addressFromStringValue(getStringByAddressOrFail(factoryDapp, keyFactoryLpAssetToPoolContractAddress(lpAsset))) | |
599 | 596 | let cfg = asAnyList(invoke(poolAddress, "getPoolConfigWrapperREADONLY", nil, nil)) | |
600 | 597 | let lpAssetId = fromBase58String(asString(cfg[idxPoolLPAssetId])) | |
601 | 598 | let amAssetIdStr = asString(cfg[idxAmtAssetId]) | |
602 | 599 | let amAssetId = fromBase58String(amAssetIdStr) | |
603 | 600 | let prAssetIdStr = asString(cfg[idxPriceAssetId]) | |
604 | 601 | let prAssetId = fromBase58String(prAssetIdStr) | |
605 | 602 | let amtAssetDcm = parseIntValue(asString(cfg[idxAmtAssetDcm])) | |
606 | 603 | let priceAssetDcm = parseIntValue(asString(cfg[idxPriceAssetDcm])) | |
607 | 604 | let poolStatus = asString(cfg[idxPoolStatus]) | |
608 | 605 | let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity | |
609 | 606 | let amBalanceRaw = asInt(invoke(poolAddress, "getAccBalanceWrapperREADONLY", [amAssetIdStr], nil)) | |
610 | 607 | let prBalanceRaw = asInt(invoke(poolAddress, "getAccBalanceWrapperREADONLY", [prAssetIdStr], nil)) | |
611 | 608 | let amBalanceRawX18 = parseBigIntValue(asString(invoke(poolAddress, "toX18WrapperREADONLY", [amBalanceRaw, amtAssetDcm], nil))) | |
612 | 609 | let prBalanceRawX18 = parseBigIntValue(asString(invoke(poolAddress, "toX18WrapperREADONLY", [prBalanceRaw, priceAssetDcm], nil))) | |
613 | 610 | let curPriceX18 = if ((poolLPBalance == 0)) | |
614 | 611 | then zeroBigInt | |
615 | 612 | else parseBigIntValue(asString(invoke(poolAddress, "calcPriceBigIntWrapperREADONLY", [toString(prBalanceRawX18), toString(amBalanceRawX18)], nil))) | |
616 | 613 | let curPrice = asInt(invoke(poolAddress, "fromX18WrapperREADONLY", [toString(curPriceX18), MULT8], nil)) | |
617 | 614 | let inPrAssetAmtX18 = parseBigIntValue(asString(invoke(poolAddress, "toX18WrapperREADONLY", [inPrAssetAmt, priceAssetDcm], nil))) | |
618 | 615 | let inAmAssetAmtX18 = fraction(inPrAssetAmtX18, MULT18, curPriceX18) | |
619 | 616 | let inAmAssetAmt = asInt(invoke(poolAddress, "fromX18WrapperREADONLY", [toString(inAmAssetAmtX18), amtAssetDcm], nil)) | |
620 | 617 | let res = invoke(poolAddress, "estimatePutOperationWrapperREADONLY", ["", 500000, inAmAssetAmt, amAssetId, inPrAssetAmt, prAssetId, "", true, false], nil) | |
621 | - | let $ | |
618 | + | let $t02555325906 = match res { | |
622 | 619 | case _ => | |
623 | 620 | if (if (if ($isInstanceOf($match0._1, "Int")) | |
624 | 621 | then if ($isInstanceOf($match0._3, "Int")) | |
625 | 622 | then if ($isInstanceOf($match0._4, "Int")) | |
626 | 623 | then if ($isInstanceOf($match0._5, "Int")) | |
627 | 624 | then $isInstanceOf($match0._6, "Int") | |
628 | 625 | else false | |
629 | 626 | else false | |
630 | 627 | else false | |
631 | 628 | else false) | |
632 | 629 | then (size($match0) == 13) | |
633 | 630 | else false) | |
634 | 631 | then { | |
635 | 632 | let calcLpAmt = $match0._1 | |
636 | 633 | let curPriceCalc = $match0._3 | |
637 | 634 | let amBalance = $match0._4 | |
638 | 635 | let prBalance = $match0._5 | |
639 | 636 | let lpEmission = $match0._6 | |
640 | 637 | $Tuple5(calcLpAmt, curPriceCalc, amBalance, prBalance, lpEmission) | |
641 | 638 | } | |
642 | 639 | else throw("Couldn't cast types") | |
643 | 640 | } | |
644 | - | let calcLpAmt = $ | |
645 | - | let curPriceCalc = $ | |
646 | - | let amBalance = $ | |
647 | - | let prBalance = $ | |
648 | - | let lpEmission = $ | |
641 | + | let calcLpAmt = $t02555325906._1 | |
642 | + | let curPriceCalc = $t02555325906._2 | |
643 | + | let amBalance = $t02555325906._3 | |
644 | + | let prBalance = $t02555325906._4 | |
645 | + | let lpEmission = $t02555325906._5 | |
649 | 646 | $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)) | |
650 | 647 | } | |
651 | 648 | ||
652 | 649 | ||
653 | 650 | ||
654 | 651 | @Callable(i) | |
655 | 652 | func poolEvaluateGetREADONLY (paymentLpAssetId,paymentLpAmt) = { | |
656 | 653 | let poolAddress = addressFromStringValue(getStringByAddressOrFail(factoryDapp, keyFactoryLpAssetToPoolContractAddress(paymentLpAssetId))) | |
657 | 654 | let res = invoke(poolAddress, "estimateGetOperationWrapperREADONLY", ["", paymentLpAssetId, paymentLpAmt, toString(poolAddress)], nil) | |
658 | - | let $ | |
655 | + | let $t02660127018 = match res { | |
659 | 656 | case _ => | |
660 | 657 | if (if (if ($isInstanceOf($match0._1, "Int")) | |
661 | 658 | then if ($isInstanceOf($match0._2, "Int")) | |
662 | 659 | then if ($isInstanceOf($match0._5, "Int")) | |
663 | 660 | then if ($isInstanceOf($match0._6, "Int")) | |
664 | 661 | then if ($isInstanceOf($match0._7, "Int")) | |
665 | 662 | then if ($isInstanceOf($match0._8, "String")) | |
666 | 663 | then $isInstanceOf($match0._9, "String") | |
667 | 664 | else false | |
668 | 665 | else false | |
669 | 666 | else false | |
670 | 667 | else false | |
671 | 668 | else false | |
672 | 669 | else false) | |
673 | 670 | then (size($match0) == 10) | |
674 | 671 | else false) | |
675 | 672 | then { | |
676 | 673 | let outAmAmt = $match0._1 | |
677 | 674 | let outPrAmt = $match0._2 | |
678 | 675 | let amBalance = $match0._5 | |
679 | 676 | let prBalance = $match0._6 | |
680 | 677 | let lpEmission = $match0._7 | |
681 | 678 | let curPrice = $match0._8 | |
682 | 679 | let poolStatus = $match0._9 | |
683 | 680 | $Tuple7(outAmAmt, outPrAmt, amBalance, prBalance, lpEmission, curPrice, poolStatus) | |
684 | 681 | } | |
685 | 682 | else throw("Couldn't cast types") | |
686 | 683 | } | |
687 | - | let outAmAmt = $ | |
688 | - | let outPrAmt = $ | |
689 | - | let amBalance = $ | |
690 | - | let prBalance = $ | |
691 | - | let lpEmission = $ | |
692 | - | let curPrice = $ | |
693 | - | let poolStatus = $ | |
684 | + | let outAmAmt = $t02660127018._1 | |
685 | + | let outPrAmt = $t02660127018._2 | |
686 | + | let amBalance = $t02660127018._3 | |
687 | + | let prBalance = $t02660127018._4 | |
688 | + | let lpEmission = $t02660127018._5 | |
689 | + | let curPrice = $t02660127018._6 | |
690 | + | let poolStatus = $t02660127018._7 | |
694 | 691 | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(outAmAmt), toString(outPrAmt), toString(amBalance), toString(prBalance), toString(lpEmission), curPrice, poolStatus], SEP)) | |
695 | 692 | } | |
696 | 693 | ||
697 | 694 | ||
698 | 695 | ||
699 | 696 | @Callable(i) | |
700 | 697 | func gwxUserInfoREADONLY (userAddress) = { | |
701 | 698 | let gwxUserInfoLIST = asAnyList(invoke(boostingDapp, "gwxUserInfoREADONLY", [userAddress], nil)) | |
702 | 699 | let gwxAmount = asInt(gwxUserInfoLIST[0]) | |
703 | 700 | $Tuple2(nil, makeString(["%d", toString(gwxAmount)], SEP)) | |
704 | 701 | } | |
705 | 702 | ||
706 | 703 | ||
707 | 704 | ||
708 | 705 | @Callable(i) | |
709 | 706 | func unstakeAndGetOneTknV2 (poolAddress,unstakeAmount,outAssetId,minOutAmount) = { | |
710 | 707 | let inv = invoke(addressFromStringValue(poolAddress), "unstakeAndGetOneTknV2", [unstakeAmount, outAssetId, minOutAmount], nil) | |
711 | 708 | if ((inv == inv)) | |
712 | 709 | then $Tuple2(nil, unit) | |
713 | 710 | else throw("Strict value is not equal to itself.") | |
714 | 711 | } | |
715 | 712 | ||
716 | 713 | ||
717 | 714 | ||
718 | 715 | @Callable(i) | |
719 | 716 | func getKeysBulkInternal (currentIter,keys,resAcc) = if ((currentIter == size(keys))) | |
720 | 717 | then $Tuple2(nil, resAcc) | |
721 | 718 | else { | |
722 | 719 | let k = split(keys[currentIter], "++") | |
723 | 720 | let addr = addressFromStringValue(k[0]) | |
724 | 721 | let key = k[1] | |
725 | 722 | let type = k[2] | |
726 | 723 | let val = getKey(addr, key, type) | |
727 | 724 | let res = (resAcc :+ val) | |
728 | 725 | let inv = invoke(this, "getKeysBulkInternal", [(currentIter + 1), keys, res], nil) | |
729 | 726 | if ((inv == inv)) | |
730 | 727 | then $Tuple2(nil, inv) | |
731 | 728 | else throw("Strict value is not equal to itself.") | |
732 | 729 | } | |
733 | 730 | ||
734 | 731 | ||
735 | 732 | ||
736 | 733 | @Callable(i) | |
737 | 734 | func getKeysBulk (keys) = { | |
738 | 735 | let res = invoke(this, "getKeysBulkInternal", [0, keys, nil], nil) | |
739 | 736 | $Tuple2(nil, res) | |
740 | 737 | } | |
741 | 738 | ||
742 | 739 | ||
743 | 740 | @Verifier(tx) | |
744 | 741 | func verify () = { | |
745 | 742 | let targetPublicKey = match managerPublicKeyOrUnit() { | |
746 | 743 | case pk: ByteVector => | |
747 | 744 | pk | |
748 | 745 | case _: Unit => | |
749 | 746 | tx.senderPublicKey | |
750 | 747 | case _ => | |
751 | 748 | throw("Match error") | |
752 | 749 | } | |
753 | 750 | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
754 | 751 | } | |
755 | 752 |
github/deemru/w8io/026f985 94.78 ms ◑