tx · DoeuqXRFJRchjnDA2Mp2PhvQv5DQtWBWZtacmhmDeJ8S 3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT: -0.03200000 Waves 2023.01.18 15:46 [2410386] smart account 3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT > SELF 0.00000000 Waves
{ "type": 13, "id": "DoeuqXRFJRchjnDA2Mp2PhvQv5DQtWBWZtacmhmDeJ8S", "fee": 3200000, "feeAssetId": null, "timestamp": 1674046014471, "version": 1, "sender": "3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT", "senderPublicKey": "D1BL65meykxFZTCuq7jq9HSGLLnWvQamQPUNrguW5w39", "proofs": [ "3tCutfKRDMs3dvbmChJtAdoLVw7edPqUWvHo2hRFL5WQLr6rhofVR2kiCWBCa1GJ9RexC4wXkFkcWDQJJSLpR3Zk" ], "script": "base64:BgKmIggCEgMKAQgSAwoBCBIAEgQKAgEEEgQKAgEEEgMKAQESABIECgIIARIECgIIARIECgIIARIECgIBARIDCgEBEgUKAwEBARIFCgMBCAESBAoCAQgSBAoCAQgSBAoCCAgSBAoCCAgSBAoCCAESABIDCgEIEgUKAwEBARIECgIIARIECgIBARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCCIGc2NhbGU4IgxzY2FsZThCaWdJbnQiB3NjYWxlMTgiCnplcm9CaWdJbnQiBGJpZzAiBGJpZzEiBGJpZzIiCnNsaXBwYWdlNEQiC3dhdmVzU3RyaW5nIgVBbXVsdCIFRGNvbnYiA1NFUCIFRU1QVFkiClBvb2xBY3RpdmUiClBvb2xQdXREaXMiDlBvb2xNYXRjaGVyRGlzIgxQb29sU2h1dGRvd24iDmlkeFBvb2xBZGRyZXNzIglpZHhQb29sU3QiCWlkeExQQXNJZCIJaWR4QW1Bc0lkIglpZHhQckFzSWQiC2lkeEFtdEFzRGNtIg1pZHhQcmljZUFzRGNtIgtpZHhJQW10QXNJZCINaWR4SVByaWNlQXNJZCIPaWR4RmFjdFN0YWtDbnRyIhJp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MJAAECBQJhdgIFT3JkZXIEAmR6BQJhdgQCZ1EJAQJhSgAEAmdSCQECZHkBBQJkegQCZ1MJAPQDAwgFAmR6CWJvZHlCeXRlcwkAkQMCCAUCZHoGcHJvb2ZzAAAIBQJkeg9zZW5kZXJQdWJsaWNLZXkEAmdUCQD0AwMIBQJkeglib2R5Qnl0ZXMJAJEDAggFAmR6BnByb29mcwABBQJnUQMDAwUCZ1IFAmdTBwUCZ1QHBgkBAmFxAwUCZ1IFAmdTBQJnVAMJAAECBQJhdgIUU2V0U2NyaXB0VHJhbnNhY3Rpb24EAmRaBQJhdgQCZ1UJAPYDAQkBBXZhbHVlAQgFAmRaBnNjcmlwdAQCZ1YJANsEAQkBBXZhbHVlAQkAnQgCBQJhRAkBAmFvAAQCZ1cJAPEHAQUEdGhpcwMDCQAAAgUCZ1YFAmdVCQECIT0CBQJnVwUCZ1UHBgkA9AMDCAUCZ04JYm9keUJ5dGVzCQCRAwIIBQJnTgZwcm9vZnMAAAUCZ1AJAPQDAwgFAmdOCWJvZHlCeXRlcwkAkQMCCAUCZ04GcHJvb2ZzAAAFAmdQf6Cfrw==", "chainId": 84, "height": 2410386, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 47vPwJCwH3qTQLhqYWyy7LPs5eckf7uVeuQa1rgR7huL Next: 3PyLQL7i7e5UKzSgSrLmYm1ry5D1R97vS9Mr5YXpEvgL Diff:
Old | New | Differences | |
---|---|---|---|
115 | 115 | func af () = "%s__addonAddr" | |
116 | 116 | ||
117 | 117 | ||
118 | - | func ag () = "%s__ | |
118 | + | func ag () = "%s__factoryConfig" | |
119 | 119 | ||
120 | 120 | ||
121 | - | func ah () = "%s__ | |
121 | + | func ah () = "%s%s__matcher__publicKey" | |
122 | 122 | ||
123 | 123 | ||
124 | - | func ai () = "% | |
124 | + | func ai (aj,ak) = (((("%d%d%s__" + aj) + "__") + ak) + "__config") | |
125 | 125 | ||
126 | 126 | ||
127 | - | func | |
127 | + | func al (am) = ("%s%s%s__mappings__baseAsset2internalId__" + am) | |
128 | 128 | ||
129 | 129 | ||
130 | - | func | |
130 | + | func an () = "%s__shutdown" | |
131 | 131 | ||
132 | 132 | ||
133 | - | func ao () = "%s__ | |
133 | + | func ao () = "%s__allowedLpStableScriptHash" | |
134 | 134 | ||
135 | 135 | ||
136 | - | func ap () = "%s__ | |
136 | + | func ap () = "%s__feeCollectorAddress" | |
137 | 137 | ||
138 | 138 | ||
139 | - | func aq () = " | |
139 | + | func aq (ar,as,at) = throw(((((("Failed: ordValid=" + toString(ar)) + " sndrValid=") + toString(as)) + " mtchrValid=") + toString(at))) | |
140 | 140 | ||
141 | 141 | ||
142 | - | func ar (as,at,au) = throw(((((("Failed: ordValid=" + toString(as)) + " sndrValid=") + toString(at)) + " mtchrValid=") + toString(au))) | |
143 | - | ||
144 | - | ||
145 | - | func av (J) = { | |
146 | - | let aw = J | |
147 | - | if ($isInstanceOf(aw, "String")) | |
142 | + | func au (J) = { | |
143 | + | let av = J | |
144 | + | if ($isInstanceOf(av, "String")) | |
148 | 145 | then { | |
149 | - | let | |
150 | - | | |
146 | + | let aw = av | |
147 | + | aw | |
151 | 148 | } | |
152 | 149 | else throw("fail cast to String") | |
153 | 150 | } | |
154 | 151 | ||
155 | 152 | ||
156 | - | func | |
153 | + | func ax (ay,az) = valueOrErrorMessage(getString(ay, az), makeString(["mandatory ", toString(ay), ".", az, " not defined"], "")) | |
157 | 154 | ||
158 | 155 | ||
159 | - | func aA ( | |
156 | + | func aA (ay,az) = valueOrErrorMessage(getInteger(ay, az), makeString(["mandatory ", toString(ay), ".", az, " not defined"], "")) | |
160 | 157 | ||
161 | 158 | ||
162 | - | func | |
159 | + | func aB (aC) = throw(makeString(["lp_stable.ride:", aC], " ")) | |
163 | 160 | ||
164 | 161 | ||
165 | - | func aD (aE) = throw(makeString(["lp_stable.ride:", aE], " ")) | |
162 | + | let aD = addressFromStringValue(ax(this, R())) | |
163 | + | ||
164 | + | let aE = { | |
165 | + | let aF = invoke(aD, "getInFeeREADONLY", [toString(this)], nil) | |
166 | + | if ($isInstanceOf(aF, "Int")) | |
167 | + | then aF | |
168 | + | else throw(($getType(aF) + " couldn't be cast to Int")) | |
169 | + | } | |
170 | + | ||
171 | + | let aG = { | |
172 | + | let aF = invoke(aD, "getOutFeeREADONLY", [toString(this)], nil) | |
173 | + | if ($isInstanceOf(aF, "Int")) | |
174 | + | then aF | |
175 | + | else throw(($getType(aF) + " couldn't be cast to Int")) | |
176 | + | } | |
177 | + | ||
178 | + | let aH = ax(this, ae()) | |
179 | + | ||
180 | + | func aI () = valueOrElse(getBoolean(aD, an()), false) | |
166 | 181 | ||
167 | 182 | ||
168 | - | let aF = addressFromStringValue(aA(this, R())) | |
169 | - | ||
170 | - | let aG = { | |
171 | - | let aH = invoke(aF, "getInFeeREADONLY", [toString(this)], nil) | |
172 | - | if ($isInstanceOf(aH, "Int")) | |
173 | - | then aH | |
174 | - | else throw(($getType(aH) + " couldn't be cast to Int")) | |
175 | - | } | |
176 | - | ||
177 | - | let aI = { | |
178 | - | let aH = invoke(aF, "getOutFeeREADONLY", [toString(this)], nil) | |
179 | - | if ($isInstanceOf(aH, "Int")) | |
180 | - | then aH | |
181 | - | else throw(($getType(aH) + " couldn't be cast to Int")) | |
182 | - | } | |
183 | - | ||
184 | - | let aJ = aA(this, ae()) | |
185 | - | ||
186 | - | func aK () = valueOrElse(getBoolean(aF, ao()), false) | |
183 | + | func aJ () = fromBase58String(ax(aD, ah())) | |
187 | 184 | ||
188 | 185 | ||
189 | - | ||
186 | + | let aK = addressFromStringValue(ax(aD, ap())) | |
190 | 187 | ||
191 | - | ||
192 | - | let aM = addressFromStringValue(aA(aF, aq())) | |
193 | - | ||
194 | - | func aN () = { | |
195 | - | let aO = aA(this, ac()) | |
196 | - | let aP = aA(this, ad()) | |
197 | - | let aQ = aC(aF, am(aP)) | |
198 | - | let ak = aC(aF, am(aO)) | |
199 | - | split(aA(aF, aj(toString(ak), toString(aQ))), l) | |
188 | + | func aL () = { | |
189 | + | let aM = ax(this, ac()) | |
190 | + | let aN = ax(this, ad()) | |
191 | + | let aO = aA(aD, al(aN)) | |
192 | + | let aj = aA(aD, al(aM)) | |
193 | + | split(ax(aD, ai(toString(aj), toString(aO))), l) | |
200 | 194 | } | |
201 | 195 | ||
202 | 196 | ||
203 | - | func | |
197 | + | func aP (aQ) = if ((aQ == i)) | |
204 | 198 | then unit | |
205 | - | else fromBase58String( | |
199 | + | else fromBase58String(aQ) | |
206 | 200 | ||
207 | 201 | ||
208 | - | func | |
202 | + | func aR (aQ) = if ((aQ == unit)) | |
209 | 203 | then i | |
210 | - | else toBase58String(value( | |
204 | + | else toBase58String(value(aQ)) | |
211 | 205 | ||
212 | 206 | ||
213 | - | func | |
207 | + | func aS (aT) = $Tuple7(addressFromStringValue(aT[r]), parseIntValue(aT[s]), fromBase58String(aT[t]), aP(aT[u]), aP(aT[v]), parseIntValue(aT[w]), parseIntValue(aT[x])) | |
214 | 208 | ||
215 | 209 | ||
216 | - | let | |
210 | + | let aU = aS(aL()) | |
217 | 211 | ||
218 | - | let | |
212 | + | let aV = aU | |
219 | 213 | ||
220 | - | let | |
214 | + | let aW = aV._1 | |
221 | 215 | ||
222 | - | let | |
216 | + | let aX = aV._2 | |
223 | 217 | ||
224 | - | let | |
218 | + | let aY = aV._3 | |
225 | 219 | ||
226 | - | let | |
220 | + | let aZ = aV._4 | |
227 | 221 | ||
228 | - | let | |
222 | + | let ba = aV._5 | |
229 | 223 | ||
230 | - | let | |
224 | + | let bb = aV._6 | |
231 | 225 | ||
232 | - | let | |
226 | + | let bc = aV._7 | |
233 | 227 | ||
234 | - | func | |
228 | + | func bd () = split(ax(aD, ag()), l) | |
235 | 229 | ||
236 | 230 | ||
237 | - | let | |
231 | + | let be = bd() | |
238 | 232 | ||
239 | - | let | |
233 | + | let bf = valueOrErrorMessage(addressFromString(be[A]), "Invalid staking contract address") | |
240 | 234 | ||
241 | - | let | |
235 | + | let bg = valueOrErrorMessage(addressFromString(be[C]), "Invalid slipage contract address") | |
242 | 236 | ||
243 | - | let | |
237 | + | let bh = valueOrErrorMessage(addressFromString(be[D]), "Invalid gwx contract address") | |
244 | 238 | ||
245 | - | let | |
239 | + | let bi = valueOrErrorMessage(addressFromString(be[B]), "Invalid gwx contract address") | |
246 | 240 | ||
247 | - | func | |
241 | + | func bj (bk,bl,bm,bn,bo,bp,bq,br,bs,bt) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bk), toString(bl), toString(bm), toString(bn), toString(bo), toString(bp), toString(bq), toString(br), toString(bs), toString(bt)], l) | |
248 | 242 | ||
249 | 243 | ||
250 | - | func | |
244 | + | func bu (bv,bw,bx,bn,bq,br) = makeString(["%d%d%d%d%d%d", toString(bv), toString(bw), toString(bx), toString(bn), toString(bq), toString(br)], l) | |
251 | 245 | ||
252 | 246 | ||
253 | - | func | |
247 | + | func by (bz) = if ((bz == "WAVES")) | |
254 | 248 | then wavesBalance(this).available | |
255 | - | else assetBalance(this, fromBase58String( | |
249 | + | else assetBalance(this, fromBase58String(bz)) | |
256 | 250 | ||
257 | 251 | ||
258 | - | func | |
252 | + | func bA (bB,bC) = fraction(bB, c, bC) | |
259 | 253 | ||
260 | 254 | ||
261 | - | func | |
262 | - | let | |
263 | - | let | |
264 | - | if (!( | |
265 | - | then throw(("Big slpg: " + toString( | |
266 | - | else $Tuple2( | |
255 | + | func bD (bE,bF,bG) = { | |
256 | + | let bH = fraction((bE - bF), b, bF) | |
257 | + | let bI = ((bG - P(bH)) > d) | |
258 | + | if (!(bI)) | |
259 | + | then throw(("Big slpg: " + toString(bH))) | |
260 | + | else $Tuple2(bI, min([bE, bF])) | |
267 | 261 | } | |
268 | 262 | ||
269 | 263 | ||
270 | - | func | |
271 | - | let | |
272 | - | let | |
273 | - | if (if ( | |
264 | + | func bJ (bK,bL,bM) = { | |
265 | + | let bH = fraction(bL, b, bK) | |
266 | + | let bN = (bM > bH) | |
267 | + | if (if (bN) | |
274 | 268 | then true | |
275 | - | else ( | |
276 | - | then throw(((((((toString( | |
277 | - | else | |
269 | + | else (bL > bK)) | |
270 | + | then throw(((((((toString(bL) + " ") + toString(bK)) + " ") + toString(bH)) + " ") + toString(bM))) | |
271 | + | else bN | |
278 | 272 | } | |
279 | 273 | ||
280 | 274 | ||
281 | - | func | |
282 | - | let | |
283 | - | let | |
284 | - | | |
275 | + | func bO (bP,bQ,bR,bS) = { | |
276 | + | let bT = F(bR, bP) | |
277 | + | let bU = F(bS, bQ) | |
278 | + | bA(bU, bT) | |
285 | 279 | } | |
286 | 280 | ||
287 | 281 | ||
288 | - | func | |
289 | - | let | |
290 | - | let | |
291 | - | let | |
292 | - | let | |
293 | - | let | |
294 | - | let | |
295 | - | let | |
296 | - | let | |
297 | - | let | |
298 | - | [cc, | |
282 | + | func bV (bR,bS,bW) = { | |
283 | + | let bX = aL() | |
284 | + | let bY = parseIntValue(bX[w]) | |
285 | + | let bZ = parseIntValue(bX[x]) | |
286 | + | let ca = bO(bY, bZ, bR, bS) | |
287 | + | let bC = F(bR, bY) | |
288 | + | let bB = F(bS, bZ) | |
289 | + | let cb = F(bW, a) | |
290 | + | let cc = bA(bC, cb) | |
291 | + | let cd = bA(bB, cb) | |
292 | + | [ca, cc, cd] | |
299 | 293 | } | |
300 | 294 | ||
301 | 295 | ||
302 | - | func | |
303 | - | let | |
304 | - | [I( | |
296 | + | func ce (bR,bS,bW) = { | |
297 | + | let cf = bV(bR, bS, bW) | |
298 | + | [I(cf[0], a), I(cf[1], a), I(cf[2], a)] | |
305 | 299 | } | |
306 | 300 | ||
307 | 301 | ||
308 | - | func | |
309 | - | let | |
302 | + | func cg (ch,ci) = { | |
303 | + | let cj = if ((ci == 0)) | |
310 | 304 | then 0 | |
311 | - | else fraction( | |
312 | - | $Tuple2(( | |
305 | + | else fraction(ch, ci, a) | |
306 | + | $Tuple2((ch - cj), cj) | |
313 | 307 | } | |
314 | 308 | ||
315 | 309 | ||
316 | - | func | |
317 | - | let | |
318 | - | let | |
319 | - | let | |
320 | - | let | |
321 | - | let | |
322 | - | let | |
323 | - | let | |
324 | - | let | |
325 | - | if (( | |
310 | + | func ck (cl,cm,cn,co) = { | |
311 | + | let bX = aL() | |
312 | + | let cp = bX[t] | |
313 | + | let cq = bX[u] | |
314 | + | let cr = bX[v] | |
315 | + | let cs = parseIntValue(bX[w]) | |
316 | + | let ct = parseIntValue(bX[x]) | |
317 | + | let cu = bX[s] | |
318 | + | let cv = valueOrErrorMessage(assetInfo(fromBase58String(cp)), "Wrong LP id").quantity | |
319 | + | if ((cp != cm)) | |
326 | 320 | then throw("Wrong pmt asset") | |
327 | 321 | else { | |
328 | - | let | |
329 | - | let | |
330 | - | let | |
331 | - | let | |
332 | - | let | |
333 | - | let | |
334 | - | let | |
335 | - | let | |
336 | - | let | |
337 | - | let | |
338 | - | let | |
339 | - | let | |
340 | - | let | |
322 | + | let cw = by(cq) | |
323 | + | let cx = F(cw, cs) | |
324 | + | let cy = by(cr) | |
325 | + | let cz = F(cy, ct) | |
326 | + | let cA = bA(cz, cx) | |
327 | + | let cB = I(cA, a) | |
328 | + | let cC = F(cn, a) | |
329 | + | let cD = F(cv, a) | |
330 | + | let cE = fraction(cx, cC, cD) | |
331 | + | let cF = fraction(cz, cC, cD) | |
332 | + | let cG = I(cE, cs) | |
333 | + | let cH = I(cF, ct) | |
334 | + | let cI = if ((cl == "")) | |
341 | 335 | then nil | |
342 | - | else [ScriptTransfer( | |
336 | + | else [ScriptTransfer(co, cG, if ((cq == "WAVES")) | |
343 | 337 | then unit | |
344 | - | else fromBase58String( | |
338 | + | else fromBase58String(cq)), ScriptTransfer(co, cH, if ((cr == "WAVES")) | |
345 | 339 | then unit | |
346 | - | else fromBase58String( | |
347 | - | $Tuple10( | |
340 | + | else fromBase58String(cr)), StringEntry(ab(toString(co), cl), bu(cG, cH, cn, cB, height, lastBlock.timestamp)), IntegerEntry(U(), cB), IntegerEntry(V(height, lastBlock.timestamp), cB)] | |
341 | + | $Tuple10(cG, cH, cq, cr, cw, cy, cv, cA, cu, cI) | |
348 | 342 | } | |
349 | 343 | } | |
350 | 344 | ||
351 | 345 | ||
352 | - | func | |
353 | - | let | |
354 | - | let | |
355 | - | let | |
356 | - | let | |
357 | - | let | |
358 | - | let | |
359 | - | let | |
360 | - | let | |
361 | - | let | |
362 | - | let | |
363 | - | let | |
364 | - | then | |
365 | - | else if (if ( | |
366 | - | then ( | |
346 | + | func cJ (cl,bG,cK,cL,cM,cN,co,cO,cP,cQ,cR,cS,cT) = { | |
347 | + | let bX = aL() | |
348 | + | let cp = fromBase58String(bX[t]) | |
349 | + | let cU = bX[u] | |
350 | + | let cV = bX[v] | |
351 | + | let cW = bX[y] | |
352 | + | let cX = bX[z] | |
353 | + | let cY = parseIntValue(bX[w]) | |
354 | + | let cZ = parseIntValue(bX[x]) | |
355 | + | let cu = bX[s] | |
356 | + | let da = valueOrErrorMessage(assetInfo(cp), "Wr lp as").quantity | |
357 | + | let cw = if (cO) | |
358 | + | then by(cU) | |
359 | + | else if (if (cQ) | |
360 | + | then (cT == cU) | |
367 | 361 | else false) | |
368 | - | then ( | |
369 | - | else if ( | |
370 | - | then | |
371 | - | else ( | |
372 | - | let | |
373 | - | then | |
374 | - | else if (if ( | |
375 | - | then ( | |
362 | + | then (by(cU) - cS) | |
363 | + | else if (cQ) | |
364 | + | then by(cU) | |
365 | + | else (by(cU) - cK) | |
366 | + | let cy = if (cO) | |
367 | + | then by(cV) | |
368 | + | else if (if (cQ) | |
369 | + | then (cT == cV) | |
376 | 370 | else false) | |
377 | - | then ( | |
378 | - | else if ( | |
379 | - | then | |
380 | - | else ( | |
381 | - | let | |
382 | - | let | |
383 | - | let | |
384 | - | let | |
385 | - | let | |
386 | - | let | |
371 | + | then (by(cV) - cS) | |
372 | + | else if (cQ) | |
373 | + | then by(cV) | |
374 | + | else (by(cV) - cM) | |
375 | + | let db = F(cK, cY) | |
376 | + | let dc = F(cM, cZ) | |
377 | + | let dd = bA(dc, db) | |
378 | + | let cx = F(cw, cY) | |
379 | + | let cz = F(cy, cZ) | |
380 | + | let de = if ((da == 0)) | |
387 | 381 | then { | |
388 | - | let | |
389 | - | let | |
390 | - | let | |
391 | - | $Tuple5(I( | |
382 | + | let cA = d | |
383 | + | let df = d | |
384 | + | let cb = pow((db * dc), 0, toBigInt(5), 1, 0, DOWN) | |
385 | + | $Tuple5(I(cb, a), I(db, cY), I(dc, cZ), bA((cz + dc), (cx + db)), df) | |
392 | 386 | } | |
393 | 387 | else { | |
394 | - | let | |
395 | - | let | |
396 | - | let | |
397 | - | if (if (if ( | |
398 | - | then ( | |
388 | + | let cA = bA(cz, cx) | |
389 | + | let dg = fraction(P((cA - dd)), c, cA) | |
390 | + | let df = F(bG, a) | |
391 | + | if (if (if (cR) | |
392 | + | then (cA != d) | |
399 | 393 | else false) | |
400 | - | then ( | |
394 | + | then (dg > df) | |
401 | 395 | else false) | |
402 | - | then throw(((("Price slippage " + toString( | |
396 | + | then throw(((("Price slippage " + toString(dg)) + " > ") + toString(df))) | |
403 | 397 | else { | |
404 | - | let | |
405 | - | let | |
406 | - | let | |
407 | - | let | |
408 | - | then $Tuple2( | |
409 | - | else $Tuple2( | |
410 | - | let | |
411 | - | let | |
412 | - | let | |
413 | - | $Tuple5(I( | |
398 | + | let dh = F(da, a) | |
399 | + | let di = fraction(db, cA, c) | |
400 | + | let dj = fraction(dc, c, cA) | |
401 | + | let dk = if ((di > dc)) | |
402 | + | then $Tuple2(dj, dc) | |
403 | + | else $Tuple2(db, di) | |
404 | + | let dl = dk._1 | |
405 | + | let dm = dk._2 | |
406 | + | let cb = fraction(dh, dm, cz) | |
407 | + | $Tuple5(I(cb, a), I(dl, cY), I(dm, cZ), cA, df) | |
414 | 408 | } | |
415 | 409 | } | |
416 | - | let | |
417 | - | let | |
418 | - | let | |
419 | - | let | |
420 | - | let | |
421 | - | if ((0 >= | |
410 | + | let dn = de._1 | |
411 | + | let do = de._2 | |
412 | + | let dp = de._3 | |
413 | + | let cB = I(de._4, a) | |
414 | + | let dq = I(de._5, a) | |
415 | + | if ((0 >= dn)) | |
422 | 416 | then throw("LP <= 0") | |
423 | 417 | else { | |
424 | - | let | |
418 | + | let dr = if (!(cP)) | |
425 | 419 | then 0 | |
426 | - | else | |
427 | - | let | |
428 | - | let | |
429 | - | let | |
430 | - | then ( | |
420 | + | else dn | |
421 | + | let ds = (cK - do) | |
422 | + | let dt = (cM - dp) | |
423 | + | let du = if (if (cQ) | |
424 | + | then (cT == cU) | |
431 | 425 | else false) | |
432 | - | then $Tuple2( | |
433 | - | else if (if ( | |
434 | - | then ( | |
426 | + | then $Tuple2(cS, 0) | |
427 | + | else if (if (cQ) | |
428 | + | then (cT == cV) | |
435 | 429 | else false) | |
436 | - | then $Tuple2(0, | |
437 | - | else $Tuple2( | |
438 | - | let | |
439 | - | let | |
440 | - | let | |
441 | - | $Tuple13( | |
430 | + | then $Tuple2(0, cS) | |
431 | + | else $Tuple2(do, dp) | |
432 | + | let dv = du._1 | |
433 | + | let dw = du._2 | |
434 | + | let dx = [IntegerEntry(U(), cB), IntegerEntry(V(height, lastBlock.timestamp), cB), StringEntry(Y(co, cl), bj(dv, dw, dr, cB, bG, dq, height, lastBlock.timestamp, ds, dt))] | |
435 | + | $Tuple13(dn, dr, cB, cw, cy, da, cp, cu, dx, ds, dt, cL, cN) | |
442 | 436 | } | |
443 | 437 | } | |
444 | 438 | ||
445 | 439 | ||
446 | - | func | |
447 | - | let | |
448 | - | let | |
449 | - | let | |
450 | - | let | |
451 | - | let | |
452 | - | let | |
453 | - | let | |
454 | - | let | |
455 | - | let | |
456 | - | then | |
457 | - | else | |
458 | - | let | |
459 | - | if (if (if ( | |
440 | + | func dy (dz) = { | |
441 | + | let bX = aL() | |
442 | + | let dA = bX[u] | |
443 | + | let dB = bX[v] | |
444 | + | let cu = parseIntValue(bX[s]) | |
445 | + | let bY = parseIntValue(bX[w]) | |
446 | + | let bZ = parseIntValue(bX[x]) | |
447 | + | let dC = by(dA) | |
448 | + | let dD = by(dB) | |
449 | + | let cA = if ((dz.orderType == Buy)) | |
450 | + | then bO(bY, bZ, (dC + dz.amount), dD) | |
451 | + | else bO(bY, bZ, (dC - dz.amount), dD) | |
452 | + | let cB = I(cA, a) | |
453 | + | if (if (if (aI()) | |
460 | 454 | then true | |
461 | - | else ( | |
455 | + | else (cu == p)) | |
462 | 456 | then true | |
463 | - | else ( | |
457 | + | else (cu == q)) | |
464 | 458 | then throw("Admin blocked") | |
465 | 459 | else { | |
466 | - | let dG = dB.assetPair.amountAsset | |
460 | + | let dE = dz.assetPair.amountAsset | |
461 | + | let dF = if ((dE == unit)) | |
462 | + | then "WAVES" | |
463 | + | else toBase58String(value(dE)) | |
464 | + | let dG = dz.assetPair.priceAsset | |
467 | 465 | let dH = if ((dG == unit)) | |
468 | 466 | then "WAVES" | |
469 | 467 | else toBase58String(value(dG)) | |
470 | - | let dI = dB.assetPair.priceAsset | |
471 | - | let dJ = if ((dI == unit)) | |
472 | - | then "WAVES" | |
473 | - | else toBase58String(value(dI)) | |
474 | - | if (if ((dH != dC)) | |
468 | + | if (if ((dF != dA)) | |
475 | 469 | then true | |
476 | - | else ( | |
470 | + | else (dH != dB)) | |
477 | 471 | then throw("Wr assets") | |
478 | 472 | else { | |
479 | - | let | |
480 | - | let | |
481 | - | let | |
482 | - | let | |
483 | - | then ( | |
484 | - | else ( | |
473 | + | let dI = dz.price | |
474 | + | let cZ = fraction(a, bZ, bY) | |
475 | + | let dJ = L(dI, a, cZ) | |
476 | + | let dK = if ((dz.orderType == Buy)) | |
477 | + | then (cB >= dJ) | |
478 | + | else (dJ >= cB) | |
485 | 479 | true | |
486 | 480 | } | |
487 | 481 | } | |
488 | 482 | } | |
489 | 483 | ||
490 | 484 | ||
491 | - | func | |
485 | + | func dL (dM) = if ((size(dM.payments) != 1)) | |
492 | 486 | then throw("1 pmnt exp") | |
493 | 487 | else { | |
494 | - | let | |
495 | - | let | |
496 | - | let | |
497 | - | let | |
498 | - | let | |
499 | - | let | |
500 | - | let | |
501 | - | let | |
502 | - | if (if ( | |
488 | + | let dN = value(dM.payments[0]) | |
489 | + | let cm = value(dN.assetId) | |
490 | + | let cS = dN.amount | |
491 | + | let de = ck(toBase58String(dM.transactionId), toBase58String(cm), cS, dM.caller) | |
492 | + | let cG = de._1 | |
493 | + | let cH = de._2 | |
494 | + | let cu = parseIntValue(de._9) | |
495 | + | let cI = de._10 | |
496 | + | if (if (aI()) | |
503 | 497 | then true | |
504 | - | else ( | |
505 | - | then throw(("Admin blocked: " + toString( | |
506 | - | else $Tuple5( | |
498 | + | else (cu == q)) | |
499 | + | then throw(("Admin blocked: " + toString(cu))) | |
500 | + | else $Tuple5(cG, cH, cS, cm, cI) | |
507 | 501 | } | |
508 | 502 | ||
509 | 503 | ||
510 | - | func | |
511 | - | let | |
512 | - | let | |
513 | - | if (if (if ( | |
504 | + | func dO (dP,aa,dQ,dR,bG,cP,cQ,cR,cS,cT) = { | |
505 | + | let de = cJ(aa, bG, value(dQ).amount, value(dQ).assetId, value(dR).amount, value(dR).assetId, dP, (aa == ""), cP, cQ, cR, cS, cT) | |
506 | + | let cu = parseIntValue(de._8) | |
507 | + | if (if (if (aI()) | |
514 | 508 | then true | |
515 | - | else ( | |
509 | + | else (cu == o)) | |
516 | 510 | then true | |
517 | - | else ( | |
518 | - | then throw(("Blocked:" + toString( | |
519 | - | else | |
511 | + | else (cu == q)) | |
512 | + | then throw(("Blocked:" + toString(cu))) | |
513 | + | else de | |
520 | 514 | } | |
521 | 515 | ||
522 | 516 | ||
523 | - | func | |
524 | - | let | |
525 | - | let | |
526 | - | let | |
527 | - | let | |
528 | - | let | |
529 | - | let | |
530 | - | if (( | |
517 | + | func dS (dT) = { | |
518 | + | let dU = g | |
519 | + | let dV = dT[0] | |
520 | + | let dW = dT[1] | |
521 | + | let dX = parseBigIntValue(j) | |
522 | + | let dY = (parseBigIntValue(aH) * dX) | |
523 | + | let dZ = (dV + dW) | |
524 | + | if ((dZ == e)) | |
531 | 525 | then e | |
532 | 526 | else { | |
533 | - | let | |
534 | - | let | |
535 | - | let | |
536 | - | let | |
537 | - | let | |
538 | - | func | |
539 | - | let | |
540 | - | let | |
541 | - | let | |
542 | - | if (( | |
543 | - | then | |
527 | + | let ea = (dY * dU) | |
528 | + | let eb = (((dV * dW) * dU) * dU) | |
529 | + | let ec = ((ea * dZ) / dX) | |
530 | + | let ed = (ea - dX) | |
531 | + | let ee = (dU + f) | |
532 | + | func ef (eg,eh) = { | |
533 | + | let ei = eg | |
534 | + | let ej = ei._1 | |
535 | + | let ek = ei._2 | |
536 | + | if ((ek != unit)) | |
537 | + | then eg | |
544 | 538 | else { | |
545 | - | let | |
546 | - | let | |
547 | - | let | |
548 | - | if ((f >= | |
549 | - | then $Tuple2( | |
550 | - | else $Tuple2( | |
539 | + | let el = (((ej * ej) * ej) / eb) | |
540 | + | let em = (((ec + (el * dU)) * ej) / (((ed * ej) / dX) + (ee * el))) | |
541 | + | let en = Q((em - value(ej))) | |
542 | + | if ((f >= en)) | |
543 | + | then $Tuple2(em, eh) | |
544 | + | else $Tuple2(em, unit) | |
551 | 545 | } | |
552 | 546 | } | |
553 | 547 | ||
554 | - | let | |
555 | - | let | |
556 | - | let | |
557 | - | let | |
558 | - | let | |
559 | - | func | |
560 | - | then | |
561 | - | else | |
548 | + | let eo = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] | |
549 | + | let ep = { | |
550 | + | let eq = eo | |
551 | + | let er = size(eq) | |
552 | + | let es = $Tuple2(dZ, unit) | |
553 | + | func et (eu,ev) = if ((ev >= er)) | |
554 | + | then eu | |
555 | + | else ef(eu, eq[ev]) | |
562 | 556 | ||
563 | - | func | |
564 | - | then | |
557 | + | func ew (eu,ev) = if ((ev >= er)) | |
558 | + | then eu | |
565 | 559 | else throw("List size exceeds 15") | |
566 | 560 | ||
567 | - | | |
561 | + | ew(et(et(et(et(et(et(et(et(et(et(et(et(et(et(et(es, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
568 | 562 | } | |
569 | - | let | |
570 | - | let | |
571 | - | if (( | |
572 | - | then | |
573 | - | else throw(("D calculation error, D = " + toString( | |
563 | + | let ej = ep._1 | |
564 | + | let ek = ep._2 | |
565 | + | if ((ek != unit)) | |
566 | + | then ej | |
567 | + | else throw(("D calculation error, D = " + toString(ej))) | |
574 | 568 | } | |
575 | 569 | } | |
576 | 570 | ||
577 | 571 | ||
578 | - | func | |
579 | - | let | |
580 | - | let | |
572 | + | func ex (dT,dM,ey) = { | |
573 | + | let dU = g | |
574 | + | let ez = dT[if ((dM == 0)) | |
581 | 575 | then 1 | |
582 | 576 | else 0] | |
583 | - | let | |
584 | - | let | |
585 | - | let | |
586 | - | let | |
587 | - | let | |
588 | - | let | |
589 | - | func | |
590 | - | let | |
591 | - | let | |
592 | - | let | |
593 | - | if (( | |
594 | - | then | |
577 | + | let dX = parseBigIntValue(j) | |
578 | + | let dY = (parseBigIntValue(aH) * dX) | |
579 | + | let dZ = ez | |
580 | + | let ea = (dY * dU) | |
581 | + | let eA = (((((ey * ey) / (ez * dU)) * ey) * dX) / (ea * dU)) | |
582 | + | let eB = ((dZ + ((ey * dX) / ea)) - ey) | |
583 | + | func ef (eg,eh) = { | |
584 | + | let eC = eg | |
585 | + | let eD = eC._1 | |
586 | + | let ek = eC._2 | |
587 | + | if ((ek != unit)) | |
588 | + | then eg | |
595 | 589 | else { | |
596 | - | let | |
597 | - | let | |
598 | - | if ((f >= | |
599 | - | then $Tuple2( | |
600 | - | else $Tuple2( | |
590 | + | let eE = (((eD * eD) + eA) / ((g * eD) + eB)) | |
591 | + | let eF = Q((eE - value(eD))) | |
592 | + | if ((f >= eF)) | |
593 | + | then $Tuple2(eE, eh) | |
594 | + | else $Tuple2(eE, unit) | |
601 | 595 | } | |
602 | 596 | } | |
603 | 597 | ||
604 | - | let | |
605 | - | let | |
606 | - | let | |
607 | - | let | |
608 | - | let | |
609 | - | func | |
610 | - | then | |
611 | - | else | |
598 | + | let eo = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] | |
599 | + | let eG = { | |
600 | + | let eq = eo | |
601 | + | let er = size(eq) | |
602 | + | let es = $Tuple2(ey, unit) | |
603 | + | func et (eu,ev) = if ((ev >= er)) | |
604 | + | then eu | |
605 | + | else ef(eu, eq[ev]) | |
612 | 606 | ||
613 | - | func | |
614 | - | then | |
607 | + | func ew (eu,ev) = if ((ev >= er)) | |
608 | + | then eu | |
615 | 609 | else throw("List size exceeds 15") | |
616 | 610 | ||
617 | - | | |
611 | + | ew(et(et(et(et(et(et(et(et(et(et(et(et(et(et(et(es, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
618 | 612 | } | |
619 | - | let | |
620 | - | let | |
621 | - | if (( | |
622 | - | then | |
623 | - | else throw(("Y calculation error, Y = " + toString( | |
613 | + | let eD = eG._1 | |
614 | + | let ek = eG._2 | |
615 | + | if ((ek != unit)) | |
616 | + | then eD | |
617 | + | else throw(("Y calculation error, Y = " + toString(eD))) | |
624 | 618 | } | |
625 | 619 | ||
626 | 620 | ||
627 | - | func | |
628 | - | let | |
629 | - | let | |
630 | - | let | |
631 | - | let | |
632 | - | let | |
633 | - | let | |
634 | - | let | |
635 | - | let | |
621 | + | func eH (eI,cm,co,aa,eJ) = { | |
622 | + | let aT = aL() | |
623 | + | let cq = aT[u] | |
624 | + | let cr = aT[v] | |
625 | + | let cp = aT[t] | |
626 | + | let cY = parseIntValue(aT[w]) | |
627 | + | let cZ = parseIntValue(aT[x]) | |
628 | + | let eK = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(cp)), "invalid lp asset").quantity) | |
629 | + | let eL = if ((eK > e)) | |
636 | 630 | then true | |
637 | 631 | else throw("initial deposit requires all coins") | |
638 | - | if (( | |
632 | + | if ((eL == eL)) | |
639 | 633 | then { | |
640 | - | let | |
641 | - | let | |
642 | - | let | |
643 | - | then $Tuple2( | |
644 | - | else if (( | |
645 | - | then if (( | |
634 | + | let cw = by(cq) | |
635 | + | let cy = by(cr) | |
636 | + | let eM = if ((aa == "")) | |
637 | + | then $Tuple2(cw, cy) | |
638 | + | else if ((cm == cq)) | |
639 | + | then if ((eI > cw)) | |
646 | 640 | then throw("invalid payment amount") | |
647 | - | else $Tuple2(( | |
648 | - | else if (( | |
649 | - | then if (( | |
641 | + | else $Tuple2((cw - eI), cy) | |
642 | + | else if ((cm == cr)) | |
643 | + | then if ((eI > cy)) | |
650 | 644 | then throw("invalid payment amount") | |
651 | - | else $Tuple2( | |
645 | + | else $Tuple2(cw, (cy - eI)) | |
652 | 646 | else throw("wrong pmtAssetId") | |
653 | - | let | |
654 | - | let | |
655 | - | let | |
656 | - | then $Tuple2( | |
657 | - | else if (( | |
658 | - | then $Tuple2(0, | |
647 | + | let eN = eM._1 | |
648 | + | let eO = eM._2 | |
649 | + | let eP = if ((cm == cq)) | |
650 | + | then $Tuple2(eI, 0) | |
651 | + | else if ((cm == cr)) | |
652 | + | then $Tuple2(0, eI) | |
659 | 653 | else throw("invalid payment") | |
660 | - | let | |
661 | - | let | |
662 | - | let | |
663 | - | then $Tuple3( | |
664 | - | else $Tuple3( | |
665 | - | let | |
666 | - | let | |
667 | - | let | |
668 | - | let | |
669 | - | let | |
670 | - | let | |
671 | - | let | |
672 | - | let | |
654 | + | let eQ = eP._1 | |
655 | + | let eR = eP._2 | |
656 | + | let eS = if (eJ) | |
657 | + | then $Tuple3(cg(eQ, aE)._1, cg(eR, aE)._1, cg(eI, aE)._2) | |
658 | + | else $Tuple3(eQ, eR, 0) | |
659 | + | let eT = eS._1 | |
660 | + | let eU = eS._2 | |
661 | + | let cj = eS._3 | |
662 | + | let eV = (eN + eT) | |
663 | + | let eW = (eO + eU) | |
664 | + | let bL = dS([toBigInt(eN), toBigInt(eO)]) | |
665 | + | let bK = dS([toBigInt(eV), toBigInt(eW)]) | |
666 | + | let eX = if ((bK > bL)) | |
673 | 667 | then true | |
674 | 668 | else throw() | |
675 | - | if (( | |
669 | + | if ((eX == eX)) | |
676 | 670 | then { | |
677 | - | let | |
678 | - | let | |
679 | - | let | |
680 | - | let | |
681 | - | let | |
682 | - | let | |
683 | - | let | |
684 | - | let | |
685 | - | $Tuple4(toInt( | |
671 | + | let eY = fraction(eK, (bK - bL), bL) | |
672 | + | let cB = I(bA(F(eW, cZ), F(eV, cY)), a) | |
673 | + | let dx = [IntegerEntry(U(), cB), IntegerEntry(V(height, lastBlock.timestamp), cB), StringEntry(Y(co, aa), bj(eQ, eR, toInt(eY), cB, 0, 0, height, lastBlock.timestamp, 0, 0))] | |
674 | + | let eZ = fraction(eO, a, eN) | |
675 | + | let fa = fraction(eI, a, (eZ + a)) | |
676 | + | let fb = (eI - fa) | |
677 | + | let fc = fraction(eK, toBigInt(fb), toBigInt(eO)) | |
678 | + | let fd = toInt(fraction((eY - fc), b, fc)) | |
679 | + | $Tuple4(toInt(eY), dx, cj, fd) | |
686 | 680 | } | |
687 | 681 | else throw("Strict value is not equal to itself.") | |
688 | 682 | } | |
690 | 684 | } | |
691 | 685 | ||
692 | 686 | ||
693 | - | func | |
694 | - | let | |
695 | - | let | |
696 | - | let | |
697 | - | let | |
698 | - | let | |
699 | - | let | |
700 | - | let | |
701 | - | let | |
702 | - | then | |
703 | - | else | |
704 | - | let | |
705 | - | let | |
706 | - | let | |
707 | - | let | |
708 | - | if (( | |
687 | + | func fe (ff,fg,fh,dP,fi,fj) = { | |
688 | + | let aT = aL() | |
689 | + | let cp = aT[t] | |
690 | + | let cq = aT[u] | |
691 | + | let cr = aT[v] | |
692 | + | let fk = parseIntValue(aT[w]) | |
693 | + | let fl = parseIntValue(aT[x]) | |
694 | + | let fm = aT[s] | |
695 | + | let co = if ((dP == bi)) | |
696 | + | then fi | |
697 | + | else dP | |
698 | + | let dN = value(fh[0]) | |
699 | + | let cm = value(dN.assetId) | |
700 | + | let cS = dN.amount | |
701 | + | let cl = toBase58String(fj) | |
702 | + | if ((cp != toBase58String(cm))) | |
709 | 703 | then throw("Wrong LP") | |
710 | 704 | else { | |
711 | - | let | |
712 | - | let | |
713 | - | let | |
714 | - | let | |
715 | - | if ($isInstanceOf( | |
716 | - | then | |
717 | - | else throw(($getType( | |
705 | + | let cw = by(cq) | |
706 | + | let cy = by(cr) | |
707 | + | let fn = { | |
708 | + | let aF = invoke(this, "getOneTknV2READONLY", [ff, cS], nil) | |
709 | + | if ($isInstanceOf(aF, "(Int, Int)")) | |
710 | + | then aF | |
711 | + | else throw(($getType(aF) + " couldn't be cast to (Int, Int)")) | |
718 | 712 | } | |
719 | - | if (( | |
713 | + | if ((fn == fn)) | |
720 | 714 | then { | |
721 | - | let | |
722 | - | let | |
723 | - | let | |
724 | - | then ( | |
715 | + | let cj = fn._2 | |
716 | + | let fo = fn._1 | |
717 | + | let fp = if (if ((fg > 0)) | |
718 | + | then (fg > fo) | |
725 | 719 | else false) | |
726 | - | then | |
727 | - | else | |
728 | - | let | |
729 | - | then $Tuple4( | |
730 | - | else if (( | |
731 | - | then $Tuple4(0, | |
720 | + | then aB(makeString(["amount to receive is less than ", toString(fg)], "")) | |
721 | + | else fo | |
722 | + | let fq = if ((ff == cq)) | |
723 | + | then $Tuple4(fp, 0, ((cw - fp) - cj), cy) | |
724 | + | else if ((ff == cr)) | |
725 | + | then $Tuple4(0, fp, cw, ((cy - fp) - cj)) | |
732 | 726 | else throw("invalid out asset id") | |
733 | - | let | |
734 | - | let | |
735 | - | let | |
736 | - | let | |
737 | - | let | |
738 | - | let | |
739 | - | let | |
727 | + | let fr = fq._1 | |
728 | + | let fs = fq._2 | |
729 | + | let eV = fq._3 | |
730 | + | let eW = fq._4 | |
731 | + | let ft = bA(F(eW, fl), F(eV, fk)) | |
732 | + | let fu = I(ft, a) | |
733 | + | let fv = if ((ff == "WAVES")) | |
740 | 734 | then unit | |
741 | - | else fromBase58String( | |
742 | - | let | |
743 | - | then [ScriptTransfer( | |
735 | + | else fromBase58String(ff) | |
736 | + | let fw = if ((cj > 0)) | |
737 | + | then [ScriptTransfer(aK, cj, fv)] | |
744 | 738 | else nil | |
745 | - | let | |
746 | - | if (( | |
739 | + | let cI = ([ScriptTransfer(co, fp, fv), StringEntry(ab(toString(co), cl), bu(fr, fs, cS, fu, height, lastBlock.timestamp)), IntegerEntry(U(), fu), IntegerEntry(V(height, lastBlock.timestamp), fu)] ++ fw) | |
740 | + | if ((cI == cI)) | |
747 | 741 | then { | |
748 | - | let | |
749 | - | if (( | |
750 | - | then $Tuple2( | |
742 | + | let fx = invoke(aD, "burn", [cS], [AttachedPayment(cm, cS)]) | |
743 | + | if ((fx == fx)) | |
744 | + | then $Tuple2(cI, fp) | |
751 | 745 | else throw("Strict value is not equal to itself.") | |
752 | 746 | } | |
753 | 747 | else throw("Strict value is not equal to itself.") | |
757 | 751 | } | |
758 | 752 | ||
759 | 753 | ||
760 | - | func | |
761 | - | let | |
762 | - | if ($isInstanceOf( | |
754 | + | func fy () = { | |
755 | + | let av = getString(S()) | |
756 | + | if ($isInstanceOf(av, "String")) | |
763 | 757 | then { | |
764 | - | let | |
765 | - | fromBase58String( | |
758 | + | let dZ = av | |
759 | + | fromBase58String(dZ) | |
766 | 760 | } | |
767 | - | else if ($isInstanceOf( | |
761 | + | else if ($isInstanceOf(av, "Unit")) | |
768 | 762 | then unit | |
769 | 763 | else throw("Match error") | |
770 | 764 | } | |
771 | 765 | ||
772 | 766 | ||
773 | - | func | |
774 | - | let | |
775 | - | if ($isInstanceOf( | |
767 | + | func fz () = { | |
768 | + | let av = getString(T()) | |
769 | + | if ($isInstanceOf(av, "String")) | |
776 | 770 | then { | |
777 | - | let | |
778 | - | fromBase58String( | |
771 | + | let dZ = av | |
772 | + | fromBase58String(dZ) | |
779 | 773 | } | |
780 | - | else if ($isInstanceOf( | |
774 | + | else if ($isInstanceOf(av, "Unit")) | |
781 | 775 | then unit | |
782 | 776 | else throw("Match error") | |
783 | 777 | } | |
784 | 778 | ||
785 | 779 | ||
786 | - | let | |
780 | + | let fA = throw("Permission denied") | |
787 | 781 | ||
788 | - | func | |
789 | - | let | |
790 | - | if ($isInstanceOf( | |
782 | + | func fB (dM) = { | |
783 | + | let av = fy() | |
784 | + | if ($isInstanceOf(av, "ByteVector")) | |
791 | 785 | then { | |
792 | - | let | |
793 | - | ( | |
786 | + | let fC = av | |
787 | + | (dM.callerPublicKey == fC) | |
794 | 788 | } | |
795 | - | else if ($isInstanceOf( | |
796 | - | then ( | |
789 | + | else if ($isInstanceOf(av, "Unit")) | |
790 | + | then (dM.caller == this) | |
797 | 791 | else throw("Match error") | |
798 | 792 | } | |
799 | 793 | ||
800 | 794 | ||
801 | - | func | |
802 | - | let | |
803 | - | if ($isInstanceOf( | |
795 | + | func fD (dM) = { | |
796 | + | let av = fy() | |
797 | + | if ($isInstanceOf(av, "ByteVector")) | |
804 | 798 | then { | |
805 | - | let | |
806 | - | if (( | |
799 | + | let fC = av | |
800 | + | if ((dM.callerPublicKey == fC)) | |
807 | 801 | then true | |
808 | - | else | |
802 | + | else fA | |
809 | 803 | } | |
810 | - | else if ($isInstanceOf( | |
811 | - | then if (( | |
804 | + | else if ($isInstanceOf(av, "Unit")) | |
805 | + | then if ((dM.caller == this)) | |
812 | 806 | then true | |
813 | - | else | |
807 | + | else fA | |
814 | 808 | else throw("Match error") | |
815 | 809 | } | |
816 | 810 | ||
817 | 811 | ||
818 | - | func fG (fH,eA,fI) = { | |
819 | - | let aV = aN() | |
820 | - | let cs = aV[u] | |
821 | - | let ct = aV[v] | |
822 | - | let dW = g | |
823 | - | let dZ = parseBigIntValue(j) | |
824 | - | let ea = (parseBigIntValue(aJ) * dZ) | |
825 | - | let dV = if ((fH == false)) | |
826 | - | then [(toBigInt(bA(cs)) - fI), toBigInt(bA(ct))] | |
827 | - | else [(toBigInt(bA(ct)) - fI), toBigInt(bA(cs))] | |
828 | - | let eB = dV[0] | |
829 | - | let eb = eB | |
830 | - | let ec = (ea * dW) | |
831 | - | let eC = (((((eA * eA) / (eB * dW)) * eA) * dZ) / (ec * dW)) | |
832 | - | let eD = ((eb + ((eA * dZ) / ec)) - eA) | |
833 | - | func eh (ei,ej) = { | |
834 | - | let fJ = ei | |
835 | - | let eF = fJ._1 | |
836 | - | let em = fJ._2 | |
837 | - | if ((em != unit)) | |
838 | - | then ei | |
839 | - | else { | |
840 | - | let eG = (((eF * eF) + eC) / ((g * eF) + eD)) | |
841 | - | let eH = Q((eG - value(eF))) | |
842 | - | if ((f >= eH)) | |
843 | - | then $Tuple2(eG, ej) | |
844 | - | else $Tuple2(eG, unit) | |
845 | - | } | |
846 | - | } | |
847 | - | ||
848 | - | let eq = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] | |
849 | - | let fK = { | |
850 | - | let es = eq | |
851 | - | let et = size(es) | |
852 | - | let eu = $Tuple2(eA, unit) | |
853 | - | func ev (ew,ex) = if ((ex >= et)) | |
854 | - | then ew | |
855 | - | else eh(ew, es[ex]) | |
856 | - | ||
857 | - | func ey (ew,ex) = if ((ex >= et)) | |
858 | - | then ew | |
859 | - | else throw("List size exceeds 15") | |
860 | - | ||
861 | - | ey(ev(ev(ev(ev(ev(ev(ev(ev(ev(ev(ev(ev(ev(ev(ev(eu, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
862 | - | } | |
863 | - | let eF = fK._1 | |
864 | - | let em = fK._2 | |
865 | - | if ((em != unit)) | |
866 | - | then eF | |
867 | - | else throw(("Y calculation error, Y = " + toString(eF))) | |
812 | + | @Callable(dM) | |
813 | + | func constructor (R) = { | |
814 | + | let eA = fD(dM) | |
815 | + | if ((eA == eA)) | |
816 | + | then [StringEntry(R(), R)] | |
817 | + | else throw("Strict value is not equal to itself.") | |
868 | 818 | } | |
869 | 819 | ||
870 | 820 | ||
871 | - | @Callable(dO) | |
872 | - | func calculateAmountOutForSwapAndSendTokens (fL,fH,fM,fN) = { | |
873 | - | let fO = [if ((value(dO.payments[0]).amount >= fL)) | |
874 | - | then true | |
875 | - | else aD("Wrong amount"), if ((dO.caller == addressFromStringValue(ay(ag())))) | |
876 | - | then true | |
877 | - | else aD("Permission denied")] | |
878 | - | if ((fO == fO)) | |
821 | + | ||
822 | + | @Callable(dM) | |
823 | + | func setManager (fE) = { | |
824 | + | let eA = fD(dM) | |
825 | + | if ((eA == eA)) | |
879 | 826 | then { | |
880 | - | let dP = value(dO.payments[0]) | |
881 | - | let fP = toBase58String(value(dP.assetId)) | |
882 | - | let fQ = if ((fH == false)) | |
883 | - | then { | |
884 | - | let fR = 1 | |
885 | - | let fS = ay(ad()) | |
886 | - | let fI = (bA(fP) - value(dO.payments[0]).amount) | |
887 | - | $Tuple3(fS, fR, fI) | |
888 | - | } | |
889 | - | else { | |
890 | - | let fR = 0 | |
891 | - | let fS = ay(ac()) | |
892 | - | let fI = (bA(fP) - value(dO.payments[0]).amount) | |
893 | - | $Tuple3(fS, fR, fI) | |
894 | - | } | |
895 | - | let fS = fQ._1 | |
896 | - | let fR = fQ._2 | |
897 | - | let fI = fQ._3 | |
898 | - | let aV = aN() | |
899 | - | let cs = aV[u] | |
900 | - | let ct = aV[v] | |
901 | - | let dV = [(toBigInt(bA(cs)) - toBigInt(value(dO.payments[0]).amount)), toBigInt(bA(ct))] | |
902 | - | let eA = dU(dV) | |
903 | - | let eF = fG(fH, eA, toBigInt(fI)) | |
904 | - | let eB = (toBigInt(fI) + toBigInt(fL)) | |
905 | - | let fT = ((toBigInt(bA(fS)) - eF) - toBigInt(1)) | |
906 | - | let fU = max([0, toInt(fT)]) | |
907 | - | let fV = [(fM >= fU), throw("Exchange resulted in fewer coins than expected")] | |
908 | - | if ((fV == fV)) | |
909 | - | then [ScriptTransfer(addressFromStringValue(fN), toInt(fT), fromBase58String(fS))] | |
827 | + | let fF = fromBase58String(fE) | |
828 | + | if ((fF == fF)) | |
829 | + | then [StringEntry(T(), fE)] | |
910 | 830 | else throw("Strict value is not equal to itself.") | |
911 | 831 | } | |
912 | 832 | else throw("Strict value is not equal to itself.") | |
914 | 834 | ||
915 | 835 | ||
916 | 836 | ||
917 | - | @Callable(dO) | |
918 | - | func setSwapContract (fW) = { | |
919 | - | let fX = fF(dO) | |
920 | - | if ((fX == fX)) | |
921 | - | then [StringEntry(ag(), fW)] | |
922 | - | else throw("Strict value is not equal to itself.") | |
923 | - | } | |
924 | - | ||
925 | - | ||
926 | - | ||
927 | - | @Callable(dO) | |
928 | - | func constructor (R) = { | |
929 | - | let eC = fF(dO) | |
930 | - | if ((eC == eC)) | |
931 | - | then [StringEntry(R(), R)] | |
932 | - | else throw("Strict value is not equal to itself.") | |
933 | - | } | |
934 | - | ||
935 | - | ||
936 | - | ||
937 | - | @Callable(dO) | |
938 | - | func setManager (fY) = { | |
939 | - | let eC = fF(dO) | |
940 | - | if ((eC == eC)) | |
837 | + | @Callable(dM) | |
838 | + | func confirmManager () = { | |
839 | + | let cf = fz() | |
840 | + | let fG = if (isDefined(cf)) | |
841 | + | then true | |
842 | + | else throw("No pending manager") | |
843 | + | if ((fG == fG)) | |
941 | 844 | then { | |
942 | - | let fZ = fromBase58String(fY) | |
943 | - | if ((fZ == fZ)) | |
944 | - | then [StringEntry(T(), fY)] | |
845 | + | let fH = if ((dM.callerPublicKey == value(cf))) | |
846 | + | then true | |
847 | + | else throw("You are not pending manager") | |
848 | + | if ((fH == fH)) | |
849 | + | then [StringEntry(S(), toBase58String(value(cf))), DeleteEntry(T())] | |
945 | 850 | else throw("Strict value is not equal to itself.") | |
946 | 851 | } | |
947 | 852 | else throw("Strict value is not equal to itself.") | |
949 | 854 | ||
950 | 855 | ||
951 | 856 | ||
952 | - | @Callable(dO) | |
953 | - | func confirmManager () = { | |
954 | - | let ch = fB() | |
955 | - | let ga = if (isDefined(ch)) | |
956 | - | then true | |
957 | - | else throw("No pending manager") | |
958 | - | if ((ga == ga)) | |
959 | - | then { | |
960 | - | let gb = if ((dO.callerPublicKey == value(ch))) | |
961 | - | then true | |
962 | - | else throw("You are not pending manager") | |
963 | - | if ((gb == gb)) | |
964 | - | then [StringEntry(S(), toBase58String(value(ch))), DeleteEntry(T())] | |
965 | - | else throw("Strict value is not equal to itself.") | |
966 | - | } | |
967 | - | else throw("Strict value is not equal to itself.") | |
968 | - | } | |
969 | - | ||
970 | - | ||
971 | - | ||
972 | - | @Callable(dO) | |
973 | - | func put (gc,gd) = { | |
974 | - | let ge = bf() | |
975 | - | let gf = valueOrErrorMessage(addressFromString(ge[A]), "Wr st addr") | |
976 | - | let gg = valueOrErrorMessage(addressFromString(ge[C]), "Wr sl addr") | |
977 | - | if ((0 > gc)) | |
857 | + | @Callable(dM) | |
858 | + | func put (fI,fJ) = { | |
859 | + | let fK = bd() | |
860 | + | let fL = valueOrErrorMessage(addressFromString(fK[A]), "Wr st addr") | |
861 | + | let fM = valueOrErrorMessage(addressFromString(fK[C]), "Wr sl addr") | |
862 | + | if ((0 > fI)) | |
978 | 863 | then throw("Wrong slippage") | |
979 | - | else if ((size( | |
864 | + | else if ((size(dM.payments) != 2)) | |
980 | 865 | then throw("2 pmnts expd") | |
981 | 866 | else { | |
982 | - | let | |
983 | - | let | |
984 | - | let | |
985 | - | let | |
986 | - | let | |
987 | - | let | |
988 | - | let | |
989 | - | let | |
990 | - | let | |
991 | - | if (( | |
867 | + | let fN = dO(toString(dM.caller), toBase58String(dM.transactionId), AttachedPayment(value(dM.payments[0]).assetId, value(dM.payments[0]).amount), dM.payments[1], fI, true, false, true, 0, "") | |
868 | + | let dr = fN._2 | |
869 | + | let fO = fN._7 | |
870 | + | let cI = fN._9 | |
871 | + | let ds = fN._10 | |
872 | + | let dt = fN._11 | |
873 | + | let cq = fN._12 | |
874 | + | let cr = fN._13 | |
875 | + | let de = invoke(aD, "emit", [dr], nil) | |
876 | + | if ((de == de)) | |
992 | 877 | then { | |
993 | - | let | |
994 | - | let | |
995 | - | if ($isInstanceOf( | |
878 | + | let fP = { | |
879 | + | let av = de | |
880 | + | if ($isInstanceOf(av, "Address")) | |
996 | 881 | then { | |
997 | - | let | |
998 | - | invoke( | |
882 | + | let fQ = av | |
883 | + | invoke(fQ, "emit", [dr], nil) | |
999 | 884 | } | |
1000 | 885 | else unit | |
1001 | 886 | } | |
1002 | - | if (( | |
887 | + | if ((fP == fP)) | |
1003 | 888 | then { | |
1004 | - | let | |
1005 | - | then invoke( | |
889 | + | let fR = if ((ds > 0)) | |
890 | + | then invoke(fM, "put", nil, [AttachedPayment(cq, ds)]) | |
1006 | 891 | else nil | |
1007 | - | if (( | |
892 | + | if ((fR == fR)) | |
1008 | 893 | then { | |
1009 | - | let | |
1010 | - | then invoke( | |
894 | + | let fS = if ((dt > 0)) | |
895 | + | then invoke(fM, "put", nil, [AttachedPayment(cr, dt)]) | |
1011 | 896 | else nil | |
1012 | - | if (( | |
897 | + | if ((fS == fS)) | |
1013 | 898 | then { | |
1014 | - | let | |
899 | + | let fT = if (fJ) | |
1015 | 900 | then { | |
1016 | - | let | |
1017 | - | if (( | |
901 | + | let fU = invoke(fL, "stake", nil, [AttachedPayment(fO, dr)]) | |
902 | + | if ((fU == fU)) | |
1018 | 903 | then nil | |
1019 | 904 | else throw("Strict value is not equal to itself.") | |
1020 | 905 | } | |
1021 | - | else [ScriptTransfer( | |
1022 | - | ( | |
906 | + | else [ScriptTransfer(dM.caller, dr, fO)] | |
907 | + | (cI ++ fT) | |
1023 | 908 | } | |
1024 | 909 | else throw("Strict value is not equal to itself.") | |
1025 | 910 | } | |
1033 | 918 | ||
1034 | 919 | ||
1035 | 920 | ||
1036 | - | @Callable( | |
1037 | - | func putOneTknV2 ( | |
1038 | - | let | |
1039 | - | let | |
1040 | - | if ($isInstanceOf( | |
1041 | - | then | |
1042 | - | else throw(($getType( | |
921 | + | @Callable(dM) | |
922 | + | func putOneTknV2 (fg,fJ) = { | |
923 | + | let fV = { | |
924 | + | let aF = invoke(aD, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
925 | + | if ($isInstanceOf(aF, "Boolean")) | |
926 | + | then aF | |
927 | + | else throw(($getType(aF) + " couldn't be cast to Boolean")) | |
1043 | 928 | } | |
1044 | - | let | |
929 | + | let fW = if (if (if (aI()) | |
1045 | 930 | then true | |
1046 | - | else ( | |
931 | + | else (aX == o)) | |
1047 | 932 | then true | |
1048 | - | else ( | |
933 | + | else (aX == q)) | |
1049 | 934 | then true | |
1050 | - | else | |
1051 | - | let | |
935 | + | else fV | |
936 | + | let fX = [if (if (!(fW)) | |
1052 | 937 | then true | |
1053 | - | else | |
938 | + | else fB(dM)) | |
1054 | 939 | then true | |
1055 | - | else | |
940 | + | else aB("put operation is blocked by admin"), if ((size(dM.payments) == 1)) | |
1056 | 941 | then true | |
1057 | - | else | |
1058 | - | if (( | |
942 | + | else aB("exactly 1 payment are expected")] | |
943 | + | if ((fX == fX)) | |
1059 | 944 | then { | |
1060 | - | let | |
1061 | - | let | |
1062 | - | let | |
1063 | - | let | |
1064 | - | let | |
1065 | - | let | |
1066 | - | let | |
1067 | - | then | |
1068 | - | else | |
1069 | - | let | |
1070 | - | let | |
1071 | - | let | |
1072 | - | let | |
1073 | - | if (( | |
945 | + | let aT = aL() | |
946 | + | let cq = aT[u] | |
947 | + | let cr = aT[v] | |
948 | + | let cp = fromBase58String(aT[t]) | |
949 | + | let fk = parseIntValue(aT[w]) | |
950 | + | let fl = parseIntValue(aT[x]) | |
951 | + | let co = if ((dM.caller == this)) | |
952 | + | then dM.originCaller | |
953 | + | else dM.caller | |
954 | + | let dN = value(dM.payments[0]) | |
955 | + | let cm = toBase58String(value(dN.assetId)) | |
956 | + | let cS = dN.amount | |
957 | + | let fY = eH(cS, cm, toString(co), toBase58String(dM.transactionId), true) | |
958 | + | if ((fY == fY)) | |
1074 | 959 | then { | |
1075 | - | let | |
1076 | - | let | |
1077 | - | let | |
1078 | - | let | |
1079 | - | then ( | |
960 | + | let cj = fY._3 | |
961 | + | let cI = fY._2 | |
962 | + | let fZ = fY._1 | |
963 | + | let dr = if (if ((fg > 0)) | |
964 | + | then (fg > fZ) | |
1080 | 965 | else false) | |
1081 | - | then | |
1082 | - | else | |
1083 | - | let | |
1084 | - | if (( | |
966 | + | then aB(makeString(["amount to receive is less than ", toString(fg)], "")) | |
967 | + | else fZ | |
968 | + | let fN = invoke(aD, "emit", [dr], nil) | |
969 | + | if ((fN == fN)) | |
1085 | 970 | then { | |
1086 | - | let | |
1087 | - | let | |
1088 | - | if ($isInstanceOf( | |
971 | + | let fP = { | |
972 | + | let av = fN | |
973 | + | if ($isInstanceOf(av, "Address")) | |
1089 | 974 | then { | |
1090 | - | let | |
1091 | - | invoke( | |
975 | + | let fQ = av | |
976 | + | invoke(fQ, "emit", [dr], nil) | |
1092 | 977 | } | |
1093 | 978 | else unit | |
1094 | 979 | } | |
1095 | - | if (( | |
980 | + | if ((fP == fP)) | |
1096 | 981 | then { | |
1097 | - | let | |
982 | + | let fT = if (fJ) | |
1098 | 983 | then { | |
1099 | - | let | |
1100 | - | if (( | |
984 | + | let fU = invoke(bf, "stake", nil, [AttachedPayment(cp, dr)]) | |
985 | + | if ((fU == fU)) | |
1101 | 986 | then nil | |
1102 | 987 | else throw("Strict value is not equal to itself.") | |
1103 | 988 | } | |
1104 | - | else [ScriptTransfer( | |
1105 | - | let | |
1106 | - | then [ScriptTransfer( | |
989 | + | else [ScriptTransfer(dM.caller, dr, cp)] | |
990 | + | let fw = if ((cj > 0)) | |
991 | + | then [ScriptTransfer(aK, cj, fromBase58String(cm))] | |
1107 | 992 | else nil | |
1108 | - | $Tuple2((( | |
993 | + | $Tuple2(((cI ++ fT) ++ fw), dr) | |
1109 | 994 | } | |
1110 | 995 | else throw("Strict value is not equal to itself.") | |
1111 | 996 | } | |
1118 | 1003 | ||
1119 | 1004 | ||
1120 | 1005 | ||
1121 | - | @Callable( | |
1122 | - | func putForFree ( | |
1006 | + | @Callable(dM) | |
1007 | + | func putForFree (ga) = if ((0 > ga)) | |
1123 | 1008 | then throw("Wrong slpg") | |
1124 | - | else if ((size( | |
1009 | + | else if ((size(dM.payments) != 2)) | |
1125 | 1010 | then throw("2 pmnts expd") | |
1126 | 1011 | else { | |
1127 | - | let | |
1128 | - | | |
1012 | + | let gb = dO(toString(dM.caller), toBase58String(dM.transactionId), AttachedPayment(value(dM.payments[0]).assetId, value(dM.payments[0]).amount), dM.payments[1], ga, false, false, true, 0, "") | |
1013 | + | gb._9 | |
1129 | 1014 | } | |
1130 | 1015 | ||
1131 | 1016 | ||
1132 | 1017 | ||
1133 | - | @Callable( | |
1018 | + | @Callable(dM) | |
1134 | 1019 | func get () = { | |
1135 | - | let | |
1136 | - | let | |
1137 | - | let | |
1138 | - | let | |
1139 | - | let | |
1140 | - | let | |
1141 | - | let | |
1142 | - | if (( | |
1143 | - | then | |
1020 | + | let de = dL(dM) | |
1021 | + | let gc = de._1 | |
1022 | + | let cH = de._2 | |
1023 | + | let cS = de._3 | |
1024 | + | let cm = de._4 | |
1025 | + | let cI = de._5 | |
1026 | + | let eB = invoke(aD, "burn", [cS], [AttachedPayment(cm, cS)]) | |
1027 | + | if ((eB == eB)) | |
1028 | + | then cI | |
1144 | 1029 | else throw("Strict value is not equal to itself.") | |
1145 | 1030 | } | |
1146 | 1031 | ||
1147 | 1032 | ||
1148 | 1033 | ||
1149 | - | @Callable( | |
1150 | - | func getOneTknV2 ( | |
1151 | - | let | |
1152 | - | let | |
1153 | - | if ($isInstanceOf( | |
1154 | - | then | |
1155 | - | else throw(($getType( | |
1034 | + | @Callable(dM) | |
1035 | + | func getOneTknV2 (ff,fg) = { | |
1036 | + | let fV = { | |
1037 | + | let aF = invoke(aD, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1038 | + | if ($isInstanceOf(aF, "Boolean")) | |
1039 | + | then aF | |
1040 | + | else throw(($getType(aF) + " couldn't be cast to Boolean")) | |
1156 | 1041 | } | |
1157 | - | let | |
1042 | + | let gd = if (if (aI()) | |
1158 | 1043 | then true | |
1159 | - | else ( | |
1044 | + | else (aX == q)) | |
1160 | 1045 | then true | |
1161 | - | else | |
1162 | - | let | |
1046 | + | else fV | |
1047 | + | let fX = [if (if (!(gd)) | |
1163 | 1048 | then true | |
1164 | - | else | |
1049 | + | else fB(dM)) | |
1165 | 1050 | then true | |
1166 | - | else | |
1051 | + | else aB("get operation is blocked by admin"), if ((size(dM.payments) == 1)) | |
1167 | 1052 | then true | |
1168 | - | else | |
1169 | - | if (( | |
1053 | + | else aB("exactly 1 payment are expected")] | |
1054 | + | if ((fX == fX)) | |
1170 | 1055 | then { | |
1171 | - | let | |
1172 | - | let | |
1173 | - | let | |
1174 | - | $Tuple2( | |
1056 | + | let ge = fe(ff, fg, dM.payments, dM.caller, dM.originCaller, dM.transactionId) | |
1057 | + | let cI = ge._1 | |
1058 | + | let fp = ge._2 | |
1059 | + | $Tuple2(cI, fp) | |
1175 | 1060 | } | |
1176 | 1061 | else throw("Strict value is not equal to itself.") | |
1177 | 1062 | } | |
1178 | 1063 | ||
1179 | 1064 | ||
1180 | 1065 | ||
1181 | - | @Callable( | |
1182 | - | func getOneTknV2READONLY ( | |
1183 | - | let | |
1184 | - | let | |
1185 | - | let | |
1186 | - | let | |
1187 | - | let | |
1188 | - | let | |
1189 | - | let | |
1190 | - | let | |
1191 | - | let | |
1066 | + | @Callable(dM) | |
1067 | + | func getOneTknV2READONLY (ff,gf) = { | |
1068 | + | let aT = aL() | |
1069 | + | let cq = aT[u] | |
1070 | + | let cr = aT[v] | |
1071 | + | let cp = aT[t] | |
1072 | + | let dT = [toBigInt(by(cq)), toBigInt(by(cr))] | |
1073 | + | let gg = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(cp)), "invalid lp asset").quantity) | |
1074 | + | let bL = dS(dT) | |
1075 | + | let bK = (bL - fraction(toBigInt(gf), bL, gg)) | |
1076 | + | let gh = if ((ff == cq)) | |
1192 | 1077 | then 0 | |
1193 | - | else if (( | |
1078 | + | else if ((ff == cr)) | |
1194 | 1079 | then 1 | |
1195 | 1080 | else throw("invalid out asset id") | |
1196 | - | let | |
1197 | - | let | |
1198 | - | let | |
1199 | - | let | |
1200 | - | let | |
1201 | - | let | |
1202 | - | $Tuple2(nil, $Tuple2( | |
1081 | + | let gi = ex(dT, gh, bK) | |
1082 | + | let gj = (dT[gh] - gi) | |
1083 | + | let gk = max([0, toInt((gj - f))]) | |
1084 | + | let gl = cg(gk, aG) | |
1085 | + | let fo = gl._1 | |
1086 | + | let cj = gl._2 | |
1087 | + | $Tuple2(nil, $Tuple2(fo, cj)) | |
1203 | 1088 | } | |
1204 | 1089 | ||
1205 | 1090 | ||
1206 | 1091 | ||
1207 | - | @Callable( | |
1208 | - | func getOneTknV2WithBonusREADONLY ( | |
1209 | - | let | |
1210 | - | let | |
1211 | - | let | |
1212 | - | let | |
1213 | - | let | |
1214 | - | let | |
1215 | - | let | |
1216 | - | let | |
1217 | - | if ($isInstanceOf( | |
1218 | - | then | |
1219 | - | else throw(($getType( | |
1092 | + | @Callable(dM) | |
1093 | + | func getOneTknV2WithBonusREADONLY (ff,gf) = { | |
1094 | + | let aT = aL() | |
1095 | + | let cq = aT[u] | |
1096 | + | let cr = aT[v] | |
1097 | + | let cp = aT[t] | |
1098 | + | let cw = by(cq) | |
1099 | + | let cy = by(cr) | |
1100 | + | let gm = { | |
1101 | + | let aF = invoke(this, "getOneTknV2READONLY", [ff, gf], nil) | |
1102 | + | if ($isInstanceOf(aF, "(Int, Int)")) | |
1103 | + | then aF | |
1104 | + | else throw(($getType(aF) + " couldn't be cast to (Int, Int)")) | |
1220 | 1105 | } | |
1221 | - | let | |
1222 | - | let | |
1223 | - | let | |
1224 | - | let | |
1225 | - | let | |
1226 | - | let | |
1227 | - | let | |
1228 | - | then if (( | |
1106 | + | let fo = gm._1 | |
1107 | + | let cj = gm._2 | |
1108 | + | let de = ck("", cp, gf, this) | |
1109 | + | let cG = de._1 | |
1110 | + | let cH = de._2 | |
1111 | + | let gn = (cG + cH) | |
1112 | + | let fd = if ((gn == 0)) | |
1113 | + | then if ((fo == 0)) | |
1229 | 1114 | then 0 | |
1230 | 1115 | else throw("bonus calculation error") | |
1231 | - | else fraction(( | |
1232 | - | $Tuple2(nil, $Tuple3( | |
1116 | + | else fraction((fo - gn), a, gn) | |
1117 | + | $Tuple2(nil, $Tuple3(fo, cj, fd)) | |
1233 | 1118 | } | |
1234 | 1119 | ||
1235 | 1120 | ||
1236 | 1121 | ||
1237 | - | @Callable( | |
1238 | - | func getNoLess ( | |
1239 | - | let | |
1240 | - | let | |
1241 | - | let | |
1242 | - | let | |
1243 | - | let | |
1244 | - | let | |
1245 | - | if (( | |
1246 | - | then throw(((("Failed: " + toString( | |
1247 | - | else if (( | |
1248 | - | then throw(((("Failed: " + toString( | |
1122 | + | @Callable(dM) | |
1123 | + | func getNoLess (go,gp) = { | |
1124 | + | let de = dL(dM) | |
1125 | + | let cG = de._1 | |
1126 | + | let cH = de._2 | |
1127 | + | let cS = de._3 | |
1128 | + | let cm = de._4 | |
1129 | + | let cI = de._5 | |
1130 | + | if ((go > cG)) | |
1131 | + | then throw(((("Failed: " + toString(cG)) + " < ") + toString(go))) | |
1132 | + | else if ((gp > cH)) | |
1133 | + | then throw(((("Failed: " + toString(cH)) + " < ") + toString(gp))) | |
1249 | 1134 | else { | |
1250 | - | let | |
1251 | - | if (( | |
1252 | - | then | |
1135 | + | let gq = invoke(aD, "burn", [cS], [AttachedPayment(cm, cS)]) | |
1136 | + | if ((gq == gq)) | |
1137 | + | then cI | |
1253 | 1138 | else throw("Strict value is not equal to itself.") | |
1254 | 1139 | } | |
1255 | 1140 | } | |
1256 | 1141 | ||
1257 | 1142 | ||
1258 | 1143 | ||
1259 | - | @Callable( | |
1260 | - | func unstakeAndGet ( | |
1261 | - | let | |
1144 | + | @Callable(dM) | |
1145 | + | func unstakeAndGet (ch) = { | |
1146 | + | let gr = if ((size(dM.payments) != 0)) | |
1262 | 1147 | then throw("No pmnts expd") | |
1263 | 1148 | else true | |
1264 | - | if (( | |
1149 | + | if ((gr == gr)) | |
1265 | 1150 | then { | |
1266 | - | let | |
1267 | - | let | |
1268 | - | let | |
1269 | - | let | |
1270 | - | let | |
1271 | - | if (( | |
1151 | + | let bX = aL() | |
1152 | + | let gs = bd() | |
1153 | + | let fO = fromBase58String(bX[t]) | |
1154 | + | let gt = valueOrErrorMessage(addressFromString(gs[A]), "Wr st addr") | |
1155 | + | let gu = invoke(gt, "unstake", [toBase58String(fO), ch], nil) | |
1156 | + | if ((gu == gu)) | |
1272 | 1157 | then { | |
1273 | - | let | |
1274 | - | let | |
1275 | - | let | |
1276 | - | let | |
1158 | + | let de = ck(toBase58String(dM.transactionId), toBase58String(fO), ch, dM.caller) | |
1159 | + | let cu = parseIntValue(de._9) | |
1160 | + | let cI = de._10 | |
1161 | + | let gv = if (if (aI()) | |
1277 | 1162 | then true | |
1278 | - | else ( | |
1279 | - | then throw(("Blocked: " + toString( | |
1163 | + | else (cu == q)) | |
1164 | + | then throw(("Blocked: " + toString(cu))) | |
1280 | 1165 | else true | |
1281 | - | if (( | |
1166 | + | if ((gv == gv)) | |
1282 | 1167 | then { | |
1283 | - | let | |
1284 | - | if (( | |
1285 | - | then | |
1168 | + | let gw = invoke(aD, "burn", [ch], [AttachedPayment(fO, ch)]) | |
1169 | + | if ((gw == gw)) | |
1170 | + | then cI | |
1286 | 1171 | else throw("Strict value is not equal to itself.") | |
1287 | 1172 | } | |
1288 | 1173 | else throw("Strict value is not equal to itself.") | |
1294 | 1179 | ||
1295 | 1180 | ||
1296 | 1181 | ||
1297 | - | @Callable( | |
1298 | - | func unstakeAndGetNoLess ( | |
1299 | - | let | |
1182 | + | @Callable(dM) | |
1183 | + | func unstakeAndGetNoLess (gx,gy,gp) = { | |
1184 | + | let gd = if (aI()) | |
1300 | 1185 | then true | |
1301 | - | else ( | |
1302 | - | let | |
1186 | + | else (aX == q) | |
1187 | + | let fX = [if (!(gd)) | |
1303 | 1188 | then true | |
1304 | - | else throw("get operation is blocked by admin"), if ((size( | |
1189 | + | else throw("get operation is blocked by admin"), if ((size(dM.payments) == 0)) | |
1305 | 1190 | then true | |
1306 | 1191 | else throw("no payments are expected")] | |
1307 | - | if (( | |
1192 | + | if ((fX == fX)) | |
1308 | 1193 | then { | |
1309 | - | let | |
1310 | - | if (( | |
1194 | + | let gu = invoke(bf, "unstake", [toBase58String(aY), gx], nil) | |
1195 | + | if ((gu == gu)) | |
1311 | 1196 | then { | |
1312 | - | let | |
1313 | - | let | |
1314 | - | let | |
1315 | - | let | |
1316 | - | let | |
1197 | + | let gz = ck(toBase58String(dM.transactionId), toBase58String(aY), gx, dM.caller) | |
1198 | + | let cG = gz._1 | |
1199 | + | let cH = gz._2 | |
1200 | + | let cI = gz._10 | |
1201 | + | let gA = [if ((cG >= gy)) | |
1317 | 1202 | then true | |
1318 | - | else throw(makeString(["amount asset amount to receive is less than ", toString( | |
1203 | + | else throw(makeString(["amount asset amount to receive is less than ", toString(gy)], "")), if ((cH >= gp)) | |
1319 | 1204 | then true | |
1320 | - | else throw(makeString(["price asset amount to receive is less than ", toString( | |
1321 | - | if (( | |
1205 | + | else throw(makeString(["price asset amount to receive is less than ", toString(gp)], ""))] | |
1206 | + | if ((gA == gA)) | |
1322 | 1207 | then { | |
1323 | - | let | |
1324 | - | if (( | |
1325 | - | then | |
1208 | + | let gq = invoke(aD, "burn", [gx], [AttachedPayment(aY, gx)]) | |
1209 | + | if ((gq == gq)) | |
1210 | + | then cI | |
1326 | 1211 | else throw("Strict value is not equal to itself.") | |
1327 | 1212 | } | |
1328 | 1213 | else throw("Strict value is not equal to itself.") | |
1334 | 1219 | ||
1335 | 1220 | ||
1336 | 1221 | ||
1337 | - | @Callable( | |
1338 | - | func unstakeAndGetOneTknV2 ( | |
1339 | - | let | |
1340 | - | let | |
1341 | - | if ($isInstanceOf( | |
1342 | - | then | |
1343 | - | else throw(($getType( | |
1222 | + | @Callable(dM) | |
1223 | + | func unstakeAndGetOneTknV2 (gx,ff,fg) = { | |
1224 | + | let fV = { | |
1225 | + | let aF = invoke(aD, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1226 | + | if ($isInstanceOf(aF, "Boolean")) | |
1227 | + | then aF | |
1228 | + | else throw(($getType(aF) + " couldn't be cast to Boolean")) | |
1344 | 1229 | } | |
1345 | - | let | |
1230 | + | let gd = if (if (aI()) | |
1346 | 1231 | then true | |
1347 | - | else ( | |
1232 | + | else (aX == q)) | |
1348 | 1233 | then true | |
1349 | - | else | |
1350 | - | let | |
1234 | + | else fV | |
1235 | + | let fX = [if (if (!(gd)) | |
1351 | 1236 | then true | |
1352 | - | else | |
1237 | + | else fB(dM)) | |
1353 | 1238 | then true | |
1354 | - | else | |
1239 | + | else aB("get operation is blocked by admin"), if ((size(dM.payments) == 0)) | |
1355 | 1240 | then true | |
1356 | - | else | |
1357 | - | if (( | |
1241 | + | else aB("no payments are expected")] | |
1242 | + | if ((fX == fX)) | |
1358 | 1243 | then { | |
1359 | - | let | |
1360 | - | let | |
1361 | - | let | |
1362 | - | let | |
1363 | - | let | |
1364 | - | if (( | |
1244 | + | let bX = aL() | |
1245 | + | let gs = bd() | |
1246 | + | let fO = fromBase58String(bX[t]) | |
1247 | + | let gt = valueOrErrorMessage(addressFromString(gs[A]), "Wr st addr") | |
1248 | + | let gu = invoke(gt, "unstake", [toBase58String(fO), gx], nil) | |
1249 | + | if ((gu == gu)) | |
1365 | 1250 | then { | |
1366 | - | let | |
1367 | - | let | |
1368 | - | let | |
1369 | - | $Tuple2( | |
1251 | + | let gB = fe(ff, fg, [AttachedPayment(fO, gx)], dM.caller, dM.originCaller, dM.transactionId) | |
1252 | + | let cI = gB._1 | |
1253 | + | let fp = gB._2 | |
1254 | + | $Tuple2(cI, fp) | |
1370 | 1255 | } | |
1371 | 1256 | else throw("Strict value is not equal to itself.") | |
1372 | 1257 | } | |
1375 | 1260 | ||
1376 | 1261 | ||
1377 | 1262 | ||
1378 | - | @Callable( | |
1379 | - | func putOneTknV2WithBonusREADONLY ( | |
1380 | - | let | |
1381 | - | let | |
1382 | - | let | |
1383 | - | let | |
1384 | - | let | |
1385 | - | let | |
1386 | - | let | |
1387 | - | let | |
1388 | - | let | |
1389 | - | $Tuple2(nil, $Tuple3( | |
1263 | + | @Callable(dM) | |
1264 | + | func putOneTknV2WithBonusREADONLY (gC,gD) = { | |
1265 | + | let aT = aL() | |
1266 | + | let cq = aT[u] | |
1267 | + | let cr = aT[v] | |
1268 | + | let cp = aT[t] | |
1269 | + | let gE = eH(gC, gD, "", "", true) | |
1270 | + | let eY = gE._1 | |
1271 | + | let cI = gE._2 | |
1272 | + | let cj = gE._3 | |
1273 | + | let fd = gE._4 | |
1274 | + | $Tuple2(nil, $Tuple3(eY, cj, fd)) | |
1390 | 1275 | } | |
1391 | 1276 | ||
1392 | 1277 | ||
1393 | 1278 | ||
1394 | - | @Callable( | |
1395 | - | func putOneTknV2WithoutTakeFeeREADONLY ( | |
1396 | - | let | |
1397 | - | let | |
1398 | - | let | |
1399 | - | let | |
1400 | - | let | |
1401 | - | let | |
1402 | - | let | |
1403 | - | let | |
1404 | - | let | |
1405 | - | $Tuple2(nil, $Tuple3( | |
1279 | + | @Callable(dM) | |
1280 | + | func putOneTknV2WithoutTakeFeeREADONLY (gC,gD) = { | |
1281 | + | let aT = aL() | |
1282 | + | let cq = aT[u] | |
1283 | + | let cr = aT[v] | |
1284 | + | let cp = aT[t] | |
1285 | + | let gF = eH(gC, gD, "", "", false) | |
1286 | + | let eY = gF._1 | |
1287 | + | let cI = gF._2 | |
1288 | + | let cj = gF._3 | |
1289 | + | let fd = gF._4 | |
1290 | + | $Tuple2(nil, $Tuple3(eY, cj, fd)) | |
1406 | 1291 | } | |
1407 | 1292 | ||
1408 | 1293 | ||
1409 | 1294 | ||
1410 | - | @Callable( | |
1411 | - | func activate ( | |
1295 | + | @Callable(dM) | |
1296 | + | func activate (gG,gH) = if ((toString(dM.caller) != toString(aD))) | |
1412 | 1297 | then throw("denied") | |
1413 | - | else $Tuple2([StringEntry(ac(), | |
1298 | + | else $Tuple2([StringEntry(ac(), gG), StringEntry(ad(), gH)], "success") | |
1414 | 1299 | ||
1415 | 1300 | ||
1416 | 1301 | ||
1417 | - | @Callable( | |
1418 | - | func setS ( | |
1419 | - | then | |
1420 | - | else [StringEntry( | |
1302 | + | @Callable(dM) | |
1303 | + | func setS (gI,gv) = if ((toString(dM.caller) != ax(this, af()))) | |
1304 | + | then fA | |
1305 | + | else [StringEntry(gI, gv)] | |
1421 | 1306 | ||
1422 | 1307 | ||
1423 | 1308 | ||
1424 | - | @Callable( | |
1425 | - | func setI ( | |
1426 | - | then | |
1427 | - | else [IntegerEntry( | |
1309 | + | @Callable(dM) | |
1310 | + | func setI (gI,gv) = if ((toString(dM.caller) != ax(this, af()))) | |
1311 | + | then fA | |
1312 | + | else [IntegerEntry(gI, gv)] | |
1428 | 1313 | ||
1429 | 1314 | ||
1430 | 1315 | ||
1431 | - | @Callable( | |
1432 | - | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, | |
1316 | + | @Callable(dM) | |
1317 | + | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aL()) | |
1433 | 1318 | ||
1434 | 1319 | ||
1435 | 1320 | ||
1436 | - | @Callable( | |
1437 | - | func getAccBalanceWrapperREADONLY ( | |
1321 | + | @Callable(dM) | |
1322 | + | func getAccBalanceWrapperREADONLY (bz) = $Tuple2(nil, by(bz)) | |
1438 | 1323 | ||
1439 | 1324 | ||
1440 | 1325 | ||
1441 | - | @Callable( | |
1442 | - | func calcPricesWrapperREADONLY ( | |
1443 | - | let | |
1444 | - | $Tuple2(nil, [toString( | |
1326 | + | @Callable(dM) | |
1327 | + | func calcPricesWrapperREADONLY (bR,bS,bW) = { | |
1328 | + | let gJ = bV(bR, bS, bW) | |
1329 | + | $Tuple2(nil, [toString(gJ[0]), toString(gJ[1]), toString(gJ[2])]) | |
1445 | 1330 | } | |
1446 | 1331 | ||
1447 | 1332 | ||
1448 | 1333 | ||
1449 | - | @Callable( | |
1450 | - | func fromX18WrapperREADONLY (J, | |
1334 | + | @Callable(dM) | |
1335 | + | func fromX18WrapperREADONLY (J,gK) = $Tuple2(nil, I(parseBigIntValue(J), gK)) | |
1451 | 1336 | ||
1452 | 1337 | ||
1453 | 1338 | ||
1454 | - | @Callable( | |
1339 | + | @Callable(dM) | |
1455 | 1340 | func toX18WrapperREADONLY (G,H) = $Tuple2(nil, toString(F(G, H))) | |
1456 | 1341 | ||
1457 | 1342 | ||
1458 | 1343 | ||
1459 | - | @Callable( | |
1460 | - | func calcPriceBigIntWrapperREADONLY ( | |
1344 | + | @Callable(dM) | |
1345 | + | func calcPriceBigIntWrapperREADONLY (bB,bC) = $Tuple2(nil, toString(bA(parseBigIntValue(bB), parseBigIntValue(bC)))) | |
1461 | 1346 | ||
1462 | 1347 | ||
1463 | 1348 | ||
1464 | - | @Callable( | |
1465 | - | func estimatePutOperationWrapperREADONLY ( | |
1349 | + | @Callable(dM) | |
1350 | + | func estimatePutOperationWrapperREADONLY (cl,bG,cK,cL,cM,cN,gL,cO,cP) = $Tuple2(nil, cJ(cl, bG, cK, cL, cM, cN, gL, cO, cP, true, false, 0, "")) | |
1466 | 1351 | ||
1467 | 1352 | ||
1468 | 1353 | ||
1469 | - | @Callable( | |
1470 | - | func estimateGetOperationWrapperREADONLY (cn, | |
1471 | - | let | |
1472 | - | $Tuple2(nil, $Tuple10( | |
1354 | + | @Callable(dM) | |
1355 | + | func estimateGetOperationWrapperREADONLY (cl,gM,cn,gL) = { | |
1356 | + | let de = ck(cl, gM, cn, addressFromStringValue(gL)) | |
1357 | + | $Tuple2(nil, $Tuple10(de._1, de._2, de._3, de._4, de._5, de._6, de._7, toString(de._8), de._9, de._10)) | |
1473 | 1358 | } | |
1474 | 1359 | ||
1475 | 1360 | ||
1476 | - | @Verifier( | |
1477 | - | func | |
1478 | - | let | |
1479 | - | let | |
1480 | - | if ($isInstanceOf( | |
1361 | + | @Verifier(gN) | |
1362 | + | func gO () = { | |
1363 | + | let gP = { | |
1364 | + | let av = fy() | |
1365 | + | if ($isInstanceOf(av, "ByteVector")) | |
1481 | 1366 | then { | |
1482 | - | let | |
1483 | - | | |
1367 | + | let fC = av | |
1368 | + | fC | |
1484 | 1369 | } | |
1485 | - | else if ($isInstanceOf( | |
1486 | - | then | |
1370 | + | else if ($isInstanceOf(av, "Unit")) | |
1371 | + | then gN.senderPublicKey | |
1487 | 1372 | else throw("Match error") | |
1488 | 1373 | } | |
1489 | - | let | |
1490 | - | if ($isInstanceOf( | |
1374 | + | let av = gN | |
1375 | + | if ($isInstanceOf(av, "Order")) | |
1491 | 1376 | then { | |
1492 | - | let | |
1493 | - | let | |
1494 | - | let | |
1495 | - | let | |
1496 | - | let | |
1497 | - | if (if (if ( | |
1498 | - | then | |
1377 | + | let dz = av | |
1378 | + | let gQ = aJ() | |
1379 | + | let gR = dy(dz) | |
1380 | + | let gS = sigVerify(dz.bodyBytes, dz.proofs[0], dz.senderPublicKey) | |
1381 | + | let gT = sigVerify(dz.bodyBytes, dz.proofs[1], gQ) | |
1382 | + | if (if (if (gR) | |
1383 | + | then gS | |
1499 | 1384 | else false) | |
1500 | - | then | |
1385 | + | then gT | |
1501 | 1386 | else false) | |
1502 | 1387 | then true | |
1503 | - | else | |
1388 | + | else aq(gR, gS, gT) | |
1504 | 1389 | } | |
1505 | - | else if ($isInstanceOf( | |
1390 | + | else if ($isInstanceOf(av, "SetScriptTransaction")) | |
1506 | 1391 | then { | |
1507 | - | let | |
1508 | - | let | |
1509 | - | let | |
1510 | - | let | |
1511 | - | if (if (( | |
1512 | - | then ( | |
1392 | + | let dZ = av | |
1393 | + | let gU = blake2b256(value(dZ.script)) | |
1394 | + | let gV = fromBase64String(value(getString(aD, ao()))) | |
1395 | + | let gW = scriptHash(this) | |
1396 | + | if (if ((gV == gU)) | |
1397 | + | then (gW != gU) | |
1513 | 1398 | else false) | |
1514 | 1399 | then true | |
1515 | - | else sigVerify( | |
1400 | + | else sigVerify(gN.bodyBytes, gN.proofs[0], gP) | |
1516 | 1401 | } | |
1517 | - | else sigVerify( | |
1402 | + | else sigVerify(gN.bodyBytes, gN.proofs[0], gP) | |
1518 | 1403 | } | |
1519 | 1404 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = 100000000 | |
5 | 5 | ||
6 | 6 | let b = toBigInt(100000000) | |
7 | 7 | ||
8 | 8 | let c = toBigInt(1000000000000000000) | |
9 | 9 | ||
10 | 10 | let d = toBigInt(0) | |
11 | 11 | ||
12 | 12 | let e = toBigInt(0) | |
13 | 13 | ||
14 | 14 | let f = toBigInt(1) | |
15 | 15 | ||
16 | 16 | let g = toBigInt(2) | |
17 | 17 | ||
18 | 18 | let h = toBigInt((a - ((a * 1) / a))) | |
19 | 19 | ||
20 | 20 | let i = "WAVES" | |
21 | 21 | ||
22 | 22 | let j = "100" | |
23 | 23 | ||
24 | 24 | let k = "1" | |
25 | 25 | ||
26 | 26 | let l = "__" | |
27 | 27 | ||
28 | 28 | let m = "" | |
29 | 29 | ||
30 | 30 | let n = 1 | |
31 | 31 | ||
32 | 32 | let o = 2 | |
33 | 33 | ||
34 | 34 | let p = 3 | |
35 | 35 | ||
36 | 36 | let q = 4 | |
37 | 37 | ||
38 | 38 | let r = 1 | |
39 | 39 | ||
40 | 40 | let s = 2 | |
41 | 41 | ||
42 | 42 | let t = 3 | |
43 | 43 | ||
44 | 44 | let u = 4 | |
45 | 45 | ||
46 | 46 | let v = 5 | |
47 | 47 | ||
48 | 48 | let w = 6 | |
49 | 49 | ||
50 | 50 | let x = 7 | |
51 | 51 | ||
52 | 52 | let y = 8 | |
53 | 53 | ||
54 | 54 | let z = 9 | |
55 | 55 | ||
56 | 56 | let A = 1 | |
57 | 57 | ||
58 | 58 | let B = 6 | |
59 | 59 | ||
60 | 60 | let C = 7 | |
61 | 61 | ||
62 | 62 | let D = 10 | |
63 | 63 | ||
64 | 64 | let E = fraction(10, a, 10000) | |
65 | 65 | ||
66 | 66 | func F (G,H) = fraction(toBigInt(G), c, toBigInt(H)) | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | func I (J,K) = toInt(fraction(J, toBigInt(K), c)) | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func L (M,N,O) = fraction(M, N, O) | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | func P (J) = if ((d > J)) | |
76 | 76 | then -(J) | |
77 | 77 | else J | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | func Q (J) = if ((d > J)) | |
81 | 81 | then -(J) | |
82 | 82 | else J | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | func R () = "%s__factoryContract" | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | func S () = "%s__managerPublicKey" | |
89 | 89 | ||
90 | 90 | ||
91 | 91 | func T () = "%s__pendingManagerPublicKey" | |
92 | 92 | ||
93 | 93 | ||
94 | 94 | func U () = "%s%s__price__last" | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | func V (W,X) = makeString(["%s%s%d%d__price__history", toString(W), toString(X)], l) | |
98 | 98 | ||
99 | 99 | ||
100 | 100 | func Y (Z,aa) = ((("%s%s%s__P__" + Z) + "__") + aa) | |
101 | 101 | ||
102 | 102 | ||
103 | 103 | func ab (Z,aa) = ((("%s%s%s__G__" + Z) + "__") + aa) | |
104 | 104 | ||
105 | 105 | ||
106 | 106 | func ac () = "%s__amountAsset" | |
107 | 107 | ||
108 | 108 | ||
109 | 109 | func ad () = "%s__priceAsset" | |
110 | 110 | ||
111 | 111 | ||
112 | 112 | func ae () = "%s__amp" | |
113 | 113 | ||
114 | 114 | ||
115 | 115 | func af () = "%s__addonAddr" | |
116 | 116 | ||
117 | 117 | ||
118 | - | func ag () = "%s__ | |
118 | + | func ag () = "%s__factoryConfig" | |
119 | 119 | ||
120 | 120 | ||
121 | - | func ah () = "%s__ | |
121 | + | func ah () = "%s%s__matcher__publicKey" | |
122 | 122 | ||
123 | 123 | ||
124 | - | func ai () = "% | |
124 | + | func ai (aj,ak) = (((("%d%d%s__" + aj) + "__") + ak) + "__config") | |
125 | 125 | ||
126 | 126 | ||
127 | - | func | |
127 | + | func al (am) = ("%s%s%s__mappings__baseAsset2internalId__" + am) | |
128 | 128 | ||
129 | 129 | ||
130 | - | func | |
130 | + | func an () = "%s__shutdown" | |
131 | 131 | ||
132 | 132 | ||
133 | - | func ao () = "%s__ | |
133 | + | func ao () = "%s__allowedLpStableScriptHash" | |
134 | 134 | ||
135 | 135 | ||
136 | - | func ap () = "%s__ | |
136 | + | func ap () = "%s__feeCollectorAddress" | |
137 | 137 | ||
138 | 138 | ||
139 | - | func aq () = " | |
139 | + | func aq (ar,as,at) = throw(((((("Failed: ordValid=" + toString(ar)) + " sndrValid=") + toString(as)) + " mtchrValid=") + toString(at))) | |
140 | 140 | ||
141 | 141 | ||
142 | - | func ar (as,at,au) = throw(((((("Failed: ordValid=" + toString(as)) + " sndrValid=") + toString(at)) + " mtchrValid=") + toString(au))) | |
143 | - | ||
144 | - | ||
145 | - | func av (J) = { | |
146 | - | let aw = J | |
147 | - | if ($isInstanceOf(aw, "String")) | |
142 | + | func au (J) = { | |
143 | + | let av = J | |
144 | + | if ($isInstanceOf(av, "String")) | |
148 | 145 | then { | |
149 | - | let | |
150 | - | | |
146 | + | let aw = av | |
147 | + | aw | |
151 | 148 | } | |
152 | 149 | else throw("fail cast to String") | |
153 | 150 | } | |
154 | 151 | ||
155 | 152 | ||
156 | - | func | |
153 | + | func ax (ay,az) = valueOrErrorMessage(getString(ay, az), makeString(["mandatory ", toString(ay), ".", az, " not defined"], "")) | |
157 | 154 | ||
158 | 155 | ||
159 | - | func aA ( | |
156 | + | func aA (ay,az) = valueOrErrorMessage(getInteger(ay, az), makeString(["mandatory ", toString(ay), ".", az, " not defined"], "")) | |
160 | 157 | ||
161 | 158 | ||
162 | - | func | |
159 | + | func aB (aC) = throw(makeString(["lp_stable.ride:", aC], " ")) | |
163 | 160 | ||
164 | 161 | ||
165 | - | func aD (aE) = throw(makeString(["lp_stable.ride:", aE], " ")) | |
162 | + | let aD = addressFromStringValue(ax(this, R())) | |
163 | + | ||
164 | + | let aE = { | |
165 | + | let aF = invoke(aD, "getInFeeREADONLY", [toString(this)], nil) | |
166 | + | if ($isInstanceOf(aF, "Int")) | |
167 | + | then aF | |
168 | + | else throw(($getType(aF) + " couldn't be cast to Int")) | |
169 | + | } | |
170 | + | ||
171 | + | let aG = { | |
172 | + | let aF = invoke(aD, "getOutFeeREADONLY", [toString(this)], nil) | |
173 | + | if ($isInstanceOf(aF, "Int")) | |
174 | + | then aF | |
175 | + | else throw(($getType(aF) + " couldn't be cast to Int")) | |
176 | + | } | |
177 | + | ||
178 | + | let aH = ax(this, ae()) | |
179 | + | ||
180 | + | func aI () = valueOrElse(getBoolean(aD, an()), false) | |
166 | 181 | ||
167 | 182 | ||
168 | - | let aF = addressFromStringValue(aA(this, R())) | |
169 | - | ||
170 | - | let aG = { | |
171 | - | let aH = invoke(aF, "getInFeeREADONLY", [toString(this)], nil) | |
172 | - | if ($isInstanceOf(aH, "Int")) | |
173 | - | then aH | |
174 | - | else throw(($getType(aH) + " couldn't be cast to Int")) | |
175 | - | } | |
176 | - | ||
177 | - | let aI = { | |
178 | - | let aH = invoke(aF, "getOutFeeREADONLY", [toString(this)], nil) | |
179 | - | if ($isInstanceOf(aH, "Int")) | |
180 | - | then aH | |
181 | - | else throw(($getType(aH) + " couldn't be cast to Int")) | |
182 | - | } | |
183 | - | ||
184 | - | let aJ = aA(this, ae()) | |
185 | - | ||
186 | - | func aK () = valueOrElse(getBoolean(aF, ao()), false) | |
183 | + | func aJ () = fromBase58String(ax(aD, ah())) | |
187 | 184 | ||
188 | 185 | ||
189 | - | ||
186 | + | let aK = addressFromStringValue(ax(aD, ap())) | |
190 | 187 | ||
191 | - | ||
192 | - | let aM = addressFromStringValue(aA(aF, aq())) | |
193 | - | ||
194 | - | func aN () = { | |
195 | - | let aO = aA(this, ac()) | |
196 | - | let aP = aA(this, ad()) | |
197 | - | let aQ = aC(aF, am(aP)) | |
198 | - | let ak = aC(aF, am(aO)) | |
199 | - | split(aA(aF, aj(toString(ak), toString(aQ))), l) | |
188 | + | func aL () = { | |
189 | + | let aM = ax(this, ac()) | |
190 | + | let aN = ax(this, ad()) | |
191 | + | let aO = aA(aD, al(aN)) | |
192 | + | let aj = aA(aD, al(aM)) | |
193 | + | split(ax(aD, ai(toString(aj), toString(aO))), l) | |
200 | 194 | } | |
201 | 195 | ||
202 | 196 | ||
203 | - | func | |
197 | + | func aP (aQ) = if ((aQ == i)) | |
204 | 198 | then unit | |
205 | - | else fromBase58String( | |
199 | + | else fromBase58String(aQ) | |
206 | 200 | ||
207 | 201 | ||
208 | - | func | |
202 | + | func aR (aQ) = if ((aQ == unit)) | |
209 | 203 | then i | |
210 | - | else toBase58String(value( | |
204 | + | else toBase58String(value(aQ)) | |
211 | 205 | ||
212 | 206 | ||
213 | - | func | |
207 | + | func aS (aT) = $Tuple7(addressFromStringValue(aT[r]), parseIntValue(aT[s]), fromBase58String(aT[t]), aP(aT[u]), aP(aT[v]), parseIntValue(aT[w]), parseIntValue(aT[x])) | |
214 | 208 | ||
215 | 209 | ||
216 | - | let | |
210 | + | let aU = aS(aL()) | |
217 | 211 | ||
218 | - | let | |
212 | + | let aV = aU | |
219 | 213 | ||
220 | - | let | |
214 | + | let aW = aV._1 | |
221 | 215 | ||
222 | - | let | |
216 | + | let aX = aV._2 | |
223 | 217 | ||
224 | - | let | |
218 | + | let aY = aV._3 | |
225 | 219 | ||
226 | - | let | |
220 | + | let aZ = aV._4 | |
227 | 221 | ||
228 | - | let | |
222 | + | let ba = aV._5 | |
229 | 223 | ||
230 | - | let | |
224 | + | let bb = aV._6 | |
231 | 225 | ||
232 | - | let | |
226 | + | let bc = aV._7 | |
233 | 227 | ||
234 | - | func | |
228 | + | func bd () = split(ax(aD, ag()), l) | |
235 | 229 | ||
236 | 230 | ||
237 | - | let | |
231 | + | let be = bd() | |
238 | 232 | ||
239 | - | let | |
233 | + | let bf = valueOrErrorMessage(addressFromString(be[A]), "Invalid staking contract address") | |
240 | 234 | ||
241 | - | let | |
235 | + | let bg = valueOrErrorMessage(addressFromString(be[C]), "Invalid slipage contract address") | |
242 | 236 | ||
243 | - | let | |
237 | + | let bh = valueOrErrorMessage(addressFromString(be[D]), "Invalid gwx contract address") | |
244 | 238 | ||
245 | - | let | |
239 | + | let bi = valueOrErrorMessage(addressFromString(be[B]), "Invalid gwx contract address") | |
246 | 240 | ||
247 | - | func | |
241 | + | func bj (bk,bl,bm,bn,bo,bp,bq,br,bs,bt) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bk), toString(bl), toString(bm), toString(bn), toString(bo), toString(bp), toString(bq), toString(br), toString(bs), toString(bt)], l) | |
248 | 242 | ||
249 | 243 | ||
250 | - | func | |
244 | + | func bu (bv,bw,bx,bn,bq,br) = makeString(["%d%d%d%d%d%d", toString(bv), toString(bw), toString(bx), toString(bn), toString(bq), toString(br)], l) | |
251 | 245 | ||
252 | 246 | ||
253 | - | func | |
247 | + | func by (bz) = if ((bz == "WAVES")) | |
254 | 248 | then wavesBalance(this).available | |
255 | - | else assetBalance(this, fromBase58String( | |
249 | + | else assetBalance(this, fromBase58String(bz)) | |
256 | 250 | ||
257 | 251 | ||
258 | - | func | |
252 | + | func bA (bB,bC) = fraction(bB, c, bC) | |
259 | 253 | ||
260 | 254 | ||
261 | - | func | |
262 | - | let | |
263 | - | let | |
264 | - | if (!( | |
265 | - | then throw(("Big slpg: " + toString( | |
266 | - | else $Tuple2( | |
255 | + | func bD (bE,bF,bG) = { | |
256 | + | let bH = fraction((bE - bF), b, bF) | |
257 | + | let bI = ((bG - P(bH)) > d) | |
258 | + | if (!(bI)) | |
259 | + | then throw(("Big slpg: " + toString(bH))) | |
260 | + | else $Tuple2(bI, min([bE, bF])) | |
267 | 261 | } | |
268 | 262 | ||
269 | 263 | ||
270 | - | func | |
271 | - | let | |
272 | - | let | |
273 | - | if (if ( | |
264 | + | func bJ (bK,bL,bM) = { | |
265 | + | let bH = fraction(bL, b, bK) | |
266 | + | let bN = (bM > bH) | |
267 | + | if (if (bN) | |
274 | 268 | then true | |
275 | - | else ( | |
276 | - | then throw(((((((toString( | |
277 | - | else | |
269 | + | else (bL > bK)) | |
270 | + | then throw(((((((toString(bL) + " ") + toString(bK)) + " ") + toString(bH)) + " ") + toString(bM))) | |
271 | + | else bN | |
278 | 272 | } | |
279 | 273 | ||
280 | 274 | ||
281 | - | func | |
282 | - | let | |
283 | - | let | |
284 | - | | |
275 | + | func bO (bP,bQ,bR,bS) = { | |
276 | + | let bT = F(bR, bP) | |
277 | + | let bU = F(bS, bQ) | |
278 | + | bA(bU, bT) | |
285 | 279 | } | |
286 | 280 | ||
287 | 281 | ||
288 | - | func | |
289 | - | let | |
290 | - | let | |
291 | - | let | |
292 | - | let | |
293 | - | let | |
294 | - | let | |
295 | - | let | |
296 | - | let | |
297 | - | let | |
298 | - | [cc, | |
282 | + | func bV (bR,bS,bW) = { | |
283 | + | let bX = aL() | |
284 | + | let bY = parseIntValue(bX[w]) | |
285 | + | let bZ = parseIntValue(bX[x]) | |
286 | + | let ca = bO(bY, bZ, bR, bS) | |
287 | + | let bC = F(bR, bY) | |
288 | + | let bB = F(bS, bZ) | |
289 | + | let cb = F(bW, a) | |
290 | + | let cc = bA(bC, cb) | |
291 | + | let cd = bA(bB, cb) | |
292 | + | [ca, cc, cd] | |
299 | 293 | } | |
300 | 294 | ||
301 | 295 | ||
302 | - | func | |
303 | - | let | |
304 | - | [I( | |
296 | + | func ce (bR,bS,bW) = { | |
297 | + | let cf = bV(bR, bS, bW) | |
298 | + | [I(cf[0], a), I(cf[1], a), I(cf[2], a)] | |
305 | 299 | } | |
306 | 300 | ||
307 | 301 | ||
308 | - | func | |
309 | - | let | |
302 | + | func cg (ch,ci) = { | |
303 | + | let cj = if ((ci == 0)) | |
310 | 304 | then 0 | |
311 | - | else fraction( | |
312 | - | $Tuple2(( | |
305 | + | else fraction(ch, ci, a) | |
306 | + | $Tuple2((ch - cj), cj) | |
313 | 307 | } | |
314 | 308 | ||
315 | 309 | ||
316 | - | func | |
317 | - | let | |
318 | - | let | |
319 | - | let | |
320 | - | let | |
321 | - | let | |
322 | - | let | |
323 | - | let | |
324 | - | let | |
325 | - | if (( | |
310 | + | func ck (cl,cm,cn,co) = { | |
311 | + | let bX = aL() | |
312 | + | let cp = bX[t] | |
313 | + | let cq = bX[u] | |
314 | + | let cr = bX[v] | |
315 | + | let cs = parseIntValue(bX[w]) | |
316 | + | let ct = parseIntValue(bX[x]) | |
317 | + | let cu = bX[s] | |
318 | + | let cv = valueOrErrorMessage(assetInfo(fromBase58String(cp)), "Wrong LP id").quantity | |
319 | + | if ((cp != cm)) | |
326 | 320 | then throw("Wrong pmt asset") | |
327 | 321 | else { | |
328 | - | let | |
329 | - | let | |
330 | - | let | |
331 | - | let | |
332 | - | let | |
333 | - | let | |
334 | - | let | |
335 | - | let | |
336 | - | let | |
337 | - | let | |
338 | - | let | |
339 | - | let | |
340 | - | let | |
322 | + | let cw = by(cq) | |
323 | + | let cx = F(cw, cs) | |
324 | + | let cy = by(cr) | |
325 | + | let cz = F(cy, ct) | |
326 | + | let cA = bA(cz, cx) | |
327 | + | let cB = I(cA, a) | |
328 | + | let cC = F(cn, a) | |
329 | + | let cD = F(cv, a) | |
330 | + | let cE = fraction(cx, cC, cD) | |
331 | + | let cF = fraction(cz, cC, cD) | |
332 | + | let cG = I(cE, cs) | |
333 | + | let cH = I(cF, ct) | |
334 | + | let cI = if ((cl == "")) | |
341 | 335 | then nil | |
342 | - | else [ScriptTransfer( | |
336 | + | else [ScriptTransfer(co, cG, if ((cq == "WAVES")) | |
343 | 337 | then unit | |
344 | - | else fromBase58String( | |
338 | + | else fromBase58String(cq)), ScriptTransfer(co, cH, if ((cr == "WAVES")) | |
345 | 339 | then unit | |
346 | - | else fromBase58String( | |
347 | - | $Tuple10( | |
340 | + | else fromBase58String(cr)), StringEntry(ab(toString(co), cl), bu(cG, cH, cn, cB, height, lastBlock.timestamp)), IntegerEntry(U(), cB), IntegerEntry(V(height, lastBlock.timestamp), cB)] | |
341 | + | $Tuple10(cG, cH, cq, cr, cw, cy, cv, cA, cu, cI) | |
348 | 342 | } | |
349 | 343 | } | |
350 | 344 | ||
351 | 345 | ||
352 | - | func | |
353 | - | let | |
354 | - | let | |
355 | - | let | |
356 | - | let | |
357 | - | let | |
358 | - | let | |
359 | - | let | |
360 | - | let | |
361 | - | let | |
362 | - | let | |
363 | - | let | |
364 | - | then | |
365 | - | else if (if ( | |
366 | - | then ( | |
346 | + | func cJ (cl,bG,cK,cL,cM,cN,co,cO,cP,cQ,cR,cS,cT) = { | |
347 | + | let bX = aL() | |
348 | + | let cp = fromBase58String(bX[t]) | |
349 | + | let cU = bX[u] | |
350 | + | let cV = bX[v] | |
351 | + | let cW = bX[y] | |
352 | + | let cX = bX[z] | |
353 | + | let cY = parseIntValue(bX[w]) | |
354 | + | let cZ = parseIntValue(bX[x]) | |
355 | + | let cu = bX[s] | |
356 | + | let da = valueOrErrorMessage(assetInfo(cp), "Wr lp as").quantity | |
357 | + | let cw = if (cO) | |
358 | + | then by(cU) | |
359 | + | else if (if (cQ) | |
360 | + | then (cT == cU) | |
367 | 361 | else false) | |
368 | - | then ( | |
369 | - | else if ( | |
370 | - | then | |
371 | - | else ( | |
372 | - | let | |
373 | - | then | |
374 | - | else if (if ( | |
375 | - | then ( | |
362 | + | then (by(cU) - cS) | |
363 | + | else if (cQ) | |
364 | + | then by(cU) | |
365 | + | else (by(cU) - cK) | |
366 | + | let cy = if (cO) | |
367 | + | then by(cV) | |
368 | + | else if (if (cQ) | |
369 | + | then (cT == cV) | |
376 | 370 | else false) | |
377 | - | then ( | |
378 | - | else if ( | |
379 | - | then | |
380 | - | else ( | |
381 | - | let | |
382 | - | let | |
383 | - | let | |
384 | - | let | |
385 | - | let | |
386 | - | let | |
371 | + | then (by(cV) - cS) | |
372 | + | else if (cQ) | |
373 | + | then by(cV) | |
374 | + | else (by(cV) - cM) | |
375 | + | let db = F(cK, cY) | |
376 | + | let dc = F(cM, cZ) | |
377 | + | let dd = bA(dc, db) | |
378 | + | let cx = F(cw, cY) | |
379 | + | let cz = F(cy, cZ) | |
380 | + | let de = if ((da == 0)) | |
387 | 381 | then { | |
388 | - | let | |
389 | - | let | |
390 | - | let | |
391 | - | $Tuple5(I( | |
382 | + | let cA = d | |
383 | + | let df = d | |
384 | + | let cb = pow((db * dc), 0, toBigInt(5), 1, 0, DOWN) | |
385 | + | $Tuple5(I(cb, a), I(db, cY), I(dc, cZ), bA((cz + dc), (cx + db)), df) | |
392 | 386 | } | |
393 | 387 | else { | |
394 | - | let | |
395 | - | let | |
396 | - | let | |
397 | - | if (if (if ( | |
398 | - | then ( | |
388 | + | let cA = bA(cz, cx) | |
389 | + | let dg = fraction(P((cA - dd)), c, cA) | |
390 | + | let df = F(bG, a) | |
391 | + | if (if (if (cR) | |
392 | + | then (cA != d) | |
399 | 393 | else false) | |
400 | - | then ( | |
394 | + | then (dg > df) | |
401 | 395 | else false) | |
402 | - | then throw(((("Price slippage " + toString( | |
396 | + | then throw(((("Price slippage " + toString(dg)) + " > ") + toString(df))) | |
403 | 397 | else { | |
404 | - | let | |
405 | - | let | |
406 | - | let | |
407 | - | let | |
408 | - | then $Tuple2( | |
409 | - | else $Tuple2( | |
410 | - | let | |
411 | - | let | |
412 | - | let | |
413 | - | $Tuple5(I( | |
398 | + | let dh = F(da, a) | |
399 | + | let di = fraction(db, cA, c) | |
400 | + | let dj = fraction(dc, c, cA) | |
401 | + | let dk = if ((di > dc)) | |
402 | + | then $Tuple2(dj, dc) | |
403 | + | else $Tuple2(db, di) | |
404 | + | let dl = dk._1 | |
405 | + | let dm = dk._2 | |
406 | + | let cb = fraction(dh, dm, cz) | |
407 | + | $Tuple5(I(cb, a), I(dl, cY), I(dm, cZ), cA, df) | |
414 | 408 | } | |
415 | 409 | } | |
416 | - | let | |
417 | - | let | |
418 | - | let | |
419 | - | let | |
420 | - | let | |
421 | - | if ((0 >= | |
410 | + | let dn = de._1 | |
411 | + | let do = de._2 | |
412 | + | let dp = de._3 | |
413 | + | let cB = I(de._4, a) | |
414 | + | let dq = I(de._5, a) | |
415 | + | if ((0 >= dn)) | |
422 | 416 | then throw("LP <= 0") | |
423 | 417 | else { | |
424 | - | let | |
418 | + | let dr = if (!(cP)) | |
425 | 419 | then 0 | |
426 | - | else | |
427 | - | let | |
428 | - | let | |
429 | - | let | |
430 | - | then ( | |
420 | + | else dn | |
421 | + | let ds = (cK - do) | |
422 | + | let dt = (cM - dp) | |
423 | + | let du = if (if (cQ) | |
424 | + | then (cT == cU) | |
431 | 425 | else false) | |
432 | - | then $Tuple2( | |
433 | - | else if (if ( | |
434 | - | then ( | |
426 | + | then $Tuple2(cS, 0) | |
427 | + | else if (if (cQ) | |
428 | + | then (cT == cV) | |
435 | 429 | else false) | |
436 | - | then $Tuple2(0, | |
437 | - | else $Tuple2( | |
438 | - | let | |
439 | - | let | |
440 | - | let | |
441 | - | $Tuple13( | |
430 | + | then $Tuple2(0, cS) | |
431 | + | else $Tuple2(do, dp) | |
432 | + | let dv = du._1 | |
433 | + | let dw = du._2 | |
434 | + | let dx = [IntegerEntry(U(), cB), IntegerEntry(V(height, lastBlock.timestamp), cB), StringEntry(Y(co, cl), bj(dv, dw, dr, cB, bG, dq, height, lastBlock.timestamp, ds, dt))] | |
435 | + | $Tuple13(dn, dr, cB, cw, cy, da, cp, cu, dx, ds, dt, cL, cN) | |
442 | 436 | } | |
443 | 437 | } | |
444 | 438 | ||
445 | 439 | ||
446 | - | func | |
447 | - | let | |
448 | - | let | |
449 | - | let | |
450 | - | let | |
451 | - | let | |
452 | - | let | |
453 | - | let | |
454 | - | let | |
455 | - | let | |
456 | - | then | |
457 | - | else | |
458 | - | let | |
459 | - | if (if (if ( | |
440 | + | func dy (dz) = { | |
441 | + | let bX = aL() | |
442 | + | let dA = bX[u] | |
443 | + | let dB = bX[v] | |
444 | + | let cu = parseIntValue(bX[s]) | |
445 | + | let bY = parseIntValue(bX[w]) | |
446 | + | let bZ = parseIntValue(bX[x]) | |
447 | + | let dC = by(dA) | |
448 | + | let dD = by(dB) | |
449 | + | let cA = if ((dz.orderType == Buy)) | |
450 | + | then bO(bY, bZ, (dC + dz.amount), dD) | |
451 | + | else bO(bY, bZ, (dC - dz.amount), dD) | |
452 | + | let cB = I(cA, a) | |
453 | + | if (if (if (aI()) | |
460 | 454 | then true | |
461 | - | else ( | |
455 | + | else (cu == p)) | |
462 | 456 | then true | |
463 | - | else ( | |
457 | + | else (cu == q)) | |
464 | 458 | then throw("Admin blocked") | |
465 | 459 | else { | |
466 | - | let dG = dB.assetPair.amountAsset | |
460 | + | let dE = dz.assetPair.amountAsset | |
461 | + | let dF = if ((dE == unit)) | |
462 | + | then "WAVES" | |
463 | + | else toBase58String(value(dE)) | |
464 | + | let dG = dz.assetPair.priceAsset | |
467 | 465 | let dH = if ((dG == unit)) | |
468 | 466 | then "WAVES" | |
469 | 467 | else toBase58String(value(dG)) | |
470 | - | let dI = dB.assetPair.priceAsset | |
471 | - | let dJ = if ((dI == unit)) | |
472 | - | then "WAVES" | |
473 | - | else toBase58String(value(dI)) | |
474 | - | if (if ((dH != dC)) | |
468 | + | if (if ((dF != dA)) | |
475 | 469 | then true | |
476 | - | else ( | |
470 | + | else (dH != dB)) | |
477 | 471 | then throw("Wr assets") | |
478 | 472 | else { | |
479 | - | let | |
480 | - | let | |
481 | - | let | |
482 | - | let | |
483 | - | then ( | |
484 | - | else ( | |
473 | + | let dI = dz.price | |
474 | + | let cZ = fraction(a, bZ, bY) | |
475 | + | let dJ = L(dI, a, cZ) | |
476 | + | let dK = if ((dz.orderType == Buy)) | |
477 | + | then (cB >= dJ) | |
478 | + | else (dJ >= cB) | |
485 | 479 | true | |
486 | 480 | } | |
487 | 481 | } | |
488 | 482 | } | |
489 | 483 | ||
490 | 484 | ||
491 | - | func | |
485 | + | func dL (dM) = if ((size(dM.payments) != 1)) | |
492 | 486 | then throw("1 pmnt exp") | |
493 | 487 | else { | |
494 | - | let | |
495 | - | let | |
496 | - | let | |
497 | - | let | |
498 | - | let | |
499 | - | let | |
500 | - | let | |
501 | - | let | |
502 | - | if (if ( | |
488 | + | let dN = value(dM.payments[0]) | |
489 | + | let cm = value(dN.assetId) | |
490 | + | let cS = dN.amount | |
491 | + | let de = ck(toBase58String(dM.transactionId), toBase58String(cm), cS, dM.caller) | |
492 | + | let cG = de._1 | |
493 | + | let cH = de._2 | |
494 | + | let cu = parseIntValue(de._9) | |
495 | + | let cI = de._10 | |
496 | + | if (if (aI()) | |
503 | 497 | then true | |
504 | - | else ( | |
505 | - | then throw(("Admin blocked: " + toString( | |
506 | - | else $Tuple5( | |
498 | + | else (cu == q)) | |
499 | + | then throw(("Admin blocked: " + toString(cu))) | |
500 | + | else $Tuple5(cG, cH, cS, cm, cI) | |
507 | 501 | } | |
508 | 502 | ||
509 | 503 | ||
510 | - | func | |
511 | - | let | |
512 | - | let | |
513 | - | if (if (if ( | |
504 | + | func dO (dP,aa,dQ,dR,bG,cP,cQ,cR,cS,cT) = { | |
505 | + | let de = cJ(aa, bG, value(dQ).amount, value(dQ).assetId, value(dR).amount, value(dR).assetId, dP, (aa == ""), cP, cQ, cR, cS, cT) | |
506 | + | let cu = parseIntValue(de._8) | |
507 | + | if (if (if (aI()) | |
514 | 508 | then true | |
515 | - | else ( | |
509 | + | else (cu == o)) | |
516 | 510 | then true | |
517 | - | else ( | |
518 | - | then throw(("Blocked:" + toString( | |
519 | - | else | |
511 | + | else (cu == q)) | |
512 | + | then throw(("Blocked:" + toString(cu))) | |
513 | + | else de | |
520 | 514 | } | |
521 | 515 | ||
522 | 516 | ||
523 | - | func | |
524 | - | let | |
525 | - | let | |
526 | - | let | |
527 | - | let | |
528 | - | let | |
529 | - | let | |
530 | - | if (( | |
517 | + | func dS (dT) = { | |
518 | + | let dU = g | |
519 | + | let dV = dT[0] | |
520 | + | let dW = dT[1] | |
521 | + | let dX = parseBigIntValue(j) | |
522 | + | let dY = (parseBigIntValue(aH) * dX) | |
523 | + | let dZ = (dV + dW) | |
524 | + | if ((dZ == e)) | |
531 | 525 | then e | |
532 | 526 | else { | |
533 | - | let | |
534 | - | let | |
535 | - | let | |
536 | - | let | |
537 | - | let | |
538 | - | func | |
539 | - | let | |
540 | - | let | |
541 | - | let | |
542 | - | if (( | |
543 | - | then | |
527 | + | let ea = (dY * dU) | |
528 | + | let eb = (((dV * dW) * dU) * dU) | |
529 | + | let ec = ((ea * dZ) / dX) | |
530 | + | let ed = (ea - dX) | |
531 | + | let ee = (dU + f) | |
532 | + | func ef (eg,eh) = { | |
533 | + | let ei = eg | |
534 | + | let ej = ei._1 | |
535 | + | let ek = ei._2 | |
536 | + | if ((ek != unit)) | |
537 | + | then eg | |
544 | 538 | else { | |
545 | - | let | |
546 | - | let | |
547 | - | let | |
548 | - | if ((f >= | |
549 | - | then $Tuple2( | |
550 | - | else $Tuple2( | |
539 | + | let el = (((ej * ej) * ej) / eb) | |
540 | + | let em = (((ec + (el * dU)) * ej) / (((ed * ej) / dX) + (ee * el))) | |
541 | + | let en = Q((em - value(ej))) | |
542 | + | if ((f >= en)) | |
543 | + | then $Tuple2(em, eh) | |
544 | + | else $Tuple2(em, unit) | |
551 | 545 | } | |
552 | 546 | } | |
553 | 547 | ||
554 | - | let | |
555 | - | let | |
556 | - | let | |
557 | - | let | |
558 | - | let | |
559 | - | func | |
560 | - | then | |
561 | - | else | |
548 | + | let eo = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] | |
549 | + | let ep = { | |
550 | + | let eq = eo | |
551 | + | let er = size(eq) | |
552 | + | let es = $Tuple2(dZ, unit) | |
553 | + | func et (eu,ev) = if ((ev >= er)) | |
554 | + | then eu | |
555 | + | else ef(eu, eq[ev]) | |
562 | 556 | ||
563 | - | func | |
564 | - | then | |
557 | + | func ew (eu,ev) = if ((ev >= er)) | |
558 | + | then eu | |
565 | 559 | else throw("List size exceeds 15") | |
566 | 560 | ||
567 | - | | |
561 | + | ew(et(et(et(et(et(et(et(et(et(et(et(et(et(et(et(es, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
568 | 562 | } | |
569 | - | let | |
570 | - | let | |
571 | - | if (( | |
572 | - | then | |
573 | - | else throw(("D calculation error, D = " + toString( | |
563 | + | let ej = ep._1 | |
564 | + | let ek = ep._2 | |
565 | + | if ((ek != unit)) | |
566 | + | then ej | |
567 | + | else throw(("D calculation error, D = " + toString(ej))) | |
574 | 568 | } | |
575 | 569 | } | |
576 | 570 | ||
577 | 571 | ||
578 | - | func | |
579 | - | let | |
580 | - | let | |
572 | + | func ex (dT,dM,ey) = { | |
573 | + | let dU = g | |
574 | + | let ez = dT[if ((dM == 0)) | |
581 | 575 | then 1 | |
582 | 576 | else 0] | |
583 | - | let | |
584 | - | let | |
585 | - | let | |
586 | - | let | |
587 | - | let | |
588 | - | let | |
589 | - | func | |
590 | - | let | |
591 | - | let | |
592 | - | let | |
593 | - | if (( | |
594 | - | then | |
577 | + | let dX = parseBigIntValue(j) | |
578 | + | let dY = (parseBigIntValue(aH) * dX) | |
579 | + | let dZ = ez | |
580 | + | let ea = (dY * dU) | |
581 | + | let eA = (((((ey * ey) / (ez * dU)) * ey) * dX) / (ea * dU)) | |
582 | + | let eB = ((dZ + ((ey * dX) / ea)) - ey) | |
583 | + | func ef (eg,eh) = { | |
584 | + | let eC = eg | |
585 | + | let eD = eC._1 | |
586 | + | let ek = eC._2 | |
587 | + | if ((ek != unit)) | |
588 | + | then eg | |
595 | 589 | else { | |
596 | - | let | |
597 | - | let | |
598 | - | if ((f >= | |
599 | - | then $Tuple2( | |
600 | - | else $Tuple2( | |
590 | + | let eE = (((eD * eD) + eA) / ((g * eD) + eB)) | |
591 | + | let eF = Q((eE - value(eD))) | |
592 | + | if ((f >= eF)) | |
593 | + | then $Tuple2(eE, eh) | |
594 | + | else $Tuple2(eE, unit) | |
601 | 595 | } | |
602 | 596 | } | |
603 | 597 | ||
604 | - | let | |
605 | - | let | |
606 | - | let | |
607 | - | let | |
608 | - | let | |
609 | - | func | |
610 | - | then | |
611 | - | else | |
598 | + | let eo = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] | |
599 | + | let eG = { | |
600 | + | let eq = eo | |
601 | + | let er = size(eq) | |
602 | + | let es = $Tuple2(ey, unit) | |
603 | + | func et (eu,ev) = if ((ev >= er)) | |
604 | + | then eu | |
605 | + | else ef(eu, eq[ev]) | |
612 | 606 | ||
613 | - | func | |
614 | - | then | |
607 | + | func ew (eu,ev) = if ((ev >= er)) | |
608 | + | then eu | |
615 | 609 | else throw("List size exceeds 15") | |
616 | 610 | ||
617 | - | | |
611 | + | ew(et(et(et(et(et(et(et(et(et(et(et(et(et(et(et(es, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
618 | 612 | } | |
619 | - | let | |
620 | - | let | |
621 | - | if (( | |
622 | - | then | |
623 | - | else throw(("Y calculation error, Y = " + toString( | |
613 | + | let eD = eG._1 | |
614 | + | let ek = eG._2 | |
615 | + | if ((ek != unit)) | |
616 | + | then eD | |
617 | + | else throw(("Y calculation error, Y = " + toString(eD))) | |
624 | 618 | } | |
625 | 619 | ||
626 | 620 | ||
627 | - | func | |
628 | - | let | |
629 | - | let | |
630 | - | let | |
631 | - | let | |
632 | - | let | |
633 | - | let | |
634 | - | let | |
635 | - | let | |
621 | + | func eH (eI,cm,co,aa,eJ) = { | |
622 | + | let aT = aL() | |
623 | + | let cq = aT[u] | |
624 | + | let cr = aT[v] | |
625 | + | let cp = aT[t] | |
626 | + | let cY = parseIntValue(aT[w]) | |
627 | + | let cZ = parseIntValue(aT[x]) | |
628 | + | let eK = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(cp)), "invalid lp asset").quantity) | |
629 | + | let eL = if ((eK > e)) | |
636 | 630 | then true | |
637 | 631 | else throw("initial deposit requires all coins") | |
638 | - | if (( | |
632 | + | if ((eL == eL)) | |
639 | 633 | then { | |
640 | - | let | |
641 | - | let | |
642 | - | let | |
643 | - | then $Tuple2( | |
644 | - | else if (( | |
645 | - | then if (( | |
634 | + | let cw = by(cq) | |
635 | + | let cy = by(cr) | |
636 | + | let eM = if ((aa == "")) | |
637 | + | then $Tuple2(cw, cy) | |
638 | + | else if ((cm == cq)) | |
639 | + | then if ((eI > cw)) | |
646 | 640 | then throw("invalid payment amount") | |
647 | - | else $Tuple2(( | |
648 | - | else if (( | |
649 | - | then if (( | |
641 | + | else $Tuple2((cw - eI), cy) | |
642 | + | else if ((cm == cr)) | |
643 | + | then if ((eI > cy)) | |
650 | 644 | then throw("invalid payment amount") | |
651 | - | else $Tuple2( | |
645 | + | else $Tuple2(cw, (cy - eI)) | |
652 | 646 | else throw("wrong pmtAssetId") | |
653 | - | let | |
654 | - | let | |
655 | - | let | |
656 | - | then $Tuple2( | |
657 | - | else if (( | |
658 | - | then $Tuple2(0, | |
647 | + | let eN = eM._1 | |
648 | + | let eO = eM._2 | |
649 | + | let eP = if ((cm == cq)) | |
650 | + | then $Tuple2(eI, 0) | |
651 | + | else if ((cm == cr)) | |
652 | + | then $Tuple2(0, eI) | |
659 | 653 | else throw("invalid payment") | |
660 | - | let | |
661 | - | let | |
662 | - | let | |
663 | - | then $Tuple3( | |
664 | - | else $Tuple3( | |
665 | - | let | |
666 | - | let | |
667 | - | let | |
668 | - | let | |
669 | - | let | |
670 | - | let | |
671 | - | let | |
672 | - | let | |
654 | + | let eQ = eP._1 | |
655 | + | let eR = eP._2 | |
656 | + | let eS = if (eJ) | |
657 | + | then $Tuple3(cg(eQ, aE)._1, cg(eR, aE)._1, cg(eI, aE)._2) | |
658 | + | else $Tuple3(eQ, eR, 0) | |
659 | + | let eT = eS._1 | |
660 | + | let eU = eS._2 | |
661 | + | let cj = eS._3 | |
662 | + | let eV = (eN + eT) | |
663 | + | let eW = (eO + eU) | |
664 | + | let bL = dS([toBigInt(eN), toBigInt(eO)]) | |
665 | + | let bK = dS([toBigInt(eV), toBigInt(eW)]) | |
666 | + | let eX = if ((bK > bL)) | |
673 | 667 | then true | |
674 | 668 | else throw() | |
675 | - | if (( | |
669 | + | if ((eX == eX)) | |
676 | 670 | then { | |
677 | - | let | |
678 | - | let | |
679 | - | let | |
680 | - | let | |
681 | - | let | |
682 | - | let | |
683 | - | let | |
684 | - | let | |
685 | - | $Tuple4(toInt( | |
671 | + | let eY = fraction(eK, (bK - bL), bL) | |
672 | + | let cB = I(bA(F(eW, cZ), F(eV, cY)), a) | |
673 | + | let dx = [IntegerEntry(U(), cB), IntegerEntry(V(height, lastBlock.timestamp), cB), StringEntry(Y(co, aa), bj(eQ, eR, toInt(eY), cB, 0, 0, height, lastBlock.timestamp, 0, 0))] | |
674 | + | let eZ = fraction(eO, a, eN) | |
675 | + | let fa = fraction(eI, a, (eZ + a)) | |
676 | + | let fb = (eI - fa) | |
677 | + | let fc = fraction(eK, toBigInt(fb), toBigInt(eO)) | |
678 | + | let fd = toInt(fraction((eY - fc), b, fc)) | |
679 | + | $Tuple4(toInt(eY), dx, cj, fd) | |
686 | 680 | } | |
687 | 681 | else throw("Strict value is not equal to itself.") | |
688 | 682 | } | |
689 | 683 | else throw("Strict value is not equal to itself.") | |
690 | 684 | } | |
691 | 685 | ||
692 | 686 | ||
693 | - | func | |
694 | - | let | |
695 | - | let | |
696 | - | let | |
697 | - | let | |
698 | - | let | |
699 | - | let | |
700 | - | let | |
701 | - | let | |
702 | - | then | |
703 | - | else | |
704 | - | let | |
705 | - | let | |
706 | - | let | |
707 | - | let | |
708 | - | if (( | |
687 | + | func fe (ff,fg,fh,dP,fi,fj) = { | |
688 | + | let aT = aL() | |
689 | + | let cp = aT[t] | |
690 | + | let cq = aT[u] | |
691 | + | let cr = aT[v] | |
692 | + | let fk = parseIntValue(aT[w]) | |
693 | + | let fl = parseIntValue(aT[x]) | |
694 | + | let fm = aT[s] | |
695 | + | let co = if ((dP == bi)) | |
696 | + | then fi | |
697 | + | else dP | |
698 | + | let dN = value(fh[0]) | |
699 | + | let cm = value(dN.assetId) | |
700 | + | let cS = dN.amount | |
701 | + | let cl = toBase58String(fj) | |
702 | + | if ((cp != toBase58String(cm))) | |
709 | 703 | then throw("Wrong LP") | |
710 | 704 | else { | |
711 | - | let | |
712 | - | let | |
713 | - | let | |
714 | - | let | |
715 | - | if ($isInstanceOf( | |
716 | - | then | |
717 | - | else throw(($getType( | |
705 | + | let cw = by(cq) | |
706 | + | let cy = by(cr) | |
707 | + | let fn = { | |
708 | + | let aF = invoke(this, "getOneTknV2READONLY", [ff, cS], nil) | |
709 | + | if ($isInstanceOf(aF, "(Int, Int)")) | |
710 | + | then aF | |
711 | + | else throw(($getType(aF) + " couldn't be cast to (Int, Int)")) | |
718 | 712 | } | |
719 | - | if (( | |
713 | + | if ((fn == fn)) | |
720 | 714 | then { | |
721 | - | let | |
722 | - | let | |
723 | - | let | |
724 | - | then ( | |
715 | + | let cj = fn._2 | |
716 | + | let fo = fn._1 | |
717 | + | let fp = if (if ((fg > 0)) | |
718 | + | then (fg > fo) | |
725 | 719 | else false) | |
726 | - | then | |
727 | - | else | |
728 | - | let | |
729 | - | then $Tuple4( | |
730 | - | else if (( | |
731 | - | then $Tuple4(0, | |
720 | + | then aB(makeString(["amount to receive is less than ", toString(fg)], "")) | |
721 | + | else fo | |
722 | + | let fq = if ((ff == cq)) | |
723 | + | then $Tuple4(fp, 0, ((cw - fp) - cj), cy) | |
724 | + | else if ((ff == cr)) | |
725 | + | then $Tuple4(0, fp, cw, ((cy - fp) - cj)) | |
732 | 726 | else throw("invalid out asset id") | |
733 | - | let | |
734 | - | let | |
735 | - | let | |
736 | - | let | |
737 | - | let | |
738 | - | let | |
739 | - | let | |
727 | + | let fr = fq._1 | |
728 | + | let fs = fq._2 | |
729 | + | let eV = fq._3 | |
730 | + | let eW = fq._4 | |
731 | + | let ft = bA(F(eW, fl), F(eV, fk)) | |
732 | + | let fu = I(ft, a) | |
733 | + | let fv = if ((ff == "WAVES")) | |
740 | 734 | then unit | |
741 | - | else fromBase58String( | |
742 | - | let | |
743 | - | then [ScriptTransfer( | |
735 | + | else fromBase58String(ff) | |
736 | + | let fw = if ((cj > 0)) | |
737 | + | then [ScriptTransfer(aK, cj, fv)] | |
744 | 738 | else nil | |
745 | - | let | |
746 | - | if (( | |
739 | + | let cI = ([ScriptTransfer(co, fp, fv), StringEntry(ab(toString(co), cl), bu(fr, fs, cS, fu, height, lastBlock.timestamp)), IntegerEntry(U(), fu), IntegerEntry(V(height, lastBlock.timestamp), fu)] ++ fw) | |
740 | + | if ((cI == cI)) | |
747 | 741 | then { | |
748 | - | let | |
749 | - | if (( | |
750 | - | then $Tuple2( | |
742 | + | let fx = invoke(aD, "burn", [cS], [AttachedPayment(cm, cS)]) | |
743 | + | if ((fx == fx)) | |
744 | + | then $Tuple2(cI, fp) | |
751 | 745 | else throw("Strict value is not equal to itself.") | |
752 | 746 | } | |
753 | 747 | else throw("Strict value is not equal to itself.") | |
754 | 748 | } | |
755 | 749 | else throw("Strict value is not equal to itself.") | |
756 | 750 | } | |
757 | 751 | } | |
758 | 752 | ||
759 | 753 | ||
760 | - | func | |
761 | - | let | |
762 | - | if ($isInstanceOf( | |
754 | + | func fy () = { | |
755 | + | let av = getString(S()) | |
756 | + | if ($isInstanceOf(av, "String")) | |
763 | 757 | then { | |
764 | - | let | |
765 | - | fromBase58String( | |
758 | + | let dZ = av | |
759 | + | fromBase58String(dZ) | |
766 | 760 | } | |
767 | - | else if ($isInstanceOf( | |
761 | + | else if ($isInstanceOf(av, "Unit")) | |
768 | 762 | then unit | |
769 | 763 | else throw("Match error") | |
770 | 764 | } | |
771 | 765 | ||
772 | 766 | ||
773 | - | func | |
774 | - | let | |
775 | - | if ($isInstanceOf( | |
767 | + | func fz () = { | |
768 | + | let av = getString(T()) | |
769 | + | if ($isInstanceOf(av, "String")) | |
776 | 770 | then { | |
777 | - | let | |
778 | - | fromBase58String( | |
771 | + | let dZ = av | |
772 | + | fromBase58String(dZ) | |
779 | 773 | } | |
780 | - | else if ($isInstanceOf( | |
774 | + | else if ($isInstanceOf(av, "Unit")) | |
781 | 775 | then unit | |
782 | 776 | else throw("Match error") | |
783 | 777 | } | |
784 | 778 | ||
785 | 779 | ||
786 | - | let | |
780 | + | let fA = throw("Permission denied") | |
787 | 781 | ||
788 | - | func | |
789 | - | let | |
790 | - | if ($isInstanceOf( | |
782 | + | func fB (dM) = { | |
783 | + | let av = fy() | |
784 | + | if ($isInstanceOf(av, "ByteVector")) | |
791 | 785 | then { | |
792 | - | let | |
793 | - | ( | |
786 | + | let fC = av | |
787 | + | (dM.callerPublicKey == fC) | |
794 | 788 | } | |
795 | - | else if ($isInstanceOf( | |
796 | - | then ( | |
789 | + | else if ($isInstanceOf(av, "Unit")) | |
790 | + | then (dM.caller == this) | |
797 | 791 | else throw("Match error") | |
798 | 792 | } | |
799 | 793 | ||
800 | 794 | ||
801 | - | func | |
802 | - | let | |
803 | - | if ($isInstanceOf( | |
795 | + | func fD (dM) = { | |
796 | + | let av = fy() | |
797 | + | if ($isInstanceOf(av, "ByteVector")) | |
804 | 798 | then { | |
805 | - | let | |
806 | - | if (( | |
799 | + | let fC = av | |
800 | + | if ((dM.callerPublicKey == fC)) | |
807 | 801 | then true | |
808 | - | else | |
802 | + | else fA | |
809 | 803 | } | |
810 | - | else if ($isInstanceOf( | |
811 | - | then if (( | |
804 | + | else if ($isInstanceOf(av, "Unit")) | |
805 | + | then if ((dM.caller == this)) | |
812 | 806 | then true | |
813 | - | else | |
807 | + | else fA | |
814 | 808 | else throw("Match error") | |
815 | 809 | } | |
816 | 810 | ||
817 | 811 | ||
818 | - | func fG (fH,eA,fI) = { | |
819 | - | let aV = aN() | |
820 | - | let cs = aV[u] | |
821 | - | let ct = aV[v] | |
822 | - | let dW = g | |
823 | - | let dZ = parseBigIntValue(j) | |
824 | - | let ea = (parseBigIntValue(aJ) * dZ) | |
825 | - | let dV = if ((fH == false)) | |
826 | - | then [(toBigInt(bA(cs)) - fI), toBigInt(bA(ct))] | |
827 | - | else [(toBigInt(bA(ct)) - fI), toBigInt(bA(cs))] | |
828 | - | let eB = dV[0] | |
829 | - | let eb = eB | |
830 | - | let ec = (ea * dW) | |
831 | - | let eC = (((((eA * eA) / (eB * dW)) * eA) * dZ) / (ec * dW)) | |
832 | - | let eD = ((eb + ((eA * dZ) / ec)) - eA) | |
833 | - | func eh (ei,ej) = { | |
834 | - | let fJ = ei | |
835 | - | let eF = fJ._1 | |
836 | - | let em = fJ._2 | |
837 | - | if ((em != unit)) | |
838 | - | then ei | |
839 | - | else { | |
840 | - | let eG = (((eF * eF) + eC) / ((g * eF) + eD)) | |
841 | - | let eH = Q((eG - value(eF))) | |
842 | - | if ((f >= eH)) | |
843 | - | then $Tuple2(eG, ej) | |
844 | - | else $Tuple2(eG, unit) | |
845 | - | } | |
846 | - | } | |
847 | - | ||
848 | - | let eq = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] | |
849 | - | let fK = { | |
850 | - | let es = eq | |
851 | - | let et = size(es) | |
852 | - | let eu = $Tuple2(eA, unit) | |
853 | - | func ev (ew,ex) = if ((ex >= et)) | |
854 | - | then ew | |
855 | - | else eh(ew, es[ex]) | |
856 | - | ||
857 | - | func ey (ew,ex) = if ((ex >= et)) | |
858 | - | then ew | |
859 | - | else throw("List size exceeds 15") | |
860 | - | ||
861 | - | ey(ev(ev(ev(ev(ev(ev(ev(ev(ev(ev(ev(ev(ev(ev(ev(eu, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
862 | - | } | |
863 | - | let eF = fK._1 | |
864 | - | let em = fK._2 | |
865 | - | if ((em != unit)) | |
866 | - | then eF | |
867 | - | else throw(("Y calculation error, Y = " + toString(eF))) | |
812 | + | @Callable(dM) | |
813 | + | func constructor (R) = { | |
814 | + | let eA = fD(dM) | |
815 | + | if ((eA == eA)) | |
816 | + | then [StringEntry(R(), R)] | |
817 | + | else throw("Strict value is not equal to itself.") | |
868 | 818 | } | |
869 | 819 | ||
870 | 820 | ||
871 | - | @Callable(dO) | |
872 | - | func calculateAmountOutForSwapAndSendTokens (fL,fH,fM,fN) = { | |
873 | - | let fO = [if ((value(dO.payments[0]).amount >= fL)) | |
874 | - | then true | |
875 | - | else aD("Wrong amount"), if ((dO.caller == addressFromStringValue(ay(ag())))) | |
876 | - | then true | |
877 | - | else aD("Permission denied")] | |
878 | - | if ((fO == fO)) | |
821 | + | ||
822 | + | @Callable(dM) | |
823 | + | func setManager (fE) = { | |
824 | + | let eA = fD(dM) | |
825 | + | if ((eA == eA)) | |
879 | 826 | then { | |
880 | - | let dP = value(dO.payments[0]) | |
881 | - | let fP = toBase58String(value(dP.assetId)) | |
882 | - | let fQ = if ((fH == false)) | |
883 | - | then { | |
884 | - | let fR = 1 | |
885 | - | let fS = ay(ad()) | |
886 | - | let fI = (bA(fP) - value(dO.payments[0]).amount) | |
887 | - | $Tuple3(fS, fR, fI) | |
888 | - | } | |
889 | - | else { | |
890 | - | let fR = 0 | |
891 | - | let fS = ay(ac()) | |
892 | - | let fI = (bA(fP) - value(dO.payments[0]).amount) | |
893 | - | $Tuple3(fS, fR, fI) | |
894 | - | } | |
895 | - | let fS = fQ._1 | |
896 | - | let fR = fQ._2 | |
897 | - | let fI = fQ._3 | |
898 | - | let aV = aN() | |
899 | - | let cs = aV[u] | |
900 | - | let ct = aV[v] | |
901 | - | let dV = [(toBigInt(bA(cs)) - toBigInt(value(dO.payments[0]).amount)), toBigInt(bA(ct))] | |
902 | - | let eA = dU(dV) | |
903 | - | let eF = fG(fH, eA, toBigInt(fI)) | |
904 | - | let eB = (toBigInt(fI) + toBigInt(fL)) | |
905 | - | let fT = ((toBigInt(bA(fS)) - eF) - toBigInt(1)) | |
906 | - | let fU = max([0, toInt(fT)]) | |
907 | - | let fV = [(fM >= fU), throw("Exchange resulted in fewer coins than expected")] | |
908 | - | if ((fV == fV)) | |
909 | - | then [ScriptTransfer(addressFromStringValue(fN), toInt(fT), fromBase58String(fS))] | |
827 | + | let fF = fromBase58String(fE) | |
828 | + | if ((fF == fF)) | |
829 | + | then [StringEntry(T(), fE)] | |
910 | 830 | else throw("Strict value is not equal to itself.") | |
911 | 831 | } | |
912 | 832 | else throw("Strict value is not equal to itself.") | |
913 | 833 | } | |
914 | 834 | ||
915 | 835 | ||
916 | 836 | ||
917 | - | @Callable(dO) | |
918 | - | func setSwapContract (fW) = { | |
919 | - | let fX = fF(dO) | |
920 | - | if ((fX == fX)) | |
921 | - | then [StringEntry(ag(), fW)] | |
922 | - | else throw("Strict value is not equal to itself.") | |
923 | - | } | |
924 | - | ||
925 | - | ||
926 | - | ||
927 | - | @Callable(dO) | |
928 | - | func constructor (R) = { | |
929 | - | let eC = fF(dO) | |
930 | - | if ((eC == eC)) | |
931 | - | then [StringEntry(R(), R)] | |
932 | - | else throw("Strict value is not equal to itself.") | |
933 | - | } | |
934 | - | ||
935 | - | ||
936 | - | ||
937 | - | @Callable(dO) | |
938 | - | func setManager (fY) = { | |
939 | - | let eC = fF(dO) | |
940 | - | if ((eC == eC)) | |
837 | + | @Callable(dM) | |
838 | + | func confirmManager () = { | |
839 | + | let cf = fz() | |
840 | + | let fG = if (isDefined(cf)) | |
841 | + | then true | |
842 | + | else throw("No pending manager") | |
843 | + | if ((fG == fG)) | |
941 | 844 | then { | |
942 | - | let fZ = fromBase58String(fY) | |
943 | - | if ((fZ == fZ)) | |
944 | - | then [StringEntry(T(), fY)] | |
845 | + | let fH = if ((dM.callerPublicKey == value(cf))) | |
846 | + | then true | |
847 | + | else throw("You are not pending manager") | |
848 | + | if ((fH == fH)) | |
849 | + | then [StringEntry(S(), toBase58String(value(cf))), DeleteEntry(T())] | |
945 | 850 | else throw("Strict value is not equal to itself.") | |
946 | 851 | } | |
947 | 852 | else throw("Strict value is not equal to itself.") | |
948 | 853 | } | |
949 | 854 | ||
950 | 855 | ||
951 | 856 | ||
952 | - | @Callable(dO) | |
953 | - | func confirmManager () = { | |
954 | - | let ch = fB() | |
955 | - | let ga = if (isDefined(ch)) | |
956 | - | then true | |
957 | - | else throw("No pending manager") | |
958 | - | if ((ga == ga)) | |
959 | - | then { | |
960 | - | let gb = if ((dO.callerPublicKey == value(ch))) | |
961 | - | then true | |
962 | - | else throw("You are not pending manager") | |
963 | - | if ((gb == gb)) | |
964 | - | then [StringEntry(S(), toBase58String(value(ch))), DeleteEntry(T())] | |
965 | - | else throw("Strict value is not equal to itself.") | |
966 | - | } | |
967 | - | else throw("Strict value is not equal to itself.") | |
968 | - | } | |
969 | - | ||
970 | - | ||
971 | - | ||
972 | - | @Callable(dO) | |
973 | - | func put (gc,gd) = { | |
974 | - | let ge = bf() | |
975 | - | let gf = valueOrErrorMessage(addressFromString(ge[A]), "Wr st addr") | |
976 | - | let gg = valueOrErrorMessage(addressFromString(ge[C]), "Wr sl addr") | |
977 | - | if ((0 > gc)) | |
857 | + | @Callable(dM) | |
858 | + | func put (fI,fJ) = { | |
859 | + | let fK = bd() | |
860 | + | let fL = valueOrErrorMessage(addressFromString(fK[A]), "Wr st addr") | |
861 | + | let fM = valueOrErrorMessage(addressFromString(fK[C]), "Wr sl addr") | |
862 | + | if ((0 > fI)) | |
978 | 863 | then throw("Wrong slippage") | |
979 | - | else if ((size( | |
864 | + | else if ((size(dM.payments) != 2)) | |
980 | 865 | then throw("2 pmnts expd") | |
981 | 866 | else { | |
982 | - | let | |
983 | - | let | |
984 | - | let | |
985 | - | let | |
986 | - | let | |
987 | - | let | |
988 | - | let | |
989 | - | let | |
990 | - | let | |
991 | - | if (( | |
867 | + | let fN = dO(toString(dM.caller), toBase58String(dM.transactionId), AttachedPayment(value(dM.payments[0]).assetId, value(dM.payments[0]).amount), dM.payments[1], fI, true, false, true, 0, "") | |
868 | + | let dr = fN._2 | |
869 | + | let fO = fN._7 | |
870 | + | let cI = fN._9 | |
871 | + | let ds = fN._10 | |
872 | + | let dt = fN._11 | |
873 | + | let cq = fN._12 | |
874 | + | let cr = fN._13 | |
875 | + | let de = invoke(aD, "emit", [dr], nil) | |
876 | + | if ((de == de)) | |
992 | 877 | then { | |
993 | - | let | |
994 | - | let | |
995 | - | if ($isInstanceOf( | |
878 | + | let fP = { | |
879 | + | let av = de | |
880 | + | if ($isInstanceOf(av, "Address")) | |
996 | 881 | then { | |
997 | - | let | |
998 | - | invoke( | |
882 | + | let fQ = av | |
883 | + | invoke(fQ, "emit", [dr], nil) | |
999 | 884 | } | |
1000 | 885 | else unit | |
1001 | 886 | } | |
1002 | - | if (( | |
887 | + | if ((fP == fP)) | |
1003 | 888 | then { | |
1004 | - | let | |
1005 | - | then invoke( | |
889 | + | let fR = if ((ds > 0)) | |
890 | + | then invoke(fM, "put", nil, [AttachedPayment(cq, ds)]) | |
1006 | 891 | else nil | |
1007 | - | if (( | |
892 | + | if ((fR == fR)) | |
1008 | 893 | then { | |
1009 | - | let | |
1010 | - | then invoke( | |
894 | + | let fS = if ((dt > 0)) | |
895 | + | then invoke(fM, "put", nil, [AttachedPayment(cr, dt)]) | |
1011 | 896 | else nil | |
1012 | - | if (( | |
897 | + | if ((fS == fS)) | |
1013 | 898 | then { | |
1014 | - | let | |
899 | + | let fT = if (fJ) | |
1015 | 900 | then { | |
1016 | - | let | |
1017 | - | if (( | |
901 | + | let fU = invoke(fL, "stake", nil, [AttachedPayment(fO, dr)]) | |
902 | + | if ((fU == fU)) | |
1018 | 903 | then nil | |
1019 | 904 | else throw("Strict value is not equal to itself.") | |
1020 | 905 | } | |
1021 | - | else [ScriptTransfer( | |
1022 | - | ( | |
906 | + | else [ScriptTransfer(dM.caller, dr, fO)] | |
907 | + | (cI ++ fT) | |
1023 | 908 | } | |
1024 | 909 | else throw("Strict value is not equal to itself.") | |
1025 | 910 | } | |
1026 | 911 | else throw("Strict value is not equal to itself.") | |
1027 | 912 | } | |
1028 | 913 | else throw("Strict value is not equal to itself.") | |
1029 | 914 | } | |
1030 | 915 | else throw("Strict value is not equal to itself.") | |
1031 | 916 | } | |
1032 | 917 | } | |
1033 | 918 | ||
1034 | 919 | ||
1035 | 920 | ||
1036 | - | @Callable( | |
1037 | - | func putOneTknV2 ( | |
1038 | - | let | |
1039 | - | let | |
1040 | - | if ($isInstanceOf( | |
1041 | - | then | |
1042 | - | else throw(($getType( | |
921 | + | @Callable(dM) | |
922 | + | func putOneTknV2 (fg,fJ) = { | |
923 | + | let fV = { | |
924 | + | let aF = invoke(aD, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
925 | + | if ($isInstanceOf(aF, "Boolean")) | |
926 | + | then aF | |
927 | + | else throw(($getType(aF) + " couldn't be cast to Boolean")) | |
1043 | 928 | } | |
1044 | - | let | |
929 | + | let fW = if (if (if (aI()) | |
1045 | 930 | then true | |
1046 | - | else ( | |
931 | + | else (aX == o)) | |
1047 | 932 | then true | |
1048 | - | else ( | |
933 | + | else (aX == q)) | |
1049 | 934 | then true | |
1050 | - | else | |
1051 | - | let | |
935 | + | else fV | |
936 | + | let fX = [if (if (!(fW)) | |
1052 | 937 | then true | |
1053 | - | else | |
938 | + | else fB(dM)) | |
1054 | 939 | then true | |
1055 | - | else | |
940 | + | else aB("put operation is blocked by admin"), if ((size(dM.payments) == 1)) | |
1056 | 941 | then true | |
1057 | - | else | |
1058 | - | if (( | |
942 | + | else aB("exactly 1 payment are expected")] | |
943 | + | if ((fX == fX)) | |
1059 | 944 | then { | |
1060 | - | let | |
1061 | - | let | |
1062 | - | let | |
1063 | - | let | |
1064 | - | let | |
1065 | - | let | |
1066 | - | let | |
1067 | - | then | |
1068 | - | else | |
1069 | - | let | |
1070 | - | let | |
1071 | - | let | |
1072 | - | let | |
1073 | - | if (( | |
945 | + | let aT = aL() | |
946 | + | let cq = aT[u] | |
947 | + | let cr = aT[v] | |
948 | + | let cp = fromBase58String(aT[t]) | |
949 | + | let fk = parseIntValue(aT[w]) | |
950 | + | let fl = parseIntValue(aT[x]) | |
951 | + | let co = if ((dM.caller == this)) | |
952 | + | then dM.originCaller | |
953 | + | else dM.caller | |
954 | + | let dN = value(dM.payments[0]) | |
955 | + | let cm = toBase58String(value(dN.assetId)) | |
956 | + | let cS = dN.amount | |
957 | + | let fY = eH(cS, cm, toString(co), toBase58String(dM.transactionId), true) | |
958 | + | if ((fY == fY)) | |
1074 | 959 | then { | |
1075 | - | let | |
1076 | - | let | |
1077 | - | let | |
1078 | - | let | |
1079 | - | then ( | |
960 | + | let cj = fY._3 | |
961 | + | let cI = fY._2 | |
962 | + | let fZ = fY._1 | |
963 | + | let dr = if (if ((fg > 0)) | |
964 | + | then (fg > fZ) | |
1080 | 965 | else false) | |
1081 | - | then | |
1082 | - | else | |
1083 | - | let | |
1084 | - | if (( | |
966 | + | then aB(makeString(["amount to receive is less than ", toString(fg)], "")) | |
967 | + | else fZ | |
968 | + | let fN = invoke(aD, "emit", [dr], nil) | |
969 | + | if ((fN == fN)) | |
1085 | 970 | then { | |
1086 | - | let | |
1087 | - | let | |
1088 | - | if ($isInstanceOf( | |
971 | + | let fP = { | |
972 | + | let av = fN | |
973 | + | if ($isInstanceOf(av, "Address")) | |
1089 | 974 | then { | |
1090 | - | let | |
1091 | - | invoke( | |
975 | + | let fQ = av | |
976 | + | invoke(fQ, "emit", [dr], nil) | |
1092 | 977 | } | |
1093 | 978 | else unit | |
1094 | 979 | } | |
1095 | - | if (( | |
980 | + | if ((fP == fP)) | |
1096 | 981 | then { | |
1097 | - | let | |
982 | + | let fT = if (fJ) | |
1098 | 983 | then { | |
1099 | - | let | |
1100 | - | if (( | |
984 | + | let fU = invoke(bf, "stake", nil, [AttachedPayment(cp, dr)]) | |
985 | + | if ((fU == fU)) | |
1101 | 986 | then nil | |
1102 | 987 | else throw("Strict value is not equal to itself.") | |
1103 | 988 | } | |
1104 | - | else [ScriptTransfer( | |
1105 | - | let | |
1106 | - | then [ScriptTransfer( | |
989 | + | else [ScriptTransfer(dM.caller, dr, cp)] | |
990 | + | let fw = if ((cj > 0)) | |
991 | + | then [ScriptTransfer(aK, cj, fromBase58String(cm))] | |
1107 | 992 | else nil | |
1108 | - | $Tuple2((( | |
993 | + | $Tuple2(((cI ++ fT) ++ fw), dr) | |
1109 | 994 | } | |
1110 | 995 | else throw("Strict value is not equal to itself.") | |
1111 | 996 | } | |
1112 | 997 | else throw("Strict value is not equal to itself.") | |
1113 | 998 | } | |
1114 | 999 | else throw("Strict value is not equal to itself.") | |
1115 | 1000 | } | |
1116 | 1001 | else throw("Strict value is not equal to itself.") | |
1117 | 1002 | } | |
1118 | 1003 | ||
1119 | 1004 | ||
1120 | 1005 | ||
1121 | - | @Callable( | |
1122 | - | func putForFree ( | |
1006 | + | @Callable(dM) | |
1007 | + | func putForFree (ga) = if ((0 > ga)) | |
1123 | 1008 | then throw("Wrong slpg") | |
1124 | - | else if ((size( | |
1009 | + | else if ((size(dM.payments) != 2)) | |
1125 | 1010 | then throw("2 pmnts expd") | |
1126 | 1011 | else { | |
1127 | - | let | |
1128 | - | | |
1012 | + | let gb = dO(toString(dM.caller), toBase58String(dM.transactionId), AttachedPayment(value(dM.payments[0]).assetId, value(dM.payments[0]).amount), dM.payments[1], ga, false, false, true, 0, "") | |
1013 | + | gb._9 | |
1129 | 1014 | } | |
1130 | 1015 | ||
1131 | 1016 | ||
1132 | 1017 | ||
1133 | - | @Callable( | |
1018 | + | @Callable(dM) | |
1134 | 1019 | func get () = { | |
1135 | - | let | |
1136 | - | let | |
1137 | - | let | |
1138 | - | let | |
1139 | - | let | |
1140 | - | let | |
1141 | - | let | |
1142 | - | if (( | |
1143 | - | then | |
1020 | + | let de = dL(dM) | |
1021 | + | let gc = de._1 | |
1022 | + | let cH = de._2 | |
1023 | + | let cS = de._3 | |
1024 | + | let cm = de._4 | |
1025 | + | let cI = de._5 | |
1026 | + | let eB = invoke(aD, "burn", [cS], [AttachedPayment(cm, cS)]) | |
1027 | + | if ((eB == eB)) | |
1028 | + | then cI | |
1144 | 1029 | else throw("Strict value is not equal to itself.") | |
1145 | 1030 | } | |
1146 | 1031 | ||
1147 | 1032 | ||
1148 | 1033 | ||
1149 | - | @Callable( | |
1150 | - | func getOneTknV2 ( | |
1151 | - | let | |
1152 | - | let | |
1153 | - | if ($isInstanceOf( | |
1154 | - | then | |
1155 | - | else throw(($getType( | |
1034 | + | @Callable(dM) | |
1035 | + | func getOneTknV2 (ff,fg) = { | |
1036 | + | let fV = { | |
1037 | + | let aF = invoke(aD, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1038 | + | if ($isInstanceOf(aF, "Boolean")) | |
1039 | + | then aF | |
1040 | + | else throw(($getType(aF) + " couldn't be cast to Boolean")) | |
1156 | 1041 | } | |
1157 | - | let | |
1042 | + | let gd = if (if (aI()) | |
1158 | 1043 | then true | |
1159 | - | else ( | |
1044 | + | else (aX == q)) | |
1160 | 1045 | then true | |
1161 | - | else | |
1162 | - | let | |
1046 | + | else fV | |
1047 | + | let fX = [if (if (!(gd)) | |
1163 | 1048 | then true | |
1164 | - | else | |
1049 | + | else fB(dM)) | |
1165 | 1050 | then true | |
1166 | - | else | |
1051 | + | else aB("get operation is blocked by admin"), if ((size(dM.payments) == 1)) | |
1167 | 1052 | then true | |
1168 | - | else | |
1169 | - | if (( | |
1053 | + | else aB("exactly 1 payment are expected")] | |
1054 | + | if ((fX == fX)) | |
1170 | 1055 | then { | |
1171 | - | let | |
1172 | - | let | |
1173 | - | let | |
1174 | - | $Tuple2( | |
1056 | + | let ge = fe(ff, fg, dM.payments, dM.caller, dM.originCaller, dM.transactionId) | |
1057 | + | let cI = ge._1 | |
1058 | + | let fp = ge._2 | |
1059 | + | $Tuple2(cI, fp) | |
1175 | 1060 | } | |
1176 | 1061 | else throw("Strict value is not equal to itself.") | |
1177 | 1062 | } | |
1178 | 1063 | ||
1179 | 1064 | ||
1180 | 1065 | ||
1181 | - | @Callable( | |
1182 | - | func getOneTknV2READONLY ( | |
1183 | - | let | |
1184 | - | let | |
1185 | - | let | |
1186 | - | let | |
1187 | - | let | |
1188 | - | let | |
1189 | - | let | |
1190 | - | let | |
1191 | - | let | |
1066 | + | @Callable(dM) | |
1067 | + | func getOneTknV2READONLY (ff,gf) = { | |
1068 | + | let aT = aL() | |
1069 | + | let cq = aT[u] | |
1070 | + | let cr = aT[v] | |
1071 | + | let cp = aT[t] | |
1072 | + | let dT = [toBigInt(by(cq)), toBigInt(by(cr))] | |
1073 | + | let gg = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(cp)), "invalid lp asset").quantity) | |
1074 | + | let bL = dS(dT) | |
1075 | + | let bK = (bL - fraction(toBigInt(gf), bL, gg)) | |
1076 | + | let gh = if ((ff == cq)) | |
1192 | 1077 | then 0 | |
1193 | - | else if (( | |
1078 | + | else if ((ff == cr)) | |
1194 | 1079 | then 1 | |
1195 | 1080 | else throw("invalid out asset id") | |
1196 | - | let | |
1197 | - | let | |
1198 | - | let | |
1199 | - | let | |
1200 | - | let | |
1201 | - | let | |
1202 | - | $Tuple2(nil, $Tuple2( | |
1081 | + | let gi = ex(dT, gh, bK) | |
1082 | + | let gj = (dT[gh] - gi) | |
1083 | + | let gk = max([0, toInt((gj - f))]) | |
1084 | + | let gl = cg(gk, aG) | |
1085 | + | let fo = gl._1 | |
1086 | + | let cj = gl._2 | |
1087 | + | $Tuple2(nil, $Tuple2(fo, cj)) | |
1203 | 1088 | } | |
1204 | 1089 | ||
1205 | 1090 | ||
1206 | 1091 | ||
1207 | - | @Callable( | |
1208 | - | func getOneTknV2WithBonusREADONLY ( | |
1209 | - | let | |
1210 | - | let | |
1211 | - | let | |
1212 | - | let | |
1213 | - | let | |
1214 | - | let | |
1215 | - | let | |
1216 | - | let | |
1217 | - | if ($isInstanceOf( | |
1218 | - | then | |
1219 | - | else throw(($getType( | |
1092 | + | @Callable(dM) | |
1093 | + | func getOneTknV2WithBonusREADONLY (ff,gf) = { | |
1094 | + | let aT = aL() | |
1095 | + | let cq = aT[u] | |
1096 | + | let cr = aT[v] | |
1097 | + | let cp = aT[t] | |
1098 | + | let cw = by(cq) | |
1099 | + | let cy = by(cr) | |
1100 | + | let gm = { | |
1101 | + | let aF = invoke(this, "getOneTknV2READONLY", [ff, gf], nil) | |
1102 | + | if ($isInstanceOf(aF, "(Int, Int)")) | |
1103 | + | then aF | |
1104 | + | else throw(($getType(aF) + " couldn't be cast to (Int, Int)")) | |
1220 | 1105 | } | |
1221 | - | let | |
1222 | - | let | |
1223 | - | let | |
1224 | - | let | |
1225 | - | let | |
1226 | - | let | |
1227 | - | let | |
1228 | - | then if (( | |
1106 | + | let fo = gm._1 | |
1107 | + | let cj = gm._2 | |
1108 | + | let de = ck("", cp, gf, this) | |
1109 | + | let cG = de._1 | |
1110 | + | let cH = de._2 | |
1111 | + | let gn = (cG + cH) | |
1112 | + | let fd = if ((gn == 0)) | |
1113 | + | then if ((fo == 0)) | |
1229 | 1114 | then 0 | |
1230 | 1115 | else throw("bonus calculation error") | |
1231 | - | else fraction(( | |
1232 | - | $Tuple2(nil, $Tuple3( | |
1116 | + | else fraction((fo - gn), a, gn) | |
1117 | + | $Tuple2(nil, $Tuple3(fo, cj, fd)) | |
1233 | 1118 | } | |
1234 | 1119 | ||
1235 | 1120 | ||
1236 | 1121 | ||
1237 | - | @Callable( | |
1238 | - | func getNoLess ( | |
1239 | - | let | |
1240 | - | let | |
1241 | - | let | |
1242 | - | let | |
1243 | - | let | |
1244 | - | let | |
1245 | - | if (( | |
1246 | - | then throw(((("Failed: " + toString( | |
1247 | - | else if (( | |
1248 | - | then throw(((("Failed: " + toString( | |
1122 | + | @Callable(dM) | |
1123 | + | func getNoLess (go,gp) = { | |
1124 | + | let de = dL(dM) | |
1125 | + | let cG = de._1 | |
1126 | + | let cH = de._2 | |
1127 | + | let cS = de._3 | |
1128 | + | let cm = de._4 | |
1129 | + | let cI = de._5 | |
1130 | + | if ((go > cG)) | |
1131 | + | then throw(((("Failed: " + toString(cG)) + " < ") + toString(go))) | |
1132 | + | else if ((gp > cH)) | |
1133 | + | then throw(((("Failed: " + toString(cH)) + " < ") + toString(gp))) | |
1249 | 1134 | else { | |
1250 | - | let | |
1251 | - | if (( | |
1252 | - | then | |
1135 | + | let gq = invoke(aD, "burn", [cS], [AttachedPayment(cm, cS)]) | |
1136 | + | if ((gq == gq)) | |
1137 | + | then cI | |
1253 | 1138 | else throw("Strict value is not equal to itself.") | |
1254 | 1139 | } | |
1255 | 1140 | } | |
1256 | 1141 | ||
1257 | 1142 | ||
1258 | 1143 | ||
1259 | - | @Callable( | |
1260 | - | func unstakeAndGet ( | |
1261 | - | let | |
1144 | + | @Callable(dM) | |
1145 | + | func unstakeAndGet (ch) = { | |
1146 | + | let gr = if ((size(dM.payments) != 0)) | |
1262 | 1147 | then throw("No pmnts expd") | |
1263 | 1148 | else true | |
1264 | - | if (( | |
1149 | + | if ((gr == gr)) | |
1265 | 1150 | then { | |
1266 | - | let | |
1267 | - | let | |
1268 | - | let | |
1269 | - | let | |
1270 | - | let | |
1271 | - | if (( | |
1151 | + | let bX = aL() | |
1152 | + | let gs = bd() | |
1153 | + | let fO = fromBase58String(bX[t]) | |
1154 | + | let gt = valueOrErrorMessage(addressFromString(gs[A]), "Wr st addr") | |
1155 | + | let gu = invoke(gt, "unstake", [toBase58String(fO), ch], nil) | |
1156 | + | if ((gu == gu)) | |
1272 | 1157 | then { | |
1273 | - | let | |
1274 | - | let | |
1275 | - | let | |
1276 | - | let | |
1158 | + | let de = ck(toBase58String(dM.transactionId), toBase58String(fO), ch, dM.caller) | |
1159 | + | let cu = parseIntValue(de._9) | |
1160 | + | let cI = de._10 | |
1161 | + | let gv = if (if (aI()) | |
1277 | 1162 | then true | |
1278 | - | else ( | |
1279 | - | then throw(("Blocked: " + toString( | |
1163 | + | else (cu == q)) | |
1164 | + | then throw(("Blocked: " + toString(cu))) | |
1280 | 1165 | else true | |
1281 | - | if (( | |
1166 | + | if ((gv == gv)) | |
1282 | 1167 | then { | |
1283 | - | let | |
1284 | - | if (( | |
1285 | - | then | |
1168 | + | let gw = invoke(aD, "burn", [ch], [AttachedPayment(fO, ch)]) | |
1169 | + | if ((gw == gw)) | |
1170 | + | then cI | |
1286 | 1171 | else throw("Strict value is not equal to itself.") | |
1287 | 1172 | } | |
1288 | 1173 | else throw("Strict value is not equal to itself.") | |
1289 | 1174 | } | |
1290 | 1175 | else throw("Strict value is not equal to itself.") | |
1291 | 1176 | } | |
1292 | 1177 | else throw("Strict value is not equal to itself.") | |
1293 | 1178 | } | |
1294 | 1179 | ||
1295 | 1180 | ||
1296 | 1181 | ||
1297 | - | @Callable( | |
1298 | - | func unstakeAndGetNoLess ( | |
1299 | - | let | |
1182 | + | @Callable(dM) | |
1183 | + | func unstakeAndGetNoLess (gx,gy,gp) = { | |
1184 | + | let gd = if (aI()) | |
1300 | 1185 | then true | |
1301 | - | else ( | |
1302 | - | let | |
1186 | + | else (aX == q) | |
1187 | + | let fX = [if (!(gd)) | |
1303 | 1188 | then true | |
1304 | - | else throw("get operation is blocked by admin"), if ((size( | |
1189 | + | else throw("get operation is blocked by admin"), if ((size(dM.payments) == 0)) | |
1305 | 1190 | then true | |
1306 | 1191 | else throw("no payments are expected")] | |
1307 | - | if (( | |
1192 | + | if ((fX == fX)) | |
1308 | 1193 | then { | |
1309 | - | let | |
1310 | - | if (( | |
1194 | + | let gu = invoke(bf, "unstake", [toBase58String(aY), gx], nil) | |
1195 | + | if ((gu == gu)) | |
1311 | 1196 | then { | |
1312 | - | let | |
1313 | - | let | |
1314 | - | let | |
1315 | - | let | |
1316 | - | let | |
1197 | + | let gz = ck(toBase58String(dM.transactionId), toBase58String(aY), gx, dM.caller) | |
1198 | + | let cG = gz._1 | |
1199 | + | let cH = gz._2 | |
1200 | + | let cI = gz._10 | |
1201 | + | let gA = [if ((cG >= gy)) | |
1317 | 1202 | then true | |
1318 | - | else throw(makeString(["amount asset amount to receive is less than ", toString( | |
1203 | + | else throw(makeString(["amount asset amount to receive is less than ", toString(gy)], "")), if ((cH >= gp)) | |
1319 | 1204 | then true | |
1320 | - | else throw(makeString(["price asset amount to receive is less than ", toString( | |
1321 | - | if (( | |
1205 | + | else throw(makeString(["price asset amount to receive is less than ", toString(gp)], ""))] | |
1206 | + | if ((gA == gA)) | |
1322 | 1207 | then { | |
1323 | - | let | |
1324 | - | if (( | |
1325 | - | then | |
1208 | + | let gq = invoke(aD, "burn", [gx], [AttachedPayment(aY, gx)]) | |
1209 | + | if ((gq == gq)) | |
1210 | + | then cI | |
1326 | 1211 | else throw("Strict value is not equal to itself.") | |
1327 | 1212 | } | |
1328 | 1213 | else throw("Strict value is not equal to itself.") | |
1329 | 1214 | } | |
1330 | 1215 | else throw("Strict value is not equal to itself.") | |
1331 | 1216 | } | |
1332 | 1217 | else throw("Strict value is not equal to itself.") | |
1333 | 1218 | } | |
1334 | 1219 | ||
1335 | 1220 | ||
1336 | 1221 | ||
1337 | - | @Callable( | |
1338 | - | func unstakeAndGetOneTknV2 ( | |
1339 | - | let | |
1340 | - | let | |
1341 | - | if ($isInstanceOf( | |
1342 | - | then | |
1343 | - | else throw(($getType( | |
1222 | + | @Callable(dM) | |
1223 | + | func unstakeAndGetOneTknV2 (gx,ff,fg) = { | |
1224 | + | let fV = { | |
1225 | + | let aF = invoke(aD, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1226 | + | if ($isInstanceOf(aF, "Boolean")) | |
1227 | + | then aF | |
1228 | + | else throw(($getType(aF) + " couldn't be cast to Boolean")) | |
1344 | 1229 | } | |
1345 | - | let | |
1230 | + | let gd = if (if (aI()) | |
1346 | 1231 | then true | |
1347 | - | else ( | |
1232 | + | else (aX == q)) | |
1348 | 1233 | then true | |
1349 | - | else | |
1350 | - | let | |
1234 | + | else fV | |
1235 | + | let fX = [if (if (!(gd)) | |
1351 | 1236 | then true | |
1352 | - | else | |
1237 | + | else fB(dM)) | |
1353 | 1238 | then true | |
1354 | - | else | |
1239 | + | else aB("get operation is blocked by admin"), if ((size(dM.payments) == 0)) | |
1355 | 1240 | then true | |
1356 | - | else | |
1357 | - | if (( | |
1241 | + | else aB("no payments are expected")] | |
1242 | + | if ((fX == fX)) | |
1358 | 1243 | then { | |
1359 | - | let | |
1360 | - | let | |
1361 | - | let | |
1362 | - | let | |
1363 | - | let | |
1364 | - | if (( | |
1244 | + | let bX = aL() | |
1245 | + | let gs = bd() | |
1246 | + | let fO = fromBase58String(bX[t]) | |
1247 | + | let gt = valueOrErrorMessage(addressFromString(gs[A]), "Wr st addr") | |
1248 | + | let gu = invoke(gt, "unstake", [toBase58String(fO), gx], nil) | |
1249 | + | if ((gu == gu)) | |
1365 | 1250 | then { | |
1366 | - | let | |
1367 | - | let | |
1368 | - | let | |
1369 | - | $Tuple2( | |
1251 | + | let gB = fe(ff, fg, [AttachedPayment(fO, gx)], dM.caller, dM.originCaller, dM.transactionId) | |
1252 | + | let cI = gB._1 | |
1253 | + | let fp = gB._2 | |
1254 | + | $Tuple2(cI, fp) | |
1370 | 1255 | } | |
1371 | 1256 | else throw("Strict value is not equal to itself.") | |
1372 | 1257 | } | |
1373 | 1258 | else throw("Strict value is not equal to itself.") | |
1374 | 1259 | } | |
1375 | 1260 | ||
1376 | 1261 | ||
1377 | 1262 | ||
1378 | - | @Callable( | |
1379 | - | func putOneTknV2WithBonusREADONLY ( | |
1380 | - | let | |
1381 | - | let | |
1382 | - | let | |
1383 | - | let | |
1384 | - | let | |
1385 | - | let | |
1386 | - | let | |
1387 | - | let | |
1388 | - | let | |
1389 | - | $Tuple2(nil, $Tuple3( | |
1263 | + | @Callable(dM) | |
1264 | + | func putOneTknV2WithBonusREADONLY (gC,gD) = { | |
1265 | + | let aT = aL() | |
1266 | + | let cq = aT[u] | |
1267 | + | let cr = aT[v] | |
1268 | + | let cp = aT[t] | |
1269 | + | let gE = eH(gC, gD, "", "", true) | |
1270 | + | let eY = gE._1 | |
1271 | + | let cI = gE._2 | |
1272 | + | let cj = gE._3 | |
1273 | + | let fd = gE._4 | |
1274 | + | $Tuple2(nil, $Tuple3(eY, cj, fd)) | |
1390 | 1275 | } | |
1391 | 1276 | ||
1392 | 1277 | ||
1393 | 1278 | ||
1394 | - | @Callable( | |
1395 | - | func putOneTknV2WithoutTakeFeeREADONLY ( | |
1396 | - | let | |
1397 | - | let | |
1398 | - | let | |
1399 | - | let | |
1400 | - | let | |
1401 | - | let | |
1402 | - | let | |
1403 | - | let | |
1404 | - | let | |
1405 | - | $Tuple2(nil, $Tuple3( | |
1279 | + | @Callable(dM) | |
1280 | + | func putOneTknV2WithoutTakeFeeREADONLY (gC,gD) = { | |
1281 | + | let aT = aL() | |
1282 | + | let cq = aT[u] | |
1283 | + | let cr = aT[v] | |
1284 | + | let cp = aT[t] | |
1285 | + | let gF = eH(gC, gD, "", "", false) | |
1286 | + | let eY = gF._1 | |
1287 | + | let cI = gF._2 | |
1288 | + | let cj = gF._3 | |
1289 | + | let fd = gF._4 | |
1290 | + | $Tuple2(nil, $Tuple3(eY, cj, fd)) | |
1406 | 1291 | } | |
1407 | 1292 | ||
1408 | 1293 | ||
1409 | 1294 | ||
1410 | - | @Callable( | |
1411 | - | func activate ( | |
1295 | + | @Callable(dM) | |
1296 | + | func activate (gG,gH) = if ((toString(dM.caller) != toString(aD))) | |
1412 | 1297 | then throw("denied") | |
1413 | - | else $Tuple2([StringEntry(ac(), | |
1298 | + | else $Tuple2([StringEntry(ac(), gG), StringEntry(ad(), gH)], "success") | |
1414 | 1299 | ||
1415 | 1300 | ||
1416 | 1301 | ||
1417 | - | @Callable( | |
1418 | - | func setS ( | |
1419 | - | then | |
1420 | - | else [StringEntry( | |
1302 | + | @Callable(dM) | |
1303 | + | func setS (gI,gv) = if ((toString(dM.caller) != ax(this, af()))) | |
1304 | + | then fA | |
1305 | + | else [StringEntry(gI, gv)] | |
1421 | 1306 | ||
1422 | 1307 | ||
1423 | 1308 | ||
1424 | - | @Callable( | |
1425 | - | func setI ( | |
1426 | - | then | |
1427 | - | else [IntegerEntry( | |
1309 | + | @Callable(dM) | |
1310 | + | func setI (gI,gv) = if ((toString(dM.caller) != ax(this, af()))) | |
1311 | + | then fA | |
1312 | + | else [IntegerEntry(gI, gv)] | |
1428 | 1313 | ||
1429 | 1314 | ||
1430 | 1315 | ||
1431 | - | @Callable( | |
1432 | - | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, | |
1316 | + | @Callable(dM) | |
1317 | + | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aL()) | |
1433 | 1318 | ||
1434 | 1319 | ||
1435 | 1320 | ||
1436 | - | @Callable( | |
1437 | - | func getAccBalanceWrapperREADONLY ( | |
1321 | + | @Callable(dM) | |
1322 | + | func getAccBalanceWrapperREADONLY (bz) = $Tuple2(nil, by(bz)) | |
1438 | 1323 | ||
1439 | 1324 | ||
1440 | 1325 | ||
1441 | - | @Callable( | |
1442 | - | func calcPricesWrapperREADONLY ( | |
1443 | - | let | |
1444 | - | $Tuple2(nil, [toString( | |
1326 | + | @Callable(dM) | |
1327 | + | func calcPricesWrapperREADONLY (bR,bS,bW) = { | |
1328 | + | let gJ = bV(bR, bS, bW) | |
1329 | + | $Tuple2(nil, [toString(gJ[0]), toString(gJ[1]), toString(gJ[2])]) | |
1445 | 1330 | } | |
1446 | 1331 | ||
1447 | 1332 | ||
1448 | 1333 | ||
1449 | - | @Callable( | |
1450 | - | func fromX18WrapperREADONLY (J, | |
1334 | + | @Callable(dM) | |
1335 | + | func fromX18WrapperREADONLY (J,gK) = $Tuple2(nil, I(parseBigIntValue(J), gK)) | |
1451 | 1336 | ||
1452 | 1337 | ||
1453 | 1338 | ||
1454 | - | @Callable( | |
1339 | + | @Callable(dM) | |
1455 | 1340 | func toX18WrapperREADONLY (G,H) = $Tuple2(nil, toString(F(G, H))) | |
1456 | 1341 | ||
1457 | 1342 | ||
1458 | 1343 | ||
1459 | - | @Callable( | |
1460 | - | func calcPriceBigIntWrapperREADONLY ( | |
1344 | + | @Callable(dM) | |
1345 | + | func calcPriceBigIntWrapperREADONLY (bB,bC) = $Tuple2(nil, toString(bA(parseBigIntValue(bB), parseBigIntValue(bC)))) | |
1461 | 1346 | ||
1462 | 1347 | ||
1463 | 1348 | ||
1464 | - | @Callable( | |
1465 | - | func estimatePutOperationWrapperREADONLY ( | |
1349 | + | @Callable(dM) | |
1350 | + | func estimatePutOperationWrapperREADONLY (cl,bG,cK,cL,cM,cN,gL,cO,cP) = $Tuple2(nil, cJ(cl, bG, cK, cL, cM, cN, gL, cO, cP, true, false, 0, "")) | |
1466 | 1351 | ||
1467 | 1352 | ||
1468 | 1353 | ||
1469 | - | @Callable( | |
1470 | - | func estimateGetOperationWrapperREADONLY (cn, | |
1471 | - | let | |
1472 | - | $Tuple2(nil, $Tuple10( | |
1354 | + | @Callable(dM) | |
1355 | + | func estimateGetOperationWrapperREADONLY (cl,gM,cn,gL) = { | |
1356 | + | let de = ck(cl, gM, cn, addressFromStringValue(gL)) | |
1357 | + | $Tuple2(nil, $Tuple10(de._1, de._2, de._3, de._4, de._5, de._6, de._7, toString(de._8), de._9, de._10)) | |
1473 | 1358 | } | |
1474 | 1359 | ||
1475 | 1360 | ||
1476 | - | @Verifier( | |
1477 | - | func | |
1478 | - | let | |
1479 | - | let | |
1480 | - | if ($isInstanceOf( | |
1361 | + | @Verifier(gN) | |
1362 | + | func gO () = { | |
1363 | + | let gP = { | |
1364 | + | let av = fy() | |
1365 | + | if ($isInstanceOf(av, "ByteVector")) | |
1481 | 1366 | then { | |
1482 | - | let | |
1483 | - | | |
1367 | + | let fC = av | |
1368 | + | fC | |
1484 | 1369 | } | |
1485 | - | else if ($isInstanceOf( | |
1486 | - | then | |
1370 | + | else if ($isInstanceOf(av, "Unit")) | |
1371 | + | then gN.senderPublicKey | |
1487 | 1372 | else throw("Match error") | |
1488 | 1373 | } | |
1489 | - | let | |
1490 | - | if ($isInstanceOf( | |
1374 | + | let av = gN | |
1375 | + | if ($isInstanceOf(av, "Order")) | |
1491 | 1376 | then { | |
1492 | - | let | |
1493 | - | let | |
1494 | - | let | |
1495 | - | let | |
1496 | - | let | |
1497 | - | if (if (if ( | |
1498 | - | then | |
1377 | + | let dz = av | |
1378 | + | let gQ = aJ() | |
1379 | + | let gR = dy(dz) | |
1380 | + | let gS = sigVerify(dz.bodyBytes, dz.proofs[0], dz.senderPublicKey) | |
1381 | + | let gT = sigVerify(dz.bodyBytes, dz.proofs[1], gQ) | |
1382 | + | if (if (if (gR) | |
1383 | + | then gS | |
1499 | 1384 | else false) | |
1500 | - | then | |
1385 | + | then gT | |
1501 | 1386 | else false) | |
1502 | 1387 | then true | |
1503 | - | else | |
1388 | + | else aq(gR, gS, gT) | |
1504 | 1389 | } | |
1505 | - | else if ($isInstanceOf( | |
1390 | + | else if ($isInstanceOf(av, "SetScriptTransaction")) | |
1506 | 1391 | then { | |
1507 | - | let | |
1508 | - | let | |
1509 | - | let | |
1510 | - | let | |
1511 | - | if (if (( | |
1512 | - | then ( | |
1392 | + | let dZ = av | |
1393 | + | let gU = blake2b256(value(dZ.script)) | |
1394 | + | let gV = fromBase64String(value(getString(aD, ao()))) | |
1395 | + | let gW = scriptHash(this) | |
1396 | + | if (if ((gV == gU)) | |
1397 | + | then (gW != gU) | |
1513 | 1398 | else false) | |
1514 | 1399 | then true | |
1515 | - | else sigVerify( | |
1400 | + | else sigVerify(gN.bodyBytes, gN.proofs[0], gP) | |
1516 | 1401 | } | |
1517 | - | else sigVerify( | |
1402 | + | else sigVerify(gN.bodyBytes, gN.proofs[0], gP) | |
1518 | 1403 | } | |
1519 | 1404 |
github/deemru/w8io/169f3d6 474.60 ms ◑