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