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