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