tx · Bm2FdP5GGNUpS4kh28FQvstAUMvCTzJX4SqmbXHNa277 3MzoZ6gnDM9qSxg2ftvW4rF33zmJpb9ixNV: -0.01400000 Waves 2021.10.07 14:36 [1735757] smart account 3MzoZ6gnDM9qSxg2ftvW4rF33zmJpb9ixNV > SELF 0.00000000 Waves
{ "type": 13, "id": "Bm2FdP5GGNUpS4kh28FQvstAUMvCTzJX4SqmbXHNa277", "fee": 1400000, "feeAssetId": null, "timestamp": 1633606579187, "version": 1, "sender": "3MzoZ6gnDM9qSxg2ftvW4rF33zmJpb9ixNV", "senderPublicKey": "C9aea3348FuUd2jm6XyHmf4axpvkSQ57q2FNjZDmdisb", "proofs": [ "5VktwfJPEYEoHvyX69pWjgUjGoAkLTYuFSeoAEi1UBrhiW3eUFvBpEhYoCWqzpH3Ts3ezgFBU3fHM4UayfZxw8Cm" ], "script": "base64:AAIFAAAAAAAAADUIAhIECgIICBIECgIBBBIAEgASBAoCAQESBAoCCAgSABIFCgMBAQgSBQoDAQEIEgUKAwgBCAAAADwAAAAACmxQZGVjaW1hbHMAAAAAAAAAAAgAAAAABnNjYWxlOAAAAAAABfXhAAAAAAAMc2NhbGU4QmlnSW50CQABNgAAAAEAAAAAAAX14QAAAAAAB3NjYWxlMTgJAAE2AAAAAQAN4Lazp2QAAAAAAAADU0VQAgAAAAJfXwAAAAAFRU1QVFkCAAAAAAAAAAAKUG9vbEFjdGl2ZQAAAAAAAAAAAQAAAAAPUG9vbFB1dERpc2FibGVkAAAAAAAAAAACAAAAABNQb29sTWF0Y2hlckRpc2FibGVkAAAAAAAAAAADAAAAAAxQb29sU2h1dGRvd24AAAAAAAAAAAQAAAAADmlkeFBvb2xBZGRyZXNzAAAAAAAAAAABAAAAAA1pZHhQb29sU3RhdHVzAAAAAAAAAAACAAAAABBpZHhQb29sTFBBc3NldElkAAAAAAAAAAADAAAAAA1pZHhBbXRBc3NldElkAAAAAAAAAAAEAAAAAA9pZHhQcmljZUFzc2V0SWQAAAAAAAAAA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AAA9zZW5kZXJQdWJsaWNLZXkHBAAAAA1tYW5hZ2VyUHVibGljCQEAAAALdmFsdWVPckVsc2UAAAACCQAEHQAAAAIFAAAABHRoaXMJAQAAABNrZXlNYW5hZ2VyUHVibGljS2V5AAAAAAUAAAAFRU1QVFkDCQAAAAAAAAIFAAAADW1hbmFnZXJQdWJsaWMFAAAABUVNUFRZCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleQkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAJAAJZAAAAAQUAAAANbWFuYWdlclB1YmxpY+ZXiv8=", "chainId": 84, "height": 1735757, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EqARLALcneZXEm7D1JG4yAg7anMdxnAgg2uJK71KQUWE Next: none Diff:
Old | New | Differences | |
---|---|---|---|
427 | 427 | ||
428 | 428 | @Callable(i) | |
429 | 429 | func putForFree () = { | |
430 | - | let actions = commonPut(i, | |
430 | + | let actions = commonPut(i, 1, false) | |
431 | 431 | actions._3 | |
432 | 432 | } | |
433 | 433 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let lPdecimals = 8 | |
5 | 5 | ||
6 | 6 | let scale8 = 100000000 | |
7 | 7 | ||
8 | 8 | let scale8BigInt = toBigInt(100000000) | |
9 | 9 | ||
10 | 10 | let scale18 = toBigInt(1000000000000000000) | |
11 | 11 | ||
12 | 12 | let SEP = "__" | |
13 | 13 | ||
14 | 14 | let EMPTY = "" | |
15 | 15 | ||
16 | 16 | let PoolActive = 1 | |
17 | 17 | ||
18 | 18 | let PoolPutDisabled = 2 | |
19 | 19 | ||
20 | 20 | let PoolMatcherDisabled = 3 | |
21 | 21 | ||
22 | 22 | let PoolShutdown = 4 | |
23 | 23 | ||
24 | 24 | let idxPoolAddress = 1 | |
25 | 25 | ||
26 | 26 | let idxPoolStatus = 2 | |
27 | 27 | ||
28 | 28 | let idxPoolLPAssetId = 3 | |
29 | 29 | ||
30 | 30 | let idxAmtAssetId = 4 | |
31 | 31 | ||
32 | 32 | let idxPriceAssetId = 5 | |
33 | 33 | ||
34 | 34 | let idxAmtAssetDcm = 6 | |
35 | 35 | ||
36 | 36 | let idxPriceAssetDcm = 7 | |
37 | 37 | ||
38 | 38 | let idxIAmtAssetId = 8 | |
39 | 39 | ||
40 | 40 | let idxIPriceAssetId = 9 | |
41 | 41 | ||
42 | 42 | let idxLPAssetDcm = 10 | |
43 | 43 | ||
44 | 44 | let idxPoolAmtAssetAmt = 1 | |
45 | 45 | ||
46 | 46 | let idxPoolPriceAssetAmt = 2 | |
47 | 47 | ||
48 | 48 | let idxPoolLPAssetAmt = 3 | |
49 | 49 | ||
50 | 50 | let idxFactoryStakingContract = 1 | |
51 | 51 | ||
52 | 52 | let idxFactorySlippageContract = 7 | |
53 | 53 | ||
54 | 54 | func toX18 (origVal,origScaleMult) = fraction(toBigInt(origVal), scale18, toBigInt(origScaleMult)) | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func fromX18 (val,resultScaleMult) = toInt(fraction(val, toBigInt(resultScaleMult), scale18)) | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | func toScale (amt,resScale,curScale) = fraction(amt, resScale, curScale) | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | func keyFactoryContract () = "%s__factoryContract" | |
64 | 64 | ||
65 | 65 | ||
66 | 66 | func keyManagerPublicKey () = "%s__managerPublicKey" | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | func keyPriceLast () = "%s%s__price__last" | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func keyPriceHistory (h,timestamp) = makeString(["%s%s%d%d__price__history", toString(h), toString(timestamp)], SEP) | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | func keyPutActionByUser (userAddress,txId) = ((("%s%s%s__P__" + userAddress) + "__") + txId) | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func keyGetActionByUser (userAddress,txId) = ((("%s%s%s__G__" + userAddress) + "__") + txId) | |
79 | 79 | ||
80 | 80 | ||
81 | 81 | func keyAmtAsset () = "%s__amountAsset" | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func keyPriceAsset () = "%s__priceAsset" | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func keyKHistoric (h,timestamp) = makeString(["%s%s%d%d__K_history", toString(h), toString(timestamp)], SEP) | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func keyFactoryConfig () = "%s__factoryConfig" | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | func keyMappingPoolContractAddressToPoolAssets (poolContractAddress) = (("%s%s%s__" + poolContractAddress) + "__mappings__poolContract2LpAsset") | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | func keyPoolConfig (iAmtAsset,iPriceAsset) = (((("%d%d%s__" + iAmtAsset) + "__") + iPriceAsset) + "__config") | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | func keyMappingsBaseAsset2internalId (baseAssetStr) = ("%s%s%s__mappings__baseAsset2internalId__" + baseAssetStr) | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func keyAllPoolsShutdown () = "%s__shutdown" | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func keyPoolWeight (contractAddress) = ("%s%s__poolWeight__" + contractAddress) | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | func getStringOrFail (address,key) = valueOrErrorMessage(getString(address, key), (((("mandatory " + toString(address)) + ".") + key) + " is not defined")) | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), (((("mandatory " + toString(address)) + ".") + key) + " is not defined")) | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | let factoryContract = addressFromStringValue(getStringOrFail(this, keyFactoryContract())) | |
115 | 115 | ||
116 | 116 | func isGlobalShutdown () = valueOrElse(getBoolean(factoryContract, keyAllPoolsShutdown()), false) | |
117 | 117 | ||
118 | 118 | ||
119 | 119 | func getPoolConfig () = { | |
120 | 120 | let amtAsset = getStringOrFail(this, keyAmtAsset()) | |
121 | 121 | let priceAsset = getStringOrFail(this, keyPriceAsset()) | |
122 | 122 | let iPriceAsset = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(priceAsset)) | |
123 | 123 | let iAmtAsset = getIntOrFail(factoryContract, keyMappingsBaseAsset2internalId(amtAsset)) | |
124 | 124 | split(getStringOrFail(factoryContract, keyPoolConfig(toString(iAmtAsset), toString(iPriceAsset))), SEP) | |
125 | 125 | } | |
126 | 126 | ||
127 | 127 | ||
128 | 128 | func getFactoryConfig () = split(getStringOrFail(factoryContract, keyFactoryConfig()), SEP) | |
129 | 129 | ||
130 | 130 | ||
131 | 131 | func dataPutActionInfo (inAmtAssetAmt,inPriceAssetAmt,outLpAmt,price,slippageTolerancePassedByUser,slippageToleranceReal,txHeight,txTimestamp,slipageAmtAssetAmt,slipagePriceAssetAmt) = makeString(["%d%d%d%d%d%d%d%d%d", toString(inAmtAssetAmt), toString(inPriceAssetAmt), toString(outLpAmt), toString(price), toString(slippageTolerancePassedByUser), toString(slippageToleranceReal), toString(txHeight), toString(txTimestamp), toString(slipageAmtAssetAmt), toString(slipagePriceAssetAmt)], SEP) | |
132 | 132 | ||
133 | 133 | ||
134 | 134 | func dataGetActionInfo (outAmtAssetAmt,outPriceAssetAmt,inLpAmt,price,txHeight,txTimestamp) = makeString(["%d%d%d%d%d%d", toString(outAmtAssetAmt), toString(outPriceAssetAmt), toString(inLpAmt), toString(price), toString(txHeight), toString(txTimestamp)], SEP) | |
135 | 135 | ||
136 | 136 | ||
137 | 137 | func getAccBalance (assetId) = if ((assetId == "WAVES")) | |
138 | 138 | then wavesBalance(this).available | |
139 | 139 | else assetBalance(this, fromBase58String(assetId)) | |
140 | 140 | ||
141 | 141 | ||
142 | 142 | func calcPriceBigInt (priceAssetLockedAmt,amtAssetlLockedAmt,resultScale) = fraction(priceAssetLockedAmt, resultScale, amtAssetlLockedAmt) | |
143 | 143 | ||
144 | 144 | ||
145 | 145 | func privateCalcPrice (amtAssetDcm,priceAssetDcm,amtAssetAmt,priceAssetAmt) = { | |
146 | 146 | let amtAssetAmtX18 = toX18(amtAssetAmt, amtAssetDcm) | |
147 | 147 | let priceAssetAmtX18 = toX18(priceAssetAmt, priceAssetDcm) | |
148 | 148 | toInt(calcPriceBigInt(priceAssetAmtX18, amtAssetAmtX18, scale8BigInt)) | |
149 | 149 | } | |
150 | 150 | ||
151 | 151 | ||
152 | 152 | func calcPrices (amtAssetAmt,priceAssetAmt,lpAmt) = { | |
153 | 153 | let cfg = getPoolConfig() | |
154 | 154 | let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm]) | |
155 | 155 | let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm]) | |
156 | 156 | let poolPrice = privateCalcPrice(amtAssetDcm, priceAssetDcm, amtAssetAmt, priceAssetAmt) | |
157 | 157 | let amtAssetAmtX18 = toX18(amtAssetAmt, amtAssetDcm) | |
158 | 158 | let priceAssetAmtX18 = toX18(priceAssetAmt, priceAssetDcm) | |
159 | 159 | let lpAmtX18 = toX18(lpAmt, scale8) | |
160 | 160 | let lpPriceInAmtAsset = toInt(calcPriceBigInt(amtAssetAmtX18, lpAmtX18, scale8BigInt)) | |
161 | 161 | let lpPriceInPriceAsset = toInt(calcPriceBigInt(priceAssetAmtX18, lpAmtX18, scale8BigInt)) | |
162 | 162 | [poolPrice, lpPriceInAmtAsset, lpPriceInPriceAsset] | |
163 | 163 | } | |
164 | 164 | ||
165 | 165 | ||
166 | 166 | func estimateGetOperation (paymentLpAssetId,paymentLpAmt,userAddress) = { | |
167 | 167 | let poolConfigList = getPoolConfig() | |
168 | 168 | let lpAssetId = poolConfigList[idxPoolLPAssetId] | |
169 | 169 | let amtAssetId = poolConfigList[idxAmtAssetId] | |
170 | 170 | let priceAssetId = poolConfigList[idxPriceAssetId] | |
171 | 171 | let iAmtAssetId = poolConfigList[idxIAmtAssetId] | |
172 | 172 | let iPriceAssetId = poolConfigList[idxIPriceAssetId] | |
173 | 173 | let amtAssetDcm = parseIntValue(poolConfigList[idxAmtAssetDcm]) | |
174 | 174 | let priceAssetDcm = parseIntValue(poolConfigList[idxPriceAssetDcm]) | |
175 | 175 | let poolStatus = poolConfigList[idxPoolStatus] | |
176 | 176 | let poolLPBalance = valueOrErrorMessage(assetInfo(fromBase58String(lpAssetId)), (("Asset " + lpAssetId) + " doesn't exist")).quantity | |
177 | 177 | if ((lpAssetId != paymentLpAssetId)) | |
178 | 178 | then throw("Invalid asset passed.") | |
179 | 179 | else { | |
180 | 180 | let amtAssetBalance = getAccBalance(amtAssetId) | |
181 | 181 | let amtAssetBalanceX18 = toX18(amtAssetBalance, amtAssetDcm) | |
182 | 182 | let priceAssetBalance = getAccBalance(priceAssetId) | |
183 | 183 | let priceAssetBalanceX18 = toX18(priceAssetBalance, priceAssetDcm) | |
184 | 184 | let curPrice = toInt(calcPriceBigInt(priceAssetBalanceX18, amtAssetBalanceX18, scale8BigInt)) | |
185 | 185 | let paymentLpAmtX18 = toX18(paymentLpAmt, scale8) | |
186 | 186 | let poolLPBalanceX18 = toX18(poolLPBalance, scale8) | |
187 | 187 | let outAmtAssetAmt = fraction(amtAssetBalanceX18, paymentLpAmtX18, poolLPBalanceX18) | |
188 | 188 | let outPriceAssetAmt = fraction(priceAssetBalanceX18, paymentLpAmtX18, poolLPBalanceX18) | |
189 | 189 | let outAmtAssetAmtFinal = fromX18(outAmtAssetAmt, amtAssetDcm) | |
190 | 190 | let outPriceAssetAmtFinal = fromX18(outPriceAssetAmt, priceAssetDcm) | |
191 | 191 | $Tuple11(outAmtAssetAmtFinal, outPriceAssetAmtFinal, iAmtAssetId, iPriceAssetId, amtAssetId, priceAssetId, amtAssetBalance, priceAssetBalance, poolLPBalance, curPrice, poolStatus) | |
192 | 192 | } | |
193 | 193 | } | |
194 | 194 | ||
195 | 195 | ||
196 | 196 | func estimatePutOperation (slippageTolerance,inAmtAssetAmt,inAmtAssetId,inPriceAssetAmt,inPriceAssetId,userAddress,isEvaluate) = { | |
197 | 197 | let cfg = getPoolConfig() | |
198 | 198 | let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId]) | |
199 | 199 | let amtAssetId = cfg[idxAmtAssetId] | |
200 | 200 | let priceAssetId = cfg[idxPriceAssetId] | |
201 | 201 | let iAmtAssetId = cfg[idxIAmtAssetId] | |
202 | 202 | let iPriceAssetId = cfg[idxIPriceAssetId] | |
203 | 203 | let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm]) | |
204 | 204 | let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm]) | |
205 | 205 | let poolStatus = cfg[idxPoolStatus] | |
206 | 206 | let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity | |
207 | 207 | if (if ((amtAssetId != inAmtAssetId)) | |
208 | 208 | then true | |
209 | 209 | else (priceAssetId != inPriceAssetId)) | |
210 | 210 | then throw("Invalid amt or price asset passed.") | |
211 | 211 | else { | |
212 | 212 | let accAmtAssetBalance = if (isEvaluate) | |
213 | 213 | then getAccBalance(amtAssetId) | |
214 | 214 | else (getAccBalance(amtAssetId) - inAmtAssetAmt) | |
215 | 215 | let accPriceAssetBalance = if (isEvaluate) | |
216 | 216 | then getAccBalance(priceAssetId) | |
217 | 217 | else (getAccBalance(priceAssetId) - inPriceAssetAmt) | |
218 | 218 | let inAmtAssetAmtX18 = toX18(inAmtAssetAmt, amtAssetDcm) | |
219 | 219 | let inPriceAssetAmtX18 = toX18(inPriceAssetAmt, priceAssetDcm) | |
220 | 220 | let userPrice = toInt(calcPriceBigInt(inPriceAssetAmtX18, inAmtAssetAmtX18, scale8BigInt)) | |
221 | 221 | let accAmtAssetBalanceX18 = toX18(accAmtAssetBalance, amtAssetDcm) | |
222 | 222 | let accPriceAssetBalanceX18 = toX18(accPriceAssetBalance, priceAssetDcm) | |
223 | 223 | let curPrice = if ((poolLPBalance == 0)) | |
224 | 224 | then 0 | |
225 | 225 | else toInt(calcPriceBigInt(accPriceAssetBalanceX18, accAmtAssetBalanceX18, scale8BigInt)) | |
226 | 226 | let slippage = if ((curPrice == 0)) | |
227 | 227 | then 0 | |
228 | 228 | else if ((curPrice > userPrice)) | |
229 | 229 | then fraction((curPrice - userPrice), scale8, curPrice) | |
230 | 230 | else fraction((userPrice - curPrice), scale8, curPrice) | |
231 | 231 | if (if ((curPrice != 0)) | |
232 | 232 | then (slippage > slippageTolerance) | |
233 | 233 | else false) | |
234 | 234 | then throw(((("Price slippage " + toString(slippage)) + " exceeded the passed limit of ") + toString(slippageTolerance))) | |
235 | 235 | else { | |
236 | 236 | let res = if ((poolLPBalance == 0)) | |
237 | 237 | then { | |
238 | 238 | let lpResultBuf = pow((inAmtAssetAmtX18 * inPriceAssetAmtX18), 0, toBigInt(5), 1, 0, DOWN) | |
239 | 239 | $Tuple4(fromX18(lpResultBuf, scale8), fromX18(inAmtAssetAmtX18, amtAssetDcm), fromX18(inPriceAssetAmtX18, priceAssetDcm), toInt(calcPriceBigInt((accPriceAssetBalanceX18 + inPriceAssetAmtX18), (accAmtAssetBalanceX18 + inAmtAssetAmtX18), scale8BigInt))) | |
240 | 240 | } | |
241 | 241 | else { | |
242 | 242 | let poolLPBalanceX18 = toX18(poolLPBalance, scale8) | |
243 | 243 | let curPriceX18 = toX18(curPrice, scale8) | |
244 | 244 | let pEqByA = fraction(curPriceX18, inAmtAssetAmtX18, scale18) | |
245 | 245 | let resAssetsToPut = if ((pEqByA > inPriceAssetAmtX18)) | |
246 | 246 | then $Tuple2(fraction(inPriceAssetAmtX18, scale18, curPriceX18), inPriceAssetAmtX18) | |
247 | 247 | else $Tuple2(inAmtAssetAmtX18, pEqByA) | |
248 | 248 | let lpResult = fromX18(fraction(poolLPBalanceX18, resAssetsToPut._2, accPriceAssetBalanceX18), scale8) | |
249 | 249 | $Tuple4(lpResult, fromX18(resAssetsToPut._1, amtAssetDcm), fromX18(resAssetsToPut._2, priceAssetDcm), toInt(calcPriceBigInt((accPriceAssetBalanceX18 + resAssetsToPut._2), (accAmtAssetBalanceX18 + resAssetsToPut._1), scale8BigInt))) | |
250 | 250 | } | |
251 | 251 | if ((0 >= res._1)) | |
252 | 252 | then throw("Invalid calculations. LP calculated is less than zero.") | |
253 | 253 | else $Tuple12(res._1, res._4, accAmtAssetBalance, accPriceAssetBalance, poolLPBalance, iAmtAssetId, iPriceAssetId, lpAssetId, slippage, poolStatus, res._2, res._3) | |
254 | 254 | } | |
255 | 255 | } | |
256 | 256 | } | |
257 | 257 | ||
258 | 258 | ||
259 | 259 | func validateMatcherOrderAllowed (order) = { | |
260 | 260 | let cfg = getPoolConfig() | |
261 | 261 | let amtAssetId = cfg[idxAmtAssetId] | |
262 | 262 | let priceAssetId = cfg[idxPriceAssetId] | |
263 | 263 | let poolStatus = parseIntValue(cfg[idxPoolStatus]) | |
264 | 264 | let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm]) | |
265 | 265 | let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm]) | |
266 | 266 | let accAmtAssetBalance = getAccBalance(amtAssetId) | |
267 | 267 | let accPriceAssetBalance = getAccBalance(priceAssetId) | |
268 | 268 | let curPrice = if ((order.orderType == Buy)) | |
269 | 269 | then privateCalcPrice(amtAssetDcm, priceAssetDcm, (accAmtAssetBalance + order.amount), accPriceAssetBalance) | |
270 | 270 | else privateCalcPrice(amtAssetDcm, priceAssetDcm, (accAmtAssetBalance - order.amount), accPriceAssetBalance) | |
271 | 271 | if (if (if (isGlobalShutdown()) | |
272 | 272 | then true | |
273 | 273 | else (poolStatus == PoolMatcherDisabled)) | |
274 | 274 | then true | |
275 | 275 | else (poolStatus == PoolShutdown)) | |
276 | 276 | then throw("Exchange operations disabled") | |
277 | 277 | else { | |
278 | 278 | let orderAmtAsset = order.assetPair.amountAsset | |
279 | 279 | let orderAmtAssetStr = if ((orderAmtAsset == unit)) | |
280 | 280 | then "WAVES" | |
281 | 281 | else toBase58String(value(orderAmtAsset)) | |
282 | 282 | let orderPriceAsset = order.assetPair.priceAsset | |
283 | 283 | let orderPriceAssetStr = if ((orderPriceAsset == unit)) | |
284 | 284 | then "WAVES" | |
285 | 285 | else toBase58String(value(orderPriceAsset)) | |
286 | 286 | if (if ((orderAmtAssetStr != amtAssetId)) | |
287 | 287 | then true | |
288 | 288 | else (orderPriceAssetStr != priceAssetId)) | |
289 | 289 | then throw("Wrong order assets.") | |
290 | 290 | else { | |
291 | 291 | let orderPrice = order.price | |
292 | 292 | let priceDcm = fraction(scale8, priceAssetDcm, amtAssetDcm) | |
293 | 293 | let castedOrderPrice = toScale(orderPrice, scale8, priceDcm) | |
294 | 294 | let isOrderPriceValid = if ((order.orderType == Buy)) | |
295 | 295 | then (curPrice >= castedOrderPrice) | |
296 | 296 | else (castedOrderPrice >= curPrice) | |
297 | 297 | if (!(isOrderPriceValid)) | |
298 | 298 | then throw(((("Order price leads to K decrease. castedOrderPrice=" + toString(castedOrderPrice)) + " curPrice=") + toString(curPrice))) | |
299 | 299 | else true | |
300 | 300 | } | |
301 | 301 | } | |
302 | 302 | } | |
303 | 303 | ||
304 | 304 | ||
305 | 305 | func commonGet (i) = { | |
306 | 306 | let pmtAmtAsset = value(i.payments[0]) | |
307 | 307 | let pmtAssetId = value(pmtAmtAsset.assetId) | |
308 | 308 | let pmtAssetAmt = pmtAmtAsset.amount | |
309 | 309 | let res = estimateGetOperation(toBase58String(pmtAssetId), pmtAssetAmt, toString(i.caller)) | |
310 | 310 | let outAmtAssetAmt = res._1 | |
311 | 311 | let outPriceAssetAmt = res._2 | |
312 | 312 | let iAmtAssetId = res._3 | |
313 | 313 | let iPriceAssetId = res._4 | |
314 | 314 | let amtAssetId = res._5 | |
315 | 315 | let priceAssetId = res._6 | |
316 | 316 | let poolAmtAssetBalance = res._7 | |
317 | 317 | let poolPriceAssetBalance = res._8 | |
318 | 318 | let poolLPBalance = res._9 | |
319 | 319 | let curPrice = res._10 | |
320 | 320 | let poolStatus = parseIntValue(res._11) | |
321 | 321 | if (if (isGlobalShutdown()) | |
322 | 322 | then true | |
323 | 323 | else (poolStatus == PoolShutdown)) | |
324 | 324 | then throw(("Get operation is blocked by admin. Status = " + toString(poolStatus))) | |
325 | 325 | else $Tuple5(outAmtAssetAmt, outPriceAssetAmt, pmtAssetAmt, pmtAssetId, [ScriptTransfer(i.caller, outAmtAssetAmt, if ((amtAssetId == "WAVES")) | |
326 | 326 | then unit | |
327 | 327 | else fromBase58String(amtAssetId)), ScriptTransfer(i.caller, outPriceAssetAmt, if ((priceAssetId == "WAVES")) | |
328 | 328 | then unit | |
329 | 329 | else fromBase58String(priceAssetId)), StringEntry(keyGetActionByUser(toString(i.caller), toBase58String(i.transactionId)), dataGetActionInfo(outAmtAssetAmt, outPriceAssetAmt, pmtAssetAmt, curPrice, height, lastBlock.timestamp)), StringEntry(keyPriceLast(), ("%s__" + toString(curPrice))), StringEntry(keyPriceHistory(height, lastBlock.timestamp), ("%s__" + toString(curPrice)))]) | |
330 | 330 | } | |
331 | 331 | ||
332 | 332 | ||
333 | 333 | func commonPut (i,slippageTolerance,emitLp) = { | |
334 | 334 | let pmtAmtAsset = value(i.payments[0]) | |
335 | 335 | let inAmtAssetAmt = pmtAmtAsset.amount | |
336 | 336 | let inAmtAssetId = if (!(isDefined(pmtAmtAsset.assetId))) | |
337 | 337 | then fromBase58String("WAVES") | |
338 | 338 | else value(pmtAmtAsset.assetId) | |
339 | 339 | let pmtPriceAsset = value(i.payments[1]) | |
340 | 340 | let inPriceAssetAmt = pmtPriceAsset.amount | |
341 | 341 | let inPriceAssetId = if (!(isDefined(pmtPriceAsset.assetId))) | |
342 | 342 | then fromBase58String("WAVES") | |
343 | 343 | else value(pmtPriceAsset.assetId) | |
344 | 344 | let estPut = estimatePutOperation(slippageTolerance, inAmtAssetAmt, toBase58String(inAmtAssetId), inPriceAssetAmt, toBase58String(inPriceAssetId), toString(i.caller), false) | |
345 | 345 | let outLpAmt = estPut._1 | |
346 | 346 | let curPrice = estPut._2 | |
347 | 347 | let poolAmtAssetBalance = estPut._3 | |
348 | 348 | let poolPriceAssetBalance = estPut._4 | |
349 | 349 | let poolLPBalance = estPut._5 | |
350 | 350 | let iAmtAssetId = estPut._6 | |
351 | 351 | let iPriceAssetId = estPut._7 | |
352 | 352 | let lpAssetId = estPut._8 | |
353 | 353 | let slippageCalc = estPut._9 | |
354 | 354 | let poolStatus = parseIntValue(estPut._10) | |
355 | 355 | let realAmtAssetIn = estPut._11 | |
356 | 356 | let realPriceAssetIn = estPut._12 | |
357 | 357 | if (if (if (isGlobalShutdown()) | |
358 | 358 | then true | |
359 | 359 | else (poolStatus == PoolPutDisabled)) | |
360 | 360 | then true | |
361 | 361 | else (poolStatus == PoolShutdown)) | |
362 | 362 | then throw(("Put operation is blocked by admin. Status = " + toString(poolStatus))) | |
363 | 363 | else { | |
364 | 364 | let lpAmtToEmit = if (!(emitLp)) | |
365 | 365 | then 0 | |
366 | 366 | else outLpAmt | |
367 | 367 | let diffInAmtAsset = (inAmtAssetAmt - realAmtAssetIn) | |
368 | 368 | let diffInPriceAsset = (inPriceAssetAmt - realPriceAssetIn) | |
369 | 369 | let dataStateWrite = [StringEntry(keyPriceLast(), ("%s__" + toString(curPrice))), StringEntry(keyPriceHistory(height, lastBlock.timestamp), ("%s__" + toString(curPrice))), StringEntry(keyPutActionByUser(toString(i.caller), toBase58String(i.transactionId)), dataPutActionInfo(realAmtAssetIn, realPriceAssetIn, lpAmtToEmit, curPrice, slippageTolerance, slippageCalc, height, lastBlock.timestamp, diffInAmtAsset, diffInPriceAsset))] | |
370 | 370 | $Tuple9(lpAmtToEmit, lpAssetId, dataStateWrite, inAmtAssetAmt, realAmtAssetIn, inPriceAssetAmt, realPriceAssetIn, pmtAmtAsset.assetId, pmtPriceAsset.assetId) | |
371 | 371 | } | |
372 | 372 | } | |
373 | 373 | ||
374 | 374 | ||
375 | 375 | @Callable(i) | |
376 | 376 | func constructor (factoryContract,managerPublicKey) = if ((i.caller != this)) | |
377 | 377 | then throw("permissions denied") | |
378 | 378 | else [StringEntry(keyFactoryContract(), factoryContract), StringEntry(keyManagerPublicKey(), managerPublicKey)] | |
379 | 379 | ||
380 | 380 | ||
381 | 381 | ||
382 | 382 | @Callable(i) | |
383 | 383 | func put (slippageTolerance,shouldAutoStake) = { | |
384 | 384 | let factoryCfg = getFactoryConfig() | |
385 | 385 | let stakingContract = valueOrErrorMessage(addressFromString(factoryCfg[idxFactoryStakingContract]), "Error. Incorrect staking address.") | |
386 | 386 | let slippageContract = valueOrErrorMessage(addressFromString(factoryCfg[idxFactorySlippageContract]), "Error. Incorrect slippage contract address.") | |
387 | 387 | let actions = commonPut(i, slippageTolerance, true) | |
388 | 388 | let amtToEmit = actions._1 | |
389 | 389 | let lpAssetId = actions._2 | |
390 | 390 | let state = actions._3 | |
391 | 391 | let inAmt = actions._4 | |
392 | 392 | let realInAmt = actions._5 | |
393 | 393 | let inPrice = actions._6 | |
394 | 394 | let realInPrice = actions._7 | |
395 | 395 | let amId = actions._8 | |
396 | 396 | let prId = actions._9 | |
397 | 397 | let diffInAmtAsset = (inAmt - realInAmt) | |
398 | 398 | let diffInPriceAsset = (inPrice - realInPrice) | |
399 | 399 | let emitInv = invoke(factoryContract, "emit", [amtToEmit], nil) | |
400 | 400 | if ((emitInv == emitInv)) | |
401 | 401 | then { | |
402 | 402 | let slippageAInv = if ((inAmt > realInAmt)) | |
403 | 403 | then invoke(slippageContract, "put", nil, [AttachedPayment(amId, diffInAmtAsset)]) | |
404 | 404 | else nil | |
405 | 405 | if ((slippageAInv == slippageAInv)) | |
406 | 406 | then { | |
407 | 407 | let slippagePInv = if ((inPrice > realInPrice)) | |
408 | 408 | then invoke(slippageContract, "put", nil, [AttachedPayment(prId, diffInPriceAsset)]) | |
409 | 409 | else nil | |
410 | 410 | if ((slippagePInv == slippagePInv)) | |
411 | 411 | then { | |
412 | 412 | let lpStakeInv = if (shouldAutoStake) | |
413 | 413 | then invoke(stakingContract, "stake", nil, [AttachedPayment(lpAssetId, amtToEmit)]) | |
414 | 414 | else nil | |
415 | 415 | if ((lpStakeInv == lpStakeInv)) | |
416 | 416 | then (state :+ ScriptTransfer(i.caller, amtToEmit, lpAssetId)) | |
417 | 417 | else throw("Strict value is not equal to itself.") | |
418 | 418 | } | |
419 | 419 | else throw("Strict value is not equal to itself.") | |
420 | 420 | } | |
421 | 421 | else throw("Strict value is not equal to itself.") | |
422 | 422 | } | |
423 | 423 | else throw("Strict value is not equal to itself.") | |
424 | 424 | } | |
425 | 425 | ||
426 | 426 | ||
427 | 427 | ||
428 | 428 | @Callable(i) | |
429 | 429 | func putForFree () = { | |
430 | - | let actions = commonPut(i, | |
430 | + | let actions = commonPut(i, 1, false) | |
431 | 431 | actions._3 | |
432 | 432 | } | |
433 | 433 | ||
434 | 434 | ||
435 | 435 | ||
436 | 436 | @Callable(i) | |
437 | 437 | func get () = { | |
438 | 438 | let res = commonGet(i) | |
439 | 439 | let outAmtAssetAmt = res._1 | |
440 | 440 | let outPriceAssetAmt = res._2 | |
441 | 441 | let pmtAssetAmt = res._3 | |
442 | 442 | let pmtAssetId = res._4 | |
443 | 443 | let actions = res._5 | |
444 | 444 | let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAssetAmt], [AttachedPayment(pmtAssetId, pmtAssetAmt)]) | |
445 | 445 | if ((burnLPAssetOnFactory == burnLPAssetOnFactory)) | |
446 | 446 | then actions | |
447 | 447 | else throw("Strict value is not equal to itself.") | |
448 | 448 | } | |
449 | 449 | ||
450 | 450 | ||
451 | 451 | ||
452 | 452 | @Callable(i) | |
453 | 453 | func getNoLess (noLessThenAmtAsset,noLessThenPriceAsset) = { | |
454 | 454 | let res = commonGet(i) | |
455 | 455 | let outAmtAssetAmt = res._1 | |
456 | 456 | let outPriceAssetAmt = res._2 | |
457 | 457 | let pmtAssetAmt = res._3 | |
458 | 458 | let pmtAssetId = res._4 | |
459 | 459 | let actions = res._5 | |
460 | 460 | if ((noLessThenAmtAsset > outAmtAssetAmt)) | |
461 | 461 | then throw(((("noLessThenAmtAsset failed: " + toString(outAmtAssetAmt)) + " < ") + toString(noLessThenAmtAsset))) | |
462 | 462 | else if ((noLessThenPriceAsset > outPriceAssetAmt)) | |
463 | 463 | then throw(((("noLessThenPriceAsset failed: " + toString(outPriceAssetAmt)) + " < ") + toString(noLessThenPriceAsset))) | |
464 | 464 | else { | |
465 | 465 | let burnLPAssetOnFactory = invoke(factoryContract, "burn", [pmtAssetAmt], [AttachedPayment(pmtAssetId, pmtAssetAmt)]) | |
466 | 466 | if ((burnLPAssetOnFactory == burnLPAssetOnFactory)) | |
467 | 467 | then actions | |
468 | 468 | else throw("Strict value is not equal to itself.") | |
469 | 469 | } | |
470 | 470 | } | |
471 | 471 | ||
472 | 472 | ||
473 | 473 | ||
474 | 474 | @Callable(i) | |
475 | 475 | func activate (amtAssetStr,priceAssetStr) = if ((toString(i.caller) != toString(factoryContract))) | |
476 | 476 | then throw("permissions denied") | |
477 | 477 | else $Tuple2([StringEntry(keyAmtAsset(), amtAssetStr), StringEntry(keyPriceAsset(), priceAssetStr)], "success") | |
478 | 478 | ||
479 | 479 | ||
480 | 480 | ||
481 | 481 | @Callable(i) | |
482 | 482 | func statsREADONLY () = { | |
483 | 483 | let cfg = getPoolConfig() | |
484 | 484 | let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId]) | |
485 | 485 | let amtAssetId = cfg[idxAmtAssetId] | |
486 | 486 | let priceAssetId = cfg[idxPriceAssetId] | |
487 | 487 | let iAmtAssetId = cfg[idxIAmtAssetId] | |
488 | 488 | let iPriceAssetId = cfg[idxIPriceAssetId] | |
489 | 489 | let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm]) | |
490 | 490 | let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm]) | |
491 | 491 | let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity | |
492 | 492 | let accAmtAssetBalance = getAccBalance(amtAssetId) | |
493 | 493 | let accPriceAssetBalance = getAccBalance(priceAssetId) | |
494 | 494 | let pricesList = calcPrices(accAmtAssetBalance, accPriceAssetBalance, poolLPBalance) | |
495 | 495 | let curPrice = pricesList[0] | |
496 | 496 | let lpAmtAssetShare = pricesList[1] | |
497 | 497 | let lpPriceAssetShare = pricesList[2] | |
498 | 498 | let poolWeight = value(getInteger(factoryContract, keyPoolWeight(toString(this)))) | |
499 | 499 | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(accAmtAssetBalance), toString(accPriceAssetBalance), toString(poolLPBalance), toString(curPrice), toString(lpAmtAssetShare), toString(lpPriceAssetShare), toString(poolWeight)], SEP)) | |
500 | 500 | } | |
501 | 501 | ||
502 | 502 | ||
503 | 503 | ||
504 | 504 | @Callable(i) | |
505 | 505 | func evaluatePutByAmtAssetREADONLY (slippageTolerance,inAmtAssetAmt,userAddress) = { | |
506 | 506 | let cfg = getPoolConfig() | |
507 | 507 | let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId]) | |
508 | 508 | let amtAssetId = cfg[idxAmtAssetId] | |
509 | 509 | let priceAssetId = cfg[idxPriceAssetId] | |
510 | 510 | let iAmtAssetId = cfg[idxIAmtAssetId] | |
511 | 511 | let iPriceAssetId = cfg[idxIPriceAssetId] | |
512 | 512 | let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm]) | |
513 | 513 | let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm]) | |
514 | 514 | let poolStatus = cfg[idxPoolStatus] | |
515 | 515 | let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity | |
516 | 516 | let accAmtAssetBalance = getAccBalance(amtAssetId) | |
517 | 517 | let accPriceAssetBalance = getAccBalance(priceAssetId) | |
518 | 518 | let amtAssetAmtX18 = toX18(accAmtAssetBalance, amtAssetDcm) | |
519 | 519 | let priceAssetAmtX18 = toX18(accPriceAssetBalance, priceAssetDcm) | |
520 | 520 | let curPriceX18 = if ((poolLPBalance == 0)) | |
521 | 521 | then toBigInt(0) | |
522 | 522 | else calcPriceBigInt(priceAssetAmtX18, amtAssetAmtX18, scale18) | |
523 | 523 | let inAmtAssetAmtX18 = toX18(inAmtAssetAmt, amtAssetDcm) | |
524 | 524 | let inPriceAssetAmtX18 = fraction(inAmtAssetAmtX18, curPriceX18, scale18) | |
525 | 525 | let inPriceAssetAmt = fromX18(inPriceAssetAmtX18, priceAssetDcm) | |
526 | 526 | let estimatedPutResults = estimatePutOperation(slippageTolerance, inAmtAssetAmt, amtAssetId, inPriceAssetAmt, priceAssetId, userAddress, true) | |
527 | 527 | let outLpAmtCalc = estimatedPutResults._1 | |
528 | 528 | let curPriceCalc = estimatedPutResults._2 | |
529 | 529 | let poolAmtAssetBalanceCalc = estimatedPutResults._3 | |
530 | 530 | let poolPriceAssetBalanceCAlc = estimatedPutResults._4 | |
531 | 531 | let poolLPBalanceCalc = estimatedPutResults._5 | |
532 | 532 | let poolStatusCalc = parseIntValue(estimatedPutResults._10) | |
533 | 533 | $Tuple2(nil, makeString(["%d%d%d%d%d%d", toString(outLpAmtCalc), toString(fromX18(curPriceX18, scale8)), toString(poolAmtAssetBalanceCalc), toString(poolPriceAssetBalanceCAlc), toString(poolLPBalanceCalc), toString(poolStatusCalc)], SEP)) | |
534 | 534 | } | |
535 | 535 | ||
536 | 536 | ||
537 | 537 | ||
538 | 538 | @Callable(i) | |
539 | 539 | func evaluatePutByPriceAssetREADONLY (slippageTolerance,inPriceAssetAmt,userAddress) = { | |
540 | 540 | let cfg = getPoolConfig() | |
541 | 541 | let lpAssetId = fromBase58String(cfg[idxPoolLPAssetId]) | |
542 | 542 | let amtAssetId = cfg[idxAmtAssetId] | |
543 | 543 | let priceAssetId = cfg[idxPriceAssetId] | |
544 | 544 | let iAmtAssetId = cfg[idxIAmtAssetId] | |
545 | 545 | let iPriceAssetId = cfg[idxIPriceAssetId] | |
546 | 546 | let amtAssetDcm = parseIntValue(cfg[idxAmtAssetDcm]) | |
547 | 547 | let priceAssetDcm = parseIntValue(cfg[idxPriceAssetDcm]) | |
548 | 548 | let poolStatus = cfg[idxPoolStatus] | |
549 | 549 | let poolLPBalance = valueOrErrorMessage(assetInfo(lpAssetId), (("Asset " + toBase58String(lpAssetId)) + " doesn't exist")).quantity | |
550 | 550 | let accAmtAssetBalance = getAccBalance(amtAssetId) | |
551 | 551 | let accPriceAssetBalance = getAccBalance(priceAssetId) | |
552 | 552 | let amtAssetAmtX18 = toX18(accAmtAssetBalance, amtAssetDcm) | |
553 | 553 | let priceAssetAmtX18 = toX18(accPriceAssetBalance, priceAssetDcm) | |
554 | 554 | let curPriceX18 = if ((poolLPBalance == 0)) | |
555 | 555 | then toBigInt(0) | |
556 | 556 | else calcPriceBigInt(priceAssetAmtX18, amtAssetAmtX18, scale18) | |
557 | 557 | let inPriceAssetAmtX18 = toX18(inPriceAssetAmt, priceAssetDcm) | |
558 | 558 | let inAmtAssetAmtX18 = fraction(inPriceAssetAmtX18, scale18, curPriceX18) | |
559 | 559 | let inAmtAssetAmt = fromX18(inAmtAssetAmtX18, amtAssetDcm) | |
560 | 560 | let estimatedPutResults = estimatePutOperation(slippageTolerance, inAmtAssetAmt, amtAssetId, inPriceAssetAmt, priceAssetId, userAddress, true) | |
561 | 561 | let outLpAmtCalc = estimatedPutResults._1 | |
562 | 562 | let curPriceCalc = estimatedPutResults._2 | |
563 | 563 | let poolAmtAssetBalanceCalc = estimatedPutResults._3 | |
564 | 564 | let poolPriceAssetBalanceCAlc = estimatedPutResults._4 | |
565 | 565 | let poolLPBalanceCalc = estimatedPutResults._5 | |
566 | 566 | let poolStatusCalc = parseIntValue(estimatedPutResults._10) | |
567 | 567 | $Tuple2(nil, makeString(["%d%d%d%d%d%d", toString(outLpAmtCalc), toString(fromX18(curPriceX18, scale8)), toString(poolAmtAssetBalanceCalc), toString(poolPriceAssetBalanceCAlc), toString(poolLPBalanceCalc), toString(poolStatusCalc)], SEP)) | |
568 | 568 | } | |
569 | 569 | ||
570 | 570 | ||
571 | 571 | ||
572 | 572 | @Callable(i) | |
573 | 573 | func evaluateGetREADONLY (paymentLpAssetId,paymentLpAmt,userAddress) = { | |
574 | 574 | let res = estimateGetOperation(paymentLpAssetId, paymentLpAmt, userAddress) | |
575 | 575 | let outAmtAssetAmt = res._1 | |
576 | 576 | let outPriceAssetAmt = res._2 | |
577 | 577 | let poolAmtAssetBalance = res._7 | |
578 | 578 | let poolPriceAssetBalance = res._8 | |
579 | 579 | let poolLPBalance = res._9 | |
580 | 580 | let curPrice = res._10 | |
581 | 581 | let poolStatus = parseIntValue(res._11) | |
582 | 582 | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(outAmtAssetAmt), toString(outPriceAssetAmt), toString(poolAmtAssetBalance), toString(poolPriceAssetBalance), toString(poolLPBalance), toString(curPrice), toString(poolStatus)], SEP)) | |
583 | 583 | } | |
584 | 584 | ||
585 | 585 | ||
586 | 586 | @Verifier(tx) | |
587 | 587 | func verify () = match tx { | |
588 | 588 | case order: Order => | |
589 | 589 | if (validateMatcherOrderAllowed(order)) | |
590 | 590 | then sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
591 | 591 | else false | |
592 | 592 | case _ => | |
593 | 593 | let managerPublic = valueOrElse(getString(this, keyManagerPublicKey()), EMPTY) | |
594 | 594 | if ((managerPublic == EMPTY)) | |
595 | 595 | then sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
596 | 596 | else sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(managerPublic)) | |
597 | 597 | } | |
598 | 598 |
github/deemru/w8io/169f3d6 67.43 ms ◑