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