tx · DoeuqXRFJRchjnDA2Mp2PhvQv5DQtWBWZtacmhmDeJ8S

3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT:  -0.03200000 Waves

2023.01.18 15:46 [2410386] smart account 3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT > SELF 0.00000000 Waves

{ "type": 13, "id": "DoeuqXRFJRchjnDA2Mp2PhvQv5DQtWBWZtacmhmDeJ8S", "fee": 3200000, "feeAssetId": null, "timestamp": 1674046014471, "version": 1, "sender": "3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT", "senderPublicKey": "D1BL65meykxFZTCuq7jq9HSGLLnWvQamQPUNrguW5w39", "proofs": [ "3tCutfKRDMs3dvbmChJtAdoLVw7edPqUWvHo2hRFL5WQLr6rhofVR2kiCWBCa1GJ9RexC4wXkFkcWDQJJSLpR3Zk" ], "script": "base64:BgKmIggCEgMKAQgSAwoBCBIAEgQKAgEEEgQKAgEEEgMKAQESABIECgIIARIECgIIARIECgIIARIECgIBARIDCgEBEgUKAwEBARIFCgMBCAESBAoCAQgSBAoCAQgSBAoCCAgSBAoCCAgSBAoCCAESABIDCgEIEgUKAwEBARIECgIIARIECgIBARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCCIGc2NhbGU4IgxzY2FsZThCaWdJbnQiB3NjYWxlMTgiCnplcm9CaWdJbnQiBGJpZzAiBGJpZzEiBGJpZzIiCnNsaXBwYWdlNEQiC3dhdmVzU3RyaW5nIgVBbXVsdCIFRGNvbnYiA1NFUCIFRU1QVFkiClBvb2xBY3RpdmUiClBvb2xQdXREaXMiDlBvb2xNYXRjaGVyRGlzIgxQb29sU2h1dGRvd24iDmlkeFBvb2xBZGRyZXNzIglpZHhQb29sU3QiCWlkeExQQXNJZCIJaWR4QW1Bc0lkIglpZHhQckFzSWQiC2lkeEFtdEFzRGNtIg1pZHhQcmljZUFzRGNtIgtpZHhJQW10QXNJZCINaWR4SVByaWNlQXNJZCIPaWR4RmFjdFN0YWtDbnRyIhJ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gMJAAECBQJhdgIFT3JkZXIEAmR6BQJhdgQCZ1EJAQJhSgAEAmdSCQECZHkBBQJkegQCZ1MJAPQDAwgFAmR6CWJvZHlCeXRlcwkAkQMCCAUCZHoGcHJvb2ZzAAAIBQJkeg9zZW5kZXJQdWJsaWNLZXkEAmdUCQD0AwMIBQJkeglib2R5Qnl0ZXMJAJEDAggFAmR6BnByb29mcwABBQJnUQMDAwUCZ1IFAmdTBwUCZ1QHBgkBAmFxAwUCZ1IFAmdTBQJnVAMJAAECBQJhdgIUU2V0U2NyaXB0VHJhbnNhY3Rpb24EAmRaBQJhdgQCZ1UJAPYDAQkBBXZhbHVlAQgFAmRaBnNjcmlwdAQCZ1YJANsEAQkBBXZhbHVlAQkAnQgCBQJhRAkBAmFvAAQCZ1cJAPEHAQUEdGhpcwMDCQAAAgUCZ1YFAmdVCQECIT0CBQJnVwUCZ1UHBgkA9AMDCAUCZ04JYm9keUJ5dGVzCQCRAwIIBQJnTgZwcm9vZnMAAAUCZ1AJAPQDAwgFAmdOCWJvZHlCeXRlcwkAkQMCCAUCZ04GcHJvb2ZzAAAFAmdQf6Cfrw==", "chainId": 84, "height": 2410386, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 47vPwJCwH3qTQLhqYWyy7LPs5eckf7uVeuQa1rgR7huL Next: 3PyLQL7i7e5UKzSgSrLmYm1ry5D1R97vS9Mr5YXpEvgL Diff:
OldNewDifferences
115115 func af () = "%s__addonAddr"
116116
117117
118-func ag () = "%s__swapContract"
118+func ag () = "%s__factoryConfig"
119119
120120
121-func ah () = "%s__factoryConfig"
121+func ah () = "%s%s__matcher__publicKey"
122122
123123
124-func ai () = "%s%s__matcher__publicKey"
124+func ai (aj,ak) = (((("%d%d%s__" + aj) + "__") + ak) + "__config")
125125
126126
127-func aj (ak,al) = (((("%d%d%s__" + ak) + "__") + al) + "__config")
127+func al (am) = ("%s%s%s__mappings__baseAsset2internalId__" + am)
128128
129129
130-func am (an) = ("%s%s%s__mappings__baseAsset2internalId__" + an)
130+func an () = "%s__shutdown"
131131
132132
133-func ao () = "%s__shutdown"
133+func ao () = "%s__allowedLpStableScriptHash"
134134
135135
136-func ap () = "%s__allowedLpStableScriptHash"
136+func ap () = "%s__feeCollectorAddress"
137137
138138
139-func aq () = "%s__feeCollectorAddress"
139+func aq (ar,as,at) = throw(((((("Failed: ordValid=" + toString(ar)) + " sndrValid=") + toString(as)) + " mtchrValid=") + toString(at)))
140140
141141
142-func ar (as,at,au) = throw(((((("Failed: ordValid=" + toString(as)) + " sndrValid=") + toString(at)) + " mtchrValid=") + toString(au)))
143-
144-
145-func av (J) = {
146- let aw = J
147- if ($isInstanceOf(aw, "String"))
142+func au (J) = {
143+ let av = J
144+ if ($isInstanceOf(av, "String"))
148145 then {
149- let ax = aw
150- ax
146+ let aw = av
147+ aw
151148 }
152149 else throw("fail cast to String")
153150 }
154151
155152
156-func ay (az) = valueOrErrorMessage(getString(az), (("mandatory this." + az) + " is not defined"))
153+func ax (ay,az) = valueOrErrorMessage(getString(ay, az), makeString(["mandatory ", toString(ay), ".", az, " not defined"], ""))
157154
158155
159-func aA (aB,az) = valueOrErrorMessage(getString(aB, az), makeString(["mandatory ", toString(aB), ".", az, " not defined"], ""))
156+func aA (ay,az) = valueOrErrorMessage(getInteger(ay, az), makeString(["mandatory ", toString(ay), ".", az, " not defined"], ""))
160157
161158
162-func aC (aB,az) = valueOrErrorMessage(getInteger(aB, az), makeString(["mandatory ", toString(aB), ".", az, " not defined"], ""))
159+func aB (aC) = throw(makeString(["lp_stable.ride:", aC], " "))
163160
164161
165-func aD (aE) = throw(makeString(["lp_stable.ride:", aE], " "))
162+let aD = addressFromStringValue(ax(this, R()))
163+
164+let aE = {
165+ let aF = invoke(aD, "getInFeeREADONLY", [toString(this)], nil)
166+ if ($isInstanceOf(aF, "Int"))
167+ then aF
168+ else throw(($getType(aF) + " couldn't be cast to Int"))
169+ }
170+
171+let aG = {
172+ let aF = invoke(aD, "getOutFeeREADONLY", [toString(this)], nil)
173+ if ($isInstanceOf(aF, "Int"))
174+ then aF
175+ else throw(($getType(aF) + " couldn't be cast to Int"))
176+ }
177+
178+let aH = ax(this, ae())
179+
180+func aI () = valueOrElse(getBoolean(aD, an()), false)
166181
167182
168-let aF = addressFromStringValue(aA(this, R()))
169-
170-let aG = {
171- let aH = invoke(aF, "getInFeeREADONLY", [toString(this)], nil)
172- if ($isInstanceOf(aH, "Int"))
173- then aH
174- else throw(($getType(aH) + " couldn't be cast to Int"))
175- }
176-
177-let aI = {
178- let aH = invoke(aF, "getOutFeeREADONLY", [toString(this)], nil)
179- if ($isInstanceOf(aH, "Int"))
180- then aH
181- else throw(($getType(aH) + " couldn't be cast to Int"))
182- }
183-
184-let aJ = aA(this, ae())
185-
186-func aK () = valueOrElse(getBoolean(aF, ao()), false)
183+func aJ () = fromBase58String(ax(aD, ah()))
187184
188185
189-func aL () = fromBase58String(aA(aF, ai()))
186+let aK = addressFromStringValue(ax(aD, ap()))
190187
191-
192-let aM = addressFromStringValue(aA(aF, aq()))
193-
194-func aN () = {
195- let aO = aA(this, ac())
196- let aP = aA(this, ad())
197- let aQ = aC(aF, am(aP))
198- let ak = aC(aF, am(aO))
199- split(aA(aF, aj(toString(ak), toString(aQ))), l)
188+func aL () = {
189+ let aM = ax(this, ac())
190+ let aN = ax(this, ad())
191+ let aO = aA(aD, al(aN))
192+ let aj = aA(aD, al(aM))
193+ split(ax(aD, ai(toString(aj), toString(aO))), l)
200194 }
201195
202196
203-func aR (aS) = if ((aS == i))
197+func aP (aQ) = if ((aQ == i))
204198 then unit
205- else fromBase58String(aS)
199+ else fromBase58String(aQ)
206200
207201
208-func aT (aS) = if ((aS == unit))
202+func aR (aQ) = if ((aQ == unit))
209203 then i
210- else toBase58String(value(aS))
204+ else toBase58String(value(aQ))
211205
212206
213-func aU (aV) = $Tuple7(addressFromStringValue(aV[r]), parseIntValue(aV[s]), fromBase58String(aV[t]), aR(aV[u]), aR(aV[v]), parseIntValue(aV[w]), parseIntValue(aV[x]))
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]))
214208
215209
216-let aW = aU(aN())
210+let aU = aS(aL())
217211
218-let aX = aW
212+let aV = aU
219213
220-let aY = aX._1
214+let aW = aV._1
221215
222-let aZ = aX._2
216+let aX = aV._2
223217
224-let ba = aX._3
218+let aY = aV._3
225219
226-let bb = aX._4
220+let aZ = aV._4
227221
228-let bc = aX._5
222+let ba = aV._5
229223
230-let bd = aX._6
224+let bb = aV._6
231225
232-let be = aX._7
226+let bc = aV._7
233227
234-func bf () = split(aA(aF, ah()), l)
228+func bd () = split(ax(aD, ag()), l)
235229
236230
237-let bg = bf()
231+let be = bd()
238232
239-let bh = valueOrErrorMessage(addressFromString(bg[A]), "Invalid staking contract address")
233+let bf = valueOrErrorMessage(addressFromString(be[A]), "Invalid staking contract address")
240234
241-let bi = valueOrErrorMessage(addressFromString(bg[C]), "Invalid slipage contract address")
235+let bg = valueOrErrorMessage(addressFromString(be[C]), "Invalid slipage contract address")
242236
243-let bj = valueOrErrorMessage(addressFromString(bg[D]), "Invalid gwx contract address")
237+let bh = valueOrErrorMessage(addressFromString(be[D]), "Invalid gwx contract address")
244238
245-let bk = valueOrErrorMessage(addressFromString(bg[B]), "Invalid gwx contract address")
239+let bi = valueOrErrorMessage(addressFromString(be[B]), "Invalid gwx contract address")
246240
247-func bl (bm,bn,bo,bp,bq,br,bs,bt,bu,bv) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bm), toString(bn), toString(bo), toString(bp), toString(bq), toString(br), toString(bs), toString(bt), toString(bu), toString(bv)], l)
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)
248242
249243
250-func bw (bx,by,bz,bp,bs,bt) = makeString(["%d%d%d%d%d%d", toString(bx), toString(by), toString(bz), toString(bp), toString(bs), toString(bt)], l)
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)
251245
252246
253-func bA (bB) = if ((bB == "WAVES"))
247+func by (bz) = if ((bz == "WAVES"))
254248 then wavesBalance(this).available
255- else assetBalance(this, fromBase58String(bB))
249+ else assetBalance(this, fromBase58String(bz))
256250
257251
258-func bC (bD,bE) = fraction(bD, c, bE)
252+func bA (bB,bC) = fraction(bB, c, bC)
259253
260254
261-func bF (bG,bH,bI) = {
262- let bJ = fraction((bG - bH), b, bH)
263- let bK = ((bI - P(bJ)) > d)
264- if (!(bK))
265- then throw(("Big slpg: " + toString(bJ)))
266- else $Tuple2(bK, min([bG, bH]))
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]))
267261 }
268262
269263
270-func bL (bM,bN,bO) = {
271- let bJ = fraction(bN, b, bM)
272- let bP = (bO > bJ)
273- if (if (bP)
264+func bJ (bK,bL,bM) = {
265+ let bH = fraction(bL, b, bK)
266+ let bN = (bM > bH)
267+ if (if (bN)
274268 then true
275- else (bN > bM))
276- then throw(((((((toString(bN) + " ") + toString(bM)) + " ") + toString(bJ)) + " ") + toString(bO)))
277- else bP
269+ else (bL > bK))
270+ then throw(((((((toString(bL) + " ") + toString(bK)) + " ") + toString(bH)) + " ") + toString(bM)))
271+ else bN
278272 }
279273
280274
281-func bQ (bR,bS,bT,bU) = {
282- let bV = F(bT, bR)
283- let bW = F(bU, bS)
284- bC(bW, bV)
275+func bO (bP,bQ,bR,bS) = {
276+ let bT = F(bR, bP)
277+ let bU = F(bS, bQ)
278+ bA(bU, bT)
285279 }
286280
287281
288-func bX (bT,bU,bY) = {
289- let bZ = aN()
290- let ca = parseIntValue(bZ[w])
291- let cb = parseIntValue(bZ[x])
292- let cc = bQ(ca, cb, bT, bU)
293- let bE = F(bT, ca)
294- let bD = F(bU, cb)
295- let cd = F(bY, a)
296- let ce = bC(bE, cd)
297- let cf = bC(bD, cd)
298-[cc, ce, cf]
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]
299293 }
300294
301295
302-func cg (bT,bU,bY) = {
303- let ch = bX(bT, bU, bY)
304-[I(ch[0], a), I(ch[1], a), I(ch[2], a)]
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)]
305299 }
306300
307301
308-func ci (cj,ck) = {
309- let cl = if ((ck == 0))
302+func cg (ch,ci) = {
303+ let cj = if ((ci == 0))
310304 then 0
311- else fraction(cj, ck, a)
312- $Tuple2((cj - cl), cl)
305+ else fraction(ch, ci, a)
306+ $Tuple2((ch - cj), cj)
313307 }
314308
315309
316-func cm (cn,co,cp,cq) = {
317- let bZ = aN()
318- let cr = bZ[t]
319- let cs = bZ[u]
320- let ct = bZ[v]
321- let cu = parseIntValue(bZ[w])
322- let cv = parseIntValue(bZ[x])
323- let cw = bZ[s]
324- let cx = valueOrErrorMessage(assetInfo(fromBase58String(cr)), "Wrong LP id").quantity
325- if ((cr != co))
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))
326320 then throw("Wrong pmt asset")
327321 else {
328- let cy = bA(cs)
329- let cz = F(cy, cu)
330- let cA = bA(ct)
331- let cB = F(cA, cv)
332- let cC = bC(cB, cz)
333- let cD = I(cC, a)
334- let cE = F(cp, a)
335- let cF = F(cx, a)
336- let cG = fraction(cz, cE, cF)
337- let cH = fraction(cB, cE, cF)
338- let cI = I(cG, cu)
339- let cJ = I(cH, cv)
340- let cK = if ((cn == ""))
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 == ""))
341335 then nil
342- else [ScriptTransfer(cq, cI, if ((cs == "WAVES"))
336+ else [ScriptTransfer(co, cG, if ((cq == "WAVES"))
343337 then unit
344- else fromBase58String(cs)), ScriptTransfer(cq, cJ, if ((ct == "WAVES"))
338+ else fromBase58String(cq)), ScriptTransfer(co, cH, if ((cr == "WAVES"))
345339 then unit
346- else fromBase58String(ct)), StringEntry(ab(toString(cq), cn), bw(cI, cJ, cp, cD, height, lastBlock.timestamp)), IntegerEntry(U(), cD), IntegerEntry(V(height, lastBlock.timestamp), cD)]
347- $Tuple10(cI, cJ, cs, ct, cy, cA, cx, cC, cw, cK)
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)
348342 }
349343 }
350344
351345
352-func cL (cn,bI,cM,cN,cO,cP,cq,cQ,cR,cS,cT,cU,cV) = {
353- let bZ = aN()
354- let cr = fromBase58String(bZ[t])
355- let cW = bZ[u]
356- let cX = bZ[v]
357- let cY = bZ[y]
358- let cZ = bZ[z]
359- let da = parseIntValue(bZ[w])
360- let db = parseIntValue(bZ[x])
361- let cw = bZ[s]
362- let dc = valueOrErrorMessage(assetInfo(cr), "Wr lp as").quantity
363- let cy = if (cQ)
364- then bA(cW)
365- else if (if (cS)
366- then (cV == cW)
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)
367361 else false)
368- then (bA(cW) - cU)
369- else if (cS)
370- then bA(cW)
371- else (bA(cW) - cM)
372- let cA = if (cQ)
373- then bA(cX)
374- else if (if (cS)
375- then (cV == cX)
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)
376370 else false)
377- then (bA(cX) - cU)
378- else if (cS)
379- then bA(cX)
380- else (bA(cX) - cO)
381- let dd = F(cM, da)
382- let de = F(cO, db)
383- let df = bC(de, dd)
384- let cz = F(cy, da)
385- let cB = F(cA, db)
386- let dg = if ((dc == 0))
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))
387381 then {
388- let cC = d
389- let dh = d
390- let cd = pow((dd * de), 0, toBigInt(5), 1, 0, DOWN)
391- $Tuple5(I(cd, a), I(dd, da), I(de, db), bC((cB + de), (cz + dd)), dh)
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)
392386 }
393387 else {
394- let cC = bC(cB, cz)
395- let di = fraction(P((cC - df)), c, cC)
396- let dh = F(bI, a)
397- if (if (if (cT)
398- then (cC != d)
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)
399393 else false)
400- then (di > dh)
394+ then (dg > df)
401395 else false)
402- then throw(((("Price slippage " + toString(di)) + " > ") + toString(dh)))
396+ then throw(((("Price slippage " + toString(dg)) + " > ") + toString(df)))
403397 else {
404- let dj = F(dc, a)
405- let dk = fraction(dd, cC, c)
406- let dl = fraction(de, c, cC)
407- let dm = if ((dk > de))
408- then $Tuple2(dl, de)
409- else $Tuple2(dd, dk)
410- let dn = dm._1
411- let do = dm._2
412- let cd = fraction(dj, do, cB)
413- $Tuple5(I(cd, a), I(dn, da), I(do, db), cC, dh)
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)
414408 }
415409 }
416- let dp = dg._1
417- let dq = dg._2
418- let dr = dg._3
419- let cD = I(dg._4, a)
420- let ds = I(dg._5, a)
421- if ((0 >= dp))
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))
422416 then throw("LP <= 0")
423417 else {
424- let dt = if (!(cR))
418+ let dr = if (!(cP))
425419 then 0
426- else dp
427- let du = (cM - dq)
428- let dv = (cO - dr)
429- let dw = if (if (cS)
430- then (cV == cW)
420+ else dn
421+ let ds = (cK - do)
422+ let dt = (cM - dp)
423+ let du = if (if (cQ)
424+ then (cT == cU)
431425 else false)
432- then $Tuple2(cU, 0)
433- else if (if (cS)
434- then (cV == cX)
426+ then $Tuple2(cS, 0)
427+ else if (if (cQ)
428+ then (cT == cV)
435429 else false)
436- then $Tuple2(0, cU)
437- else $Tuple2(dq, dr)
438- let dx = dw._1
439- let dy = dw._2
440- let dz = [IntegerEntry(U(), cD), IntegerEntry(V(height, lastBlock.timestamp), cD), StringEntry(Y(cq, cn), bl(dx, dy, dt, cD, bI, ds, height, lastBlock.timestamp, du, dv))]
441- $Tuple13(dp, dt, cD, cy, cA, dc, cr, cw, dz, du, dv, cN, cP)
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)
442436 }
443437 }
444438
445439
446-func dA (dB) = {
447- let bZ = aN()
448- let dC = bZ[u]
449- let dD = bZ[v]
450- let cw = parseIntValue(bZ[s])
451- let ca = parseIntValue(bZ[w])
452- let cb = parseIntValue(bZ[x])
453- let dE = bA(dC)
454- let dF = bA(dD)
455- let cC = if ((dB.orderType == Buy))
456- then bQ(ca, cb, (dE + dB.amount), dF)
457- else bQ(ca, cb, (dE - dB.amount), dF)
458- let cD = I(cC, a)
459- if (if (if (aK())
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())
460454 then true
461- else (cw == p))
455+ else (cu == p))
462456 then true
463- else (cw == q))
457+ else (cu == q))
464458 then throw("Admin blocked")
465459 else {
466- let dG = dB.assetPair.amountAsset
460+ let dE = dz.assetPair.amountAsset
461+ let dF = if ((dE == unit))
462+ then "WAVES"
463+ else toBase58String(value(dE))
464+ let dG = dz.assetPair.priceAsset
467465 let dH = if ((dG == unit))
468466 then "WAVES"
469467 else toBase58String(value(dG))
470- let dI = dB.assetPair.priceAsset
471- let dJ = if ((dI == unit))
472- then "WAVES"
473- else toBase58String(value(dI))
474- if (if ((dH != dC))
468+ if (if ((dF != dA))
475469 then true
476- else (dJ != dD))
470+ else (dH != dB))
477471 then throw("Wr assets")
478472 else {
479- let dK = dB.price
480- let db = fraction(a, cb, ca)
481- let dL = L(dK, a, db)
482- let dM = if ((dB.orderType == Buy))
483- then (cD >= dL)
484- else (dL >= cD)
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)
485479 true
486480 }
487481 }
488482 }
489483
490484
491-func dN (dO) = if ((size(dO.payments) != 1))
485+func dL (dM) = if ((size(dM.payments) != 1))
492486 then throw("1 pmnt exp")
493487 else {
494- let dP = value(dO.payments[0])
495- let co = value(dP.assetId)
496- let cU = dP.amount
497- let dg = cm(toBase58String(dO.transactionId), toBase58String(co), cU, dO.caller)
498- let cI = dg._1
499- let cJ = dg._2
500- let cw = parseIntValue(dg._9)
501- let cK = dg._10
502- if (if (aK())
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())
503497 then true
504- else (cw == q))
505- then throw(("Admin blocked: " + toString(cw)))
506- else $Tuple5(cI, cJ, cU, co, cK)
498+ else (cu == q))
499+ then throw(("Admin blocked: " + toString(cu)))
500+ else $Tuple5(cG, cH, cS, cm, cI)
507501 }
508502
509503
510-func dQ (dR,aa,dS,dT,bI,cR,cS,cT,cU,cV) = {
511- let dg = cL(aa, bI, value(dS).amount, value(dS).assetId, value(dT).amount, value(dT).assetId, dR, (aa == ""), cR, cS, cT, cU, cV)
512- let cw = parseIntValue(dg._8)
513- if (if (if (aK())
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())
514508 then true
515- else (cw == o))
509+ else (cu == o))
516510 then true
517- else (cw == q))
518- then throw(("Blocked:" + toString(cw)))
519- else dg
511+ else (cu == q))
512+ then throw(("Blocked:" + toString(cu)))
513+ else de
520514 }
521515
522516
523-func dU (dV) = {
524- let dW = g
525- let dX = dV[0]
526- let dY = dV[1]
527- let dZ = parseBigIntValue(j)
528- let ea = (parseBigIntValue(aJ) * dZ)
529- let eb = (dX + dY)
530- if ((eb == e))
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))
531525 then e
532526 else {
533- let ec = (ea * dW)
534- let ed = (((dX * dY) * dW) * dW)
535- let ee = ((ec * eb) / dZ)
536- let ef = (ec - dZ)
537- let eg = (dW + f)
538- func eh (ei,ej) = {
539- let ek = ei
540- let el = ek._1
541- let em = ek._2
542- if ((em != unit))
543- then ei
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
544538 else {
545- let en = (((el * el) * el) / ed)
546- let eo = (((ee + (en * dW)) * el) / (((ef * el) / dZ) + (eg * en)))
547- let ep = Q((eo - value(el)))
548- if ((f >= ep))
549- then $Tuple2(eo, ej)
550- else $Tuple2(eo, unit)
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)
551545 }
552546 }
553547
554- let eq = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
555- let er = {
556- let es = eq
557- let et = size(es)
558- let eu = $Tuple2(eb, unit)
559- func ev (ew,ex) = if ((ex >= et))
560- then ew
561- else eh(ew, es[ex])
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])
562556
563- func ey (ew,ex) = if ((ex >= et))
564- then ew
557+ func ew (eu,ev) = if ((ev >= er))
558+ then eu
565559 else throw("List size exceeds 15")
566560
567- ey(ev(ev(ev(ev(ev(ev(ev(ev(ev(ev(ev(ev(ev(ev(ev(eu, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
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)
568562 }
569- let el = er._1
570- let em = er._2
571- if ((em != unit))
572- then el
573- else throw(("D calculation error, D = " + toString(el)))
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)))
574568 }
575569 }
576570
577571
578-func ez (dV,dO,eA) = {
579- let dW = g
580- let eB = dV[if ((dO == 0))
572+func ex (dT,dM,ey) = {
573+ let dU = g
574+ let ez = dT[if ((dM == 0))
581575 then 1
582576 else 0]
583- let dZ = parseBigIntValue(j)
584- let ea = (parseBigIntValue(aJ) * dZ)
585- let eb = eB
586- let ec = (ea * dW)
587- let eC = (((((eA * eA) / (eB * dW)) * eA) * dZ) / (ec * dW))
588- let eD = ((eb + ((eA * dZ) / ec)) - eA)
589- func eh (ei,ej) = {
590- let eE = ei
591- let eF = eE._1
592- let em = eE._2
593- if ((em != unit))
594- then ei
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
595589 else {
596- let eG = (((eF * eF) + eC) / ((g * eF) + eD))
597- let eH = Q((eG - value(eF)))
598- if ((f >= eH))
599- then $Tuple2(eG, ej)
600- else $Tuple2(eG, unit)
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)
601595 }
602596 }
603597
604- let eq = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
605- let eI = {
606- let es = eq
607- let et = size(es)
608- let eu = $Tuple2(eA, unit)
609- func ev (ew,ex) = if ((ex >= et))
610- then ew
611- else eh(ew, es[ex])
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])
612606
613- func ey (ew,ex) = if ((ex >= et))
614- then ew
607+ func ew (eu,ev) = if ((ev >= er))
608+ then eu
615609 else throw("List size exceeds 15")
616610
617- ey(ev(ev(ev(ev(ev(ev(ev(ev(ev(ev(ev(ev(ev(ev(ev(eu, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
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)
618612 }
619- let eF = eI._1
620- let em = eI._2
621- if ((em != unit))
622- then eF
623- else throw(("Y calculation error, Y = " + toString(eF)))
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)))
624618 }
625619
626620
627-func eJ (eK,co,cq,aa,eL) = {
628- let aV = aN()
629- let cs = aV[u]
630- let ct = aV[v]
631- let cr = aV[t]
632- let da = parseIntValue(aV[w])
633- let db = parseIntValue(aV[x])
634- let eM = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(cr)), "invalid lp asset").quantity)
635- let eN = if ((eM > e))
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))
636630 then true
637631 else throw("initial deposit requires all coins")
638- if ((eN == eN))
632+ if ((eL == eL))
639633 then {
640- let cy = bA(cs)
641- let cA = bA(ct)
642- let eO = if ((aa == ""))
643- then $Tuple2(cy, cA)
644- else if ((co == cs))
645- then if ((eK > cy))
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))
646640 then throw("invalid payment amount")
647- else $Tuple2((cy - eK), cA)
648- else if ((co == ct))
649- then if ((eK > cA))
641+ else $Tuple2((cw - eI), cy)
642+ else if ((cm == cr))
643+ then if ((eI > cy))
650644 then throw("invalid payment amount")
651- else $Tuple2(cy, (cA - eK))
645+ else $Tuple2(cw, (cy - eI))
652646 else throw("wrong pmtAssetId")
653- let eP = eO._1
654- let eQ = eO._2
655- let eR = if ((co == cs))
656- then $Tuple2(eK, 0)
657- else if ((co == ct))
658- then $Tuple2(0, eK)
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)
659653 else throw("invalid payment")
660- let eS = eR._1
661- let eT = eR._2
662- let eU = if (eL)
663- then $Tuple3(ci(eS, aG)._1, ci(eT, aG)._1, ci(eK, aG)._2)
664- else $Tuple3(eS, eT, 0)
665- let eV = eU._1
666- let eW = eU._2
667- let cl = eU._3
668- let eX = (eP + eV)
669- let eY = (eQ + eW)
670- let bN = dU([toBigInt(eP), toBigInt(eQ)])
671- let bM = dU([toBigInt(eX), toBigInt(eY)])
672- let eZ = if ((bM > bN))
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))
673667 then true
674668 else throw()
675- if ((eZ == eZ))
669+ if ((eX == eX))
676670 then {
677- let fa = fraction(eM, (bM - bN), bN)
678- let cD = I(bC(F(eY, db), F(eX, da)), a)
679- let dz = [IntegerEntry(U(), cD), IntegerEntry(V(height, lastBlock.timestamp), cD), StringEntry(Y(cq, aa), bl(eS, eT, toInt(fa), cD, 0, 0, height, lastBlock.timestamp, 0, 0))]
680- let fb = fraction(eQ, a, eP)
681- let fc = fraction(eK, a, (fb + a))
682- let fd = (eK - fc)
683- let fe = fraction(eM, toBigInt(fd), toBigInt(eQ))
684- let ff = toInt(fraction((fa - fe), b, fe))
685- $Tuple4(toInt(fa), dz, cl, ff)
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)
686680 }
687681 else throw("Strict value is not equal to itself.")
688682 }
690684 }
691685
692686
693-func fg (fh,fi,fj,dR,fk,fl) = {
694- let aV = aN()
695- let cr = aV[t]
696- let cs = aV[u]
697- let ct = aV[v]
698- let fm = parseIntValue(aV[w])
699- let fn = parseIntValue(aV[x])
700- let fo = aV[s]
701- let cq = if ((dR == bk))
702- then fk
703- else dR
704- let dP = value(fj[0])
705- let co = value(dP.assetId)
706- let cU = dP.amount
707- let cn = toBase58String(fl)
708- if ((cr != toBase58String(co)))
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)))
709703 then throw("Wrong LP")
710704 else {
711- let cy = bA(cs)
712- let cA = bA(ct)
713- let fp = {
714- let aH = invoke(this, "getOneTknV2READONLY", [fh, cU], nil)
715- if ($isInstanceOf(aH, "(Int, Int)"))
716- then aH
717- else throw(($getType(aH) + " couldn't be cast to (Int, Int)"))
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)"))
718712 }
719- if ((fp == fp))
713+ if ((fn == fn))
720714 then {
721- let cl = fp._2
722- let fq = fp._1
723- let fr = if (if ((fi > 0))
724- then (fi > fq)
715+ let cj = fn._2
716+ let fo = fn._1
717+ let fp = if (if ((fg > 0))
718+ then (fg > fo)
725719 else false)
726- then aD(makeString(["amount to receive is less than ", toString(fi)], ""))
727- else fq
728- let fs = if ((fh == cs))
729- then $Tuple4(fr, 0, ((cy - fr) - cl), cA)
730- else if ((fh == ct))
731- then $Tuple4(0, fr, cy, ((cA - fr) - cl))
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))
732726 else throw("invalid out asset id")
733- let ft = fs._1
734- let fu = fs._2
735- let eX = fs._3
736- let eY = fs._4
737- let fv = bC(F(eY, fn), F(eX, fm))
738- let fw = I(fv, a)
739- let fx = if ((fh == "WAVES"))
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"))
740734 then unit
741- else fromBase58String(fh)
742- let fy = if ((cl > 0))
743- then [ScriptTransfer(aM, cl, fx)]
735+ else fromBase58String(ff)
736+ let fw = if ((cj > 0))
737+ then [ScriptTransfer(aK, cj, fv)]
744738 else nil
745- let cK = ([ScriptTransfer(cq, fr, fx), StringEntry(ab(toString(cq), cn), bw(ft, fu, cU, fw, height, lastBlock.timestamp)), IntegerEntry(U(), fw), IntegerEntry(V(height, lastBlock.timestamp), fw)] ++ fy)
746- if ((cK == cK))
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))
747741 then {
748- let fz = invoke(aF, "burn", [cU], [AttachedPayment(co, cU)])
749- if ((fz == fz))
750- then $Tuple2(cK, fr)
742+ let fx = invoke(aD, "burn", [cS], [AttachedPayment(cm, cS)])
743+ if ((fx == fx))
744+ then $Tuple2(cI, fp)
751745 else throw("Strict value is not equal to itself.")
752746 }
753747 else throw("Strict value is not equal to itself.")
757751 }
758752
759753
760-func fA () = {
761- let aw = getString(S())
762- if ($isInstanceOf(aw, "String"))
754+func fy () = {
755+ let av = getString(S())
756+ if ($isInstanceOf(av, "String"))
763757 then {
764- let eb = aw
765- fromBase58String(eb)
758+ let dZ = av
759+ fromBase58String(dZ)
766760 }
767- else if ($isInstanceOf(aw, "Unit"))
761+ else if ($isInstanceOf(av, "Unit"))
768762 then unit
769763 else throw("Match error")
770764 }
771765
772766
773-func fB () = {
774- let aw = getString(T())
775- if ($isInstanceOf(aw, "String"))
767+func fz () = {
768+ let av = getString(T())
769+ if ($isInstanceOf(av, "String"))
776770 then {
777- let eb = aw
778- fromBase58String(eb)
771+ let dZ = av
772+ fromBase58String(dZ)
779773 }
780- else if ($isInstanceOf(aw, "Unit"))
774+ else if ($isInstanceOf(av, "Unit"))
781775 then unit
782776 else throw("Match error")
783777 }
784778
785779
786-let fC = throw("Permission denied")
780+let fA = throw("Permission denied")
787781
788-func fD (dO) = {
789- let aw = fA()
790- if ($isInstanceOf(aw, "ByteVector"))
782+func fB (dM) = {
783+ let av = fy()
784+ if ($isInstanceOf(av, "ByteVector"))
791785 then {
792- let fE = aw
793- (dO.callerPublicKey == fE)
786+ let fC = av
787+ (dM.callerPublicKey == fC)
794788 }
795- else if ($isInstanceOf(aw, "Unit"))
796- then (dO.caller == this)
789+ else if ($isInstanceOf(av, "Unit"))
790+ then (dM.caller == this)
797791 else throw("Match error")
798792 }
799793
800794
801-func fF (dO) = {
802- let aw = fA()
803- if ($isInstanceOf(aw, "ByteVector"))
795+func fD (dM) = {
796+ let av = fy()
797+ if ($isInstanceOf(av, "ByteVector"))
804798 then {
805- let fE = aw
806- if ((dO.callerPublicKey == fE))
799+ let fC = av
800+ if ((dM.callerPublicKey == fC))
807801 then true
808- else fC
802+ else fA
809803 }
810- else if ($isInstanceOf(aw, "Unit"))
811- then if ((dO.caller == this))
804+ else if ($isInstanceOf(av, "Unit"))
805+ then if ((dM.caller == this))
812806 then true
813- else fC
807+ else fA
814808 else throw("Match error")
815809 }
816810
817811
818-func fG (fH,eA,fI) = {
819- let aV = aN()
820- let cs = aV[u]
821- let ct = aV[v]
822- let dW = g
823- let dZ = parseBigIntValue(j)
824- let ea = (parseBigIntValue(aJ) * dZ)
825- let dV = if ((fH == false))
826- then [(toBigInt(bA(cs)) - fI), toBigInt(bA(ct))]
827- else [(toBigInt(bA(ct)) - fI), toBigInt(bA(cs))]
828- let eB = dV[0]
829- let eb = eB
830- let ec = (ea * dW)
831- let eC = (((((eA * eA) / (eB * dW)) * eA) * dZ) / (ec * dW))
832- let eD = ((eb + ((eA * dZ) / ec)) - eA)
833- func eh (ei,ej) = {
834- let fJ = ei
835- let eF = fJ._1
836- let em = fJ._2
837- if ((em != unit))
838- then ei
839- else {
840- let eG = (((eF * eF) + eC) / ((g * eF) + eD))
841- let eH = Q((eG - value(eF)))
842- if ((f >= eH))
843- then $Tuple2(eG, ej)
844- else $Tuple2(eG, unit)
845- }
846- }
847-
848- let eq = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
849- let fK = {
850- let es = eq
851- let et = size(es)
852- let eu = $Tuple2(eA, unit)
853- func ev (ew,ex) = if ((ex >= et))
854- then ew
855- else eh(ew, es[ex])
856-
857- func ey (ew,ex) = if ((ex >= et))
858- then ew
859- else throw("List size exceeds 15")
860-
861- ey(ev(ev(ev(ev(ev(ev(ev(ev(ev(ev(ev(ev(ev(ev(ev(eu, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
862- }
863- let eF = fK._1
864- let em = fK._2
865- if ((em != unit))
866- then eF
867- else throw(("Y calculation error, Y = " + toString(eF)))
812+@Callable(dM)
813+func constructor (R) = {
814+ let eA = fD(dM)
815+ if ((eA == eA))
816+ then [StringEntry(R(), R)]
817+ else throw("Strict value is not equal to itself.")
868818 }
869819
870820
871-@Callable(dO)
872-func calculateAmountOutForSwapAndSendTokens (fL,fH,fM,fN) = {
873- let fO = [if ((value(dO.payments[0]).amount >= fL))
874- then true
875- else aD("Wrong amount"), if ((dO.caller == addressFromStringValue(ay(ag()))))
876- then true
877- else aD("Permission denied")]
878- if ((fO == fO))
821+
822+@Callable(dM)
823+func setManager (fE) = {
824+ let eA = fD(dM)
825+ if ((eA == eA))
879826 then {
880- let dP = value(dO.payments[0])
881- let fP = toBase58String(value(dP.assetId))
882- let fQ = if ((fH == false))
883- then {
884- let fR = 1
885- let fS = ay(ad())
886- let fI = (bA(fP) - value(dO.payments[0]).amount)
887- $Tuple3(fS, fR, fI)
888- }
889- else {
890- let fR = 0
891- let fS = ay(ac())
892- let fI = (bA(fP) - value(dO.payments[0]).amount)
893- $Tuple3(fS, fR, fI)
894- }
895- let fS = fQ._1
896- let fR = fQ._2
897- let fI = fQ._3
898- let aV = aN()
899- let cs = aV[u]
900- let ct = aV[v]
901- let dV = [(toBigInt(bA(cs)) - toBigInt(value(dO.payments[0]).amount)), toBigInt(bA(ct))]
902- let eA = dU(dV)
903- let eF = fG(fH, eA, toBigInt(fI))
904- let eB = (toBigInt(fI) + toBigInt(fL))
905- let fT = ((toBigInt(bA(fS)) - eF) - toBigInt(1))
906- let fU = max([0, toInt(fT)])
907- let fV = [(fM >= fU), throw("Exchange resulted in fewer coins than expected")]
908- if ((fV == fV))
909- then [ScriptTransfer(addressFromStringValue(fN), toInt(fT), fromBase58String(fS))]
827+ let fF = fromBase58String(fE)
828+ if ((fF == fF))
829+ then [StringEntry(T(), fE)]
910830 else throw("Strict value is not equal to itself.")
911831 }
912832 else throw("Strict value is not equal to itself.")
914834
915835
916836
917-@Callable(dO)
918-func setSwapContract (fW) = {
919- let fX = fF(dO)
920- if ((fX == fX))
921- then [StringEntry(ag(), fW)]
922- else throw("Strict value is not equal to itself.")
923- }
924-
925-
926-
927-@Callable(dO)
928-func constructor (R) = {
929- let eC = fF(dO)
930- if ((eC == eC))
931- then [StringEntry(R(), R)]
932- else throw("Strict value is not equal to itself.")
933- }
934-
935-
936-
937-@Callable(dO)
938-func setManager (fY) = {
939- let eC = fF(dO)
940- if ((eC == eC))
837+@Callable(dM)
838+func confirmManager () = {
839+ let cf = fz()
840+ let fG = if (isDefined(cf))
841+ then true
842+ else throw("No pending manager")
843+ if ((fG == fG))
941844 then {
942- let fZ = fromBase58String(fY)
943- if ((fZ == fZ))
944- then [StringEntry(T(), fY)]
845+ let fH = if ((dM.callerPublicKey == value(cf)))
846+ then true
847+ else throw("You are not pending manager")
848+ if ((fH == fH))
849+ then [StringEntry(S(), toBase58String(value(cf))), DeleteEntry(T())]
945850 else throw("Strict value is not equal to itself.")
946851 }
947852 else throw("Strict value is not equal to itself.")
949854
950855
951856
952-@Callable(dO)
953-func confirmManager () = {
954- let ch = fB()
955- let ga = if (isDefined(ch))
956- then true
957- else throw("No pending manager")
958- if ((ga == ga))
959- then {
960- let gb = if ((dO.callerPublicKey == value(ch)))
961- then true
962- else throw("You are not pending manager")
963- if ((gb == gb))
964- then [StringEntry(S(), toBase58String(value(ch))), DeleteEntry(T())]
965- else throw("Strict value is not equal to itself.")
966- }
967- else throw("Strict value is not equal to itself.")
968- }
969-
970-
971-
972-@Callable(dO)
973-func put (gc,gd) = {
974- let ge = bf()
975- let gf = valueOrErrorMessage(addressFromString(ge[A]), "Wr st addr")
976- let gg = valueOrErrorMessage(addressFromString(ge[C]), "Wr sl addr")
977- if ((0 > gc))
857+@Callable(dM)
858+func put (fI,fJ) = {
859+ let fK = bd()
860+ let fL = valueOrErrorMessage(addressFromString(fK[A]), "Wr st addr")
861+ let fM = valueOrErrorMessage(addressFromString(fK[C]), "Wr sl addr")
862+ if ((0 > fI))
978863 then throw("Wrong slippage")
979- else if ((size(dO.payments) != 2))
864+ else if ((size(dM.payments) != 2))
980865 then throw("2 pmnts expd")
981866 else {
982- let gh = dQ(toString(dO.caller), toBase58String(dO.transactionId), AttachedPayment(value(dO.payments[0]).assetId, value(dO.payments[0]).amount), dO.payments[1], gc, true, false, true, 0, "")
983- let dt = gh._2
984- let gi = gh._7
985- let cK = gh._9
986- let du = gh._10
987- let dv = gh._11
988- let cs = gh._12
989- let ct = gh._13
990- let dg = invoke(aF, "emit", [dt], nil)
991- if ((dg == dg))
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))
992877 then {
993- let gj = {
994- let aw = dg
995- if ($isInstanceOf(aw, "Address"))
878+ let fP = {
879+ let av = de
880+ if ($isInstanceOf(av, "Address"))
996881 then {
997- let gk = aw
998- invoke(gk, "emit", [dt], nil)
882+ let fQ = av
883+ invoke(fQ, "emit", [dr], nil)
999884 }
1000885 else unit
1001886 }
1002- if ((gj == gj))
887+ if ((fP == fP))
1003888 then {
1004- let gl = if ((du > 0))
1005- then invoke(gg, "put", nil, [AttachedPayment(cs, du)])
889+ let fR = if ((ds > 0))
890+ then invoke(fM, "put", nil, [AttachedPayment(cq, ds)])
1006891 else nil
1007- if ((gl == gl))
892+ if ((fR == fR))
1008893 then {
1009- let gm = if ((dv > 0))
1010- then invoke(gg, "put", nil, [AttachedPayment(ct, dv)])
894+ let fS = if ((dt > 0))
895+ then invoke(fM, "put", nil, [AttachedPayment(cr, dt)])
1011896 else nil
1012- if ((gm == gm))
897+ if ((fS == fS))
1013898 then {
1014- let gn = if (gd)
899+ let fT = if (fJ)
1015900 then {
1016- let go = invoke(gf, "stake", nil, [AttachedPayment(gi, dt)])
1017- if ((go == go))
901+ let fU = invoke(fL, "stake", nil, [AttachedPayment(fO, dr)])
902+ if ((fU == fU))
1018903 then nil
1019904 else throw("Strict value is not equal to itself.")
1020905 }
1021- else [ScriptTransfer(dO.caller, dt, gi)]
1022- (cK ++ gn)
906+ else [ScriptTransfer(dM.caller, dr, fO)]
907+ (cI ++ fT)
1023908 }
1024909 else throw("Strict value is not equal to itself.")
1025910 }
1033918
1034919
1035920
1036-@Callable(dO)
1037-func putOneTknV2 (fi,gd) = {
1038- let gp = {
1039- let aH = invoke(aF, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1040- if ($isInstanceOf(aH, "Boolean"))
1041- then aH
1042- else throw(($getType(aH) + " couldn't be cast to Boolean"))
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"))
1043928 }
1044- let gq = if (if (if (aK())
929+ let fW = if (if (if (aI())
1045930 then true
1046- else (aZ == o))
931+ else (aX == o))
1047932 then true
1048- else (aZ == q))
933+ else (aX == q))
1049934 then true
1050- else gp
1051- let fO = [if (if (!(gq))
935+ else fV
936+ let fX = [if (if (!(fW))
1052937 then true
1053- else fD(dO))
938+ else fB(dM))
1054939 then true
1055- else aD("put operation is blocked by admin"), if ((size(dO.payments) == 1))
940+ else aB("put operation is blocked by admin"), if ((size(dM.payments) == 1))
1056941 then true
1057- else aD("exactly 1 payment are expected")]
1058- if ((fO == fO))
942+ else aB("exactly 1 payment are expected")]
943+ if ((fX == fX))
1059944 then {
1060- let aV = aN()
1061- let cs = aV[u]
1062- let ct = aV[v]
1063- let cr = fromBase58String(aV[t])
1064- let fm = parseIntValue(aV[w])
1065- let fn = parseIntValue(aV[x])
1066- let cq = if ((dO.caller == this))
1067- then dO.originCaller
1068- else dO.caller
1069- let dP = value(dO.payments[0])
1070- let co = toBase58String(value(dP.assetId))
1071- let cU = dP.amount
1072- let gr = eJ(cU, co, toString(cq), toBase58String(dO.transactionId), true)
1073- if ((gr == gr))
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))
1074959 then {
1075- let cl = gr._3
1076- let cK = gr._2
1077- let gs = gr._1
1078- let dt = if (if ((fi > 0))
1079- then (fi > gs)
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)
1080965 else false)
1081- then aD(makeString(["amount to receive is less than ", toString(fi)], ""))
1082- else gs
1083- let gh = invoke(aF, "emit", [dt], nil)
1084- if ((gh == gh))
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))
1085970 then {
1086- let gj = {
1087- let aw = gh
1088- if ($isInstanceOf(aw, "Address"))
971+ let fP = {
972+ let av = fN
973+ if ($isInstanceOf(av, "Address"))
1089974 then {
1090- let gk = aw
1091- invoke(gk, "emit", [dt], nil)
975+ let fQ = av
976+ invoke(fQ, "emit", [dr], nil)
1092977 }
1093978 else unit
1094979 }
1095- if ((gj == gj))
980+ if ((fP == fP))
1096981 then {
1097- let gn = if (gd)
982+ let fT = if (fJ)
1098983 then {
1099- let go = invoke(bh, "stake", nil, [AttachedPayment(cr, dt)])
1100- if ((go == go))
984+ let fU = invoke(bf, "stake", nil, [AttachedPayment(cp, dr)])
985+ if ((fU == fU))
1101986 then nil
1102987 else throw("Strict value is not equal to itself.")
1103988 }
1104- else [ScriptTransfer(dO.caller, dt, cr)]
1105- let fy = if ((cl > 0))
1106- then [ScriptTransfer(aM, cl, fromBase58String(co))]
989+ else [ScriptTransfer(dM.caller, dr, cp)]
990+ let fw = if ((cj > 0))
991+ then [ScriptTransfer(aK, cj, fromBase58String(cm))]
1107992 else nil
1108- $Tuple2(((cK ++ gn) ++ fy), dt)
993+ $Tuple2(((cI ++ fT) ++ fw), dr)
1109994 }
1110995 else throw("Strict value is not equal to itself.")
1111996 }
11181003
11191004
11201005
1121-@Callable(dO)
1122-func putForFree (gt) = if ((0 > gt))
1006+@Callable(dM)
1007+func putForFree (ga) = if ((0 > ga))
11231008 then throw("Wrong slpg")
1124- else if ((size(dO.payments) != 2))
1009+ else if ((size(dM.payments) != 2))
11251010 then throw("2 pmnts expd")
11261011 else {
1127- let gu = dQ(toString(dO.caller), toBase58String(dO.transactionId), AttachedPayment(value(dO.payments[0]).assetId, value(dO.payments[0]).amount), dO.payments[1], gt, false, false, true, 0, "")
1128- gu._9
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
11291014 }
11301015
11311016
11321017
1133-@Callable(dO)
1018+@Callable(dM)
11341019 func get () = {
1135- let dg = dN(dO)
1136- let gv = dg._1
1137- let cJ = dg._2
1138- let cU = dg._3
1139- let co = dg._4
1140- let cK = dg._5
1141- let eD = invoke(aF, "burn", [cU], [AttachedPayment(co, cU)])
1142- if ((eD == eD))
1143- then cK
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
11441029 else throw("Strict value is not equal to itself.")
11451030 }
11461031
11471032
11481033
1149-@Callable(dO)
1150-func getOneTknV2 (fh,fi) = {
1151- let gp = {
1152- let aH = invoke(aF, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1153- if ($isInstanceOf(aH, "Boolean"))
1154- then aH
1155- else throw(($getType(aH) + " couldn't be cast to Boolean"))
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"))
11561041 }
1157- let gw = if (if (aK())
1042+ let gd = if (if (aI())
11581043 then true
1159- else (aZ == q))
1044+ else (aX == q))
11601045 then true
1161- else gp
1162- let fO = [if (if (!(gw))
1046+ else fV
1047+ let fX = [if (if (!(gd))
11631048 then true
1164- else fD(dO))
1049+ else fB(dM))
11651050 then true
1166- else aD("get operation is blocked by admin"), if ((size(dO.payments) == 1))
1051+ else aB("get operation is blocked by admin"), if ((size(dM.payments) == 1))
11671052 then true
1168- else aD("exactly 1 payment are expected")]
1169- if ((fO == fO))
1053+ else aB("exactly 1 payment are expected")]
1054+ if ((fX == fX))
11701055 then {
1171- let gx = fg(fh, fi, dO.payments, dO.caller, dO.originCaller, dO.transactionId)
1172- let cK = gx._1
1173- let fr = gx._2
1174- $Tuple2(cK, fr)
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)
11751060 }
11761061 else throw("Strict value is not equal to itself.")
11771062 }
11781063
11791064
11801065
1181-@Callable(dO)
1182-func getOneTknV2READONLY (fh,gy) = {
1183- let aV = aN()
1184- let cs = aV[u]
1185- let ct = aV[v]
1186- let cr = aV[t]
1187- let dV = [toBigInt(bA(cs)), toBigInt(bA(ct))]
1188- let gz = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(cr)), "invalid lp asset").quantity)
1189- let bN = dU(dV)
1190- let bM = (bN - fraction(toBigInt(gy), bN, gz))
1191- let fR = if ((fh == cs))
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))
11921077 then 0
1193- else if ((fh == ct))
1078+ else if ((ff == cr))
11941079 then 1
11951080 else throw("invalid out asset id")
1196- let gA = ez(dV, fR, bM)
1197- let fT = (dV[fR] - gA)
1198- let fU = max([0, toInt((fT - f))])
1199- let gB = ci(fU, aI)
1200- let fq = gB._1
1201- let cl = gB._2
1202- $Tuple2(nil, $Tuple2(fq, cl))
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))
12031088 }
12041089
12051090
12061091
1207-@Callable(dO)
1208-func getOneTknV2WithBonusREADONLY (fh,gy) = {
1209- let aV = aN()
1210- let cs = aV[u]
1211- let ct = aV[v]
1212- let cr = aV[t]
1213- let cy = bA(cs)
1214- let cA = bA(ct)
1215- let gC = {
1216- let aH = invoke(this, "getOneTknV2READONLY", [fh, gy], nil)
1217- if ($isInstanceOf(aH, "(Int, Int)"))
1218- then aH
1219- else throw(($getType(aH) + " couldn't be cast to (Int, Int)"))
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)"))
12201105 }
1221- let fq = gC._1
1222- let cl = gC._2
1223- let dg = cm("", cr, gy, this)
1224- let cI = dg._1
1225- let cJ = dg._2
1226- let gD = (cI + cJ)
1227- let ff = if ((gD == 0))
1228- then if ((fq == 0))
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))
12291114 then 0
12301115 else throw("bonus calculation error")
1231- else fraction((fq - gD), a, gD)
1232- $Tuple2(nil, $Tuple3(fq, cl, ff))
1116+ else fraction((fo - gn), a, gn)
1117+ $Tuple2(nil, $Tuple3(fo, cj, fd))
12331118 }
12341119
12351120
12361121
1237-@Callable(dO)
1238-func getNoLess (gE,gF) = {
1239- let dg = dN(dO)
1240- let cI = dg._1
1241- let cJ = dg._2
1242- let cU = dg._3
1243- let co = dg._4
1244- let cK = dg._5
1245- if ((gE > cI))
1246- then throw(((("Failed: " + toString(cI)) + " < ") + toString(gE)))
1247- else if ((gF > cJ))
1248- then throw(((("Failed: " + toString(cJ)) + " < ") + toString(gF)))
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)))
12491134 else {
1250- let gG = invoke(aF, "burn", [cU], [AttachedPayment(co, cU)])
1251- if ((gG == gG))
1252- then cK
1135+ let gq = invoke(aD, "burn", [cS], [AttachedPayment(cm, cS)])
1136+ if ((gq == gq))
1137+ then cI
12531138 else throw("Strict value is not equal to itself.")
12541139 }
12551140 }
12561141
12571142
12581143
1259-@Callable(dO)
1260-func unstakeAndGet (cj) = {
1261- let gH = if ((size(dO.payments) != 0))
1144+@Callable(dM)
1145+func unstakeAndGet (ch) = {
1146+ let gr = if ((size(dM.payments) != 0))
12621147 then throw("No pmnts expd")
12631148 else true
1264- if ((gH == gH))
1149+ if ((gr == gr))
12651150 then {
1266- let bZ = aN()
1267- let gI = bf()
1268- let gi = fromBase58String(bZ[t])
1269- let gJ = valueOrErrorMessage(addressFromString(gI[A]), "Wr st addr")
1270- let gK = invoke(gJ, "unstake", [toBase58String(gi), cj], nil)
1271- if ((gK == gK))
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))
12721157 then {
1273- let dg = cm(toBase58String(dO.transactionId), toBase58String(gi), cj, dO.caller)
1274- let cw = parseIntValue(dg._9)
1275- let cK = dg._10
1276- let gL = if (if (aK())
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())
12771162 then true
1278- else (cw == q))
1279- then throw(("Blocked: " + toString(cw)))
1163+ else (cu == q))
1164+ then throw(("Blocked: " + toString(cu)))
12801165 else true
1281- if ((gL == gL))
1166+ if ((gv == gv))
12821167 then {
1283- let gM = invoke(aF, "burn", [cj], [AttachedPayment(gi, cj)])
1284- if ((gM == gM))
1285- then cK
1168+ let gw = invoke(aD, "burn", [ch], [AttachedPayment(fO, ch)])
1169+ if ((gw == gw))
1170+ then cI
12861171 else throw("Strict value is not equal to itself.")
12871172 }
12881173 else throw("Strict value is not equal to itself.")
12941179
12951180
12961181
1297-@Callable(dO)
1298-func unstakeAndGetNoLess (gN,gO,gF) = {
1299- let gw = if (aK())
1182+@Callable(dM)
1183+func unstakeAndGetNoLess (gx,gy,gp) = {
1184+ let gd = if (aI())
13001185 then true
1301- else (aZ == q)
1302- let fO = [if (!(gw))
1186+ else (aX == q)
1187+ let fX = [if (!(gd))
13031188 then true
1304- else throw("get operation is blocked by admin"), if ((size(dO.payments) == 0))
1189+ else throw("get operation is blocked by admin"), if ((size(dM.payments) == 0))
13051190 then true
13061191 else throw("no payments are expected")]
1307- if ((fO == fO))
1192+ if ((fX == fX))
13081193 then {
1309- let gK = invoke(bh, "unstake", [toBase58String(ba), gN], nil)
1310- if ((gK == gK))
1194+ let gu = invoke(bf, "unstake", [toBase58String(aY), gx], nil)
1195+ if ((gu == gu))
13111196 then {
1312- let gP = cm(toBase58String(dO.transactionId), toBase58String(ba), gN, dO.caller)
1313- let cI = gP._1
1314- let cJ = gP._2
1315- let cK = gP._10
1316- let gQ = [if ((cI >= gO))
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))
13171202 then true
1318- else throw(makeString(["amount asset amount to receive is less than ", toString(gO)], "")), if ((cJ >= gF))
1203+ else throw(makeString(["amount asset amount to receive is less than ", toString(gy)], "")), if ((cH >= gp))
13191204 then true
1320- else throw(makeString(["price asset amount to receive is less than ", toString(gF)], ""))]
1321- if ((gQ == gQ))
1205+ else throw(makeString(["price asset amount to receive is less than ", toString(gp)], ""))]
1206+ if ((gA == gA))
13221207 then {
1323- let gG = invoke(aF, "burn", [gN], [AttachedPayment(ba, gN)])
1324- if ((gG == gG))
1325- then cK
1208+ let gq = invoke(aD, "burn", [gx], [AttachedPayment(aY, gx)])
1209+ if ((gq == gq))
1210+ then cI
13261211 else throw("Strict value is not equal to itself.")
13271212 }
13281213 else throw("Strict value is not equal to itself.")
13341219
13351220
13361221
1337-@Callable(dO)
1338-func unstakeAndGetOneTknV2 (gN,fh,fi) = {
1339- let gp = {
1340- let aH = invoke(aF, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1341- if ($isInstanceOf(aH, "Boolean"))
1342- then aH
1343- else throw(($getType(aH) + " couldn't be cast to Boolean"))
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"))
13441229 }
1345- let gw = if (if (aK())
1230+ let gd = if (if (aI())
13461231 then true
1347- else (aZ == q))
1232+ else (aX == q))
13481233 then true
1349- else gp
1350- let fO = [if (if (!(gw))
1234+ else fV
1235+ let fX = [if (if (!(gd))
13511236 then true
1352- else fD(dO))
1237+ else fB(dM))
13531238 then true
1354- else aD("get operation is blocked by admin"), if ((size(dO.payments) == 0))
1239+ else aB("get operation is blocked by admin"), if ((size(dM.payments) == 0))
13551240 then true
1356- else aD("no payments are expected")]
1357- if ((fO == fO))
1241+ else aB("no payments are expected")]
1242+ if ((fX == fX))
13581243 then {
1359- let bZ = aN()
1360- let gI = bf()
1361- let gi = fromBase58String(bZ[t])
1362- let gJ = valueOrErrorMessage(addressFromString(gI[A]), "Wr st addr")
1363- let gK = invoke(gJ, "unstake", [toBase58String(gi), gN], nil)
1364- if ((gK == gK))
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))
13651250 then {
1366- let gR = fg(fh, fi, [AttachedPayment(gi, gN)], dO.caller, dO.originCaller, dO.transactionId)
1367- let cK = gR._1
1368- let fr = gR._2
1369- $Tuple2(cK, fr)
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)
13701255 }
13711256 else throw("Strict value is not equal to itself.")
13721257 }
13751260
13761261
13771262
1378-@Callable(dO)
1379-func putOneTknV2WithBonusREADONLY (gS,gT) = {
1380- let aV = aN()
1381- let cs = aV[u]
1382- let ct = aV[v]
1383- let cr = aV[t]
1384- let gU = eJ(gS, gT, "", "", true)
1385- let fa = gU._1
1386- let cK = gU._2
1387- let cl = gU._3
1388- let ff = gU._4
1389- $Tuple2(nil, $Tuple3(fa, cl, ff))
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))
13901275 }
13911276
13921277
13931278
1394-@Callable(dO)
1395-func putOneTknV2WithoutTakeFeeREADONLY (gS,gT) = {
1396- let aV = aN()
1397- let cs = aV[u]
1398- let ct = aV[v]
1399- let cr = aV[t]
1400- let gV = eJ(gS, gT, "", "", false)
1401- let fa = gV._1
1402- let cK = gV._2
1403- let cl = gV._3
1404- let ff = gV._4
1405- $Tuple2(nil, $Tuple3(fa, cl, ff))
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))
14061291 }
14071292
14081293
14091294
1410-@Callable(dO)
1411-func activate (gW,gX) = if ((toString(dO.caller) != toString(aF)))
1295+@Callable(dM)
1296+func activate (gG,gH) = if ((toString(dM.caller) != toString(aD)))
14121297 then throw("denied")
1413- else $Tuple2([StringEntry(ac(), gW), StringEntry(ad(), gX)], "success")
1298+ else $Tuple2([StringEntry(ac(), gG), StringEntry(ad(), gH)], "success")
14141299
14151300
14161301
1417-@Callable(dO)
1418-func setS (gY,gL) = if ((toString(dO.caller) != aA(this, af())))
1419- then fC
1420- else [StringEntry(gY, gL)]
1302+@Callable(dM)
1303+func setS (gI,gv) = if ((toString(dM.caller) != ax(this, af())))
1304+ then fA
1305+ else [StringEntry(gI, gv)]
14211306
14221307
14231308
1424-@Callable(dO)
1425-func setI (gY,gL) = if ((toString(dO.caller) != aA(this, af())))
1426- then fC
1427- else [IntegerEntry(gY, gL)]
1309+@Callable(dM)
1310+func setI (gI,gv) = if ((toString(dM.caller) != ax(this, af())))
1311+ then fA
1312+ else [IntegerEntry(gI, gv)]
14281313
14291314
14301315
1431-@Callable(dO)
1432-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aN())
1316+@Callable(dM)
1317+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aL())
14331318
14341319
14351320
1436-@Callable(dO)
1437-func getAccBalanceWrapperREADONLY (bB) = $Tuple2(nil, bA(bB))
1321+@Callable(dM)
1322+func getAccBalanceWrapperREADONLY (bz) = $Tuple2(nil, by(bz))
14381323
14391324
14401325
1441-@Callable(dO)
1442-func calcPricesWrapperREADONLY (bT,bU,bY) = {
1443- let gZ = bX(bT, bU, bY)
1444- $Tuple2(nil, [toString(gZ[0]), toString(gZ[1]), toString(gZ[2])])
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])])
14451330 }
14461331
14471332
14481333
1449-@Callable(dO)
1450-func fromX18WrapperREADONLY (J,ha) = $Tuple2(nil, I(parseBigIntValue(J), ha))
1334+@Callable(dM)
1335+func fromX18WrapperREADONLY (J,gK) = $Tuple2(nil, I(parseBigIntValue(J), gK))
14511336
14521337
14531338
1454-@Callable(dO)
1339+@Callable(dM)
14551340 func toX18WrapperREADONLY (G,H) = $Tuple2(nil, toString(F(G, H)))
14561341
14571342
14581343
1459-@Callable(dO)
1460-func calcPriceBigIntWrapperREADONLY (bD,bE) = $Tuple2(nil, toString(bC(parseBigIntValue(bD), parseBigIntValue(bE))))
1344+@Callable(dM)
1345+func calcPriceBigIntWrapperREADONLY (bB,bC) = $Tuple2(nil, toString(bA(parseBigIntValue(bB), parseBigIntValue(bC))))
14611346
14621347
14631348
1464-@Callable(dO)
1465-func estimatePutOperationWrapperREADONLY (cn,bI,cM,cN,cO,cP,hb,cQ,cR) = $Tuple2(nil, cL(cn, bI, cM, cN, cO, cP, hb, cQ, cR, true, false, 0, ""))
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, ""))
14661351
14671352
14681353
1469-@Callable(dO)
1470-func estimateGetOperationWrapperREADONLY (cn,hc,cp,hb) = {
1471- let dg = cm(cn, hc, cp, addressFromStringValue(hb))
1472- $Tuple2(nil, $Tuple10(dg._1, dg._2, dg._3, dg._4, dg._5, dg._6, dg._7, toString(dg._8), dg._9, dg._10))
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))
14731358 }
14741359
14751360
1476-@Verifier(hd)
1477-func he () = {
1478- let hf = {
1479- let aw = fA()
1480- if ($isInstanceOf(aw, "ByteVector"))
1361+@Verifier(gN)
1362+func gO () = {
1363+ let gP = {
1364+ let av = fy()
1365+ if ($isInstanceOf(av, "ByteVector"))
14811366 then {
1482- let fE = aw
1483- fE
1367+ let fC = av
1368+ fC
14841369 }
1485- else if ($isInstanceOf(aw, "Unit"))
1486- then hd.senderPublicKey
1370+ else if ($isInstanceOf(av, "Unit"))
1371+ then gN.senderPublicKey
14871372 else throw("Match error")
14881373 }
1489- let aw = hd
1490- if ($isInstanceOf(aw, "Order"))
1374+ let av = gN
1375+ if ($isInstanceOf(av, "Order"))
14911376 then {
1492- let dB = aw
1493- let hg = aL()
1494- let hh = dA(dB)
1495- let hi = sigVerify(dB.bodyBytes, dB.proofs[0], dB.senderPublicKey)
1496- let hj = sigVerify(dB.bodyBytes, dB.proofs[1], hg)
1497- if (if (if (hh)
1498- then hi
1377+ let dz = av
1378+ let gQ = aJ()
1379+ let gR = dy(dz)
1380+ let gS = sigVerify(dz.bodyBytes, dz.proofs[0], dz.senderPublicKey)
1381+ let gT = sigVerify(dz.bodyBytes, dz.proofs[1], gQ)
1382+ if (if (if (gR)
1383+ then gS
14991384 else false)
1500- then hj
1385+ then gT
15011386 else false)
15021387 then true
1503- else ar(hh, hi, hj)
1388+ else aq(gR, gS, gT)
15041389 }
1505- else if ($isInstanceOf(aw, "SetScriptTransaction"))
1390+ else if ($isInstanceOf(av, "SetScriptTransaction"))
15061391 then {
1507- let eb = aw
1508- let hk = blake2b256(value(eb.script))
1509- let hl = fromBase64String(value(getString(aF, ap())))
1510- let hm = scriptHash(this)
1511- if (if ((hl == hk))
1512- then (hm != hk)
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)
15131398 else false)
15141399 then true
1515- else sigVerify(hd.bodyBytes, hd.proofs[0], hf)
1400+ else sigVerify(gN.bodyBytes, gN.proofs[0], gP)
15161401 }
1517- else sigVerify(hd.bodyBytes, hd.proofs[0], hf)
1402+ else sigVerify(gN.bodyBytes, gN.proofs[0], gP)
15181403 }
15191404
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = 100000000
55
66 let b = toBigInt(100000000)
77
88 let c = toBigInt(1000000000000000000)
99
1010 let d = toBigInt(0)
1111
1212 let e = toBigInt(0)
1313
1414 let f = toBigInt(1)
1515
1616 let g = toBigInt(2)
1717
1818 let h = toBigInt((a - ((a * 1) / a)))
1919
2020 let i = "WAVES"
2121
2222 let j = "100"
2323
2424 let k = "1"
2525
2626 let l = "__"
2727
2828 let m = ""
2929
3030 let n = 1
3131
3232 let o = 2
3333
3434 let p = 3
3535
3636 let q = 4
3737
3838 let r = 1
3939
4040 let s = 2
4141
4242 let t = 3
4343
4444 let u = 4
4545
4646 let v = 5
4747
4848 let w = 6
4949
5050 let x = 7
5151
5252 let y = 8
5353
5454 let z = 9
5555
5656 let A = 1
5757
5858 let B = 6
5959
6060 let C = 7
6161
6262 let D = 10
6363
6464 let E = fraction(10, a, 10000)
6565
6666 func F (G,H) = fraction(toBigInt(G), c, toBigInt(H))
6767
6868
6969 func I (J,K) = toInt(fraction(J, toBigInt(K), c))
7070
7171
7272 func L (M,N,O) = fraction(M, N, O)
7373
7474
7575 func P (J) = if ((d > J))
7676 then -(J)
7777 else J
7878
7979
8080 func Q (J) = if ((d > J))
8181 then -(J)
8282 else J
8383
8484
8585 func R () = "%s__factoryContract"
8686
8787
8888 func S () = "%s__managerPublicKey"
8989
9090
9191 func T () = "%s__pendingManagerPublicKey"
9292
9393
9494 func U () = "%s%s__price__last"
9595
9696
9797 func V (W,X) = makeString(["%s%s%d%d__price__history", toString(W), toString(X)], l)
9898
9999
100100 func Y (Z,aa) = ((("%s%s%s__P__" + Z) + "__") + aa)
101101
102102
103103 func ab (Z,aa) = ((("%s%s%s__G__" + Z) + "__") + aa)
104104
105105
106106 func ac () = "%s__amountAsset"
107107
108108
109109 func ad () = "%s__priceAsset"
110110
111111
112112 func ae () = "%s__amp"
113113
114114
115115 func af () = "%s__addonAddr"
116116
117117
118-func ag () = "%s__swapContract"
118+func ag () = "%s__factoryConfig"
119119
120120
121-func ah () = "%s__factoryConfig"
121+func ah () = "%s%s__matcher__publicKey"
122122
123123
124-func ai () = "%s%s__matcher__publicKey"
124+func ai (aj,ak) = (((("%d%d%s__" + aj) + "__") + ak) + "__config")
125125
126126
127-func aj (ak,al) = (((("%d%d%s__" + ak) + "__") + al) + "__config")
127+func al (am) = ("%s%s%s__mappings__baseAsset2internalId__" + am)
128128
129129
130-func am (an) = ("%s%s%s__mappings__baseAsset2internalId__" + an)
130+func an () = "%s__shutdown"
131131
132132
133-func ao () = "%s__shutdown"
133+func ao () = "%s__allowedLpStableScriptHash"
134134
135135
136-func ap () = "%s__allowedLpStableScriptHash"
136+func ap () = "%s__feeCollectorAddress"
137137
138138
139-func aq () = "%s__feeCollectorAddress"
139+func aq (ar,as,at) = throw(((((("Failed: ordValid=" + toString(ar)) + " sndrValid=") + toString(as)) + " mtchrValid=") + toString(at)))
140140
141141
142-func ar (as,at,au) = throw(((((("Failed: ordValid=" + toString(as)) + " sndrValid=") + toString(at)) + " mtchrValid=") + toString(au)))
143-
144-
145-func av (J) = {
146- let aw = J
147- if ($isInstanceOf(aw, "String"))
142+func au (J) = {
143+ let av = J
144+ if ($isInstanceOf(av, "String"))
148145 then {
149- let ax = aw
150- ax
146+ let aw = av
147+ aw
151148 }
152149 else throw("fail cast to String")
153150 }
154151
155152
156-func ay (az) = valueOrErrorMessage(getString(az), (("mandatory this." + az) + " is not defined"))
153+func ax (ay,az) = valueOrErrorMessage(getString(ay, az), makeString(["mandatory ", toString(ay), ".", az, " not defined"], ""))
157154
158155
159-func aA (aB,az) = valueOrErrorMessage(getString(aB, az), makeString(["mandatory ", toString(aB), ".", az, " not defined"], ""))
156+func aA (ay,az) = valueOrErrorMessage(getInteger(ay, az), makeString(["mandatory ", toString(ay), ".", az, " not defined"], ""))
160157
161158
162-func aC (aB,az) = valueOrErrorMessage(getInteger(aB, az), makeString(["mandatory ", toString(aB), ".", az, " not defined"], ""))
159+func aB (aC) = throw(makeString(["lp_stable.ride:", aC], " "))
163160
164161
165-func aD (aE) = throw(makeString(["lp_stable.ride:", aE], " "))
162+let aD = addressFromStringValue(ax(this, R()))
163+
164+let aE = {
165+ let aF = invoke(aD, "getInFeeREADONLY", [toString(this)], nil)
166+ if ($isInstanceOf(aF, "Int"))
167+ then aF
168+ else throw(($getType(aF) + " couldn't be cast to Int"))
169+ }
170+
171+let aG = {
172+ let aF = invoke(aD, "getOutFeeREADONLY", [toString(this)], nil)
173+ if ($isInstanceOf(aF, "Int"))
174+ then aF
175+ else throw(($getType(aF) + " couldn't be cast to Int"))
176+ }
177+
178+let aH = ax(this, ae())
179+
180+func aI () = valueOrElse(getBoolean(aD, an()), false)
166181
167182
168-let aF = addressFromStringValue(aA(this, R()))
169-
170-let aG = {
171- let aH = invoke(aF, "getInFeeREADONLY", [toString(this)], nil)
172- if ($isInstanceOf(aH, "Int"))
173- then aH
174- else throw(($getType(aH) + " couldn't be cast to Int"))
175- }
176-
177-let aI = {
178- let aH = invoke(aF, "getOutFeeREADONLY", [toString(this)], nil)
179- if ($isInstanceOf(aH, "Int"))
180- then aH
181- else throw(($getType(aH) + " couldn't be cast to Int"))
182- }
183-
184-let aJ = aA(this, ae())
185-
186-func aK () = valueOrElse(getBoolean(aF, ao()), false)
183+func aJ () = fromBase58String(ax(aD, ah()))
187184
188185
189-func aL () = fromBase58String(aA(aF, ai()))
186+let aK = addressFromStringValue(ax(aD, ap()))
190187
191-
192-let aM = addressFromStringValue(aA(aF, aq()))
193-
194-func aN () = {
195- let aO = aA(this, ac())
196- let aP = aA(this, ad())
197- let aQ = aC(aF, am(aP))
198- let ak = aC(aF, am(aO))
199- split(aA(aF, aj(toString(ak), toString(aQ))), l)
188+func aL () = {
189+ let aM = ax(this, ac())
190+ let aN = ax(this, ad())
191+ let aO = aA(aD, al(aN))
192+ let aj = aA(aD, al(aM))
193+ split(ax(aD, ai(toString(aj), toString(aO))), l)
200194 }
201195
202196
203-func aR (aS) = if ((aS == i))
197+func aP (aQ) = if ((aQ == i))
204198 then unit
205- else fromBase58String(aS)
199+ else fromBase58String(aQ)
206200
207201
208-func aT (aS) = if ((aS == unit))
202+func aR (aQ) = if ((aQ == unit))
209203 then i
210- else toBase58String(value(aS))
204+ else toBase58String(value(aQ))
211205
212206
213-func aU (aV) = $Tuple7(addressFromStringValue(aV[r]), parseIntValue(aV[s]), fromBase58String(aV[t]), aR(aV[u]), aR(aV[v]), parseIntValue(aV[w]), parseIntValue(aV[x]))
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]))
214208
215209
216-let aW = aU(aN())
210+let aU = aS(aL())
217211
218-let aX = aW
212+let aV = aU
219213
220-let aY = aX._1
214+let aW = aV._1
221215
222-let aZ = aX._2
216+let aX = aV._2
223217
224-let ba = aX._3
218+let aY = aV._3
225219
226-let bb = aX._4
220+let aZ = aV._4
227221
228-let bc = aX._5
222+let ba = aV._5
229223
230-let bd = aX._6
224+let bb = aV._6
231225
232-let be = aX._7
226+let bc = aV._7
233227
234-func bf () = split(aA(aF, ah()), l)
228+func bd () = split(ax(aD, ag()), l)
235229
236230
237-let bg = bf()
231+let be = bd()
238232
239-let bh = valueOrErrorMessage(addressFromString(bg[A]), "Invalid staking contract address")
233+let bf = valueOrErrorMessage(addressFromString(be[A]), "Invalid staking contract address")
240234
241-let bi = valueOrErrorMessage(addressFromString(bg[C]), "Invalid slipage contract address")
235+let bg = valueOrErrorMessage(addressFromString(be[C]), "Invalid slipage contract address")
242236
243-let bj = valueOrErrorMessage(addressFromString(bg[D]), "Invalid gwx contract address")
237+let bh = valueOrErrorMessage(addressFromString(be[D]), "Invalid gwx contract address")
244238
245-let bk = valueOrErrorMessage(addressFromString(bg[B]), "Invalid gwx contract address")
239+let bi = valueOrErrorMessage(addressFromString(be[B]), "Invalid gwx contract address")
246240
247-func bl (bm,bn,bo,bp,bq,br,bs,bt,bu,bv) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bm), toString(bn), toString(bo), toString(bp), toString(bq), toString(br), toString(bs), toString(bt), toString(bu), toString(bv)], l)
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)
248242
249243
250-func bw (bx,by,bz,bp,bs,bt) = makeString(["%d%d%d%d%d%d", toString(bx), toString(by), toString(bz), toString(bp), toString(bs), toString(bt)], l)
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)
251245
252246
253-func bA (bB) = if ((bB == "WAVES"))
247+func by (bz) = if ((bz == "WAVES"))
254248 then wavesBalance(this).available
255- else assetBalance(this, fromBase58String(bB))
249+ else assetBalance(this, fromBase58String(bz))
256250
257251
258-func bC (bD,bE) = fraction(bD, c, bE)
252+func bA (bB,bC) = fraction(bB, c, bC)
259253
260254
261-func bF (bG,bH,bI) = {
262- let bJ = fraction((bG - bH), b, bH)
263- let bK = ((bI - P(bJ)) > d)
264- if (!(bK))
265- then throw(("Big slpg: " + toString(bJ)))
266- else $Tuple2(bK, min([bG, bH]))
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]))
267261 }
268262
269263
270-func bL (bM,bN,bO) = {
271- let bJ = fraction(bN, b, bM)
272- let bP = (bO > bJ)
273- if (if (bP)
264+func bJ (bK,bL,bM) = {
265+ let bH = fraction(bL, b, bK)
266+ let bN = (bM > bH)
267+ if (if (bN)
274268 then true
275- else (bN > bM))
276- then throw(((((((toString(bN) + " ") + toString(bM)) + " ") + toString(bJ)) + " ") + toString(bO)))
277- else bP
269+ else (bL > bK))
270+ then throw(((((((toString(bL) + " ") + toString(bK)) + " ") + toString(bH)) + " ") + toString(bM)))
271+ else bN
278272 }
279273
280274
281-func bQ (bR,bS,bT,bU) = {
282- let bV = F(bT, bR)
283- let bW = F(bU, bS)
284- bC(bW, bV)
275+func bO (bP,bQ,bR,bS) = {
276+ let bT = F(bR, bP)
277+ let bU = F(bS, bQ)
278+ bA(bU, bT)
285279 }
286280
287281
288-func bX (bT,bU,bY) = {
289- let bZ = aN()
290- let ca = parseIntValue(bZ[w])
291- let cb = parseIntValue(bZ[x])
292- let cc = bQ(ca, cb, bT, bU)
293- let bE = F(bT, ca)
294- let bD = F(bU, cb)
295- let cd = F(bY, a)
296- let ce = bC(bE, cd)
297- let cf = bC(bD, cd)
298-[cc, ce, cf]
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]
299293 }
300294
301295
302-func cg (bT,bU,bY) = {
303- let ch = bX(bT, bU, bY)
304-[I(ch[0], a), I(ch[1], a), I(ch[2], a)]
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)]
305299 }
306300
307301
308-func ci (cj,ck) = {
309- let cl = if ((ck == 0))
302+func cg (ch,ci) = {
303+ let cj = if ((ci == 0))
310304 then 0
311- else fraction(cj, ck, a)
312- $Tuple2((cj - cl), cl)
305+ else fraction(ch, ci, a)
306+ $Tuple2((ch - cj), cj)
313307 }
314308
315309
316-func cm (cn,co,cp,cq) = {
317- let bZ = aN()
318- let cr = bZ[t]
319- let cs = bZ[u]
320- let ct = bZ[v]
321- let cu = parseIntValue(bZ[w])
322- let cv = parseIntValue(bZ[x])
323- let cw = bZ[s]
324- let cx = valueOrErrorMessage(assetInfo(fromBase58String(cr)), "Wrong LP id").quantity
325- if ((cr != co))
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))
326320 then throw("Wrong pmt asset")
327321 else {
328- let cy = bA(cs)
329- let cz = F(cy, cu)
330- let cA = bA(ct)
331- let cB = F(cA, cv)
332- let cC = bC(cB, cz)
333- let cD = I(cC, a)
334- let cE = F(cp, a)
335- let cF = F(cx, a)
336- let cG = fraction(cz, cE, cF)
337- let cH = fraction(cB, cE, cF)
338- let cI = I(cG, cu)
339- let cJ = I(cH, cv)
340- let cK = if ((cn == ""))
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 == ""))
341335 then nil
342- else [ScriptTransfer(cq, cI, if ((cs == "WAVES"))
336+ else [ScriptTransfer(co, cG, if ((cq == "WAVES"))
343337 then unit
344- else fromBase58String(cs)), ScriptTransfer(cq, cJ, if ((ct == "WAVES"))
338+ else fromBase58String(cq)), ScriptTransfer(co, cH, if ((cr == "WAVES"))
345339 then unit
346- else fromBase58String(ct)), StringEntry(ab(toString(cq), cn), bw(cI, cJ, cp, cD, height, lastBlock.timestamp)), IntegerEntry(U(), cD), IntegerEntry(V(height, lastBlock.timestamp), cD)]
347- $Tuple10(cI, cJ, cs, ct, cy, cA, cx, cC, cw, cK)
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)
348342 }
349343 }
350344
351345
352-func cL (cn,bI,cM,cN,cO,cP,cq,cQ,cR,cS,cT,cU,cV) = {
353- let bZ = aN()
354- let cr = fromBase58String(bZ[t])
355- let cW = bZ[u]
356- let cX = bZ[v]
357- let cY = bZ[y]
358- let cZ = bZ[z]
359- let da = parseIntValue(bZ[w])
360- let db = parseIntValue(bZ[x])
361- let cw = bZ[s]
362- let dc = valueOrErrorMessage(assetInfo(cr), "Wr lp as").quantity
363- let cy = if (cQ)
364- then bA(cW)
365- else if (if (cS)
366- then (cV == cW)
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)
367361 else false)
368- then (bA(cW) - cU)
369- else if (cS)
370- then bA(cW)
371- else (bA(cW) - cM)
372- let cA = if (cQ)
373- then bA(cX)
374- else if (if (cS)
375- then (cV == cX)
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)
376370 else false)
377- then (bA(cX) - cU)
378- else if (cS)
379- then bA(cX)
380- else (bA(cX) - cO)
381- let dd = F(cM, da)
382- let de = F(cO, db)
383- let df = bC(de, dd)
384- let cz = F(cy, da)
385- let cB = F(cA, db)
386- let dg = if ((dc == 0))
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))
387381 then {
388- let cC = d
389- let dh = d
390- let cd = pow((dd * de), 0, toBigInt(5), 1, 0, DOWN)
391- $Tuple5(I(cd, a), I(dd, da), I(de, db), bC((cB + de), (cz + dd)), dh)
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)
392386 }
393387 else {
394- let cC = bC(cB, cz)
395- let di = fraction(P((cC - df)), c, cC)
396- let dh = F(bI, a)
397- if (if (if (cT)
398- then (cC != d)
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)
399393 else false)
400- then (di > dh)
394+ then (dg > df)
401395 else false)
402- then throw(((("Price slippage " + toString(di)) + " > ") + toString(dh)))
396+ then throw(((("Price slippage " + toString(dg)) + " > ") + toString(df)))
403397 else {
404- let dj = F(dc, a)
405- let dk = fraction(dd, cC, c)
406- let dl = fraction(de, c, cC)
407- let dm = if ((dk > de))
408- then $Tuple2(dl, de)
409- else $Tuple2(dd, dk)
410- let dn = dm._1
411- let do = dm._2
412- let cd = fraction(dj, do, cB)
413- $Tuple5(I(cd, a), I(dn, da), I(do, db), cC, dh)
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)
414408 }
415409 }
416- let dp = dg._1
417- let dq = dg._2
418- let dr = dg._3
419- let cD = I(dg._4, a)
420- let ds = I(dg._5, a)
421- if ((0 >= dp))
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))
422416 then throw("LP <= 0")
423417 else {
424- let dt = if (!(cR))
418+ let dr = if (!(cP))
425419 then 0
426- else dp
427- let du = (cM - dq)
428- let dv = (cO - dr)
429- let dw = if (if (cS)
430- then (cV == cW)
420+ else dn
421+ let ds = (cK - do)
422+ let dt = (cM - dp)
423+ let du = if (if (cQ)
424+ then (cT == cU)
431425 else false)
432- then $Tuple2(cU, 0)
433- else if (if (cS)
434- then (cV == cX)
426+ then $Tuple2(cS, 0)
427+ else if (if (cQ)
428+ then (cT == cV)
435429 else false)
436- then $Tuple2(0, cU)
437- else $Tuple2(dq, dr)
438- let dx = dw._1
439- let dy = dw._2
440- let dz = [IntegerEntry(U(), cD), IntegerEntry(V(height, lastBlock.timestamp), cD), StringEntry(Y(cq, cn), bl(dx, dy, dt, cD, bI, ds, height, lastBlock.timestamp, du, dv))]
441- $Tuple13(dp, dt, cD, cy, cA, dc, cr, cw, dz, du, dv, cN, cP)
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)
442436 }
443437 }
444438
445439
446-func dA (dB) = {
447- let bZ = aN()
448- let dC = bZ[u]
449- let dD = bZ[v]
450- let cw = parseIntValue(bZ[s])
451- let ca = parseIntValue(bZ[w])
452- let cb = parseIntValue(bZ[x])
453- let dE = bA(dC)
454- let dF = bA(dD)
455- let cC = if ((dB.orderType == Buy))
456- then bQ(ca, cb, (dE + dB.amount), dF)
457- else bQ(ca, cb, (dE - dB.amount), dF)
458- let cD = I(cC, a)
459- if (if (if (aK())
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())
460454 then true
461- else (cw == p))
455+ else (cu == p))
462456 then true
463- else (cw == q))
457+ else (cu == q))
464458 then throw("Admin blocked")
465459 else {
466- let dG = dB.assetPair.amountAsset
460+ let dE = dz.assetPair.amountAsset
461+ let dF = if ((dE == unit))
462+ then "WAVES"
463+ else toBase58String(value(dE))
464+ let dG = dz.assetPair.priceAsset
467465 let dH = if ((dG == unit))
468466 then "WAVES"
469467 else toBase58String(value(dG))
470- let dI = dB.assetPair.priceAsset
471- let dJ = if ((dI == unit))
472- then "WAVES"
473- else toBase58String(value(dI))
474- if (if ((dH != dC))
468+ if (if ((dF != dA))
475469 then true
476- else (dJ != dD))
470+ else (dH != dB))
477471 then throw("Wr assets")
478472 else {
479- let dK = dB.price
480- let db = fraction(a, cb, ca)
481- let dL = L(dK, a, db)
482- let dM = if ((dB.orderType == Buy))
483- then (cD >= dL)
484- else (dL >= cD)
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)
485479 true
486480 }
487481 }
488482 }
489483
490484
491-func dN (dO) = if ((size(dO.payments) != 1))
485+func dL (dM) = if ((size(dM.payments) != 1))
492486 then throw("1 pmnt exp")
493487 else {
494- let dP = value(dO.payments[0])
495- let co = value(dP.assetId)
496- let cU = dP.amount
497- let dg = cm(toBase58String(dO.transactionId), toBase58String(co), cU, dO.caller)
498- let cI = dg._1
499- let cJ = dg._2
500- let cw = parseIntValue(dg._9)
501- let cK = dg._10
502- if (if (aK())
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())
503497 then true
504- else (cw == q))
505- then throw(("Admin blocked: " + toString(cw)))
506- else $Tuple5(cI, cJ, cU, co, cK)
498+ else (cu == q))
499+ then throw(("Admin blocked: " + toString(cu)))
500+ else $Tuple5(cG, cH, cS, cm, cI)
507501 }
508502
509503
510-func dQ (dR,aa,dS,dT,bI,cR,cS,cT,cU,cV) = {
511- let dg = cL(aa, bI, value(dS).amount, value(dS).assetId, value(dT).amount, value(dT).assetId, dR, (aa == ""), cR, cS, cT, cU, cV)
512- let cw = parseIntValue(dg._8)
513- if (if (if (aK())
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())
514508 then true
515- else (cw == o))
509+ else (cu == o))
516510 then true
517- else (cw == q))
518- then throw(("Blocked:" + toString(cw)))
519- else dg
511+ else (cu == q))
512+ then throw(("Blocked:" + toString(cu)))
513+ else de
520514 }
521515
522516
523-func dU (dV) = {
524- let dW = g
525- let dX = dV[0]
526- let dY = dV[1]
527- let dZ = parseBigIntValue(j)
528- let ea = (parseBigIntValue(aJ) * dZ)
529- let eb = (dX + dY)
530- if ((eb == e))
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))
531525 then e
532526 else {
533- let ec = (ea * dW)
534- let ed = (((dX * dY) * dW) * dW)
535- let ee = ((ec * eb) / dZ)
536- let ef = (ec - dZ)
537- let eg = (dW + f)
538- func eh (ei,ej) = {
539- let ek = ei
540- let el = ek._1
541- let em = ek._2
542- if ((em != unit))
543- then ei
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
544538 else {
545- let en = (((el * el) * el) / ed)
546- let eo = (((ee + (en * dW)) * el) / (((ef * el) / dZ) + (eg * en)))
547- let ep = Q((eo - value(el)))
548- if ((f >= ep))
549- then $Tuple2(eo, ej)
550- else $Tuple2(eo, unit)
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)
551545 }
552546 }
553547
554- let eq = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
555- let er = {
556- let es = eq
557- let et = size(es)
558- let eu = $Tuple2(eb, unit)
559- func ev (ew,ex) = if ((ex >= et))
560- then ew
561- else eh(ew, es[ex])
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])
562556
563- func ey (ew,ex) = if ((ex >= et))
564- then ew
557+ func ew (eu,ev) = if ((ev >= er))
558+ then eu
565559 else throw("List size exceeds 15")
566560
567- ey(ev(ev(ev(ev(ev(ev(ev(ev(ev(ev(ev(ev(ev(ev(ev(eu, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
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)
568562 }
569- let el = er._1
570- let em = er._2
571- if ((em != unit))
572- then el
573- else throw(("D calculation error, D = " + toString(el)))
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)))
574568 }
575569 }
576570
577571
578-func ez (dV,dO,eA) = {
579- let dW = g
580- let eB = dV[if ((dO == 0))
572+func ex (dT,dM,ey) = {
573+ let dU = g
574+ let ez = dT[if ((dM == 0))
581575 then 1
582576 else 0]
583- let dZ = parseBigIntValue(j)
584- let ea = (parseBigIntValue(aJ) * dZ)
585- let eb = eB
586- let ec = (ea * dW)
587- let eC = (((((eA * eA) / (eB * dW)) * eA) * dZ) / (ec * dW))
588- let eD = ((eb + ((eA * dZ) / ec)) - eA)
589- func eh (ei,ej) = {
590- let eE = ei
591- let eF = eE._1
592- let em = eE._2
593- if ((em != unit))
594- then ei
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
595589 else {
596- let eG = (((eF * eF) + eC) / ((g * eF) + eD))
597- let eH = Q((eG - value(eF)))
598- if ((f >= eH))
599- then $Tuple2(eG, ej)
600- else $Tuple2(eG, unit)
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)
601595 }
602596 }
603597
604- let eq = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
605- let eI = {
606- let es = eq
607- let et = size(es)
608- let eu = $Tuple2(eA, unit)
609- func ev (ew,ex) = if ((ex >= et))
610- then ew
611- else eh(ew, es[ex])
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])
612606
613- func ey (ew,ex) = if ((ex >= et))
614- then ew
607+ func ew (eu,ev) = if ((ev >= er))
608+ then eu
615609 else throw("List size exceeds 15")
616610
617- ey(ev(ev(ev(ev(ev(ev(ev(ev(ev(ev(ev(ev(ev(ev(ev(eu, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
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)
618612 }
619- let eF = eI._1
620- let em = eI._2
621- if ((em != unit))
622- then eF
623- else throw(("Y calculation error, Y = " + toString(eF)))
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)))
624618 }
625619
626620
627-func eJ (eK,co,cq,aa,eL) = {
628- let aV = aN()
629- let cs = aV[u]
630- let ct = aV[v]
631- let cr = aV[t]
632- let da = parseIntValue(aV[w])
633- let db = parseIntValue(aV[x])
634- let eM = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(cr)), "invalid lp asset").quantity)
635- let eN = if ((eM > e))
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))
636630 then true
637631 else throw("initial deposit requires all coins")
638- if ((eN == eN))
632+ if ((eL == eL))
639633 then {
640- let cy = bA(cs)
641- let cA = bA(ct)
642- let eO = if ((aa == ""))
643- then $Tuple2(cy, cA)
644- else if ((co == cs))
645- then if ((eK > cy))
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))
646640 then throw("invalid payment amount")
647- else $Tuple2((cy - eK), cA)
648- else if ((co == ct))
649- then if ((eK > cA))
641+ else $Tuple2((cw - eI), cy)
642+ else if ((cm == cr))
643+ then if ((eI > cy))
650644 then throw("invalid payment amount")
651- else $Tuple2(cy, (cA - eK))
645+ else $Tuple2(cw, (cy - eI))
652646 else throw("wrong pmtAssetId")
653- let eP = eO._1
654- let eQ = eO._2
655- let eR = if ((co == cs))
656- then $Tuple2(eK, 0)
657- else if ((co == ct))
658- then $Tuple2(0, eK)
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)
659653 else throw("invalid payment")
660- let eS = eR._1
661- let eT = eR._2
662- let eU = if (eL)
663- then $Tuple3(ci(eS, aG)._1, ci(eT, aG)._1, ci(eK, aG)._2)
664- else $Tuple3(eS, eT, 0)
665- let eV = eU._1
666- let eW = eU._2
667- let cl = eU._3
668- let eX = (eP + eV)
669- let eY = (eQ + eW)
670- let bN = dU([toBigInt(eP), toBigInt(eQ)])
671- let bM = dU([toBigInt(eX), toBigInt(eY)])
672- let eZ = if ((bM > bN))
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))
673667 then true
674668 else throw()
675- if ((eZ == eZ))
669+ if ((eX == eX))
676670 then {
677- let fa = fraction(eM, (bM - bN), bN)
678- let cD = I(bC(F(eY, db), F(eX, da)), a)
679- let dz = [IntegerEntry(U(), cD), IntegerEntry(V(height, lastBlock.timestamp), cD), StringEntry(Y(cq, aa), bl(eS, eT, toInt(fa), cD, 0, 0, height, lastBlock.timestamp, 0, 0))]
680- let fb = fraction(eQ, a, eP)
681- let fc = fraction(eK, a, (fb + a))
682- let fd = (eK - fc)
683- let fe = fraction(eM, toBigInt(fd), toBigInt(eQ))
684- let ff = toInt(fraction((fa - fe), b, fe))
685- $Tuple4(toInt(fa), dz, cl, ff)
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)
686680 }
687681 else throw("Strict value is not equal to itself.")
688682 }
689683 else throw("Strict value is not equal to itself.")
690684 }
691685
692686
693-func fg (fh,fi,fj,dR,fk,fl) = {
694- let aV = aN()
695- let cr = aV[t]
696- let cs = aV[u]
697- let ct = aV[v]
698- let fm = parseIntValue(aV[w])
699- let fn = parseIntValue(aV[x])
700- let fo = aV[s]
701- let cq = if ((dR == bk))
702- then fk
703- else dR
704- let dP = value(fj[0])
705- let co = value(dP.assetId)
706- let cU = dP.amount
707- let cn = toBase58String(fl)
708- if ((cr != toBase58String(co)))
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)))
709703 then throw("Wrong LP")
710704 else {
711- let cy = bA(cs)
712- let cA = bA(ct)
713- let fp = {
714- let aH = invoke(this, "getOneTknV2READONLY", [fh, cU], nil)
715- if ($isInstanceOf(aH, "(Int, Int)"))
716- then aH
717- else throw(($getType(aH) + " couldn't be cast to (Int, Int)"))
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)"))
718712 }
719- if ((fp == fp))
713+ if ((fn == fn))
720714 then {
721- let cl = fp._2
722- let fq = fp._1
723- let fr = if (if ((fi > 0))
724- then (fi > fq)
715+ let cj = fn._2
716+ let fo = fn._1
717+ let fp = if (if ((fg > 0))
718+ then (fg > fo)
725719 else false)
726- then aD(makeString(["amount to receive is less than ", toString(fi)], ""))
727- else fq
728- let fs = if ((fh == cs))
729- then $Tuple4(fr, 0, ((cy - fr) - cl), cA)
730- else if ((fh == ct))
731- then $Tuple4(0, fr, cy, ((cA - fr) - cl))
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))
732726 else throw("invalid out asset id")
733- let ft = fs._1
734- let fu = fs._2
735- let eX = fs._3
736- let eY = fs._4
737- let fv = bC(F(eY, fn), F(eX, fm))
738- let fw = I(fv, a)
739- let fx = if ((fh == "WAVES"))
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"))
740734 then unit
741- else fromBase58String(fh)
742- let fy = if ((cl > 0))
743- then [ScriptTransfer(aM, cl, fx)]
735+ else fromBase58String(ff)
736+ let fw = if ((cj > 0))
737+ then [ScriptTransfer(aK, cj, fv)]
744738 else nil
745- let cK = ([ScriptTransfer(cq, fr, fx), StringEntry(ab(toString(cq), cn), bw(ft, fu, cU, fw, height, lastBlock.timestamp)), IntegerEntry(U(), fw), IntegerEntry(V(height, lastBlock.timestamp), fw)] ++ fy)
746- if ((cK == cK))
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))
747741 then {
748- let fz = invoke(aF, "burn", [cU], [AttachedPayment(co, cU)])
749- if ((fz == fz))
750- then $Tuple2(cK, fr)
742+ let fx = invoke(aD, "burn", [cS], [AttachedPayment(cm, cS)])
743+ if ((fx == fx))
744+ then $Tuple2(cI, fp)
751745 else throw("Strict value is not equal to itself.")
752746 }
753747 else throw("Strict value is not equal to itself.")
754748 }
755749 else throw("Strict value is not equal to itself.")
756750 }
757751 }
758752
759753
760-func fA () = {
761- let aw = getString(S())
762- if ($isInstanceOf(aw, "String"))
754+func fy () = {
755+ let av = getString(S())
756+ if ($isInstanceOf(av, "String"))
763757 then {
764- let eb = aw
765- fromBase58String(eb)
758+ let dZ = av
759+ fromBase58String(dZ)
766760 }
767- else if ($isInstanceOf(aw, "Unit"))
761+ else if ($isInstanceOf(av, "Unit"))
768762 then unit
769763 else throw("Match error")
770764 }
771765
772766
773-func fB () = {
774- let aw = getString(T())
775- if ($isInstanceOf(aw, "String"))
767+func fz () = {
768+ let av = getString(T())
769+ if ($isInstanceOf(av, "String"))
776770 then {
777- let eb = aw
778- fromBase58String(eb)
771+ let dZ = av
772+ fromBase58String(dZ)
779773 }
780- else if ($isInstanceOf(aw, "Unit"))
774+ else if ($isInstanceOf(av, "Unit"))
781775 then unit
782776 else throw("Match error")
783777 }
784778
785779
786-let fC = throw("Permission denied")
780+let fA = throw("Permission denied")
787781
788-func fD (dO) = {
789- let aw = fA()
790- if ($isInstanceOf(aw, "ByteVector"))
782+func fB (dM) = {
783+ let av = fy()
784+ if ($isInstanceOf(av, "ByteVector"))
791785 then {
792- let fE = aw
793- (dO.callerPublicKey == fE)
786+ let fC = av
787+ (dM.callerPublicKey == fC)
794788 }
795- else if ($isInstanceOf(aw, "Unit"))
796- then (dO.caller == this)
789+ else if ($isInstanceOf(av, "Unit"))
790+ then (dM.caller == this)
797791 else throw("Match error")
798792 }
799793
800794
801-func fF (dO) = {
802- let aw = fA()
803- if ($isInstanceOf(aw, "ByteVector"))
795+func fD (dM) = {
796+ let av = fy()
797+ if ($isInstanceOf(av, "ByteVector"))
804798 then {
805- let fE = aw
806- if ((dO.callerPublicKey == fE))
799+ let fC = av
800+ if ((dM.callerPublicKey == fC))
807801 then true
808- else fC
802+ else fA
809803 }
810- else if ($isInstanceOf(aw, "Unit"))
811- then if ((dO.caller == this))
804+ else if ($isInstanceOf(av, "Unit"))
805+ then if ((dM.caller == this))
812806 then true
813- else fC
807+ else fA
814808 else throw("Match error")
815809 }
816810
817811
818-func fG (fH,eA,fI) = {
819- let aV = aN()
820- let cs = aV[u]
821- let ct = aV[v]
822- let dW = g
823- let dZ = parseBigIntValue(j)
824- let ea = (parseBigIntValue(aJ) * dZ)
825- let dV = if ((fH == false))
826- then [(toBigInt(bA(cs)) - fI), toBigInt(bA(ct))]
827- else [(toBigInt(bA(ct)) - fI), toBigInt(bA(cs))]
828- let eB = dV[0]
829- let eb = eB
830- let ec = (ea * dW)
831- let eC = (((((eA * eA) / (eB * dW)) * eA) * dZ) / (ec * dW))
832- let eD = ((eb + ((eA * dZ) / ec)) - eA)
833- func eh (ei,ej) = {
834- let fJ = ei
835- let eF = fJ._1
836- let em = fJ._2
837- if ((em != unit))
838- then ei
839- else {
840- let eG = (((eF * eF) + eC) / ((g * eF) + eD))
841- let eH = Q((eG - value(eF)))
842- if ((f >= eH))
843- then $Tuple2(eG, ej)
844- else $Tuple2(eG, unit)
845- }
846- }
847-
848- let eq = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
849- let fK = {
850- let es = eq
851- let et = size(es)
852- let eu = $Tuple2(eA, unit)
853- func ev (ew,ex) = if ((ex >= et))
854- then ew
855- else eh(ew, es[ex])
856-
857- func ey (ew,ex) = if ((ex >= et))
858- then ew
859- else throw("List size exceeds 15")
860-
861- ey(ev(ev(ev(ev(ev(ev(ev(ev(ev(ev(ev(ev(ev(ev(ev(eu, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
862- }
863- let eF = fK._1
864- let em = fK._2
865- if ((em != unit))
866- then eF
867- else throw(("Y calculation error, Y = " + toString(eF)))
812+@Callable(dM)
813+func constructor (R) = {
814+ let eA = fD(dM)
815+ if ((eA == eA))
816+ then [StringEntry(R(), R)]
817+ else throw("Strict value is not equal to itself.")
868818 }
869819
870820
871-@Callable(dO)
872-func calculateAmountOutForSwapAndSendTokens (fL,fH,fM,fN) = {
873- let fO = [if ((value(dO.payments[0]).amount >= fL))
874- then true
875- else aD("Wrong amount"), if ((dO.caller == addressFromStringValue(ay(ag()))))
876- then true
877- else aD("Permission denied")]
878- if ((fO == fO))
821+
822+@Callable(dM)
823+func setManager (fE) = {
824+ let eA = fD(dM)
825+ if ((eA == eA))
879826 then {
880- let dP = value(dO.payments[0])
881- let fP = toBase58String(value(dP.assetId))
882- let fQ = if ((fH == false))
883- then {
884- let fR = 1
885- let fS = ay(ad())
886- let fI = (bA(fP) - value(dO.payments[0]).amount)
887- $Tuple3(fS, fR, fI)
888- }
889- else {
890- let fR = 0
891- let fS = ay(ac())
892- let fI = (bA(fP) - value(dO.payments[0]).amount)
893- $Tuple3(fS, fR, fI)
894- }
895- let fS = fQ._1
896- let fR = fQ._2
897- let fI = fQ._3
898- let aV = aN()
899- let cs = aV[u]
900- let ct = aV[v]
901- let dV = [(toBigInt(bA(cs)) - toBigInt(value(dO.payments[0]).amount)), toBigInt(bA(ct))]
902- let eA = dU(dV)
903- let eF = fG(fH, eA, toBigInt(fI))
904- let eB = (toBigInt(fI) + toBigInt(fL))
905- let fT = ((toBigInt(bA(fS)) - eF) - toBigInt(1))
906- let fU = max([0, toInt(fT)])
907- let fV = [(fM >= fU), throw("Exchange resulted in fewer coins than expected")]
908- if ((fV == fV))
909- then [ScriptTransfer(addressFromStringValue(fN), toInt(fT), fromBase58String(fS))]
827+ let fF = fromBase58String(fE)
828+ if ((fF == fF))
829+ then [StringEntry(T(), fE)]
910830 else throw("Strict value is not equal to itself.")
911831 }
912832 else throw("Strict value is not equal to itself.")
913833 }
914834
915835
916836
917-@Callable(dO)
918-func setSwapContract (fW) = {
919- let fX = fF(dO)
920- if ((fX == fX))
921- then [StringEntry(ag(), fW)]
922- else throw("Strict value is not equal to itself.")
923- }
924-
925-
926-
927-@Callable(dO)
928-func constructor (R) = {
929- let eC = fF(dO)
930- if ((eC == eC))
931- then [StringEntry(R(), R)]
932- else throw("Strict value is not equal to itself.")
933- }
934-
935-
936-
937-@Callable(dO)
938-func setManager (fY) = {
939- let eC = fF(dO)
940- if ((eC == eC))
837+@Callable(dM)
838+func confirmManager () = {
839+ let cf = fz()
840+ let fG = if (isDefined(cf))
841+ then true
842+ else throw("No pending manager")
843+ if ((fG == fG))
941844 then {
942- let fZ = fromBase58String(fY)
943- if ((fZ == fZ))
944- then [StringEntry(T(), fY)]
845+ let fH = if ((dM.callerPublicKey == value(cf)))
846+ then true
847+ else throw("You are not pending manager")
848+ if ((fH == fH))
849+ then [StringEntry(S(), toBase58String(value(cf))), DeleteEntry(T())]
945850 else throw("Strict value is not equal to itself.")
946851 }
947852 else throw("Strict value is not equal to itself.")
948853 }
949854
950855
951856
952-@Callable(dO)
953-func confirmManager () = {
954- let ch = fB()
955- let ga = if (isDefined(ch))
956- then true
957- else throw("No pending manager")
958- if ((ga == ga))
959- then {
960- let gb = if ((dO.callerPublicKey == value(ch)))
961- then true
962- else throw("You are not pending manager")
963- if ((gb == gb))
964- then [StringEntry(S(), toBase58String(value(ch))), DeleteEntry(T())]
965- else throw("Strict value is not equal to itself.")
966- }
967- else throw("Strict value is not equal to itself.")
968- }
969-
970-
971-
972-@Callable(dO)
973-func put (gc,gd) = {
974- let ge = bf()
975- let gf = valueOrErrorMessage(addressFromString(ge[A]), "Wr st addr")
976- let gg = valueOrErrorMessage(addressFromString(ge[C]), "Wr sl addr")
977- if ((0 > gc))
857+@Callable(dM)
858+func put (fI,fJ) = {
859+ let fK = bd()
860+ let fL = valueOrErrorMessage(addressFromString(fK[A]), "Wr st addr")
861+ let fM = valueOrErrorMessage(addressFromString(fK[C]), "Wr sl addr")
862+ if ((0 > fI))
978863 then throw("Wrong slippage")
979- else if ((size(dO.payments) != 2))
864+ else if ((size(dM.payments) != 2))
980865 then throw("2 pmnts expd")
981866 else {
982- let gh = dQ(toString(dO.caller), toBase58String(dO.transactionId), AttachedPayment(value(dO.payments[0]).assetId, value(dO.payments[0]).amount), dO.payments[1], gc, true, false, true, 0, "")
983- let dt = gh._2
984- let gi = gh._7
985- let cK = gh._9
986- let du = gh._10
987- let dv = gh._11
988- let cs = gh._12
989- let ct = gh._13
990- let dg = invoke(aF, "emit", [dt], nil)
991- if ((dg == dg))
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))
992877 then {
993- let gj = {
994- let aw = dg
995- if ($isInstanceOf(aw, "Address"))
878+ let fP = {
879+ let av = de
880+ if ($isInstanceOf(av, "Address"))
996881 then {
997- let gk = aw
998- invoke(gk, "emit", [dt], nil)
882+ let fQ = av
883+ invoke(fQ, "emit", [dr], nil)
999884 }
1000885 else unit
1001886 }
1002- if ((gj == gj))
887+ if ((fP == fP))
1003888 then {
1004- let gl = if ((du > 0))
1005- then invoke(gg, "put", nil, [AttachedPayment(cs, du)])
889+ let fR = if ((ds > 0))
890+ then invoke(fM, "put", nil, [AttachedPayment(cq, ds)])
1006891 else nil
1007- if ((gl == gl))
892+ if ((fR == fR))
1008893 then {
1009- let gm = if ((dv > 0))
1010- then invoke(gg, "put", nil, [AttachedPayment(ct, dv)])
894+ let fS = if ((dt > 0))
895+ then invoke(fM, "put", nil, [AttachedPayment(cr, dt)])
1011896 else nil
1012- if ((gm == gm))
897+ if ((fS == fS))
1013898 then {
1014- let gn = if (gd)
899+ let fT = if (fJ)
1015900 then {
1016- let go = invoke(gf, "stake", nil, [AttachedPayment(gi, dt)])
1017- if ((go == go))
901+ let fU = invoke(fL, "stake", nil, [AttachedPayment(fO, dr)])
902+ if ((fU == fU))
1018903 then nil
1019904 else throw("Strict value is not equal to itself.")
1020905 }
1021- else [ScriptTransfer(dO.caller, dt, gi)]
1022- (cK ++ gn)
906+ else [ScriptTransfer(dM.caller, dr, fO)]
907+ (cI ++ fT)
1023908 }
1024909 else throw("Strict value is not equal to itself.")
1025910 }
1026911 else throw("Strict value is not equal to itself.")
1027912 }
1028913 else throw("Strict value is not equal to itself.")
1029914 }
1030915 else throw("Strict value is not equal to itself.")
1031916 }
1032917 }
1033918
1034919
1035920
1036-@Callable(dO)
1037-func putOneTknV2 (fi,gd) = {
1038- let gp = {
1039- let aH = invoke(aF, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1040- if ($isInstanceOf(aH, "Boolean"))
1041- then aH
1042- else throw(($getType(aH) + " couldn't be cast to Boolean"))
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"))
1043928 }
1044- let gq = if (if (if (aK())
929+ let fW = if (if (if (aI())
1045930 then true
1046- else (aZ == o))
931+ else (aX == o))
1047932 then true
1048- else (aZ == q))
933+ else (aX == q))
1049934 then true
1050- else gp
1051- let fO = [if (if (!(gq))
935+ else fV
936+ let fX = [if (if (!(fW))
1052937 then true
1053- else fD(dO))
938+ else fB(dM))
1054939 then true
1055- else aD("put operation is blocked by admin"), if ((size(dO.payments) == 1))
940+ else aB("put operation is blocked by admin"), if ((size(dM.payments) == 1))
1056941 then true
1057- else aD("exactly 1 payment are expected")]
1058- if ((fO == fO))
942+ else aB("exactly 1 payment are expected")]
943+ if ((fX == fX))
1059944 then {
1060- let aV = aN()
1061- let cs = aV[u]
1062- let ct = aV[v]
1063- let cr = fromBase58String(aV[t])
1064- let fm = parseIntValue(aV[w])
1065- let fn = parseIntValue(aV[x])
1066- let cq = if ((dO.caller == this))
1067- then dO.originCaller
1068- else dO.caller
1069- let dP = value(dO.payments[0])
1070- let co = toBase58String(value(dP.assetId))
1071- let cU = dP.amount
1072- let gr = eJ(cU, co, toString(cq), toBase58String(dO.transactionId), true)
1073- if ((gr == gr))
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))
1074959 then {
1075- let cl = gr._3
1076- let cK = gr._2
1077- let gs = gr._1
1078- let dt = if (if ((fi > 0))
1079- then (fi > gs)
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)
1080965 else false)
1081- then aD(makeString(["amount to receive is less than ", toString(fi)], ""))
1082- else gs
1083- let gh = invoke(aF, "emit", [dt], nil)
1084- if ((gh == gh))
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))
1085970 then {
1086- let gj = {
1087- let aw = gh
1088- if ($isInstanceOf(aw, "Address"))
971+ let fP = {
972+ let av = fN
973+ if ($isInstanceOf(av, "Address"))
1089974 then {
1090- let gk = aw
1091- invoke(gk, "emit", [dt], nil)
975+ let fQ = av
976+ invoke(fQ, "emit", [dr], nil)
1092977 }
1093978 else unit
1094979 }
1095- if ((gj == gj))
980+ if ((fP == fP))
1096981 then {
1097- let gn = if (gd)
982+ let fT = if (fJ)
1098983 then {
1099- let go = invoke(bh, "stake", nil, [AttachedPayment(cr, dt)])
1100- if ((go == go))
984+ let fU = invoke(bf, "stake", nil, [AttachedPayment(cp, dr)])
985+ if ((fU == fU))
1101986 then nil
1102987 else throw("Strict value is not equal to itself.")
1103988 }
1104- else [ScriptTransfer(dO.caller, dt, cr)]
1105- let fy = if ((cl > 0))
1106- then [ScriptTransfer(aM, cl, fromBase58String(co))]
989+ else [ScriptTransfer(dM.caller, dr, cp)]
990+ let fw = if ((cj > 0))
991+ then [ScriptTransfer(aK, cj, fromBase58String(cm))]
1107992 else nil
1108- $Tuple2(((cK ++ gn) ++ fy), dt)
993+ $Tuple2(((cI ++ fT) ++ fw), dr)
1109994 }
1110995 else throw("Strict value is not equal to itself.")
1111996 }
1112997 else throw("Strict value is not equal to itself.")
1113998 }
1114999 else throw("Strict value is not equal to itself.")
11151000 }
11161001 else throw("Strict value is not equal to itself.")
11171002 }
11181003
11191004
11201005
1121-@Callable(dO)
1122-func putForFree (gt) = if ((0 > gt))
1006+@Callable(dM)
1007+func putForFree (ga) = if ((0 > ga))
11231008 then throw("Wrong slpg")
1124- else if ((size(dO.payments) != 2))
1009+ else if ((size(dM.payments) != 2))
11251010 then throw("2 pmnts expd")
11261011 else {
1127- let gu = dQ(toString(dO.caller), toBase58String(dO.transactionId), AttachedPayment(value(dO.payments[0]).assetId, value(dO.payments[0]).amount), dO.payments[1], gt, false, false, true, 0, "")
1128- gu._9
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
11291014 }
11301015
11311016
11321017
1133-@Callable(dO)
1018+@Callable(dM)
11341019 func get () = {
1135- let dg = dN(dO)
1136- let gv = dg._1
1137- let cJ = dg._2
1138- let cU = dg._3
1139- let co = dg._4
1140- let cK = dg._5
1141- let eD = invoke(aF, "burn", [cU], [AttachedPayment(co, cU)])
1142- if ((eD == eD))
1143- then cK
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
11441029 else throw("Strict value is not equal to itself.")
11451030 }
11461031
11471032
11481033
1149-@Callable(dO)
1150-func getOneTknV2 (fh,fi) = {
1151- let gp = {
1152- let aH = invoke(aF, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1153- if ($isInstanceOf(aH, "Boolean"))
1154- then aH
1155- else throw(($getType(aH) + " couldn't be cast to Boolean"))
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"))
11561041 }
1157- let gw = if (if (aK())
1042+ let gd = if (if (aI())
11581043 then true
1159- else (aZ == q))
1044+ else (aX == q))
11601045 then true
1161- else gp
1162- let fO = [if (if (!(gw))
1046+ else fV
1047+ let fX = [if (if (!(gd))
11631048 then true
1164- else fD(dO))
1049+ else fB(dM))
11651050 then true
1166- else aD("get operation is blocked by admin"), if ((size(dO.payments) == 1))
1051+ else aB("get operation is blocked by admin"), if ((size(dM.payments) == 1))
11671052 then true
1168- else aD("exactly 1 payment are expected")]
1169- if ((fO == fO))
1053+ else aB("exactly 1 payment are expected")]
1054+ if ((fX == fX))
11701055 then {
1171- let gx = fg(fh, fi, dO.payments, dO.caller, dO.originCaller, dO.transactionId)
1172- let cK = gx._1
1173- let fr = gx._2
1174- $Tuple2(cK, fr)
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)
11751060 }
11761061 else throw("Strict value is not equal to itself.")
11771062 }
11781063
11791064
11801065
1181-@Callable(dO)
1182-func getOneTknV2READONLY (fh,gy) = {
1183- let aV = aN()
1184- let cs = aV[u]
1185- let ct = aV[v]
1186- let cr = aV[t]
1187- let dV = [toBigInt(bA(cs)), toBigInt(bA(ct))]
1188- let gz = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(cr)), "invalid lp asset").quantity)
1189- let bN = dU(dV)
1190- let bM = (bN - fraction(toBigInt(gy), bN, gz))
1191- let fR = if ((fh == cs))
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))
11921077 then 0
1193- else if ((fh == ct))
1078+ else if ((ff == cr))
11941079 then 1
11951080 else throw("invalid out asset id")
1196- let gA = ez(dV, fR, bM)
1197- let fT = (dV[fR] - gA)
1198- let fU = max([0, toInt((fT - f))])
1199- let gB = ci(fU, aI)
1200- let fq = gB._1
1201- let cl = gB._2
1202- $Tuple2(nil, $Tuple2(fq, cl))
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))
12031088 }
12041089
12051090
12061091
1207-@Callable(dO)
1208-func getOneTknV2WithBonusREADONLY (fh,gy) = {
1209- let aV = aN()
1210- let cs = aV[u]
1211- let ct = aV[v]
1212- let cr = aV[t]
1213- let cy = bA(cs)
1214- let cA = bA(ct)
1215- let gC = {
1216- let aH = invoke(this, "getOneTknV2READONLY", [fh, gy], nil)
1217- if ($isInstanceOf(aH, "(Int, Int)"))
1218- then aH
1219- else throw(($getType(aH) + " couldn't be cast to (Int, Int)"))
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)"))
12201105 }
1221- let fq = gC._1
1222- let cl = gC._2
1223- let dg = cm("", cr, gy, this)
1224- let cI = dg._1
1225- let cJ = dg._2
1226- let gD = (cI + cJ)
1227- let ff = if ((gD == 0))
1228- then if ((fq == 0))
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))
12291114 then 0
12301115 else throw("bonus calculation error")
1231- else fraction((fq - gD), a, gD)
1232- $Tuple2(nil, $Tuple3(fq, cl, ff))
1116+ else fraction((fo - gn), a, gn)
1117+ $Tuple2(nil, $Tuple3(fo, cj, fd))
12331118 }
12341119
12351120
12361121
1237-@Callable(dO)
1238-func getNoLess (gE,gF) = {
1239- let dg = dN(dO)
1240- let cI = dg._1
1241- let cJ = dg._2
1242- let cU = dg._3
1243- let co = dg._4
1244- let cK = dg._5
1245- if ((gE > cI))
1246- then throw(((("Failed: " + toString(cI)) + " < ") + toString(gE)))
1247- else if ((gF > cJ))
1248- then throw(((("Failed: " + toString(cJ)) + " < ") + toString(gF)))
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)))
12491134 else {
1250- let gG = invoke(aF, "burn", [cU], [AttachedPayment(co, cU)])
1251- if ((gG == gG))
1252- then cK
1135+ let gq = invoke(aD, "burn", [cS], [AttachedPayment(cm, cS)])
1136+ if ((gq == gq))
1137+ then cI
12531138 else throw("Strict value is not equal to itself.")
12541139 }
12551140 }
12561141
12571142
12581143
1259-@Callable(dO)
1260-func unstakeAndGet (cj) = {
1261- let gH = if ((size(dO.payments) != 0))
1144+@Callable(dM)
1145+func unstakeAndGet (ch) = {
1146+ let gr = if ((size(dM.payments) != 0))
12621147 then throw("No pmnts expd")
12631148 else true
1264- if ((gH == gH))
1149+ if ((gr == gr))
12651150 then {
1266- let bZ = aN()
1267- let gI = bf()
1268- let gi = fromBase58String(bZ[t])
1269- let gJ = valueOrErrorMessage(addressFromString(gI[A]), "Wr st addr")
1270- let gK = invoke(gJ, "unstake", [toBase58String(gi), cj], nil)
1271- if ((gK == gK))
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))
12721157 then {
1273- let dg = cm(toBase58String(dO.transactionId), toBase58String(gi), cj, dO.caller)
1274- let cw = parseIntValue(dg._9)
1275- let cK = dg._10
1276- let gL = if (if (aK())
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())
12771162 then true
1278- else (cw == q))
1279- then throw(("Blocked: " + toString(cw)))
1163+ else (cu == q))
1164+ then throw(("Blocked: " + toString(cu)))
12801165 else true
1281- if ((gL == gL))
1166+ if ((gv == gv))
12821167 then {
1283- let gM = invoke(aF, "burn", [cj], [AttachedPayment(gi, cj)])
1284- if ((gM == gM))
1285- then cK
1168+ let gw = invoke(aD, "burn", [ch], [AttachedPayment(fO, ch)])
1169+ if ((gw == gw))
1170+ then cI
12861171 else throw("Strict value is not equal to itself.")
12871172 }
12881173 else throw("Strict value is not equal to itself.")
12891174 }
12901175 else throw("Strict value is not equal to itself.")
12911176 }
12921177 else throw("Strict value is not equal to itself.")
12931178 }
12941179
12951180
12961181
1297-@Callable(dO)
1298-func unstakeAndGetNoLess (gN,gO,gF) = {
1299- let gw = if (aK())
1182+@Callable(dM)
1183+func unstakeAndGetNoLess (gx,gy,gp) = {
1184+ let gd = if (aI())
13001185 then true
1301- else (aZ == q)
1302- let fO = [if (!(gw))
1186+ else (aX == q)
1187+ let fX = [if (!(gd))
13031188 then true
1304- else throw("get operation is blocked by admin"), if ((size(dO.payments) == 0))
1189+ else throw("get operation is blocked by admin"), if ((size(dM.payments) == 0))
13051190 then true
13061191 else throw("no payments are expected")]
1307- if ((fO == fO))
1192+ if ((fX == fX))
13081193 then {
1309- let gK = invoke(bh, "unstake", [toBase58String(ba), gN], nil)
1310- if ((gK == gK))
1194+ let gu = invoke(bf, "unstake", [toBase58String(aY), gx], nil)
1195+ if ((gu == gu))
13111196 then {
1312- let gP = cm(toBase58String(dO.transactionId), toBase58String(ba), gN, dO.caller)
1313- let cI = gP._1
1314- let cJ = gP._2
1315- let cK = gP._10
1316- let gQ = [if ((cI >= gO))
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))
13171202 then true
1318- else throw(makeString(["amount asset amount to receive is less than ", toString(gO)], "")), if ((cJ >= gF))
1203+ else throw(makeString(["amount asset amount to receive is less than ", toString(gy)], "")), if ((cH >= gp))
13191204 then true
1320- else throw(makeString(["price asset amount to receive is less than ", toString(gF)], ""))]
1321- if ((gQ == gQ))
1205+ else throw(makeString(["price asset amount to receive is less than ", toString(gp)], ""))]
1206+ if ((gA == gA))
13221207 then {
1323- let gG = invoke(aF, "burn", [gN], [AttachedPayment(ba, gN)])
1324- if ((gG == gG))
1325- then cK
1208+ let gq = invoke(aD, "burn", [gx], [AttachedPayment(aY, gx)])
1209+ if ((gq == gq))
1210+ then cI
13261211 else throw("Strict value is not equal to itself.")
13271212 }
13281213 else throw("Strict value is not equal to itself.")
13291214 }
13301215 else throw("Strict value is not equal to itself.")
13311216 }
13321217 else throw("Strict value is not equal to itself.")
13331218 }
13341219
13351220
13361221
1337-@Callable(dO)
1338-func unstakeAndGetOneTknV2 (gN,fh,fi) = {
1339- let gp = {
1340- let aH = invoke(aF, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil)
1341- if ($isInstanceOf(aH, "Boolean"))
1342- then aH
1343- else throw(($getType(aH) + " couldn't be cast to Boolean"))
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"))
13441229 }
1345- let gw = if (if (aK())
1230+ let gd = if (if (aI())
13461231 then true
1347- else (aZ == q))
1232+ else (aX == q))
13481233 then true
1349- else gp
1350- let fO = [if (if (!(gw))
1234+ else fV
1235+ let fX = [if (if (!(gd))
13511236 then true
1352- else fD(dO))
1237+ else fB(dM))
13531238 then true
1354- else aD("get operation is blocked by admin"), if ((size(dO.payments) == 0))
1239+ else aB("get operation is blocked by admin"), if ((size(dM.payments) == 0))
13551240 then true
1356- else aD("no payments are expected")]
1357- if ((fO == fO))
1241+ else aB("no payments are expected")]
1242+ if ((fX == fX))
13581243 then {
1359- let bZ = aN()
1360- let gI = bf()
1361- let gi = fromBase58String(bZ[t])
1362- let gJ = valueOrErrorMessage(addressFromString(gI[A]), "Wr st addr")
1363- let gK = invoke(gJ, "unstake", [toBase58String(gi), gN], nil)
1364- if ((gK == gK))
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))
13651250 then {
1366- let gR = fg(fh, fi, [AttachedPayment(gi, gN)], dO.caller, dO.originCaller, dO.transactionId)
1367- let cK = gR._1
1368- let fr = gR._2
1369- $Tuple2(cK, fr)
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)
13701255 }
13711256 else throw("Strict value is not equal to itself.")
13721257 }
13731258 else throw("Strict value is not equal to itself.")
13741259 }
13751260
13761261
13771262
1378-@Callable(dO)
1379-func putOneTknV2WithBonusREADONLY (gS,gT) = {
1380- let aV = aN()
1381- let cs = aV[u]
1382- let ct = aV[v]
1383- let cr = aV[t]
1384- let gU = eJ(gS, gT, "", "", true)
1385- let fa = gU._1
1386- let cK = gU._2
1387- let cl = gU._3
1388- let ff = gU._4
1389- $Tuple2(nil, $Tuple3(fa, cl, ff))
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))
13901275 }
13911276
13921277
13931278
1394-@Callable(dO)
1395-func putOneTknV2WithoutTakeFeeREADONLY (gS,gT) = {
1396- let aV = aN()
1397- let cs = aV[u]
1398- let ct = aV[v]
1399- let cr = aV[t]
1400- let gV = eJ(gS, gT, "", "", false)
1401- let fa = gV._1
1402- let cK = gV._2
1403- let cl = gV._3
1404- let ff = gV._4
1405- $Tuple2(nil, $Tuple3(fa, cl, ff))
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))
14061291 }
14071292
14081293
14091294
1410-@Callable(dO)
1411-func activate (gW,gX) = if ((toString(dO.caller) != toString(aF)))
1295+@Callable(dM)
1296+func activate (gG,gH) = if ((toString(dM.caller) != toString(aD)))
14121297 then throw("denied")
1413- else $Tuple2([StringEntry(ac(), gW), StringEntry(ad(), gX)], "success")
1298+ else $Tuple2([StringEntry(ac(), gG), StringEntry(ad(), gH)], "success")
14141299
14151300
14161301
1417-@Callable(dO)
1418-func setS (gY,gL) = if ((toString(dO.caller) != aA(this, af())))
1419- then fC
1420- else [StringEntry(gY, gL)]
1302+@Callable(dM)
1303+func setS (gI,gv) = if ((toString(dM.caller) != ax(this, af())))
1304+ then fA
1305+ else [StringEntry(gI, gv)]
14211306
14221307
14231308
1424-@Callable(dO)
1425-func setI (gY,gL) = if ((toString(dO.caller) != aA(this, af())))
1426- then fC
1427- else [IntegerEntry(gY, gL)]
1309+@Callable(dM)
1310+func setI (gI,gv) = if ((toString(dM.caller) != ax(this, af())))
1311+ then fA
1312+ else [IntegerEntry(gI, gv)]
14281313
14291314
14301315
1431-@Callable(dO)
1432-func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aN())
1316+@Callable(dM)
1317+func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aL())
14331318
14341319
14351320
1436-@Callable(dO)
1437-func getAccBalanceWrapperREADONLY (bB) = $Tuple2(nil, bA(bB))
1321+@Callable(dM)
1322+func getAccBalanceWrapperREADONLY (bz) = $Tuple2(nil, by(bz))
14381323
14391324
14401325
1441-@Callable(dO)
1442-func calcPricesWrapperREADONLY (bT,bU,bY) = {
1443- let gZ = bX(bT, bU, bY)
1444- $Tuple2(nil, [toString(gZ[0]), toString(gZ[1]), toString(gZ[2])])
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])])
14451330 }
14461331
14471332
14481333
1449-@Callable(dO)
1450-func fromX18WrapperREADONLY (J,ha) = $Tuple2(nil, I(parseBigIntValue(J), ha))
1334+@Callable(dM)
1335+func fromX18WrapperREADONLY (J,gK) = $Tuple2(nil, I(parseBigIntValue(J), gK))
14511336
14521337
14531338
1454-@Callable(dO)
1339+@Callable(dM)
14551340 func toX18WrapperREADONLY (G,H) = $Tuple2(nil, toString(F(G, H)))
14561341
14571342
14581343
1459-@Callable(dO)
1460-func calcPriceBigIntWrapperREADONLY (bD,bE) = $Tuple2(nil, toString(bC(parseBigIntValue(bD), parseBigIntValue(bE))))
1344+@Callable(dM)
1345+func calcPriceBigIntWrapperREADONLY (bB,bC) = $Tuple2(nil, toString(bA(parseBigIntValue(bB), parseBigIntValue(bC))))
14611346
14621347
14631348
1464-@Callable(dO)
1465-func estimatePutOperationWrapperREADONLY (cn,bI,cM,cN,cO,cP,hb,cQ,cR) = $Tuple2(nil, cL(cn, bI, cM, cN, cO, cP, hb, cQ, cR, true, false, 0, ""))
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, ""))
14661351
14671352
14681353
1469-@Callable(dO)
1470-func estimateGetOperationWrapperREADONLY (cn,hc,cp,hb) = {
1471- let dg = cm(cn, hc, cp, addressFromStringValue(hb))
1472- $Tuple2(nil, $Tuple10(dg._1, dg._2, dg._3, dg._4, dg._5, dg._6, dg._7, toString(dg._8), dg._9, dg._10))
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))
14731358 }
14741359
14751360
1476-@Verifier(hd)
1477-func he () = {
1478- let hf = {
1479- let aw = fA()
1480- if ($isInstanceOf(aw, "ByteVector"))
1361+@Verifier(gN)
1362+func gO () = {
1363+ let gP = {
1364+ let av = fy()
1365+ if ($isInstanceOf(av, "ByteVector"))
14811366 then {
1482- let fE = aw
1483- fE
1367+ let fC = av
1368+ fC
14841369 }
1485- else if ($isInstanceOf(aw, "Unit"))
1486- then hd.senderPublicKey
1370+ else if ($isInstanceOf(av, "Unit"))
1371+ then gN.senderPublicKey
14871372 else throw("Match error")
14881373 }
1489- let aw = hd
1490- if ($isInstanceOf(aw, "Order"))
1374+ let av = gN
1375+ if ($isInstanceOf(av, "Order"))
14911376 then {
1492- let dB = aw
1493- let hg = aL()
1494- let hh = dA(dB)
1495- let hi = sigVerify(dB.bodyBytes, dB.proofs[0], dB.senderPublicKey)
1496- let hj = sigVerify(dB.bodyBytes, dB.proofs[1], hg)
1497- if (if (if (hh)
1498- then hi
1377+ let dz = av
1378+ let gQ = aJ()
1379+ let gR = dy(dz)
1380+ let gS = sigVerify(dz.bodyBytes, dz.proofs[0], dz.senderPublicKey)
1381+ let gT = sigVerify(dz.bodyBytes, dz.proofs[1], gQ)
1382+ if (if (if (gR)
1383+ then gS
14991384 else false)
1500- then hj
1385+ then gT
15011386 else false)
15021387 then true
1503- else ar(hh, hi, hj)
1388+ else aq(gR, gS, gT)
15041389 }
1505- else if ($isInstanceOf(aw, "SetScriptTransaction"))
1390+ else if ($isInstanceOf(av, "SetScriptTransaction"))
15061391 then {
1507- let eb = aw
1508- let hk = blake2b256(value(eb.script))
1509- let hl = fromBase64String(value(getString(aF, ap())))
1510- let hm = scriptHash(this)
1511- if (if ((hl == hk))
1512- then (hm != hk)
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)
15131398 else false)
15141399 then true
1515- else sigVerify(hd.bodyBytes, hd.proofs[0], hf)
1400+ else sigVerify(gN.bodyBytes, gN.proofs[0], gP)
15161401 }
1517- else sigVerify(hd.bodyBytes, hd.proofs[0], hf)
1402+ else sigVerify(gN.bodyBytes, gN.proofs[0], gP)
15181403 }
15191404

github/deemru/w8io/169f3d6 
474.60 ms