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