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