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