tx · h19vHNoDpEAJKhEV6g93cRRxzMiApBTufwoS8Fksqxz 3N8cKL8uHT2sFedwsSdD7u7zFPD7iM2WSo4: -0.02800000 Waves 2022.10.13 16:42 [2270658] smart account 3N8cKL8uHT2sFedwsSdD7u7zFPD7iM2WSo4 > SELF 0.00000000 Waves
{ "type": 13, "id": "h19vHNoDpEAJKhEV6g93cRRxzMiApBTufwoS8Fksqxz", "fee": 2800000, "feeAssetId": null, "timestamp": 1665668582055, "version": 1, "sender": "3N8cKL8uHT2sFedwsSdD7u7zFPD7iM2WSo4", "senderPublicKey": "5uqTFe1tdb9qAXgGRerTFeiZvA8oaXqKKAHGzaHKAnwu", "proofs": [ "5Wh5MPv77KjyauHTL4HptfQzxHtjpqo6y3Pr6SD4StoRhruxWkMcxVsePEtTutzsa3g9evKqRNZ4sovas6mFTz6s" ], "script": "base64:BgLkJQgCEgMKAQgSABIECgIBBBIDCgEBEgQKAgEEEgUKAwgBARIAEgQKAgEBEgMKAQESBAoCCAgSABIDCgEIEgUKAwEBARIECgIBARIECgIIARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCBIAEgMKAQESAwoBARIECgIIASIKbFBkZWNpbWFscyIGc2NhbGU4IgxzY2FsZThCaWdJbnQiB3NjYWxlMTgiCnplcm9CaWdJbnQiBGJpZzAiBGJpZzEiBGJpZzIiC3dhdmVzU3RyaW5nIgNTRVAiClBvb2xBY3RpdmUiD1Bvb2xQdXREaXNhYmxlZCITUG9vbE1hdGNoZXJEaXNhYmxlZCIMUG9vbFNodXRkb3duIg5pZHhQb29sQWRkcmVzcyINaWR4UG9vbFN0YXR1cyIQaWR4UG9vbExQQXNzZXRJZCINaWR4QW10QXNzZXRJZCIPaWR4UHJpY2VBc3NldElkIg5pZHhBbXRBc3NldERjbSIQaWR4UHJpY2VBc3NldERjbSIOaWR4SUFtdEFzc2V0SWQiEGlkeElQcmljZUFzc2V0SWQiDWlkeExQQXNzZXREY20iEmlkeFBvb2xBbXRBc3NldEFtdCIUa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FAmNIBnByb29mcwAACAUCY0gPc2VuZGVyUHVibGljS2V5BAJhdgkA9AMDCAUCY0gJYm9keUJ5dGVzCQCRAwIIBQJjSAZwcm9vZnMAAQUCZkEDAwMFAmF0BQJhdQcFAmF2BwYJAQJhcwMFAmF0BQJhdQUCYXYDCQABAgUCZGcCFFNldFNjcmlwdFRyYW5zYWN0aW9uBAJlcwUCZGcEAmZCCQD2AwEJAQV2YWx1ZQEIBQJlcwZzY3JpcHQEAmZDCQDbBAEJAQV2YWx1ZQEJAJ0IAgUCYUMJAQJhcQAEAmZECQDxBwEFBHRoaXMDAwkAAAIFAmZDBQJmQgkBAiE9AgUCZkQFAmZCBwYJAPQDAwgFAmZ4CWJvZHlCeXRlcwkAkQMCCAUCZngGcHJvb2ZzAAAFAmZ6CQD0AwMIBQJmeAlib2R5Qnl0ZXMJAJEDAggFAmZ4BnByb29mcwAABQJmerlLhmU=", "chainId": 84, "height": 2270658, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CHA9KUPzAXon5zKJe7o5JZFXmNn7HLbMEas83V6rVcfW Next: 4PwzMKVXGhXTU9PEbKknYkn2AShiExw8Ja4L3K2qPd5y Diff:
Old | New | Differences | |
---|---|---|---|
100 | 100 | func aa () = "%s__priceAsset" | |
101 | 101 | ||
102 | 102 | ||
103 | - | func ab () = "%s__factoryConfig" | |
103 | + | let ab = "%s__fee" | |
104 | + | ||
105 | + | let ac = fraction(5, b, 10000) | |
106 | + | ||
107 | + | let ad = valueOrElse(getInteger(this, ab), ac) | |
108 | + | ||
109 | + | func ae () = "%s__factoryConfig" | |
104 | 110 | ||
105 | 111 | ||
106 | - | func | |
112 | + | func af () = "%s%s__matcher__publicKey" | |
107 | 113 | ||
108 | 114 | ||
109 | - | func | |
115 | + | func ag (ah) = (("%s%s%s__" + ah) + "__mappings__poolContract2LpAsset") | |
110 | 116 | ||
111 | 117 | ||
112 | - | func | |
118 | + | func ai (aj,ak) = (((("%d%d%s__" + aj) + "__") + ak) + "__config") | |
113 | 119 | ||
114 | 120 | ||
115 | - | func | |
121 | + | func al (am) = ("%s%s%s__mappings__baseAsset2internalId__" + am) | |
116 | 122 | ||
117 | 123 | ||
118 | - | func | |
124 | + | func an () = "%s__shutdown" | |
119 | 125 | ||
120 | 126 | ||
121 | - | func | |
127 | + | func ao (ap) = ("%s%s__poolWeight__" + ap) | |
122 | 128 | ||
123 | 129 | ||
124 | - | func | |
130 | + | func aq () = "%s__allowedLpScriptHash" | |
125 | 131 | ||
126 | 132 | ||
127 | - | func ao (ap,aq,ar) = throw(((((("order validation failed: orderValid=" + toString(ap)) + " senderValid=") + toString(aq)) + " matcherValid=") + toString(ar))) | |
133 | + | let ar = "%s__feeCollectorAddress" | |
134 | + | ||
135 | + | func as (at,au,av) = throw(((((("order validation failed: orderValid=" + toString(at)) + " senderValid=") + toString(au)) + " matcherValid=") + toString(av))) | |
128 | 136 | ||
129 | 137 | ||
130 | - | func | |
138 | + | func aw (ax,ay) = valueOrErrorMessage(getString(ax, ay), makeString(["mandatory ", toString(ax), ".", ay, " is not defined"], "")) | |
131 | 139 | ||
132 | 140 | ||
133 | - | func | |
141 | + | func az (ax,ay) = valueOrErrorMessage(getInteger(ax, ay), makeString(["mandatory ", toString(ax), ".", ay, " is not defined"], "")) | |
134 | 142 | ||
135 | 143 | ||
136 | - | func | |
144 | + | func aA (aB) = throw(makeString(["lp.ride:", aB], " ")) | |
137 | 145 | ||
138 | 146 | ||
139 | - | let | |
147 | + | let aC = addressFromStringValue(aw(this, O())) | |
140 | 148 | ||
141 | - | func az () = valueOrElse(getBoolean(ay, ak()), false) | |
149 | + | let aD = addressFromStringValue(aw(aC, ar)) | |
150 | + | ||
151 | + | func aE () = valueOrElse(getBoolean(aC, an()), false) | |
142 | 152 | ||
143 | 153 | ||
144 | - | func | |
154 | + | func aF () = fromBase58String(aw(aC, af())) | |
145 | 155 | ||
146 | 156 | ||
147 | - | func | |
148 | - | let | |
149 | - | let | |
150 | - | let | |
151 | - | let | |
152 | - | split( | |
157 | + | func aG () = { | |
158 | + | let aH = aw(this, Z()) | |
159 | + | let aI = aw(this, aa()) | |
160 | + | let ak = az(aC, al(aI)) | |
161 | + | let aj = az(aC, al(aH)) | |
162 | + | split(aw(aC, ai(toString(aj), toString(ak))), j) | |
153 | 163 | } | |
154 | 164 | ||
155 | 165 | ||
156 | - | func | |
166 | + | func aJ (aK) = if ((aK == i)) | |
157 | 167 | then unit | |
158 | - | else fromBase58String( | |
168 | + | else fromBase58String(aK) | |
159 | 169 | ||
160 | 170 | ||
161 | - | func | |
171 | + | func aL (aK) = if ((aK == unit)) | |
162 | 172 | then i | |
163 | - | else toBase58String(value( | |
173 | + | else toBase58String(value(aK)) | |
164 | 174 | ||
165 | 175 | ||
166 | - | func | |
176 | + | func aM (aN) = $Tuple7(addressFromStringValue(aN[o]), parseIntValue(aN[p]), fromBase58String(aN[q]), aJ(aN[r]), aJ(aN[s]), parseIntValue(aN[t]), parseIntValue(aN[u])) | |
167 | 177 | ||
168 | 178 | ||
169 | - | func | |
179 | + | func aO () = split(aw(aC, ae()), j) | |
170 | 180 | ||
171 | 181 | ||
172 | - | let | |
182 | + | let aP = valueOrErrorMessage(addressFromString(aO()[B]), "incorrect staking address") | |
173 | 183 | ||
174 | - | let | |
184 | + | let aQ = valueOrErrorMessage(addressFromString(aO()[C]), "incorrect staking address") | |
175 | 185 | ||
176 | - | func | |
186 | + | func aR (aS,aT,aU,aV,aW,aX,aY,aZ,ba,bb) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(aS), toString(aT), toString(aU), toString(aV), toString(aW), toString(aX), toString(aY), toString(aZ), toString(ba), toString(bb)], j) | |
177 | 187 | ||
178 | 188 | ||
179 | - | func | |
189 | + | func bc (bd,be,bf,aV,aY,aZ) = makeString(["%d%d%d%d%d%d", toString(bd), toString(be), toString(bf), toString(aV), toString(aY), toString(aZ)], j) | |
180 | 190 | ||
181 | 191 | ||
182 | - | func | |
192 | + | func bg (bh) = if ((bh == "WAVES")) | |
183 | 193 | then wavesBalance(this).available | |
184 | - | else assetBalance(this, fromBase58String( | |
194 | + | else assetBalance(this, fromBase58String(bh)) | |
185 | 195 | ||
186 | 196 | ||
187 | - | func | |
197 | + | func bi (bj,bk) = fraction(bj, d, bk) | |
188 | 198 | ||
189 | 199 | ||
190 | - | func | |
191 | - | let | |
192 | - | let | |
193 | - | | |
200 | + | func bl (bm,bn,bo,bp) = { | |
201 | + | let bq = D(bo, bm) | |
202 | + | let br = D(bp, bn) | |
203 | + | bi(br, bq) | |
194 | 204 | } | |
195 | 205 | ||
196 | 206 | ||
197 | - | func | |
198 | - | let | |
199 | - | let | |
200 | - | let | |
201 | - | let | |
202 | - | let | |
203 | - | let | |
204 | - | let | |
205 | - | let | |
206 | - | let | |
207 | - | [ | |
207 | + | func bs (bo,bp,bt) = { | |
208 | + | let bu = aG() | |
209 | + | let bv = parseIntValue(bu[t]) | |
210 | + | let bw = parseIntValue(bu[u]) | |
211 | + | let bx = bl(bv, bw, bo, bp) | |
212 | + | let bk = D(bo, bv) | |
213 | + | let bj = D(bp, bw) | |
214 | + | let by = D(bt, b) | |
215 | + | let bz = bi(bk, by) | |
216 | + | let bA = bi(bj, by) | |
217 | + | [bx, bz, bA] | |
208 | 218 | } | |
209 | 219 | ||
210 | 220 | ||
211 | - | func | |
212 | - | let | |
213 | - | [G( | |
221 | + | func bB (bo,bp,bt) = { | |
222 | + | let bC = bs(bo, bp, bt) | |
223 | + | [G(bC[0], b), G(bC[1], b), G(bC[2], b)] | |
214 | 224 | } | |
215 | 225 | ||
216 | 226 | ||
217 | - | func | |
218 | - | let | |
219 | - | let | |
220 | - | let | |
221 | - | let | |
222 | - | let | |
223 | - | let | |
224 | - | let | |
225 | - | let | |
226 | - | if (( | |
227 | + | func bD (bE,bF,bG,W) = { | |
228 | + | let bu = aG() | |
229 | + | let bH = bu[q] | |
230 | + | let bI = bu[r] | |
231 | + | let bJ = bu[s] | |
232 | + | let bm = parseIntValue(bu[t]) | |
233 | + | let bn = parseIntValue(bu[u]) | |
234 | + | let bK = bu[p] | |
235 | + | let bL = valueOrErrorMessage(assetInfo(fromBase58String(bH)), (("Asset " + bH) + " doesn't exist")).quantity | |
236 | + | if ((bH != bF)) | |
227 | 237 | then throw("Invalid asset passed.") | |
228 | 238 | else { | |
229 | - | let | |
230 | - | let | |
231 | - | let | |
232 | - | let | |
233 | - | let | |
234 | - | let | |
235 | - | let | |
236 | - | let | |
237 | - | let | |
238 | - | let | |
239 | - | let | |
240 | - | let | |
241 | - | let | |
239 | + | let bM = bg(bI) | |
240 | + | let bN = D(bM, bm) | |
241 | + | let bO = bg(bJ) | |
242 | + | let bP = D(bO, bn) | |
243 | + | let bQ = bi(bP, bN) | |
244 | + | let bR = G(bQ, b) | |
245 | + | let bS = D(bG, b) | |
246 | + | let bT = D(bL, b) | |
247 | + | let bU = fraction(bN, bS, bT) | |
248 | + | let bV = fraction(bP, bS, bT) | |
249 | + | let bW = G(bU, bm) | |
250 | + | let bX = G(bV, bn) | |
251 | + | let bY = if ((bE == "")) | |
242 | 252 | then nil | |
243 | - | else [ScriptTransfer(W, | |
253 | + | else [ScriptTransfer(W, bW, if ((bI == "WAVES")) | |
244 | 254 | then unit | |
245 | - | else fromBase58String( | |
255 | + | else fromBase58String(bI)), ScriptTransfer(W, bX, if ((bJ == "WAVES")) | |
246 | 256 | then unit | |
247 | - | else fromBase58String( | |
248 | - | $Tuple10( | |
257 | + | else fromBase58String(bJ)), StringEntry(Y(toString(W), bE), bc(bW, bX, bG, bR, height, lastBlock.timestamp)), IntegerEntry(R(), bR), IntegerEntry(S(height, lastBlock.timestamp), bR)] | |
258 | + | $Tuple10(bW, bX, bI, bJ, bM, bO, bL, bQ, bK, bY) | |
249 | 259 | } | |
250 | 260 | } | |
251 | 261 | ||
252 | 262 | ||
253 | - | func | |
254 | - | let | |
255 | - | let | |
256 | - | let | |
257 | - | let | |
258 | - | let | |
259 | - | let | |
260 | - | let | |
261 | - | let | |
262 | - | let | |
263 | - | let | |
264 | - | let | |
265 | - | let | |
266 | - | if (if (( | |
263 | + | func bZ (bE,ca,cb,cc,cd,ce,W,cf,cg) = { | |
264 | + | let bu = aG() | |
265 | + | let bH = fromBase58String(bu[q]) | |
266 | + | let ch = bu[r] | |
267 | + | let ci = bu[s] | |
268 | + | let cj = bu[v] | |
269 | + | let ck = bu[w] | |
270 | + | let bv = parseIntValue(bu[t]) | |
271 | + | let bw = parseIntValue(bu[u]) | |
272 | + | let bK = bu[p] | |
273 | + | let bL = valueOrErrorMessage(assetInfo(bH), (("Asset " + toBase58String(bH)) + " doesn't exist")).quantity | |
274 | + | let cl = toBase58String(valueOrElse(cc, fromBase58String("WAVES"))) | |
275 | + | let cm = toBase58String(valueOrElse(ce, fromBase58String("WAVES"))) | |
276 | + | if (if ((ch != cl)) | |
267 | 277 | then true | |
268 | - | else ( | |
278 | + | else (ci != cm)) | |
269 | 279 | then throw("Invalid amt or price asset passed.") | |
270 | 280 | else { | |
271 | - | let | |
272 | - | then | |
273 | - | else ( | |
274 | - | let | |
275 | - | then | |
276 | - | else ( | |
277 | - | let | |
278 | - | let | |
279 | - | let | |
280 | - | let | |
281 | - | let | |
282 | - | let | |
281 | + | let bM = if (cf) | |
282 | + | then bg(ch) | |
283 | + | else (bg(ch) - cb) | |
284 | + | let bO = if (cf) | |
285 | + | then bg(ci) | |
286 | + | else (bg(ci) - cd) | |
287 | + | let cn = D(cb, bv) | |
288 | + | let co = D(cd, bw) | |
289 | + | let cp = bi(co, cn) | |
290 | + | let bN = D(bM, bv) | |
291 | + | let bP = D(bO, bw) | |
292 | + | let cq = if ((bL == 0)) | |
283 | 293 | then { | |
284 | - | let | |
285 | - | let | |
286 | - | let | |
287 | - | $Tuple5(G( | |
294 | + | let bQ = e | |
295 | + | let cr = e | |
296 | + | let by = pow((cn * co), 0, toBigInt(5), 1, 0, DOWN) | |
297 | + | $Tuple5(G(by, b), G(cn, bv), G(co, bw), bi((bP + co), (bN + cn)), cr) | |
288 | 298 | } | |
289 | 299 | else { | |
290 | - | let | |
291 | - | let | |
292 | - | let | |
293 | - | if (if (( | |
294 | - | then ( | |
300 | + | let bQ = bi(bP, bN) | |
301 | + | let cr = fraction(N((bQ - cp)), d, bQ) | |
302 | + | let cs = D(ca, b) | |
303 | + | if (if ((bQ != e)) | |
304 | + | then (cr > cs) | |
295 | 305 | else false) | |
296 | - | then throw(((("Price slippage " + toString( | |
306 | + | then throw(((("Price slippage " + toString(cr)) + " exceeded the passed limit of ") + toString(cs))) | |
297 | 307 | else { | |
298 | - | let | |
299 | - | let | |
300 | - | let | |
301 | - | let | |
302 | - | then $Tuple2( | |
303 | - | else $Tuple2( | |
304 | - | let | |
305 | - | let | |
306 | - | let | |
307 | - | $Tuple5(G( | |
308 | + | let bT = D(bL, b) | |
309 | + | let ct = fraction(cn, bQ, d) | |
310 | + | let cu = fraction(co, d, bQ) | |
311 | + | let cv = if ((ct > co)) | |
312 | + | then $Tuple2(cu, co) | |
313 | + | else $Tuple2(cn, ct) | |
314 | + | let cw = cv._1 | |
315 | + | let cx = cv._2 | |
316 | + | let by = fraction(bT, cx, bP) | |
317 | + | $Tuple5(G(by, b), G(cw, bv), G(cx, bw), bQ, cr) | |
308 | 318 | } | |
309 | 319 | } | |
310 | - | let | |
311 | - | let | |
312 | - | let | |
313 | - | let | |
314 | - | let | |
315 | - | if ((0 >= | |
320 | + | let cy = cq._1 | |
321 | + | let cz = cq._2 | |
322 | + | let cA = cq._3 | |
323 | + | let bR = G(cq._4, b) | |
324 | + | let cB = G(cq._5, b) | |
325 | + | if ((0 >= cy)) | |
316 | 326 | then throw("Invalid calculations. LP calculated is less than zero.") | |
317 | 327 | else { | |
318 | - | let | |
328 | + | let cC = if (!(cg)) | |
319 | 329 | then 0 | |
320 | - | else | |
321 | - | let | |
322 | - | let | |
323 | - | let | |
324 | - | $Tuple13( | |
330 | + | else cy | |
331 | + | let cD = (cb - cz) | |
332 | + | let cE = (cd - cA) | |
333 | + | let cF = [IntegerEntry(R(), bR), IntegerEntry(S(height, lastBlock.timestamp), bR), StringEntry(V(W, bE), aR(cz, cA, cC, bR, ca, cB, height, lastBlock.timestamp, cD, cE))] | |
334 | + | $Tuple13(cy, cC, bR, bM, bO, bL, bH, bK, cF, cD, cE, cc, ce) | |
325 | 335 | } | |
326 | 336 | } | |
327 | 337 | } | |
328 | 338 | ||
329 | 339 | ||
330 | - | func | |
331 | - | let | |
332 | - | let | |
333 | - | let | |
334 | - | let | |
335 | - | let | |
336 | - | let | |
337 | - | let | |
338 | - | let | |
339 | - | let | |
340 | - | then | |
341 | - | else | |
342 | - | let | |
343 | - | if (if (if ( | |
340 | + | func cG (cH) = { | |
341 | + | let bu = aG() | |
342 | + | let cI = bu[r] | |
343 | + | let cJ = bu[s] | |
344 | + | let bK = parseIntValue(bu[p]) | |
345 | + | let bv = parseIntValue(bu[t]) | |
346 | + | let bw = parseIntValue(bu[u]) | |
347 | + | let cK = bg(cI) | |
348 | + | let cL = bg(cJ) | |
349 | + | let bQ = if ((cH.orderType == Buy)) | |
350 | + | then bl(bv, bw, (cK + cH.amount), cL) | |
351 | + | else bl(bv, bw, (cK - cH.amount), cL) | |
352 | + | let bR = G(bQ, b) | |
353 | + | if (if (if (aE()) | |
344 | 354 | then true | |
345 | - | else ( | |
355 | + | else (bK == m)) | |
346 | 356 | then true | |
347 | - | else ( | |
357 | + | else (bK == n)) | |
348 | 358 | then throw("Exchange operations disabled") | |
349 | 359 | else { | |
350 | - | let | |
351 | - | let | |
360 | + | let cM = cH.assetPair.amountAsset | |
361 | + | let cN = if ((cM == unit)) | |
352 | 362 | then "WAVES" | |
353 | - | else toBase58String(value( | |
354 | - | let | |
355 | - | let | |
363 | + | else toBase58String(value(cM)) | |
364 | + | let cO = cH.assetPair.priceAsset | |
365 | + | let cP = if ((cO == unit)) | |
356 | 366 | then "WAVES" | |
357 | - | else toBase58String(value( | |
358 | - | if (if (( | |
367 | + | else toBase58String(value(cO)) | |
368 | + | if (if ((cN != cI)) | |
359 | 369 | then true | |
360 | - | else ( | |
370 | + | else (cP != cJ)) | |
361 | 371 | then throw("Wrong order assets.") | |
362 | 372 | else { | |
363 | - | let | |
364 | - | let | |
365 | - | let | |
366 | - | let | |
367 | - | then ( | |
368 | - | else ( | |
373 | + | let cQ = cH.price | |
374 | + | let cR = fraction(b, bw, bv) | |
375 | + | let cS = J(cQ, b, cR) | |
376 | + | let cT = if ((cH.orderType == Buy)) | |
377 | + | then (bR >= cS) | |
378 | + | else (cS >= bR) | |
369 | 379 | true | |
370 | 380 | } | |
371 | 381 | } | |
372 | 382 | } | |
373 | 383 | ||
374 | 384 | ||
375 | - | func | |
385 | + | func cU (cV) = if ((size(cV.payments) != 1)) | |
376 | 386 | then throw("exactly 1 payment is expected") | |
377 | 387 | else { | |
378 | - | let | |
379 | - | let | |
380 | - | let | |
381 | - | let | |
382 | - | let | |
383 | - | let | |
384 | - | let | |
385 | - | let | |
386 | - | if (if ( | |
388 | + | let cW = value(cV.payments[0]) | |
389 | + | let bF = value(cW.assetId) | |
390 | + | let cX = cW.amount | |
391 | + | let cq = bD(toBase58String(cV.transactionId), toBase58String(bF), cX, cV.caller) | |
392 | + | let bW = cq._1 | |
393 | + | let bX = cq._2 | |
394 | + | let bK = parseIntValue(cq._9) | |
395 | + | let bY = cq._10 | |
396 | + | if (if (aE()) | |
387 | 397 | then true | |
388 | - | else ( | |
389 | - | then throw(("Get operation is blocked by admin. Status = " + toString( | |
390 | - | else $Tuple5( | |
398 | + | else (bK == n)) | |
399 | + | then throw(("Get operation is blocked by admin. Status = " + toString(bK))) | |
400 | + | else $Tuple5(bW, bX, cX, bF, bY) | |
391 | 401 | } | |
392 | 402 | ||
393 | 403 | ||
394 | - | func | |
404 | + | func cY (cV,ca,cg) = if ((size(cV.payments) != 2)) | |
395 | 405 | then throw("exactly 2 payments are expected") | |
396 | 406 | else { | |
397 | - | let | |
398 | - | let | |
399 | - | let | |
400 | - | let | |
401 | - | if (if (if ( | |
407 | + | let cZ = value(cV.payments[0]) | |
408 | + | let da = value(cV.payments[1]) | |
409 | + | let db = bZ(toBase58String(cV.transactionId), ca, cZ.amount, cZ.assetId, da.amount, da.assetId, toString(cV.caller), false, cg) | |
410 | + | let bK = parseIntValue(db._8) | |
411 | + | if (if (if (aE()) | |
402 | 412 | then true | |
403 | - | else ( | |
413 | + | else (bK == l)) | |
404 | 414 | then true | |
405 | - | else ( | |
406 | - | then throw(("Put operation is blocked by admin. Status = " + toString( | |
407 | - | else | |
415 | + | else (bK == n)) | |
416 | + | then throw(("Put operation is blocked by admin. Status = " + toString(bK))) | |
417 | + | else db | |
408 | 418 | } | |
409 | 419 | ||
410 | 420 | ||
411 | - | func | |
412 | - | let | |
413 | - | if (( | |
421 | + | func dc (dd) = { | |
422 | + | let de = invoke(aC, "emit", [dd], nil) | |
423 | + | if ((de == de)) | |
414 | 424 | then { | |
415 | - | let | |
416 | - | let | |
417 | - | if ($isInstanceOf( | |
425 | + | let df = { | |
426 | + | let dg = de | |
427 | + | if ($isInstanceOf(dg, "Address")) | |
418 | 428 | then { | |
419 | - | let | |
420 | - | invoke( | |
429 | + | let dh = dg | |
430 | + | invoke(dh, "emit", [dd], nil) | |
421 | 431 | } | |
422 | 432 | else unit | |
423 | 433 | } | |
424 | - | if (( | |
425 | - | then | |
434 | + | if ((df == df)) | |
435 | + | then dd | |
426 | 436 | else throw("Strict value is not equal to itself.") | |
427 | 437 | } | |
428 | 438 | else throw("Strict value is not equal to itself.") | |
429 | 439 | } | |
430 | 440 | ||
431 | 441 | ||
432 | - | func dd (de,df,W,X) = { | |
433 | - | let dg = (X == unit) | |
434 | - | let dh = aH(aB()) | |
435 | - | let di = dh._1 | |
436 | - | let bF = dh._2 | |
437 | - | let bC = dh._3 | |
438 | - | let dj = dh._4 | |
439 | - | let cE = dh._5 | |
440 | - | let dk = dh._6 | |
441 | - | let dl = dh._7 | |
442 | - | let dm = de | |
443 | - | let dn = if ((df == dj)) | |
444 | - | then bb(aG(dj)) | |
445 | - | else if ((df == cE)) | |
446 | - | then bb(aG(cE)) | |
447 | - | else aw("invalid asset") | |
448 | - | let do = if (dg) | |
449 | - | then 0 | |
450 | - | else dm | |
451 | - | let dp = (dn - do) | |
452 | - | let dq = toBigInt(dp) | |
453 | - | let dr = toBigInt(valueOrErrorMessage(assetInfo(bC), (("asset " + toBase58String(bC)) + " doesn't exist")).quantity) | |
454 | - | let ds = toBigInt(dm) | |
455 | - | let dt = ((dr * (sqrtBigInt((c + ((ds * c) / dq)), 8, 8, DOWN) - c)) / c) | |
456 | - | toInt(dt) | |
442 | + | func di (dd) = { | |
443 | + | let dj = fraction(dd, ad, b) | |
444 | + | $Tuple2((dd - dj), dj) | |
457 | 445 | } | |
458 | 446 | ||
459 | 447 | ||
460 | - | func du (dv,dm,df,W,X) = { | |
461 | - | let dg = (X == unit) | |
462 | - | let dw = aH(aB()) | |
463 | - | let di = dw._1 | |
464 | - | let bF = dw._2 | |
465 | - | let bC = dw._3 | |
466 | - | let dj = dw._4 | |
467 | - | let cE = dw._5 | |
468 | - | let dk = dw._6 | |
469 | - | let dl = dw._7 | |
470 | - | let dx = [if ((df == bC)) | |
448 | + | func dk (dl,dm,W,X) = { | |
449 | + | let dn = (X == unit) | |
450 | + | let do = aM(aG()) | |
451 | + | let dp = do._1 | |
452 | + | let bK = do._2 | |
453 | + | let bH = do._3 | |
454 | + | let dq = do._4 | |
455 | + | let cJ = do._5 | |
456 | + | let dr = do._6 | |
457 | + | let ds = do._7 | |
458 | + | let dt = bg(aL(dq)) | |
459 | + | let du = bg(aL(cJ)) | |
460 | + | let dv = if ((dm == dq)) | |
471 | 461 | then true | |
472 | - | else throw("invalid lp asset")] | |
473 | - | if ((dx == dx)) | |
462 | + | else if ((dm == cJ)) | |
463 | + | then false | |
464 | + | else aA("invalid asset") | |
465 | + | let dw = if (dn) | |
466 | + | then $Tuple2(dt, du) | |
467 | + | else if (dv) | |
468 | + | then $Tuple2((dt - dl), du) | |
469 | + | else $Tuple2(dt, (du - dl)) | |
470 | + | let dx = dw._1 | |
471 | + | let dy = dw._2 | |
472 | + | let dz = if (dv) | |
473 | + | then $Tuple2(dl, 0) | |
474 | + | else $Tuple2(0, dl) | |
475 | + | let dA = dz._1 | |
476 | + | let dB = dz._2 | |
477 | + | let dC = di(dA)._1 | |
478 | + | let dD = di(dB)._1 | |
479 | + | let dE = di(dl) | |
480 | + | let dF = dE._1 | |
481 | + | let dj = dE._2 | |
482 | + | let dG = (dx + dC) | |
483 | + | let dH = (dy + dD) | |
484 | + | let bR = G(bi(D(dH, ds), D(dG, dr)), b) | |
485 | + | let dI = if (dv) | |
486 | + | then dx | |
487 | + | else dy | |
488 | + | let dJ = toBigInt(dI) | |
489 | + | let dK = toBigInt(valueOrErrorMessage(assetInfo(bH), (("asset " + toBase58String(bH)) + " doesn't exist")).quantity) | |
490 | + | let dL = if ((dK > f)) | |
491 | + | then true | |
492 | + | else throw("initial deposit requires all coins") | |
493 | + | if ((dL == dL)) | |
474 | 494 | then { | |
475 | - | let dq = if ((dv == dj)) | |
476 | - | then toBigInt(bb(aG(dj))) | |
477 | - | else if ((dv == cE)) | |
478 | - | then toBigInt(bb(aG(cE))) | |
479 | - | else aw("invalid asset") | |
480 | - | let dr = toBigInt(valueOrErrorMessage(assetInfo(bC), (("asset " + toBase58String(bC)) + " doesn't exist")).quantity) | |
481 | - | let dy = toBigInt(dm) | |
482 | - | let cY = ((dq * (c - pow((c - ((dy * c) / dr)), 8, h, 0, 8, DOWN))) / c) | |
483 | - | toInt(cY) | |
495 | + | let dM = toBigInt(dF) | |
496 | + | let dN = toInt(((dK * (sqrtBigInt((c + ((dM * c) / dJ)), 8, 8, DOWN) - c)) / c)) | |
497 | + | let cF = if (dn) | |
498 | + | then nil | |
499 | + | else [IntegerEntry(R(), bR), IntegerEntry(S(height, lastBlock.timestamp), bR), StringEntry(V(toString(value(W)), toBase58String(value(X))), aR(dA, dB, dN, bR, 0, 0, height, lastBlock.timestamp, 0, 0))] | |
500 | + | let dO = fraction(dy, b, dx) | |
501 | + | let dP = fraction(dl, b, (dO + b)) | |
502 | + | let dQ = (dl - dP) | |
503 | + | let dR = fraction(dK, toBigInt(dQ), toBigInt(dy)) | |
504 | + | let dS = toInt(fraction((toBigInt(dN) - dR), c, dR)) | |
505 | + | $Tuple4(dN, cF, dj, dS) | |
484 | 506 | } | |
485 | 507 | else throw("Strict value is not equal to itself.") | |
486 | 508 | } | |
487 | 509 | ||
488 | 510 | ||
489 | - | func dz () = { | |
490 | - | let db = getString(P()) | |
491 | - | if ($isInstanceOf(db, "String")) | |
511 | + | func dT (dU,dF,dm,W,X) = { | |
512 | + | let dn = (X == unit) | |
513 | + | let dV = aM(aG()) | |
514 | + | let dp = dV._1 | |
515 | + | let bK = dV._2 | |
516 | + | let bH = dV._3 | |
517 | + | let dq = dV._4 | |
518 | + | let cJ = dV._5 | |
519 | + | let dW = dV._6 | |
520 | + | let dX = dV._7 | |
521 | + | let dY = [if ((dm == bH)) | |
522 | + | then true | |
523 | + | else throw("invalid lp asset")] | |
524 | + | if ((dY == dY)) | |
492 | 525 | then { | |
493 | - | let dA = db | |
494 | - | fromBase58String(dA) | |
526 | + | let dZ = if ((dU == dq)) | |
527 | + | then true | |
528 | + | else if ((dU == cJ)) | |
529 | + | then false | |
530 | + | else aA("invalid asset") | |
531 | + | let ea = if (dZ) | |
532 | + | then toBigInt(bg(aL(dq))) | |
533 | + | else toBigInt(bg(aL(cJ))) | |
534 | + | let eb = bg(aL(dq)) | |
535 | + | let ec = bg(aL(cJ)) | |
536 | + | let ed = if (dZ) | |
537 | + | then eb | |
538 | + | else ec | |
539 | + | let ee = toBigInt(ed) | |
540 | + | let dK = toBigInt(valueOrErrorMessage(assetInfo(bH), (("asset " + toBase58String(bH)) + " doesn't exist")).quantity) | |
541 | + | let ef = toBigInt(dF) | |
542 | + | let eg = toInt(((ea * (c - pow((c - ((ef * c) / dK)), 8, h, 0, 8, DOWN))) / c)) | |
543 | + | let eh = di(eg) | |
544 | + | let ei = eh._1 | |
545 | + | let dj = eh._2 | |
546 | + | let ej = if (dZ) | |
547 | + | then $Tuple4(ei, 0, (eb - eg), ec) | |
548 | + | else $Tuple4(0, ei, eb, (ec - eg)) | |
549 | + | let ek = ej._1 | |
550 | + | let el = ej._2 | |
551 | + | let em = ej._3 | |
552 | + | let en = ej._4 | |
553 | + | let eo = bi(D(en, dX), D(em, dW)) | |
554 | + | let bR = G(eo, b) | |
555 | + | let cF = if (dn) | |
556 | + | then nil | |
557 | + | else [StringEntry(Y(toString(value(W)), toBase58String(value(X))), bc(ek, el, dF, bR, height, lastBlock.timestamp)), IntegerEntry(R(), bR), IntegerEntry(S(height, lastBlock.timestamp), bR)] | |
558 | + | let ep = bD("", aL(bH), dF, this) | |
559 | + | let eq = (ep._1 + ep._2) | |
560 | + | let dS = fraction((ei - eq), b, eq) | |
561 | + | $Tuple4(ei, cF, dj, dS) | |
495 | 562 | } | |
496 | - | else if ($isInstanceOf(db, "Unit")) | |
563 | + | else throw("Strict value is not equal to itself.") | |
564 | + | } | |
565 | + | ||
566 | + | ||
567 | + | func er () = { | |
568 | + | let dg = getString(P()) | |
569 | + | if ($isInstanceOf(dg, "String")) | |
570 | + | then { | |
571 | + | let es = dg | |
572 | + | fromBase58String(es) | |
573 | + | } | |
574 | + | else if ($isInstanceOf(dg, "Unit")) | |
497 | 575 | then unit | |
498 | 576 | else throw("Match error") | |
499 | 577 | } | |
500 | 578 | ||
501 | 579 | ||
502 | - | func | |
503 | - | let | |
504 | - | if ($isInstanceOf( | |
580 | + | func et () = { | |
581 | + | let dg = getString(Q()) | |
582 | + | if ($isInstanceOf(dg, "String")) | |
505 | 583 | then { | |
506 | - | let | |
507 | - | fromBase58String( | |
584 | + | let es = dg | |
585 | + | fromBase58String(es) | |
508 | 586 | } | |
509 | - | else if ($isInstanceOf( | |
587 | + | else if ($isInstanceOf(dg, "Unit")) | |
510 | 588 | then unit | |
511 | 589 | else throw("Match error") | |
512 | 590 | } | |
513 | 591 | ||
514 | 592 | ||
515 | - | func | |
516 | - | let | |
517 | - | let | |
518 | - | if ($isInstanceOf( | |
593 | + | func eu (cV) = { | |
594 | + | let ev = throw("Permission denied") | |
595 | + | let dg = er() | |
596 | + | if ($isInstanceOf(dg, "ByteVector")) | |
519 | 597 | then { | |
520 | - | let | |
521 | - | if (( | |
598 | + | let ew = dg | |
599 | + | if ((cV.callerPublicKey == ew)) | |
522 | 600 | then true | |
523 | - | else | |
601 | + | else ev | |
524 | 602 | } | |
525 | - | else if ($isInstanceOf( | |
526 | - | then if (( | |
603 | + | else if ($isInstanceOf(dg, "Unit")) | |
604 | + | then if ((cV.caller == this)) | |
527 | 605 | then true | |
528 | - | else | |
606 | + | else ev | |
529 | 607 | else throw("Match error") | |
530 | 608 | } | |
531 | 609 | ||
532 | 610 | ||
533 | - | @Callable( | |
534 | - | func setManager ( | |
535 | - | let | |
536 | - | if (( | |
611 | + | @Callable(cV) | |
612 | + | func setManager (ex) = { | |
613 | + | let ey = eu(cV) | |
614 | + | if ((ey == ey)) | |
537 | 615 | then { | |
538 | - | let | |
539 | - | if (( | |
540 | - | then [StringEntry(Q(), | |
616 | + | let ez = fromBase58String(ex) | |
617 | + | if ((ez == ez)) | |
618 | + | then [StringEntry(Q(), ex)] | |
541 | 619 | else throw("Strict value is not equal to itself.") | |
542 | 620 | } | |
543 | 621 | else throw("Strict value is not equal to itself.") | |
545 | 623 | ||
546 | 624 | ||
547 | 625 | ||
548 | - | @Callable( | |
626 | + | @Callable(cV) | |
549 | 627 | func confirmManager () = { | |
550 | - | let | |
551 | - | let | |
628 | + | let eA = et() | |
629 | + | let eB = if (isDefined(eA)) | |
552 | 630 | then true | |
553 | 631 | else throw("No pending manager") | |
554 | - | if (( | |
632 | + | if ((eB == eB)) | |
555 | 633 | then { | |
556 | - | let | |
634 | + | let eC = if ((cV.callerPublicKey == value(eA))) | |
557 | 635 | then true | |
558 | 636 | else throw("You are not pending manager") | |
559 | - | if (( | |
560 | - | then [StringEntry(P(), toBase58String(value( | |
637 | + | if ((eC == eC)) | |
638 | + | then [StringEntry(P(), toBase58String(value(eA))), DeleteEntry(Q())] | |
561 | 639 | else throw("Strict value is not equal to itself.") | |
562 | 640 | } | |
563 | 641 | else throw("Strict value is not equal to itself.") | |
565 | 643 | ||
566 | 644 | ||
567 | 645 | ||
568 | - | @Callable( | |
569 | - | func put ( | |
646 | + | @Callable(cV) | |
647 | + | func put (ca,eD) = if ((0 > ca)) | |
570 | 648 | then throw("Invalid slippageTolerance passed") | |
571 | 649 | else { | |
572 | - | let | |
573 | - | let | |
574 | - | let | |
575 | - | let | |
576 | - | let | |
577 | - | let | |
578 | - | let | |
579 | - | let | |
580 | - | let | |
581 | - | if (( | |
650 | + | let db = cY(cV, ca, true) | |
651 | + | let cC = db._2 | |
652 | + | let bH = db._7 | |
653 | + | let bY = db._9 | |
654 | + | let cD = db._10 | |
655 | + | let cE = db._11 | |
656 | + | let eE = db._12 | |
657 | + | let eF = db._13 | |
658 | + | let de = invoke(aC, "emit", [cC], nil) | |
659 | + | if ((de == de)) | |
582 | 660 | then { | |
583 | - | let | |
584 | - | let | |
585 | - | if ($isInstanceOf( | |
661 | + | let df = { | |
662 | + | let dg = de | |
663 | + | if ($isInstanceOf(dg, "Address")) | |
586 | 664 | then { | |
587 | - | let | |
588 | - | invoke( | |
665 | + | let dh = dg | |
666 | + | invoke(dh, "emit", [cC], nil) | |
589 | 667 | } | |
590 | 668 | else unit | |
591 | 669 | } | |
592 | - | if (( | |
670 | + | if ((df == df)) | |
593 | 671 | then { | |
594 | - | let | |
595 | - | then invoke( | |
672 | + | let eG = if ((cD > 0)) | |
673 | + | then invoke(aQ, "put", nil, [AttachedPayment(eE, cD)]) | |
596 | 674 | else nil | |
597 | - | if (( | |
675 | + | if ((eG == eG)) | |
598 | 676 | then { | |
599 | - | let | |
600 | - | then invoke( | |
677 | + | let eH = if ((cE > 0)) | |
678 | + | then invoke(aQ, "put", nil, [AttachedPayment(eF, cE)]) | |
601 | 679 | else nil | |
602 | - | if (( | |
680 | + | if ((eH == eH)) | |
603 | 681 | then { | |
604 | - | let | |
682 | + | let eI = if (eD) | |
605 | 683 | then { | |
606 | - | let | |
607 | - | if (( | |
684 | + | let eJ = invoke(aP, "stake", nil, [AttachedPayment(bH, cC)]) | |
685 | + | if ((eJ == eJ)) | |
608 | 686 | then nil | |
609 | 687 | else throw("Strict value is not equal to itself.") | |
610 | 688 | } | |
611 | - | else [ScriptTransfer( | |
612 | - | ( | |
689 | + | else [ScriptTransfer(cV.caller, cC, bH)] | |
690 | + | (bY ++ eI) | |
613 | 691 | } | |
614 | 692 | else throw("Strict value is not equal to itself.") | |
615 | 693 | } | |
622 | 700 | ||
623 | 701 | ||
624 | 702 | ||
625 | - | @Callable( | |
626 | - | func putForFree ( | |
703 | + | @Callable(cV) | |
704 | + | func putForFree (eK) = if ((0 > eK)) | |
627 | 705 | then throw("Invalid value passed") | |
628 | 706 | else { | |
629 | - | let | |
630 | - | | |
707 | + | let db = cY(cV, eK, false) | |
708 | + | db._9 | |
631 | 709 | } | |
632 | 710 | ||
633 | 711 | ||
634 | 712 | ||
635 | - | @Callable( | |
636 | - | func putOneTkn ( | |
637 | - | let | |
638 | - | let | |
639 | - | let | |
640 | - | let | |
641 | - | let | |
642 | - | let | |
643 | - | let | |
644 | - | let | |
645 | - | let | |
713 | + | @Callable(cV) | |
714 | + | func putOneTkn (eL,eM) = { | |
715 | + | let eN = aM(aG()) | |
716 | + | let dp = eN._1 | |
717 | + | let bK = eN._2 | |
718 | + | let bH = eN._3 | |
719 | + | let dq = eN._4 | |
720 | + | let cJ = eN._5 | |
721 | + | let dr = eN._6 | |
722 | + | let ds = eN._7 | |
723 | + | let eO = if (if (aE()) | |
646 | 724 | then true | |
647 | - | else ( | |
725 | + | else (bK == l)) | |
648 | 726 | then true | |
649 | - | else ( | |
650 | - | let | |
727 | + | else (bK == n) | |
728 | + | let dY = [if (!(eO)) | |
651 | 729 | then true | |
652 | - | else | |
730 | + | else aA("put operation is blocked by admin"), if ((size(cV.payments) == 1)) | |
653 | 731 | then true | |
654 | - | else | |
655 | - | if (( | |
732 | + | else aA("exactly 1 payment are expected")] | |
733 | + | if ((dY == dY)) | |
656 | 734 | then { | |
657 | - | let dX = cQ.payments[0] | |
658 | - | let df = dX.assetId | |
659 | - | let de = dX.amount | |
660 | - | let dm = de | |
661 | - | let W = cQ.caller | |
662 | - | let X = cQ.transactionId | |
663 | - | let dY = { | |
664 | - | let dZ = dd(de, df, W, X) | |
665 | - | if (if ((dT > 0)) | |
666 | - | then (dT > dZ) | |
667 | - | else false) | |
668 | - | then throw(makeString(["amount to receive is less than ", toString(dT)], "")) | |
669 | - | else dZ | |
670 | - | } | |
671 | - | let cZ = cX(dY) | |
672 | - | if ((cZ == cZ)) | |
735 | + | let eP = cV.payments[0] | |
736 | + | let dm = eP.assetId | |
737 | + | let dl = eP.amount | |
738 | + | let dF = dl | |
739 | + | let W = cV.caller | |
740 | + | let X = cV.transactionId | |
741 | + | let eQ = dk(dl, dm, W, X) | |
742 | + | let eR = eQ._1 | |
743 | + | let cF = eQ._2 | |
744 | + | let dj = eQ._3 | |
745 | + | let dS = eQ._4 | |
746 | + | let eS = if (if ((eL > 0)) | |
747 | + | then (eL > eR) | |
748 | + | else false) | |
749 | + | then throw(makeString(["amount to receive is less than ", toString(eL)], "")) | |
750 | + | else eR | |
751 | + | let de = dc(eS) | |
752 | + | if ((de == de)) | |
673 | 753 | then { | |
674 | - | let | |
754 | + | let eI = if (eM) | |
675 | 755 | then { | |
676 | - | let | |
677 | - | if (( | |
756 | + | let eT = invoke(aP, "stake", nil, [AttachedPayment(bH, eS)]) | |
757 | + | if ((eT == eT)) | |
678 | 758 | then nil | |
679 | 759 | else throw("Strict value is not equal to itself.") | |
680 | 760 | } | |
681 | - | else [ScriptTransfer(cQ.caller, dY, bC)] | |
682 | - | $Tuple2(dQ, dY) | |
761 | + | else [ScriptTransfer(cV.caller, eS, bH)] | |
762 | + | let eU = if ((dj > 0)) | |
763 | + | then [ScriptTransfer(aD, dj, dm)] | |
764 | + | else nil | |
765 | + | $Tuple2(((cF ++ eI) ++ eU), eS) | |
683 | 766 | } | |
684 | 767 | else throw("Strict value is not equal to itself.") | |
685 | 768 | } | |
688 | 771 | ||
689 | 772 | ||
690 | 773 | ||
691 | - | @Callable( | |
692 | - | func getOneTkn ( | |
693 | - | let | |
694 | - | let | |
695 | - | let | |
696 | - | let | |
697 | - | let | |
698 | - | let | |
699 | - | let | |
700 | - | let | |
701 | - | let | |
774 | + | @Callable(cV) | |
775 | + | func getOneTkn (dU,eL,eV) = { | |
776 | + | let eW = aM(aG()) | |
777 | + | let dp = eW._1 | |
778 | + | let bK = eW._2 | |
779 | + | let bH = eW._3 | |
780 | + | let dq = eW._4 | |
781 | + | let cJ = eW._5 | |
782 | + | let dr = eW._6 | |
783 | + | let ds = eW._7 | |
784 | + | let eX = if (aE()) | |
702 | 785 | then true | |
703 | - | else ( | |
704 | - | let | |
786 | + | else (bK == n) | |
787 | + | let dY = [if (!(eX)) | |
705 | 788 | then true | |
706 | - | else | |
789 | + | else aA("get operation is blocked by admin"), if ((size(cV.payments) == 1)) | |
707 | 790 | then true | |
708 | - | else | |
709 | - | if (( | |
791 | + | else aA("exactly 1 payment are expected")] | |
792 | + | if ((dY == dY)) | |
710 | 793 | then { | |
711 | - | let dX = cQ.payments[0] | |
712 | - | let df = dX.assetId | |
713 | - | let dm = dX.amount | |
714 | - | let W = cQ.caller | |
715 | - | let X = cQ.transactionId | |
716 | - | let cY = { | |
717 | - | let ee = du(aE(dv), dm, df, W, X) | |
718 | - | if (if ((dT > 0)) | |
719 | - | then (dT > ee) | |
720 | - | else false) | |
721 | - | then throw(makeString(["amount to receive is less than ", toString(dT)], "")) | |
722 | - | else ee | |
723 | - | } | |
724 | - | let ef = invoke(ay, "burn", [dm], [AttachedPayment(df, dm)]) | |
725 | - | if ((ef == ef)) | |
794 | + | let eP = cV.payments[0] | |
795 | + | let dm = eP.assetId | |
796 | + | let dF = eP.amount | |
797 | + | let W = cV.caller | |
798 | + | let X = cV.transactionId | |
799 | + | let eY = dT(aJ(dU), dF, dm, W, X) | |
800 | + | let eZ = eY._1 | |
801 | + | let cF = eY._2 | |
802 | + | let dj = eY._3 | |
803 | + | let dS = eY._4 | |
804 | + | let dd = if (if ((eL > 0)) | |
805 | + | then (eL > eZ) | |
806 | + | else false) | |
807 | + | then throw(makeString(["amount to receive is less than ", toString(eL)], "")) | |
808 | + | else eZ | |
809 | + | let fa = invoke(aC, "burn", [dF], [AttachedPayment(dm, dF)]) | |
810 | + | if ((fa == fa)) | |
726 | 811 | then { | |
727 | - | let | |
728 | - | $Tuple2( | |
812 | + | let fb = [ScriptTransfer(W, dd, aJ(dU))] | |
813 | + | $Tuple2(fb, dd) | |
729 | 814 | } | |
730 | 815 | else throw("Strict value is not equal to itself.") | |
731 | 816 | } | |
734 | 819 | ||
735 | 820 | ||
736 | 821 | ||
737 | - | @Callable( | |
822 | + | @Callable(cV) | |
738 | 823 | func get () = { | |
739 | - | let | |
740 | - | let | |
741 | - | let | |
742 | - | let | |
743 | - | let | |
744 | - | let | |
745 | - | let | |
746 | - | if (( | |
747 | - | then | |
824 | + | let cq = cU(cV) | |
825 | + | let fc = cq._1 | |
826 | + | let bX = cq._2 | |
827 | + | let cX = cq._3 | |
828 | + | let bF = cq._4 | |
829 | + | let bY = cq._5 | |
830 | + | let fd = invoke(aC, "burn", [cX], [AttachedPayment(bF, cX)]) | |
831 | + | if ((fd == fd)) | |
832 | + | then bY | |
748 | 833 | else throw("Strict value is not equal to itself.") | |
749 | 834 | } | |
750 | 835 | ||
751 | 836 | ||
752 | 837 | ||
753 | - | @Callable( | |
754 | - | func getNoLess ( | |
755 | - | let | |
756 | - | let | |
757 | - | let | |
758 | - | let | |
759 | - | let | |
760 | - | let | |
761 | - | if (( | |
762 | - | then throw(((("noLessThenAmtAsset failed: " + toString( | |
763 | - | else if (( | |
764 | - | then throw(((("noLessThenPriceAsset failed: " + toString( | |
838 | + | @Callable(cV) | |
839 | + | func getNoLess (fe,ff) = { | |
840 | + | let cq = cU(cV) | |
841 | + | let bW = cq._1 | |
842 | + | let bX = cq._2 | |
843 | + | let cX = cq._3 | |
844 | + | let bF = cq._4 | |
845 | + | let bY = cq._5 | |
846 | + | if ((fe > bW)) | |
847 | + | then throw(((("noLessThenAmtAsset failed: " + toString(bW)) + " < ") + toString(fe))) | |
848 | + | else if ((ff > bX)) | |
849 | + | then throw(((("noLessThenPriceAsset failed: " + toString(bX)) + " < ") + toString(ff))) | |
765 | 850 | else { | |
766 | - | let | |
767 | - | if (( | |
768 | - | then | |
851 | + | let fd = invoke(aC, "burn", [cX], [AttachedPayment(bF, cX)]) | |
852 | + | if ((fd == fd)) | |
853 | + | then bY | |
769 | 854 | else throw("Strict value is not equal to itself.") | |
770 | 855 | } | |
771 | 856 | } | |
772 | 857 | ||
773 | 858 | ||
774 | 859 | ||
775 | - | @Callable( | |
776 | - | func unstakeAndGet ( | |
777 | - | let | |
860 | + | @Callable(cV) | |
861 | + | func unstakeAndGet (dd) = { | |
862 | + | let fg = if ((size(cV.payments) != 0)) | |
778 | 863 | then throw("No payments are expected") | |
779 | 864 | else true | |
780 | - | if (( | |
865 | + | if ((fg == fg)) | |
781 | 866 | then { | |
782 | - | let | |
783 | - | let | |
784 | - | let | |
785 | - | if (( | |
867 | + | let bu = aG() | |
868 | + | let bH = fromBase58String(bu[q]) | |
869 | + | let fh = invoke(aP, "unstake", [toBase58String(bH), dd], nil) | |
870 | + | if ((fh == fh)) | |
786 | 871 | then { | |
787 | - | let | |
788 | - | let | |
789 | - | let | |
790 | - | let | |
872 | + | let cq = bD(toBase58String(cV.transactionId), toBase58String(bH), dd, cV.caller) | |
873 | + | let bK = parseIntValue(cq._9) | |
874 | + | let bY = cq._10 | |
875 | + | let fi = if (if (aE()) | |
791 | 876 | then true | |
792 | - | else ( | |
793 | - | then throw(("Get operation is blocked by admin. Status = " + toString( | |
877 | + | else (bK == n)) | |
878 | + | then throw(("Get operation is blocked by admin. Status = " + toString(bK))) | |
794 | 879 | else true | |
795 | - | if (( | |
880 | + | if ((fi == fi)) | |
796 | 881 | then { | |
797 | - | let | |
798 | - | if (( | |
799 | - | then | |
882 | + | let fd = invoke(aC, "burn", [dd], [AttachedPayment(bH, dd)]) | |
883 | + | if ((fd == fd)) | |
884 | + | then bY | |
800 | 885 | else throw("Strict value is not equal to itself.") | |
801 | 886 | } | |
802 | 887 | else throw("Strict value is not equal to itself.") | |
808 | 893 | ||
809 | 894 | ||
810 | 895 | ||
811 | - | @Callable( | |
812 | - | func activate ( | |
896 | + | @Callable(cV) | |
897 | + | func activate (fj,fk) = if ((toString(cV.caller) != toString(aC))) | |
813 | 898 | then throw("permissions denied") | |
814 | - | else $Tuple2([StringEntry(Z(), | |
899 | + | else $Tuple2([StringEntry(Z(), fj), StringEntry(aa(), fk)], "success") | |
815 | 900 | ||
816 | 901 | ||
817 | 902 | ||
818 | - | @Callable( | |
819 | - | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, | |
903 | + | @Callable(cV) | |
904 | + | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aG()) | |
820 | 905 | ||
821 | 906 | ||
822 | 907 | ||
823 | - | @Callable( | |
824 | - | func getAccBalanceWrapperREADONLY ( | |
908 | + | @Callable(cV) | |
909 | + | func getAccBalanceWrapperREADONLY (bh) = $Tuple2(nil, bg(bh)) | |
825 | 910 | ||
826 | 911 | ||
827 | 912 | ||
828 | - | @Callable( | |
829 | - | func calcPricesWrapperREADONLY ( | |
830 | - | let | |
831 | - | $Tuple2(nil, [toString( | |
913 | + | @Callable(cV) | |
914 | + | func calcPricesWrapperREADONLY (bo,bp,bt) = { | |
915 | + | let bC = bs(bo, bp, bt) | |
916 | + | $Tuple2(nil, [toString(bC[0]), toString(bC[1]), toString(bC[2])]) | |
832 | 917 | } | |
833 | 918 | ||
834 | 919 | ||
835 | 920 | ||
836 | - | @Callable( | |
921 | + | @Callable(cV) | |
837 | 922 | func toX18WrapperREADONLY (E,F) = $Tuple2(nil, toString(D(E, F))) | |
838 | 923 | ||
839 | 924 | ||
840 | 925 | ||
841 | - | @Callable( | |
926 | + | @Callable(cV) | |
842 | 927 | func fromX18WrapperREADONLY (H,I) = $Tuple2(nil, G(parseBigIntValue(H), I)) | |
843 | 928 | ||
844 | 929 | ||
845 | 930 | ||
846 | - | @Callable( | |
847 | - | func calcPriceBigIntWrapperREADONLY ( | |
931 | + | @Callable(cV) | |
932 | + | func calcPriceBigIntWrapperREADONLY (bj,bk) = $Tuple2(nil, toString(bi(parseBigIntValue(bj), parseBigIntValue(bk)))) | |
848 | 933 | ||
849 | 934 | ||
850 | 935 | ||
851 | - | @Callable( | |
852 | - | func estimatePutOperationWrapperREADONLY ( | |
936 | + | @Callable(cV) | |
937 | + | func estimatePutOperationWrapperREADONLY (bE,ca,cb,cc,cd,ce,W,cf,cg) = $Tuple2(nil, bZ(bE, ca, cb, cc, cd, ce, W, cf, cg)) | |
853 | 938 | ||
854 | 939 | ||
855 | 940 | ||
856 | - | @Callable( | |
857 | - | func estimateGetOperationWrapperREADONLY ( | |
858 | - | let | |
859 | - | $Tuple2(nil, $Tuple10( | |
941 | + | @Callable(cV) | |
942 | + | func estimateGetOperationWrapperREADONLY (bE,bF,bG,W) = { | |
943 | + | let cq = bD(bE, bF, bG, addressFromStringValue(W)) | |
944 | + | $Tuple2(nil, $Tuple10(cq._1, cq._2, cq._3, cq._4, cq._5, cq._6, cq._7, toString(cq._8), cq._9, cq._10)) | |
860 | 945 | } | |
861 | 946 | ||
862 | 947 | ||
863 | 948 | ||
864 | - | @Callable( | |
949 | + | @Callable(cV) | |
865 | 950 | func statsREADONLY () = { | |
866 | - | let | |
867 | - | let | |
868 | - | let | |
869 | - | let | |
870 | - | let | |
871 | - | let | |
872 | - | let | |
873 | - | let | |
874 | - | let | |
875 | - | let | |
876 | - | let | |
877 | - | let | |
951 | + | let bu = aG() | |
952 | + | let bH = fromBase58String(bu[q]) | |
953 | + | let cI = bu[r] | |
954 | + | let cJ = bu[s] | |
955 | + | let cj = bu[v] | |
956 | + | let ck = bu[w] | |
957 | + | let bv = parseIntValue(bu[t]) | |
958 | + | let bw = parseIntValue(bu[u]) | |
959 | + | let fl = valueOrErrorMessage(assetInfo(bH), (("Asset " + toBase58String(bH)) + " doesn't exist")).quantity | |
960 | + | let cK = bg(cI) | |
961 | + | let cL = bg(cJ) | |
962 | + | let fm = if ((fl == 0)) | |
878 | 963 | then [e, e, e] | |
879 | - | else | |
880 | - | let | |
881 | - | let | |
882 | - | let | |
883 | - | let | |
884 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString( | |
964 | + | else bs(cK, cL, fl) | |
965 | + | let bR = 0 | |
966 | + | let fn = G(fm[1], b) | |
967 | + | let fo = G(fm[2], b) | |
968 | + | let fp = value(getInteger(aC, ao(toString(this)))) | |
969 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(cK), toString(cL), toString(fl), toString(bR), toString(fn), toString(fo), toString(fp)], j)) | |
885 | 970 | } | |
886 | 971 | ||
887 | 972 | ||
888 | 973 | ||
889 | - | @Callable( | |
890 | - | func evaluatePutByAmountAssetREADONLY ( | |
891 | - | let | |
892 | - | let | |
893 | - | let | |
894 | - | let | |
895 | - | let | |
896 | - | let | |
897 | - | let | |
898 | - | let | |
899 | - | let | |
900 | - | let | |
901 | - | let | |
902 | - | let | |
903 | - | let | |
904 | - | let | |
905 | - | let | |
974 | + | @Callable(cV) | |
975 | + | func evaluatePutByAmountAssetREADONLY (cb) = { | |
976 | + | let bu = aG() | |
977 | + | let bH = fromBase58String(bu[q]) | |
978 | + | let ch = bu[r] | |
979 | + | let bI = fromBase58String(ch) | |
980 | + | let ci = bu[s] | |
981 | + | let bJ = fromBase58String(ci) | |
982 | + | let bv = parseIntValue(bu[t]) | |
983 | + | let bw = parseIntValue(bu[u]) | |
984 | + | let bK = bu[p] | |
985 | + | let fl = valueOrErrorMessage(assetInfo(bH), (("Asset " + toBase58String(bH)) + " doesn't exist")).quantity | |
986 | + | let cK = bg(ch) | |
987 | + | let cL = bg(ci) | |
988 | + | let bq = D(cK, bv) | |
989 | + | let br = D(cL, bw) | |
990 | + | let bQ = if ((fl == 0)) | |
906 | 991 | then e | |
907 | - | else | |
908 | - | let | |
909 | - | let | |
910 | - | let | |
911 | - | let | |
912 | - | let | |
913 | - | let | |
914 | - | let | |
915 | - | let | |
916 | - | let | |
917 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString( | |
992 | + | else bi(br, bq) | |
993 | + | let cn = D(cb, bv) | |
994 | + | let co = fraction(cn, bQ, d) | |
995 | + | let cd = G(co, bw) | |
996 | + | let db = bZ("", 500000, cb, bI, cd, bJ, "", true, false) | |
997 | + | let cy = db._1 | |
998 | + | let fq = db._3 | |
999 | + | let bM = db._4 | |
1000 | + | let bO = db._5 | |
1001 | + | let bL = db._6 | |
1002 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cy), toString(G(bQ, b)), toString(bM), toString(bO), toString(bL), bK, toString(cb), toString(cd)], j)) | |
918 | 1003 | } | |
919 | 1004 | ||
920 | 1005 | ||
921 | 1006 | ||
922 | - | @Callable( | |
923 | - | func evaluatePutByPriceAssetREADONLY ( | |
924 | - | let | |
925 | - | let | |
926 | - | let | |
927 | - | let | |
928 | - | let | |
929 | - | let | |
930 | - | let | |
931 | - | let | |
932 | - | let | |
933 | - | let | |
934 | - | let | |
935 | - | let | |
936 | - | let | |
937 | - | let | |
938 | - | let | |
1007 | + | @Callable(cV) | |
1008 | + | func evaluatePutByPriceAssetREADONLY (cd) = { | |
1009 | + | let bu = aG() | |
1010 | + | let bH = fromBase58String(bu[q]) | |
1011 | + | let ch = bu[r] | |
1012 | + | let bI = fromBase58String(ch) | |
1013 | + | let ci = bu[s] | |
1014 | + | let bJ = fromBase58String(ci) | |
1015 | + | let bv = parseIntValue(bu[t]) | |
1016 | + | let bw = parseIntValue(bu[u]) | |
1017 | + | let bK = bu[p] | |
1018 | + | let fl = valueOrErrorMessage(assetInfo(bH), (("Asset " + toBase58String(bH)) + " doesn't exist")).quantity | |
1019 | + | let fr = bg(ch) | |
1020 | + | let fs = bg(ci) | |
1021 | + | let ft = D(fr, bv) | |
1022 | + | let fu = D(fs, bw) | |
1023 | + | let bQ = if ((fl == 0)) | |
939 | 1024 | then e | |
940 | - | else | |
941 | - | let | |
942 | - | let | |
943 | - | let | |
944 | - | let | |
945 | - | let | |
946 | - | let | |
947 | - | let | |
948 | - | let | |
949 | - | let | |
950 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString( | |
1025 | + | else bi(fu, ft) | |
1026 | + | let co = D(cd, bw) | |
1027 | + | let cn = fraction(co, d, bQ) | |
1028 | + | let cb = G(cn, bv) | |
1029 | + | let db = bZ("", 500000, cb, bI, cd, bJ, "", true, false) | |
1030 | + | let cy = db._1 | |
1031 | + | let fq = db._3 | |
1032 | + | let bM = db._4 | |
1033 | + | let bO = db._5 | |
1034 | + | let bL = db._6 | |
1035 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cy), toString(G(bQ, b)), toString(bM), toString(bO), toString(bL), bK, toString(cb), toString(cd)], j)) | |
951 | 1036 | } | |
952 | 1037 | ||
953 | 1038 | ||
954 | 1039 | ||
955 | - | @Callable( | |
956 | - | func evaluateGetREADONLY ( | |
957 | - | let | |
958 | - | let | |
959 | - | let | |
960 | - | let | |
961 | - | let | |
962 | - | let | |
963 | - | let | |
964 | - | let | |
965 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString( | |
1040 | + | @Callable(cV) | |
1041 | + | func evaluateGetREADONLY (fv,fw) = { | |
1042 | + | let cq = bD("", fv, fw, this) | |
1043 | + | let bW = cq._1 | |
1044 | + | let bX = cq._2 | |
1045 | + | let bM = cq._5 | |
1046 | + | let bO = cq._6 | |
1047 | + | let bL = cq._7 | |
1048 | + | let bR = cq._8 | |
1049 | + | let bK = parseIntValue(cq._9) | |
1050 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(bW), toString(bX), toString(bM), toString(bO), toString(bL), toString(bR), toString(bK)], j)) | |
966 | 1051 | } | |
967 | 1052 | ||
968 | 1053 | ||
969 | - | @Verifier( | |
970 | - | func | |
971 | - | let | |
972 | - | let | |
973 | - | if ($isInstanceOf( | |
1054 | + | @Verifier(fx) | |
1055 | + | func fy () = { | |
1056 | + | let fz = { | |
1057 | + | let dg = er() | |
1058 | + | if ($isInstanceOf(dg, "ByteVector")) | |
974 | 1059 | then { | |
975 | - | let | |
976 | - | | |
1060 | + | let ew = dg | |
1061 | + | ew | |
977 | 1062 | } | |
978 | - | else if ($isInstanceOf( | |
979 | - | then | |
1063 | + | else if ($isInstanceOf(dg, "Unit")) | |
1064 | + | then fx.senderPublicKey | |
980 | 1065 | else throw("Match error") | |
981 | 1066 | } | |
982 | - | let | |
983 | - | if ($isInstanceOf( | |
1067 | + | let dg = fx | |
1068 | + | if ($isInstanceOf(dg, "Order")) | |
984 | 1069 | then { | |
985 | - | let | |
986 | - | let | |
987 | - | let | |
988 | - | let | |
989 | - | let | |
990 | - | if (if (if ( | |
991 | - | then | |
1070 | + | let cH = dg | |
1071 | + | let fA = aF() | |
1072 | + | let at = cG(cH) | |
1073 | + | let au = sigVerify(cH.bodyBytes, cH.proofs[0], cH.senderPublicKey) | |
1074 | + | let av = sigVerify(cH.bodyBytes, cH.proofs[1], fA) | |
1075 | + | if (if (if (at) | |
1076 | + | then au | |
992 | 1077 | else false) | |
993 | - | then | |
1078 | + | then av | |
994 | 1079 | else false) | |
995 | 1080 | then true | |
996 | - | else | |
1081 | + | else as(at, au, av) | |
997 | 1082 | } | |
998 | - | else if ($isInstanceOf( | |
1083 | + | else if ($isInstanceOf(dg, "SetScriptTransaction")) | |
999 | 1084 | then { | |
1000 | - | let | |
1001 | - | let | |
1002 | - | let | |
1003 | - | let | |
1004 | - | if (if (( | |
1005 | - | then ( | |
1085 | + | let es = dg | |
1086 | + | let fB = blake2b256(value(es.script)) | |
1087 | + | let fC = fromBase64String(value(getString(aC, aq()))) | |
1088 | + | let fD = scriptHash(this) | |
1089 | + | if (if ((fC == fB)) | |
1090 | + | then (fD != fB) | |
1006 | 1091 | else false) | |
1007 | 1092 | then true | |
1008 | - | else sigVerify( | |
1093 | + | else sigVerify(fx.bodyBytes, fx.proofs[0], fz) | |
1009 | 1094 | } | |
1010 | - | else sigVerify( | |
1095 | + | else sigVerify(fx.bodyBytes, fx.proofs[0], fz) | |
1011 | 1096 | } | |
1012 | 1097 |
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(1) | |
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 (H,I) = toInt(fraction(H, toBigInt(I), d)) | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | func J (K,L,M) = fraction(K, L, M) | |
69 | 69 | ||
70 | 70 | ||
71 | 71 | func N (H) = if ((e > H)) | |
72 | 72 | then -(H) | |
73 | 73 | else H | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | func O () = "%s__factoryContract" | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | func P () = "%s__managerPublicKey" | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | func Q () = "%s__pendingManagerPublicKey" | |
83 | 83 | ||
84 | 84 | ||
85 | 85 | func R () = "%s%s__price__last" | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | func S (T,U) = makeString(["%s%s%d%d__price__history", toString(T), toString(U)], j) | |
89 | 89 | ||
90 | 90 | ||
91 | 91 | func V (W,X) = ((("%s%s%s__P__" + W) + "__") + X) | |
92 | 92 | ||
93 | 93 | ||
94 | 94 | func Y (W,X) = ((("%s%s%s__G__" + W) + "__") + X) | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | func Z () = "%s__amountAsset" | |
98 | 98 | ||
99 | 99 | ||
100 | 100 | func aa () = "%s__priceAsset" | |
101 | 101 | ||
102 | 102 | ||
103 | - | func ab () = "%s__factoryConfig" | |
103 | + | let ab = "%s__fee" | |
104 | + | ||
105 | + | let ac = fraction(5, b, 10000) | |
106 | + | ||
107 | + | let ad = valueOrElse(getInteger(this, ab), ac) | |
108 | + | ||
109 | + | func ae () = "%s__factoryConfig" | |
104 | 110 | ||
105 | 111 | ||
106 | - | func | |
112 | + | func af () = "%s%s__matcher__publicKey" | |
107 | 113 | ||
108 | 114 | ||
109 | - | func | |
115 | + | func ag (ah) = (("%s%s%s__" + ah) + "__mappings__poolContract2LpAsset") | |
110 | 116 | ||
111 | 117 | ||
112 | - | func | |
118 | + | func ai (aj,ak) = (((("%d%d%s__" + aj) + "__") + ak) + "__config") | |
113 | 119 | ||
114 | 120 | ||
115 | - | func | |
121 | + | func al (am) = ("%s%s%s__mappings__baseAsset2internalId__" + am) | |
116 | 122 | ||
117 | 123 | ||
118 | - | func | |
124 | + | func an () = "%s__shutdown" | |
119 | 125 | ||
120 | 126 | ||
121 | - | func | |
127 | + | func ao (ap) = ("%s%s__poolWeight__" + ap) | |
122 | 128 | ||
123 | 129 | ||
124 | - | func | |
130 | + | func aq () = "%s__allowedLpScriptHash" | |
125 | 131 | ||
126 | 132 | ||
127 | - | func ao (ap,aq,ar) = throw(((((("order validation failed: orderValid=" + toString(ap)) + " senderValid=") + toString(aq)) + " matcherValid=") + toString(ar))) | |
133 | + | let ar = "%s__feeCollectorAddress" | |
134 | + | ||
135 | + | func as (at,au,av) = throw(((((("order validation failed: orderValid=" + toString(at)) + " senderValid=") + toString(au)) + " matcherValid=") + toString(av))) | |
128 | 136 | ||
129 | 137 | ||
130 | - | func | |
138 | + | func aw (ax,ay) = valueOrErrorMessage(getString(ax, ay), makeString(["mandatory ", toString(ax), ".", ay, " is not defined"], "")) | |
131 | 139 | ||
132 | 140 | ||
133 | - | func | |
141 | + | func az (ax,ay) = valueOrErrorMessage(getInteger(ax, ay), makeString(["mandatory ", toString(ax), ".", ay, " is not defined"], "")) | |
134 | 142 | ||
135 | 143 | ||
136 | - | func | |
144 | + | func aA (aB) = throw(makeString(["lp.ride:", aB], " ")) | |
137 | 145 | ||
138 | 146 | ||
139 | - | let | |
147 | + | let aC = addressFromStringValue(aw(this, O())) | |
140 | 148 | ||
141 | - | func az () = valueOrElse(getBoolean(ay, ak()), false) | |
149 | + | let aD = addressFromStringValue(aw(aC, ar)) | |
150 | + | ||
151 | + | func aE () = valueOrElse(getBoolean(aC, an()), false) | |
142 | 152 | ||
143 | 153 | ||
144 | - | func | |
154 | + | func aF () = fromBase58String(aw(aC, af())) | |
145 | 155 | ||
146 | 156 | ||
147 | - | func | |
148 | - | let | |
149 | - | let | |
150 | - | let | |
151 | - | let | |
152 | - | split( | |
157 | + | func aG () = { | |
158 | + | let aH = aw(this, Z()) | |
159 | + | let aI = aw(this, aa()) | |
160 | + | let ak = az(aC, al(aI)) | |
161 | + | let aj = az(aC, al(aH)) | |
162 | + | split(aw(aC, ai(toString(aj), toString(ak))), j) | |
153 | 163 | } | |
154 | 164 | ||
155 | 165 | ||
156 | - | func | |
166 | + | func aJ (aK) = if ((aK == i)) | |
157 | 167 | then unit | |
158 | - | else fromBase58String( | |
168 | + | else fromBase58String(aK) | |
159 | 169 | ||
160 | 170 | ||
161 | - | func | |
171 | + | func aL (aK) = if ((aK == unit)) | |
162 | 172 | then i | |
163 | - | else toBase58String(value( | |
173 | + | else toBase58String(value(aK)) | |
164 | 174 | ||
165 | 175 | ||
166 | - | func | |
176 | + | func aM (aN) = $Tuple7(addressFromStringValue(aN[o]), parseIntValue(aN[p]), fromBase58String(aN[q]), aJ(aN[r]), aJ(aN[s]), parseIntValue(aN[t]), parseIntValue(aN[u])) | |
167 | 177 | ||
168 | 178 | ||
169 | - | func | |
179 | + | func aO () = split(aw(aC, ae()), j) | |
170 | 180 | ||
171 | 181 | ||
172 | - | let | |
182 | + | let aP = valueOrErrorMessage(addressFromString(aO()[B]), "incorrect staking address") | |
173 | 183 | ||
174 | - | let | |
184 | + | let aQ = valueOrErrorMessage(addressFromString(aO()[C]), "incorrect staking address") | |
175 | 185 | ||
176 | - | func | |
186 | + | func aR (aS,aT,aU,aV,aW,aX,aY,aZ,ba,bb) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(aS), toString(aT), toString(aU), toString(aV), toString(aW), toString(aX), toString(aY), toString(aZ), toString(ba), toString(bb)], j) | |
177 | 187 | ||
178 | 188 | ||
179 | - | func | |
189 | + | func bc (bd,be,bf,aV,aY,aZ) = makeString(["%d%d%d%d%d%d", toString(bd), toString(be), toString(bf), toString(aV), toString(aY), toString(aZ)], j) | |
180 | 190 | ||
181 | 191 | ||
182 | - | func | |
192 | + | func bg (bh) = if ((bh == "WAVES")) | |
183 | 193 | then wavesBalance(this).available | |
184 | - | else assetBalance(this, fromBase58String( | |
194 | + | else assetBalance(this, fromBase58String(bh)) | |
185 | 195 | ||
186 | 196 | ||
187 | - | func | |
197 | + | func bi (bj,bk) = fraction(bj, d, bk) | |
188 | 198 | ||
189 | 199 | ||
190 | - | func | |
191 | - | let | |
192 | - | let | |
193 | - | | |
200 | + | func bl (bm,bn,bo,bp) = { | |
201 | + | let bq = D(bo, bm) | |
202 | + | let br = D(bp, bn) | |
203 | + | bi(br, bq) | |
194 | 204 | } | |
195 | 205 | ||
196 | 206 | ||
197 | - | func | |
198 | - | let | |
199 | - | let | |
200 | - | let | |
201 | - | let | |
202 | - | let | |
203 | - | let | |
204 | - | let | |
205 | - | let | |
206 | - | let | |
207 | - | [ | |
207 | + | func bs (bo,bp,bt) = { | |
208 | + | let bu = aG() | |
209 | + | let bv = parseIntValue(bu[t]) | |
210 | + | let bw = parseIntValue(bu[u]) | |
211 | + | let bx = bl(bv, bw, bo, bp) | |
212 | + | let bk = D(bo, bv) | |
213 | + | let bj = D(bp, bw) | |
214 | + | let by = D(bt, b) | |
215 | + | let bz = bi(bk, by) | |
216 | + | let bA = bi(bj, by) | |
217 | + | [bx, bz, bA] | |
208 | 218 | } | |
209 | 219 | ||
210 | 220 | ||
211 | - | func | |
212 | - | let | |
213 | - | [G( | |
221 | + | func bB (bo,bp,bt) = { | |
222 | + | let bC = bs(bo, bp, bt) | |
223 | + | [G(bC[0], b), G(bC[1], b), G(bC[2], b)] | |
214 | 224 | } | |
215 | 225 | ||
216 | 226 | ||
217 | - | func | |
218 | - | let | |
219 | - | let | |
220 | - | let | |
221 | - | let | |
222 | - | let | |
223 | - | let | |
224 | - | let | |
225 | - | let | |
226 | - | if (( | |
227 | + | func bD (bE,bF,bG,W) = { | |
228 | + | let bu = aG() | |
229 | + | let bH = bu[q] | |
230 | + | let bI = bu[r] | |
231 | + | let bJ = bu[s] | |
232 | + | let bm = parseIntValue(bu[t]) | |
233 | + | let bn = parseIntValue(bu[u]) | |
234 | + | let bK = bu[p] | |
235 | + | let bL = valueOrErrorMessage(assetInfo(fromBase58String(bH)), (("Asset " + bH) + " doesn't exist")).quantity | |
236 | + | if ((bH != bF)) | |
227 | 237 | then throw("Invalid asset passed.") | |
228 | 238 | else { | |
229 | - | let | |
230 | - | let | |
231 | - | let | |
232 | - | let | |
233 | - | let | |
234 | - | let | |
235 | - | let | |
236 | - | let | |
237 | - | let | |
238 | - | let | |
239 | - | let | |
240 | - | let | |
241 | - | let | |
239 | + | let bM = bg(bI) | |
240 | + | let bN = D(bM, bm) | |
241 | + | let bO = bg(bJ) | |
242 | + | let bP = D(bO, bn) | |
243 | + | let bQ = bi(bP, bN) | |
244 | + | let bR = G(bQ, b) | |
245 | + | let bS = D(bG, b) | |
246 | + | let bT = D(bL, b) | |
247 | + | let bU = fraction(bN, bS, bT) | |
248 | + | let bV = fraction(bP, bS, bT) | |
249 | + | let bW = G(bU, bm) | |
250 | + | let bX = G(bV, bn) | |
251 | + | let bY = if ((bE == "")) | |
242 | 252 | then nil | |
243 | - | else [ScriptTransfer(W, | |
253 | + | else [ScriptTransfer(W, bW, if ((bI == "WAVES")) | |
244 | 254 | then unit | |
245 | - | else fromBase58String( | |
255 | + | else fromBase58String(bI)), ScriptTransfer(W, bX, if ((bJ == "WAVES")) | |
246 | 256 | then unit | |
247 | - | else fromBase58String( | |
248 | - | $Tuple10( | |
257 | + | else fromBase58String(bJ)), StringEntry(Y(toString(W), bE), bc(bW, bX, bG, bR, height, lastBlock.timestamp)), IntegerEntry(R(), bR), IntegerEntry(S(height, lastBlock.timestamp), bR)] | |
258 | + | $Tuple10(bW, bX, bI, bJ, bM, bO, bL, bQ, bK, bY) | |
249 | 259 | } | |
250 | 260 | } | |
251 | 261 | ||
252 | 262 | ||
253 | - | func | |
254 | - | let | |
255 | - | let | |
256 | - | let | |
257 | - | let | |
258 | - | let | |
259 | - | let | |
260 | - | let | |
261 | - | let | |
262 | - | let | |
263 | - | let | |
264 | - | let | |
265 | - | let | |
266 | - | if (if (( | |
263 | + | func bZ (bE,ca,cb,cc,cd,ce,W,cf,cg) = { | |
264 | + | let bu = aG() | |
265 | + | let bH = fromBase58String(bu[q]) | |
266 | + | let ch = bu[r] | |
267 | + | let ci = bu[s] | |
268 | + | let cj = bu[v] | |
269 | + | let ck = bu[w] | |
270 | + | let bv = parseIntValue(bu[t]) | |
271 | + | let bw = parseIntValue(bu[u]) | |
272 | + | let bK = bu[p] | |
273 | + | let bL = valueOrErrorMessage(assetInfo(bH), (("Asset " + toBase58String(bH)) + " doesn't exist")).quantity | |
274 | + | let cl = toBase58String(valueOrElse(cc, fromBase58String("WAVES"))) | |
275 | + | let cm = toBase58String(valueOrElse(ce, fromBase58String("WAVES"))) | |
276 | + | if (if ((ch != cl)) | |
267 | 277 | then true | |
268 | - | else ( | |
278 | + | else (ci != cm)) | |
269 | 279 | then throw("Invalid amt or price asset passed.") | |
270 | 280 | else { | |
271 | - | let | |
272 | - | then | |
273 | - | else ( | |
274 | - | let | |
275 | - | then | |
276 | - | else ( | |
277 | - | let | |
278 | - | let | |
279 | - | let | |
280 | - | let | |
281 | - | let | |
282 | - | let | |
281 | + | let bM = if (cf) | |
282 | + | then bg(ch) | |
283 | + | else (bg(ch) - cb) | |
284 | + | let bO = if (cf) | |
285 | + | then bg(ci) | |
286 | + | else (bg(ci) - cd) | |
287 | + | let cn = D(cb, bv) | |
288 | + | let co = D(cd, bw) | |
289 | + | let cp = bi(co, cn) | |
290 | + | let bN = D(bM, bv) | |
291 | + | let bP = D(bO, bw) | |
292 | + | let cq = if ((bL == 0)) | |
283 | 293 | then { | |
284 | - | let | |
285 | - | let | |
286 | - | let | |
287 | - | $Tuple5(G( | |
294 | + | let bQ = e | |
295 | + | let cr = e | |
296 | + | let by = pow((cn * co), 0, toBigInt(5), 1, 0, DOWN) | |
297 | + | $Tuple5(G(by, b), G(cn, bv), G(co, bw), bi((bP + co), (bN + cn)), cr) | |
288 | 298 | } | |
289 | 299 | else { | |
290 | - | let | |
291 | - | let | |
292 | - | let | |
293 | - | if (if (( | |
294 | - | then ( | |
300 | + | let bQ = bi(bP, bN) | |
301 | + | let cr = fraction(N((bQ - cp)), d, bQ) | |
302 | + | let cs = D(ca, b) | |
303 | + | if (if ((bQ != e)) | |
304 | + | then (cr > cs) | |
295 | 305 | else false) | |
296 | - | then throw(((("Price slippage " + toString( | |
306 | + | then throw(((("Price slippage " + toString(cr)) + " exceeded the passed limit of ") + toString(cs))) | |
297 | 307 | else { | |
298 | - | let | |
299 | - | let | |
300 | - | let | |
301 | - | let | |
302 | - | then $Tuple2( | |
303 | - | else $Tuple2( | |
304 | - | let | |
305 | - | let | |
306 | - | let | |
307 | - | $Tuple5(G( | |
308 | + | let bT = D(bL, b) | |
309 | + | let ct = fraction(cn, bQ, d) | |
310 | + | let cu = fraction(co, d, bQ) | |
311 | + | let cv = if ((ct > co)) | |
312 | + | then $Tuple2(cu, co) | |
313 | + | else $Tuple2(cn, ct) | |
314 | + | let cw = cv._1 | |
315 | + | let cx = cv._2 | |
316 | + | let by = fraction(bT, cx, bP) | |
317 | + | $Tuple5(G(by, b), G(cw, bv), G(cx, bw), bQ, cr) | |
308 | 318 | } | |
309 | 319 | } | |
310 | - | let | |
311 | - | let | |
312 | - | let | |
313 | - | let | |
314 | - | let | |
315 | - | if ((0 >= | |
320 | + | let cy = cq._1 | |
321 | + | let cz = cq._2 | |
322 | + | let cA = cq._3 | |
323 | + | let bR = G(cq._4, b) | |
324 | + | let cB = G(cq._5, b) | |
325 | + | if ((0 >= cy)) | |
316 | 326 | then throw("Invalid calculations. LP calculated is less than zero.") | |
317 | 327 | else { | |
318 | - | let | |
328 | + | let cC = if (!(cg)) | |
319 | 329 | then 0 | |
320 | - | else | |
321 | - | let | |
322 | - | let | |
323 | - | let | |
324 | - | $Tuple13( | |
330 | + | else cy | |
331 | + | let cD = (cb - cz) | |
332 | + | let cE = (cd - cA) | |
333 | + | let cF = [IntegerEntry(R(), bR), IntegerEntry(S(height, lastBlock.timestamp), bR), StringEntry(V(W, bE), aR(cz, cA, cC, bR, ca, cB, height, lastBlock.timestamp, cD, cE))] | |
334 | + | $Tuple13(cy, cC, bR, bM, bO, bL, bH, bK, cF, cD, cE, cc, ce) | |
325 | 335 | } | |
326 | 336 | } | |
327 | 337 | } | |
328 | 338 | ||
329 | 339 | ||
330 | - | func | |
331 | - | let | |
332 | - | let | |
333 | - | let | |
334 | - | let | |
335 | - | let | |
336 | - | let | |
337 | - | let | |
338 | - | let | |
339 | - | let | |
340 | - | then | |
341 | - | else | |
342 | - | let | |
343 | - | if (if (if ( | |
340 | + | func cG (cH) = { | |
341 | + | let bu = aG() | |
342 | + | let cI = bu[r] | |
343 | + | let cJ = bu[s] | |
344 | + | let bK = parseIntValue(bu[p]) | |
345 | + | let bv = parseIntValue(bu[t]) | |
346 | + | let bw = parseIntValue(bu[u]) | |
347 | + | let cK = bg(cI) | |
348 | + | let cL = bg(cJ) | |
349 | + | let bQ = if ((cH.orderType == Buy)) | |
350 | + | then bl(bv, bw, (cK + cH.amount), cL) | |
351 | + | else bl(bv, bw, (cK - cH.amount), cL) | |
352 | + | let bR = G(bQ, b) | |
353 | + | if (if (if (aE()) | |
344 | 354 | then true | |
345 | - | else ( | |
355 | + | else (bK == m)) | |
346 | 356 | then true | |
347 | - | else ( | |
357 | + | else (bK == n)) | |
348 | 358 | then throw("Exchange operations disabled") | |
349 | 359 | else { | |
350 | - | let | |
351 | - | let | |
360 | + | let cM = cH.assetPair.amountAsset | |
361 | + | let cN = if ((cM == unit)) | |
352 | 362 | then "WAVES" | |
353 | - | else toBase58String(value( | |
354 | - | let | |
355 | - | let | |
363 | + | else toBase58String(value(cM)) | |
364 | + | let cO = cH.assetPair.priceAsset | |
365 | + | let cP = if ((cO == unit)) | |
356 | 366 | then "WAVES" | |
357 | - | else toBase58String(value( | |
358 | - | if (if (( | |
367 | + | else toBase58String(value(cO)) | |
368 | + | if (if ((cN != cI)) | |
359 | 369 | then true | |
360 | - | else ( | |
370 | + | else (cP != cJ)) | |
361 | 371 | then throw("Wrong order assets.") | |
362 | 372 | else { | |
363 | - | let | |
364 | - | let | |
365 | - | let | |
366 | - | let | |
367 | - | then ( | |
368 | - | else ( | |
373 | + | let cQ = cH.price | |
374 | + | let cR = fraction(b, bw, bv) | |
375 | + | let cS = J(cQ, b, cR) | |
376 | + | let cT = if ((cH.orderType == Buy)) | |
377 | + | then (bR >= cS) | |
378 | + | else (cS >= bR) | |
369 | 379 | true | |
370 | 380 | } | |
371 | 381 | } | |
372 | 382 | } | |
373 | 383 | ||
374 | 384 | ||
375 | - | func | |
385 | + | func cU (cV) = if ((size(cV.payments) != 1)) | |
376 | 386 | then throw("exactly 1 payment is expected") | |
377 | 387 | else { | |
378 | - | let | |
379 | - | let | |
380 | - | let | |
381 | - | let | |
382 | - | let | |
383 | - | let | |
384 | - | let | |
385 | - | let | |
386 | - | if (if ( | |
388 | + | let cW = value(cV.payments[0]) | |
389 | + | let bF = value(cW.assetId) | |
390 | + | let cX = cW.amount | |
391 | + | let cq = bD(toBase58String(cV.transactionId), toBase58String(bF), cX, cV.caller) | |
392 | + | let bW = cq._1 | |
393 | + | let bX = cq._2 | |
394 | + | let bK = parseIntValue(cq._9) | |
395 | + | let bY = cq._10 | |
396 | + | if (if (aE()) | |
387 | 397 | then true | |
388 | - | else ( | |
389 | - | then throw(("Get operation is blocked by admin. Status = " + toString( | |
390 | - | else $Tuple5( | |
398 | + | else (bK == n)) | |
399 | + | then throw(("Get operation is blocked by admin. Status = " + toString(bK))) | |
400 | + | else $Tuple5(bW, bX, cX, bF, bY) | |
391 | 401 | } | |
392 | 402 | ||
393 | 403 | ||
394 | - | func | |
404 | + | func cY (cV,ca,cg) = if ((size(cV.payments) != 2)) | |
395 | 405 | then throw("exactly 2 payments are expected") | |
396 | 406 | else { | |
397 | - | let | |
398 | - | let | |
399 | - | let | |
400 | - | let | |
401 | - | if (if (if ( | |
407 | + | let cZ = value(cV.payments[0]) | |
408 | + | let da = value(cV.payments[1]) | |
409 | + | let db = bZ(toBase58String(cV.transactionId), ca, cZ.amount, cZ.assetId, da.amount, da.assetId, toString(cV.caller), false, cg) | |
410 | + | let bK = parseIntValue(db._8) | |
411 | + | if (if (if (aE()) | |
402 | 412 | then true | |
403 | - | else ( | |
413 | + | else (bK == l)) | |
404 | 414 | then true | |
405 | - | else ( | |
406 | - | then throw(("Put operation is blocked by admin. Status = " + toString( | |
407 | - | else | |
415 | + | else (bK == n)) | |
416 | + | then throw(("Put operation is blocked by admin. Status = " + toString(bK))) | |
417 | + | else db | |
408 | 418 | } | |
409 | 419 | ||
410 | 420 | ||
411 | - | func | |
412 | - | let | |
413 | - | if (( | |
421 | + | func dc (dd) = { | |
422 | + | let de = invoke(aC, "emit", [dd], nil) | |
423 | + | if ((de == de)) | |
414 | 424 | then { | |
415 | - | let | |
416 | - | let | |
417 | - | if ($isInstanceOf( | |
425 | + | let df = { | |
426 | + | let dg = de | |
427 | + | if ($isInstanceOf(dg, "Address")) | |
418 | 428 | then { | |
419 | - | let | |
420 | - | invoke( | |
429 | + | let dh = dg | |
430 | + | invoke(dh, "emit", [dd], nil) | |
421 | 431 | } | |
422 | 432 | else unit | |
423 | 433 | } | |
424 | - | if (( | |
425 | - | then | |
434 | + | if ((df == df)) | |
435 | + | then dd | |
426 | 436 | else throw("Strict value is not equal to itself.") | |
427 | 437 | } | |
428 | 438 | else throw("Strict value is not equal to itself.") | |
429 | 439 | } | |
430 | 440 | ||
431 | 441 | ||
432 | - | func dd (de,df,W,X) = { | |
433 | - | let dg = (X == unit) | |
434 | - | let dh = aH(aB()) | |
435 | - | let di = dh._1 | |
436 | - | let bF = dh._2 | |
437 | - | let bC = dh._3 | |
438 | - | let dj = dh._4 | |
439 | - | let cE = dh._5 | |
440 | - | let dk = dh._6 | |
441 | - | let dl = dh._7 | |
442 | - | let dm = de | |
443 | - | let dn = if ((df == dj)) | |
444 | - | then bb(aG(dj)) | |
445 | - | else if ((df == cE)) | |
446 | - | then bb(aG(cE)) | |
447 | - | else aw("invalid asset") | |
448 | - | let do = if (dg) | |
449 | - | then 0 | |
450 | - | else dm | |
451 | - | let dp = (dn - do) | |
452 | - | let dq = toBigInt(dp) | |
453 | - | let dr = toBigInt(valueOrErrorMessage(assetInfo(bC), (("asset " + toBase58String(bC)) + " doesn't exist")).quantity) | |
454 | - | let ds = toBigInt(dm) | |
455 | - | let dt = ((dr * (sqrtBigInt((c + ((ds * c) / dq)), 8, 8, DOWN) - c)) / c) | |
456 | - | toInt(dt) | |
442 | + | func di (dd) = { | |
443 | + | let dj = fraction(dd, ad, b) | |
444 | + | $Tuple2((dd - dj), dj) | |
457 | 445 | } | |
458 | 446 | ||
459 | 447 | ||
460 | - | func du (dv,dm,df,W,X) = { | |
461 | - | let dg = (X == unit) | |
462 | - | let dw = aH(aB()) | |
463 | - | let di = dw._1 | |
464 | - | let bF = dw._2 | |
465 | - | let bC = dw._3 | |
466 | - | let dj = dw._4 | |
467 | - | let cE = dw._5 | |
468 | - | let dk = dw._6 | |
469 | - | let dl = dw._7 | |
470 | - | let dx = [if ((df == bC)) | |
448 | + | func dk (dl,dm,W,X) = { | |
449 | + | let dn = (X == unit) | |
450 | + | let do = aM(aG()) | |
451 | + | let dp = do._1 | |
452 | + | let bK = do._2 | |
453 | + | let bH = do._3 | |
454 | + | let dq = do._4 | |
455 | + | let cJ = do._5 | |
456 | + | let dr = do._6 | |
457 | + | let ds = do._7 | |
458 | + | let dt = bg(aL(dq)) | |
459 | + | let du = bg(aL(cJ)) | |
460 | + | let dv = if ((dm == dq)) | |
471 | 461 | then true | |
472 | - | else throw("invalid lp asset")] | |
473 | - | if ((dx == dx)) | |
462 | + | else if ((dm == cJ)) | |
463 | + | then false | |
464 | + | else aA("invalid asset") | |
465 | + | let dw = if (dn) | |
466 | + | then $Tuple2(dt, du) | |
467 | + | else if (dv) | |
468 | + | then $Tuple2((dt - dl), du) | |
469 | + | else $Tuple2(dt, (du - dl)) | |
470 | + | let dx = dw._1 | |
471 | + | let dy = dw._2 | |
472 | + | let dz = if (dv) | |
473 | + | then $Tuple2(dl, 0) | |
474 | + | else $Tuple2(0, dl) | |
475 | + | let dA = dz._1 | |
476 | + | let dB = dz._2 | |
477 | + | let dC = di(dA)._1 | |
478 | + | let dD = di(dB)._1 | |
479 | + | let dE = di(dl) | |
480 | + | let dF = dE._1 | |
481 | + | let dj = dE._2 | |
482 | + | let dG = (dx + dC) | |
483 | + | let dH = (dy + dD) | |
484 | + | let bR = G(bi(D(dH, ds), D(dG, dr)), b) | |
485 | + | let dI = if (dv) | |
486 | + | then dx | |
487 | + | else dy | |
488 | + | let dJ = toBigInt(dI) | |
489 | + | let dK = toBigInt(valueOrErrorMessage(assetInfo(bH), (("asset " + toBase58String(bH)) + " doesn't exist")).quantity) | |
490 | + | let dL = if ((dK > f)) | |
491 | + | then true | |
492 | + | else throw("initial deposit requires all coins") | |
493 | + | if ((dL == dL)) | |
474 | 494 | then { | |
475 | - | let dq = if ((dv == dj)) | |
476 | - | then toBigInt(bb(aG(dj))) | |
477 | - | else if ((dv == cE)) | |
478 | - | then toBigInt(bb(aG(cE))) | |
479 | - | else aw("invalid asset") | |
480 | - | let dr = toBigInt(valueOrErrorMessage(assetInfo(bC), (("asset " + toBase58String(bC)) + " doesn't exist")).quantity) | |
481 | - | let dy = toBigInt(dm) | |
482 | - | let cY = ((dq * (c - pow((c - ((dy * c) / dr)), 8, h, 0, 8, DOWN))) / c) | |
483 | - | toInt(cY) | |
495 | + | let dM = toBigInt(dF) | |
496 | + | let dN = toInt(((dK * (sqrtBigInt((c + ((dM * c) / dJ)), 8, 8, DOWN) - c)) / c)) | |
497 | + | let cF = if (dn) | |
498 | + | then nil | |
499 | + | else [IntegerEntry(R(), bR), IntegerEntry(S(height, lastBlock.timestamp), bR), StringEntry(V(toString(value(W)), toBase58String(value(X))), aR(dA, dB, dN, bR, 0, 0, height, lastBlock.timestamp, 0, 0))] | |
500 | + | let dO = fraction(dy, b, dx) | |
501 | + | let dP = fraction(dl, b, (dO + b)) | |
502 | + | let dQ = (dl - dP) | |
503 | + | let dR = fraction(dK, toBigInt(dQ), toBigInt(dy)) | |
504 | + | let dS = toInt(fraction((toBigInt(dN) - dR), c, dR)) | |
505 | + | $Tuple4(dN, cF, dj, dS) | |
484 | 506 | } | |
485 | 507 | else throw("Strict value is not equal to itself.") | |
486 | 508 | } | |
487 | 509 | ||
488 | 510 | ||
489 | - | func dz () = { | |
490 | - | let db = getString(P()) | |
491 | - | if ($isInstanceOf(db, "String")) | |
511 | + | func dT (dU,dF,dm,W,X) = { | |
512 | + | let dn = (X == unit) | |
513 | + | let dV = aM(aG()) | |
514 | + | let dp = dV._1 | |
515 | + | let bK = dV._2 | |
516 | + | let bH = dV._3 | |
517 | + | let dq = dV._4 | |
518 | + | let cJ = dV._5 | |
519 | + | let dW = dV._6 | |
520 | + | let dX = dV._7 | |
521 | + | let dY = [if ((dm == bH)) | |
522 | + | then true | |
523 | + | else throw("invalid lp asset")] | |
524 | + | if ((dY == dY)) | |
492 | 525 | then { | |
493 | - | let dA = db | |
494 | - | fromBase58String(dA) | |
526 | + | let dZ = if ((dU == dq)) | |
527 | + | then true | |
528 | + | else if ((dU == cJ)) | |
529 | + | then false | |
530 | + | else aA("invalid asset") | |
531 | + | let ea = if (dZ) | |
532 | + | then toBigInt(bg(aL(dq))) | |
533 | + | else toBigInt(bg(aL(cJ))) | |
534 | + | let eb = bg(aL(dq)) | |
535 | + | let ec = bg(aL(cJ)) | |
536 | + | let ed = if (dZ) | |
537 | + | then eb | |
538 | + | else ec | |
539 | + | let ee = toBigInt(ed) | |
540 | + | let dK = toBigInt(valueOrErrorMessage(assetInfo(bH), (("asset " + toBase58String(bH)) + " doesn't exist")).quantity) | |
541 | + | let ef = toBigInt(dF) | |
542 | + | let eg = toInt(((ea * (c - pow((c - ((ef * c) / dK)), 8, h, 0, 8, DOWN))) / c)) | |
543 | + | let eh = di(eg) | |
544 | + | let ei = eh._1 | |
545 | + | let dj = eh._2 | |
546 | + | let ej = if (dZ) | |
547 | + | then $Tuple4(ei, 0, (eb - eg), ec) | |
548 | + | else $Tuple4(0, ei, eb, (ec - eg)) | |
549 | + | let ek = ej._1 | |
550 | + | let el = ej._2 | |
551 | + | let em = ej._3 | |
552 | + | let en = ej._4 | |
553 | + | let eo = bi(D(en, dX), D(em, dW)) | |
554 | + | let bR = G(eo, b) | |
555 | + | let cF = if (dn) | |
556 | + | then nil | |
557 | + | else [StringEntry(Y(toString(value(W)), toBase58String(value(X))), bc(ek, el, dF, bR, height, lastBlock.timestamp)), IntegerEntry(R(), bR), IntegerEntry(S(height, lastBlock.timestamp), bR)] | |
558 | + | let ep = bD("", aL(bH), dF, this) | |
559 | + | let eq = (ep._1 + ep._2) | |
560 | + | let dS = fraction((ei - eq), b, eq) | |
561 | + | $Tuple4(ei, cF, dj, dS) | |
495 | 562 | } | |
496 | - | else if ($isInstanceOf(db, "Unit")) | |
563 | + | else throw("Strict value is not equal to itself.") | |
564 | + | } | |
565 | + | ||
566 | + | ||
567 | + | func er () = { | |
568 | + | let dg = getString(P()) | |
569 | + | if ($isInstanceOf(dg, "String")) | |
570 | + | then { | |
571 | + | let es = dg | |
572 | + | fromBase58String(es) | |
573 | + | } | |
574 | + | else if ($isInstanceOf(dg, "Unit")) | |
497 | 575 | then unit | |
498 | 576 | else throw("Match error") | |
499 | 577 | } | |
500 | 578 | ||
501 | 579 | ||
502 | - | func | |
503 | - | let | |
504 | - | if ($isInstanceOf( | |
580 | + | func et () = { | |
581 | + | let dg = getString(Q()) | |
582 | + | if ($isInstanceOf(dg, "String")) | |
505 | 583 | then { | |
506 | - | let | |
507 | - | fromBase58String( | |
584 | + | let es = dg | |
585 | + | fromBase58String(es) | |
508 | 586 | } | |
509 | - | else if ($isInstanceOf( | |
587 | + | else if ($isInstanceOf(dg, "Unit")) | |
510 | 588 | then unit | |
511 | 589 | else throw("Match error") | |
512 | 590 | } | |
513 | 591 | ||
514 | 592 | ||
515 | - | func | |
516 | - | let | |
517 | - | let | |
518 | - | if ($isInstanceOf( | |
593 | + | func eu (cV) = { | |
594 | + | let ev = throw("Permission denied") | |
595 | + | let dg = er() | |
596 | + | if ($isInstanceOf(dg, "ByteVector")) | |
519 | 597 | then { | |
520 | - | let | |
521 | - | if (( | |
598 | + | let ew = dg | |
599 | + | if ((cV.callerPublicKey == ew)) | |
522 | 600 | then true | |
523 | - | else | |
601 | + | else ev | |
524 | 602 | } | |
525 | - | else if ($isInstanceOf( | |
526 | - | then if (( | |
603 | + | else if ($isInstanceOf(dg, "Unit")) | |
604 | + | then if ((cV.caller == this)) | |
527 | 605 | then true | |
528 | - | else | |
606 | + | else ev | |
529 | 607 | else throw("Match error") | |
530 | 608 | } | |
531 | 609 | ||
532 | 610 | ||
533 | - | @Callable( | |
534 | - | func setManager ( | |
535 | - | let | |
536 | - | if (( | |
611 | + | @Callable(cV) | |
612 | + | func setManager (ex) = { | |
613 | + | let ey = eu(cV) | |
614 | + | if ((ey == ey)) | |
537 | 615 | then { | |
538 | - | let | |
539 | - | if (( | |
540 | - | then [StringEntry(Q(), | |
616 | + | let ez = fromBase58String(ex) | |
617 | + | if ((ez == ez)) | |
618 | + | then [StringEntry(Q(), ex)] | |
541 | 619 | else throw("Strict value is not equal to itself.") | |
542 | 620 | } | |
543 | 621 | else throw("Strict value is not equal to itself.") | |
544 | 622 | } | |
545 | 623 | ||
546 | 624 | ||
547 | 625 | ||
548 | - | @Callable( | |
626 | + | @Callable(cV) | |
549 | 627 | func confirmManager () = { | |
550 | - | let | |
551 | - | let | |
628 | + | let eA = et() | |
629 | + | let eB = if (isDefined(eA)) | |
552 | 630 | then true | |
553 | 631 | else throw("No pending manager") | |
554 | - | if (( | |
632 | + | if ((eB == eB)) | |
555 | 633 | then { | |
556 | - | let | |
634 | + | let eC = if ((cV.callerPublicKey == value(eA))) | |
557 | 635 | then true | |
558 | 636 | else throw("You are not pending manager") | |
559 | - | if (( | |
560 | - | then [StringEntry(P(), toBase58String(value( | |
637 | + | if ((eC == eC)) | |
638 | + | then [StringEntry(P(), toBase58String(value(eA))), DeleteEntry(Q())] | |
561 | 639 | else throw("Strict value is not equal to itself.") | |
562 | 640 | } | |
563 | 641 | else throw("Strict value is not equal to itself.") | |
564 | 642 | } | |
565 | 643 | ||
566 | 644 | ||
567 | 645 | ||
568 | - | @Callable( | |
569 | - | func put ( | |
646 | + | @Callable(cV) | |
647 | + | func put (ca,eD) = if ((0 > ca)) | |
570 | 648 | then throw("Invalid slippageTolerance passed") | |
571 | 649 | else { | |
572 | - | let | |
573 | - | let | |
574 | - | let | |
575 | - | let | |
576 | - | let | |
577 | - | let | |
578 | - | let | |
579 | - | let | |
580 | - | let | |
581 | - | if (( | |
650 | + | let db = cY(cV, ca, true) | |
651 | + | let cC = db._2 | |
652 | + | let bH = db._7 | |
653 | + | let bY = db._9 | |
654 | + | let cD = db._10 | |
655 | + | let cE = db._11 | |
656 | + | let eE = db._12 | |
657 | + | let eF = db._13 | |
658 | + | let de = invoke(aC, "emit", [cC], nil) | |
659 | + | if ((de == de)) | |
582 | 660 | then { | |
583 | - | let | |
584 | - | let | |
585 | - | if ($isInstanceOf( | |
661 | + | let df = { | |
662 | + | let dg = de | |
663 | + | if ($isInstanceOf(dg, "Address")) | |
586 | 664 | then { | |
587 | - | let | |
588 | - | invoke( | |
665 | + | let dh = dg | |
666 | + | invoke(dh, "emit", [cC], nil) | |
589 | 667 | } | |
590 | 668 | else unit | |
591 | 669 | } | |
592 | - | if (( | |
670 | + | if ((df == df)) | |
593 | 671 | then { | |
594 | - | let | |
595 | - | then invoke( | |
672 | + | let eG = if ((cD > 0)) | |
673 | + | then invoke(aQ, "put", nil, [AttachedPayment(eE, cD)]) | |
596 | 674 | else nil | |
597 | - | if (( | |
675 | + | if ((eG == eG)) | |
598 | 676 | then { | |
599 | - | let | |
600 | - | then invoke( | |
677 | + | let eH = if ((cE > 0)) | |
678 | + | then invoke(aQ, "put", nil, [AttachedPayment(eF, cE)]) | |
601 | 679 | else nil | |
602 | - | if (( | |
680 | + | if ((eH == eH)) | |
603 | 681 | then { | |
604 | - | let | |
682 | + | let eI = if (eD) | |
605 | 683 | then { | |
606 | - | let | |
607 | - | if (( | |
684 | + | let eJ = invoke(aP, "stake", nil, [AttachedPayment(bH, cC)]) | |
685 | + | if ((eJ == eJ)) | |
608 | 686 | then nil | |
609 | 687 | else throw("Strict value is not equal to itself.") | |
610 | 688 | } | |
611 | - | else [ScriptTransfer( | |
612 | - | ( | |
689 | + | else [ScriptTransfer(cV.caller, cC, bH)] | |
690 | + | (bY ++ eI) | |
613 | 691 | } | |
614 | 692 | else throw("Strict value is not equal to itself.") | |
615 | 693 | } | |
616 | 694 | else throw("Strict value is not equal to itself.") | |
617 | 695 | } | |
618 | 696 | else throw("Strict value is not equal to itself.") | |
619 | 697 | } | |
620 | 698 | else throw("Strict value is not equal to itself.") | |
621 | 699 | } | |
622 | 700 | ||
623 | 701 | ||
624 | 702 | ||
625 | - | @Callable( | |
626 | - | func putForFree ( | |
703 | + | @Callable(cV) | |
704 | + | func putForFree (eK) = if ((0 > eK)) | |
627 | 705 | then throw("Invalid value passed") | |
628 | 706 | else { | |
629 | - | let | |
630 | - | | |
707 | + | let db = cY(cV, eK, false) | |
708 | + | db._9 | |
631 | 709 | } | |
632 | 710 | ||
633 | 711 | ||
634 | 712 | ||
635 | - | @Callable( | |
636 | - | func putOneTkn ( | |
637 | - | let | |
638 | - | let | |
639 | - | let | |
640 | - | let | |
641 | - | let | |
642 | - | let | |
643 | - | let | |
644 | - | let | |
645 | - | let | |
713 | + | @Callable(cV) | |
714 | + | func putOneTkn (eL,eM) = { | |
715 | + | let eN = aM(aG()) | |
716 | + | let dp = eN._1 | |
717 | + | let bK = eN._2 | |
718 | + | let bH = eN._3 | |
719 | + | let dq = eN._4 | |
720 | + | let cJ = eN._5 | |
721 | + | let dr = eN._6 | |
722 | + | let ds = eN._7 | |
723 | + | let eO = if (if (aE()) | |
646 | 724 | then true | |
647 | - | else ( | |
725 | + | else (bK == l)) | |
648 | 726 | then true | |
649 | - | else ( | |
650 | - | let | |
727 | + | else (bK == n) | |
728 | + | let dY = [if (!(eO)) | |
651 | 729 | then true | |
652 | - | else | |
730 | + | else aA("put operation is blocked by admin"), if ((size(cV.payments) == 1)) | |
653 | 731 | then true | |
654 | - | else | |
655 | - | if (( | |
732 | + | else aA("exactly 1 payment are expected")] | |
733 | + | if ((dY == dY)) | |
656 | 734 | then { | |
657 | - | let dX = cQ.payments[0] | |
658 | - | let df = dX.assetId | |
659 | - | let de = dX.amount | |
660 | - | let dm = de | |
661 | - | let W = cQ.caller | |
662 | - | let X = cQ.transactionId | |
663 | - | let dY = { | |
664 | - | let dZ = dd(de, df, W, X) | |
665 | - | if (if ((dT > 0)) | |
666 | - | then (dT > dZ) | |
667 | - | else false) | |
668 | - | then throw(makeString(["amount to receive is less than ", toString(dT)], "")) | |
669 | - | else dZ | |
670 | - | } | |
671 | - | let cZ = cX(dY) | |
672 | - | if ((cZ == cZ)) | |
735 | + | let eP = cV.payments[0] | |
736 | + | let dm = eP.assetId | |
737 | + | let dl = eP.amount | |
738 | + | let dF = dl | |
739 | + | let W = cV.caller | |
740 | + | let X = cV.transactionId | |
741 | + | let eQ = dk(dl, dm, W, X) | |
742 | + | let eR = eQ._1 | |
743 | + | let cF = eQ._2 | |
744 | + | let dj = eQ._3 | |
745 | + | let dS = eQ._4 | |
746 | + | let eS = if (if ((eL > 0)) | |
747 | + | then (eL > eR) | |
748 | + | else false) | |
749 | + | then throw(makeString(["amount to receive is less than ", toString(eL)], "")) | |
750 | + | else eR | |
751 | + | let de = dc(eS) | |
752 | + | if ((de == de)) | |
673 | 753 | then { | |
674 | - | let | |
754 | + | let eI = if (eM) | |
675 | 755 | then { | |
676 | - | let | |
677 | - | if (( | |
756 | + | let eT = invoke(aP, "stake", nil, [AttachedPayment(bH, eS)]) | |
757 | + | if ((eT == eT)) | |
678 | 758 | then nil | |
679 | 759 | else throw("Strict value is not equal to itself.") | |
680 | 760 | } | |
681 | - | else [ScriptTransfer(cQ.caller, dY, bC)] | |
682 | - | $Tuple2(dQ, dY) | |
761 | + | else [ScriptTransfer(cV.caller, eS, bH)] | |
762 | + | let eU = if ((dj > 0)) | |
763 | + | then [ScriptTransfer(aD, dj, dm)] | |
764 | + | else nil | |
765 | + | $Tuple2(((cF ++ eI) ++ eU), eS) | |
683 | 766 | } | |
684 | 767 | else throw("Strict value is not equal to itself.") | |
685 | 768 | } | |
686 | 769 | else throw("Strict value is not equal to itself.") | |
687 | 770 | } | |
688 | 771 | ||
689 | 772 | ||
690 | 773 | ||
691 | - | @Callable( | |
692 | - | func getOneTkn ( | |
693 | - | let | |
694 | - | let | |
695 | - | let | |
696 | - | let | |
697 | - | let | |
698 | - | let | |
699 | - | let | |
700 | - | let | |
701 | - | let | |
774 | + | @Callable(cV) | |
775 | + | func getOneTkn (dU,eL,eV) = { | |
776 | + | let eW = aM(aG()) | |
777 | + | let dp = eW._1 | |
778 | + | let bK = eW._2 | |
779 | + | let bH = eW._3 | |
780 | + | let dq = eW._4 | |
781 | + | let cJ = eW._5 | |
782 | + | let dr = eW._6 | |
783 | + | let ds = eW._7 | |
784 | + | let eX = if (aE()) | |
702 | 785 | then true | |
703 | - | else ( | |
704 | - | let | |
786 | + | else (bK == n) | |
787 | + | let dY = [if (!(eX)) | |
705 | 788 | then true | |
706 | - | else | |
789 | + | else aA("get operation is blocked by admin"), if ((size(cV.payments) == 1)) | |
707 | 790 | then true | |
708 | - | else | |
709 | - | if (( | |
791 | + | else aA("exactly 1 payment are expected")] | |
792 | + | if ((dY == dY)) | |
710 | 793 | then { | |
711 | - | let dX = cQ.payments[0] | |
712 | - | let df = dX.assetId | |
713 | - | let dm = dX.amount | |
714 | - | let W = cQ.caller | |
715 | - | let X = cQ.transactionId | |
716 | - | let cY = { | |
717 | - | let ee = du(aE(dv), dm, df, W, X) | |
718 | - | if (if ((dT > 0)) | |
719 | - | then (dT > ee) | |
720 | - | else false) | |
721 | - | then throw(makeString(["amount to receive is less than ", toString(dT)], "")) | |
722 | - | else ee | |
723 | - | } | |
724 | - | let ef = invoke(ay, "burn", [dm], [AttachedPayment(df, dm)]) | |
725 | - | if ((ef == ef)) | |
794 | + | let eP = cV.payments[0] | |
795 | + | let dm = eP.assetId | |
796 | + | let dF = eP.amount | |
797 | + | let W = cV.caller | |
798 | + | let X = cV.transactionId | |
799 | + | let eY = dT(aJ(dU), dF, dm, W, X) | |
800 | + | let eZ = eY._1 | |
801 | + | let cF = eY._2 | |
802 | + | let dj = eY._3 | |
803 | + | let dS = eY._4 | |
804 | + | let dd = if (if ((eL > 0)) | |
805 | + | then (eL > eZ) | |
806 | + | else false) | |
807 | + | then throw(makeString(["amount to receive is less than ", toString(eL)], "")) | |
808 | + | else eZ | |
809 | + | let fa = invoke(aC, "burn", [dF], [AttachedPayment(dm, dF)]) | |
810 | + | if ((fa == fa)) | |
726 | 811 | then { | |
727 | - | let | |
728 | - | $Tuple2( | |
812 | + | let fb = [ScriptTransfer(W, dd, aJ(dU))] | |
813 | + | $Tuple2(fb, dd) | |
729 | 814 | } | |
730 | 815 | else throw("Strict value is not equal to itself.") | |
731 | 816 | } | |
732 | 817 | else throw("Strict value is not equal to itself.") | |
733 | 818 | } | |
734 | 819 | ||
735 | 820 | ||
736 | 821 | ||
737 | - | @Callable( | |
822 | + | @Callable(cV) | |
738 | 823 | func get () = { | |
739 | - | let | |
740 | - | let | |
741 | - | let | |
742 | - | let | |
743 | - | let | |
744 | - | let | |
745 | - | let | |
746 | - | if (( | |
747 | - | then | |
824 | + | let cq = cU(cV) | |
825 | + | let fc = cq._1 | |
826 | + | let bX = cq._2 | |
827 | + | let cX = cq._3 | |
828 | + | let bF = cq._4 | |
829 | + | let bY = cq._5 | |
830 | + | let fd = invoke(aC, "burn", [cX], [AttachedPayment(bF, cX)]) | |
831 | + | if ((fd == fd)) | |
832 | + | then bY | |
748 | 833 | else throw("Strict value is not equal to itself.") | |
749 | 834 | } | |
750 | 835 | ||
751 | 836 | ||
752 | 837 | ||
753 | - | @Callable( | |
754 | - | func getNoLess ( | |
755 | - | let | |
756 | - | let | |
757 | - | let | |
758 | - | let | |
759 | - | let | |
760 | - | let | |
761 | - | if (( | |
762 | - | then throw(((("noLessThenAmtAsset failed: " + toString( | |
763 | - | else if (( | |
764 | - | then throw(((("noLessThenPriceAsset failed: " + toString( | |
838 | + | @Callable(cV) | |
839 | + | func getNoLess (fe,ff) = { | |
840 | + | let cq = cU(cV) | |
841 | + | let bW = cq._1 | |
842 | + | let bX = cq._2 | |
843 | + | let cX = cq._3 | |
844 | + | let bF = cq._4 | |
845 | + | let bY = cq._5 | |
846 | + | if ((fe > bW)) | |
847 | + | then throw(((("noLessThenAmtAsset failed: " + toString(bW)) + " < ") + toString(fe))) | |
848 | + | else if ((ff > bX)) | |
849 | + | then throw(((("noLessThenPriceAsset failed: " + toString(bX)) + " < ") + toString(ff))) | |
765 | 850 | else { | |
766 | - | let | |
767 | - | if (( | |
768 | - | then | |
851 | + | let fd = invoke(aC, "burn", [cX], [AttachedPayment(bF, cX)]) | |
852 | + | if ((fd == fd)) | |
853 | + | then bY | |
769 | 854 | else throw("Strict value is not equal to itself.") | |
770 | 855 | } | |
771 | 856 | } | |
772 | 857 | ||
773 | 858 | ||
774 | 859 | ||
775 | - | @Callable( | |
776 | - | func unstakeAndGet ( | |
777 | - | let | |
860 | + | @Callable(cV) | |
861 | + | func unstakeAndGet (dd) = { | |
862 | + | let fg = if ((size(cV.payments) != 0)) | |
778 | 863 | then throw("No payments are expected") | |
779 | 864 | else true | |
780 | - | if (( | |
865 | + | if ((fg == fg)) | |
781 | 866 | then { | |
782 | - | let | |
783 | - | let | |
784 | - | let | |
785 | - | if (( | |
867 | + | let bu = aG() | |
868 | + | let bH = fromBase58String(bu[q]) | |
869 | + | let fh = invoke(aP, "unstake", [toBase58String(bH), dd], nil) | |
870 | + | if ((fh == fh)) | |
786 | 871 | then { | |
787 | - | let | |
788 | - | let | |
789 | - | let | |
790 | - | let | |
872 | + | let cq = bD(toBase58String(cV.transactionId), toBase58String(bH), dd, cV.caller) | |
873 | + | let bK = parseIntValue(cq._9) | |
874 | + | let bY = cq._10 | |
875 | + | let fi = if (if (aE()) | |
791 | 876 | then true | |
792 | - | else ( | |
793 | - | then throw(("Get operation is blocked by admin. Status = " + toString( | |
877 | + | else (bK == n)) | |
878 | + | then throw(("Get operation is blocked by admin. Status = " + toString(bK))) | |
794 | 879 | else true | |
795 | - | if (( | |
880 | + | if ((fi == fi)) | |
796 | 881 | then { | |
797 | - | let | |
798 | - | if (( | |
799 | - | then | |
882 | + | let fd = invoke(aC, "burn", [dd], [AttachedPayment(bH, dd)]) | |
883 | + | if ((fd == fd)) | |
884 | + | then bY | |
800 | 885 | else throw("Strict value is not equal to itself.") | |
801 | 886 | } | |
802 | 887 | else throw("Strict value is not equal to itself.") | |
803 | 888 | } | |
804 | 889 | else throw("Strict value is not equal to itself.") | |
805 | 890 | } | |
806 | 891 | else throw("Strict value is not equal to itself.") | |
807 | 892 | } | |
808 | 893 | ||
809 | 894 | ||
810 | 895 | ||
811 | - | @Callable( | |
812 | - | func activate ( | |
896 | + | @Callable(cV) | |
897 | + | func activate (fj,fk) = if ((toString(cV.caller) != toString(aC))) | |
813 | 898 | then throw("permissions denied") | |
814 | - | else $Tuple2([StringEntry(Z(), | |
899 | + | else $Tuple2([StringEntry(Z(), fj), StringEntry(aa(), fk)], "success") | |
815 | 900 | ||
816 | 901 | ||
817 | 902 | ||
818 | - | @Callable( | |
819 | - | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, | |
903 | + | @Callable(cV) | |
904 | + | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aG()) | |
820 | 905 | ||
821 | 906 | ||
822 | 907 | ||
823 | - | @Callable( | |
824 | - | func getAccBalanceWrapperREADONLY ( | |
908 | + | @Callable(cV) | |
909 | + | func getAccBalanceWrapperREADONLY (bh) = $Tuple2(nil, bg(bh)) | |
825 | 910 | ||
826 | 911 | ||
827 | 912 | ||
828 | - | @Callable( | |
829 | - | func calcPricesWrapperREADONLY ( | |
830 | - | let | |
831 | - | $Tuple2(nil, [toString( | |
913 | + | @Callable(cV) | |
914 | + | func calcPricesWrapperREADONLY (bo,bp,bt) = { | |
915 | + | let bC = bs(bo, bp, bt) | |
916 | + | $Tuple2(nil, [toString(bC[0]), toString(bC[1]), toString(bC[2])]) | |
832 | 917 | } | |
833 | 918 | ||
834 | 919 | ||
835 | 920 | ||
836 | - | @Callable( | |
921 | + | @Callable(cV) | |
837 | 922 | func toX18WrapperREADONLY (E,F) = $Tuple2(nil, toString(D(E, F))) | |
838 | 923 | ||
839 | 924 | ||
840 | 925 | ||
841 | - | @Callable( | |
926 | + | @Callable(cV) | |
842 | 927 | func fromX18WrapperREADONLY (H,I) = $Tuple2(nil, G(parseBigIntValue(H), I)) | |
843 | 928 | ||
844 | 929 | ||
845 | 930 | ||
846 | - | @Callable( | |
847 | - | func calcPriceBigIntWrapperREADONLY ( | |
931 | + | @Callable(cV) | |
932 | + | func calcPriceBigIntWrapperREADONLY (bj,bk) = $Tuple2(nil, toString(bi(parseBigIntValue(bj), parseBigIntValue(bk)))) | |
848 | 933 | ||
849 | 934 | ||
850 | 935 | ||
851 | - | @Callable( | |
852 | - | func estimatePutOperationWrapperREADONLY ( | |
936 | + | @Callable(cV) | |
937 | + | func estimatePutOperationWrapperREADONLY (bE,ca,cb,cc,cd,ce,W,cf,cg) = $Tuple2(nil, bZ(bE, ca, cb, cc, cd, ce, W, cf, cg)) | |
853 | 938 | ||
854 | 939 | ||
855 | 940 | ||
856 | - | @Callable( | |
857 | - | func estimateGetOperationWrapperREADONLY ( | |
858 | - | let | |
859 | - | $Tuple2(nil, $Tuple10( | |
941 | + | @Callable(cV) | |
942 | + | func estimateGetOperationWrapperREADONLY (bE,bF,bG,W) = { | |
943 | + | let cq = bD(bE, bF, bG, addressFromStringValue(W)) | |
944 | + | $Tuple2(nil, $Tuple10(cq._1, cq._2, cq._3, cq._4, cq._5, cq._6, cq._7, toString(cq._8), cq._9, cq._10)) | |
860 | 945 | } | |
861 | 946 | ||
862 | 947 | ||
863 | 948 | ||
864 | - | @Callable( | |
949 | + | @Callable(cV) | |
865 | 950 | func statsREADONLY () = { | |
866 | - | let | |
867 | - | let | |
868 | - | let | |
869 | - | let | |
870 | - | let | |
871 | - | let | |
872 | - | let | |
873 | - | let | |
874 | - | let | |
875 | - | let | |
876 | - | let | |
877 | - | let | |
951 | + | let bu = aG() | |
952 | + | let bH = fromBase58String(bu[q]) | |
953 | + | let cI = bu[r] | |
954 | + | let cJ = bu[s] | |
955 | + | let cj = bu[v] | |
956 | + | let ck = bu[w] | |
957 | + | let bv = parseIntValue(bu[t]) | |
958 | + | let bw = parseIntValue(bu[u]) | |
959 | + | let fl = valueOrErrorMessage(assetInfo(bH), (("Asset " + toBase58String(bH)) + " doesn't exist")).quantity | |
960 | + | let cK = bg(cI) | |
961 | + | let cL = bg(cJ) | |
962 | + | let fm = if ((fl == 0)) | |
878 | 963 | then [e, e, e] | |
879 | - | else | |
880 | - | let | |
881 | - | let | |
882 | - | let | |
883 | - | let | |
884 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString( | |
964 | + | else bs(cK, cL, fl) | |
965 | + | let bR = 0 | |
966 | + | let fn = G(fm[1], b) | |
967 | + | let fo = G(fm[2], b) | |
968 | + | let fp = value(getInteger(aC, ao(toString(this)))) | |
969 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(cK), toString(cL), toString(fl), toString(bR), toString(fn), toString(fo), toString(fp)], j)) | |
885 | 970 | } | |
886 | 971 | ||
887 | 972 | ||
888 | 973 | ||
889 | - | @Callable( | |
890 | - | func evaluatePutByAmountAssetREADONLY ( | |
891 | - | let | |
892 | - | let | |
893 | - | let | |
894 | - | let | |
895 | - | let | |
896 | - | let | |
897 | - | let | |
898 | - | let | |
899 | - | let | |
900 | - | let | |
901 | - | let | |
902 | - | let | |
903 | - | let | |
904 | - | let | |
905 | - | let | |
974 | + | @Callable(cV) | |
975 | + | func evaluatePutByAmountAssetREADONLY (cb) = { | |
976 | + | let bu = aG() | |
977 | + | let bH = fromBase58String(bu[q]) | |
978 | + | let ch = bu[r] | |
979 | + | let bI = fromBase58String(ch) | |
980 | + | let ci = bu[s] | |
981 | + | let bJ = fromBase58String(ci) | |
982 | + | let bv = parseIntValue(bu[t]) | |
983 | + | let bw = parseIntValue(bu[u]) | |
984 | + | let bK = bu[p] | |
985 | + | let fl = valueOrErrorMessage(assetInfo(bH), (("Asset " + toBase58String(bH)) + " doesn't exist")).quantity | |
986 | + | let cK = bg(ch) | |
987 | + | let cL = bg(ci) | |
988 | + | let bq = D(cK, bv) | |
989 | + | let br = D(cL, bw) | |
990 | + | let bQ = if ((fl == 0)) | |
906 | 991 | then e | |
907 | - | else | |
908 | - | let | |
909 | - | let | |
910 | - | let | |
911 | - | let | |
912 | - | let | |
913 | - | let | |
914 | - | let | |
915 | - | let | |
916 | - | let | |
917 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString( | |
992 | + | else bi(br, bq) | |
993 | + | let cn = D(cb, bv) | |
994 | + | let co = fraction(cn, bQ, d) | |
995 | + | let cd = G(co, bw) | |
996 | + | let db = bZ("", 500000, cb, bI, cd, bJ, "", true, false) | |
997 | + | let cy = db._1 | |
998 | + | let fq = db._3 | |
999 | + | let bM = db._4 | |
1000 | + | let bO = db._5 | |
1001 | + | let bL = db._6 | |
1002 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cy), toString(G(bQ, b)), toString(bM), toString(bO), toString(bL), bK, toString(cb), toString(cd)], j)) | |
918 | 1003 | } | |
919 | 1004 | ||
920 | 1005 | ||
921 | 1006 | ||
922 | - | @Callable( | |
923 | - | func evaluatePutByPriceAssetREADONLY ( | |
924 | - | let | |
925 | - | let | |
926 | - | let | |
927 | - | let | |
928 | - | let | |
929 | - | let | |
930 | - | let | |
931 | - | let | |
932 | - | let | |
933 | - | let | |
934 | - | let | |
935 | - | let | |
936 | - | let | |
937 | - | let | |
938 | - | let | |
1007 | + | @Callable(cV) | |
1008 | + | func evaluatePutByPriceAssetREADONLY (cd) = { | |
1009 | + | let bu = aG() | |
1010 | + | let bH = fromBase58String(bu[q]) | |
1011 | + | let ch = bu[r] | |
1012 | + | let bI = fromBase58String(ch) | |
1013 | + | let ci = bu[s] | |
1014 | + | let bJ = fromBase58String(ci) | |
1015 | + | let bv = parseIntValue(bu[t]) | |
1016 | + | let bw = parseIntValue(bu[u]) | |
1017 | + | let bK = bu[p] | |
1018 | + | let fl = valueOrErrorMessage(assetInfo(bH), (("Asset " + toBase58String(bH)) + " doesn't exist")).quantity | |
1019 | + | let fr = bg(ch) | |
1020 | + | let fs = bg(ci) | |
1021 | + | let ft = D(fr, bv) | |
1022 | + | let fu = D(fs, bw) | |
1023 | + | let bQ = if ((fl == 0)) | |
939 | 1024 | then e | |
940 | - | else | |
941 | - | let | |
942 | - | let | |
943 | - | let | |
944 | - | let | |
945 | - | let | |
946 | - | let | |
947 | - | let | |
948 | - | let | |
949 | - | let | |
950 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString( | |
1025 | + | else bi(fu, ft) | |
1026 | + | let co = D(cd, bw) | |
1027 | + | let cn = fraction(co, d, bQ) | |
1028 | + | let cb = G(cn, bv) | |
1029 | + | let db = bZ("", 500000, cb, bI, cd, bJ, "", true, false) | |
1030 | + | let cy = db._1 | |
1031 | + | let fq = db._3 | |
1032 | + | let bM = db._4 | |
1033 | + | let bO = db._5 | |
1034 | + | let bL = db._6 | |
1035 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d%d", toString(cy), toString(G(bQ, b)), toString(bM), toString(bO), toString(bL), bK, toString(cb), toString(cd)], j)) | |
951 | 1036 | } | |
952 | 1037 | ||
953 | 1038 | ||
954 | 1039 | ||
955 | - | @Callable( | |
956 | - | func evaluateGetREADONLY ( | |
957 | - | let | |
958 | - | let | |
959 | - | let | |
960 | - | let | |
961 | - | let | |
962 | - | let | |
963 | - | let | |
964 | - | let | |
965 | - | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString( | |
1040 | + | @Callable(cV) | |
1041 | + | func evaluateGetREADONLY (fv,fw) = { | |
1042 | + | let cq = bD("", fv, fw, this) | |
1043 | + | let bW = cq._1 | |
1044 | + | let bX = cq._2 | |
1045 | + | let bM = cq._5 | |
1046 | + | let bO = cq._6 | |
1047 | + | let bL = cq._7 | |
1048 | + | let bR = cq._8 | |
1049 | + | let bK = parseIntValue(cq._9) | |
1050 | + | $Tuple2(nil, makeString(["%d%d%d%d%d%d%d", toString(bW), toString(bX), toString(bM), toString(bO), toString(bL), toString(bR), toString(bK)], j)) | |
966 | 1051 | } | |
967 | 1052 | ||
968 | 1053 | ||
969 | - | @Verifier( | |
970 | - | func | |
971 | - | let | |
972 | - | let | |
973 | - | if ($isInstanceOf( | |
1054 | + | @Verifier(fx) | |
1055 | + | func fy () = { | |
1056 | + | let fz = { | |
1057 | + | let dg = er() | |
1058 | + | if ($isInstanceOf(dg, "ByteVector")) | |
974 | 1059 | then { | |
975 | - | let | |
976 | - | | |
1060 | + | let ew = dg | |
1061 | + | ew | |
977 | 1062 | } | |
978 | - | else if ($isInstanceOf( | |
979 | - | then | |
1063 | + | else if ($isInstanceOf(dg, "Unit")) | |
1064 | + | then fx.senderPublicKey | |
980 | 1065 | else throw("Match error") | |
981 | 1066 | } | |
982 | - | let | |
983 | - | if ($isInstanceOf( | |
1067 | + | let dg = fx | |
1068 | + | if ($isInstanceOf(dg, "Order")) | |
984 | 1069 | then { | |
985 | - | let | |
986 | - | let | |
987 | - | let | |
988 | - | let | |
989 | - | let | |
990 | - | if (if (if ( | |
991 | - | then | |
1070 | + | let cH = dg | |
1071 | + | let fA = aF() | |
1072 | + | let at = cG(cH) | |
1073 | + | let au = sigVerify(cH.bodyBytes, cH.proofs[0], cH.senderPublicKey) | |
1074 | + | let av = sigVerify(cH.bodyBytes, cH.proofs[1], fA) | |
1075 | + | if (if (if (at) | |
1076 | + | then au | |
992 | 1077 | else false) | |
993 | - | then | |
1078 | + | then av | |
994 | 1079 | else false) | |
995 | 1080 | then true | |
996 | - | else | |
1081 | + | else as(at, au, av) | |
997 | 1082 | } | |
998 | - | else if ($isInstanceOf( | |
1083 | + | else if ($isInstanceOf(dg, "SetScriptTransaction")) | |
999 | 1084 | then { | |
1000 | - | let | |
1001 | - | let | |
1002 | - | let | |
1003 | - | let | |
1004 | - | if (if (( | |
1005 | - | then ( | |
1085 | + | let es = dg | |
1086 | + | let fB = blake2b256(value(es.script)) | |
1087 | + | let fC = fromBase64String(value(getString(aC, aq()))) | |
1088 | + | let fD = scriptHash(this) | |
1089 | + | if (if ((fC == fB)) | |
1090 | + | then (fD != fB) | |
1006 | 1091 | else false) | |
1007 | 1092 | then true | |
1008 | - | else sigVerify( | |
1093 | + | else sigVerify(fx.bodyBytes, fx.proofs[0], fz) | |
1009 | 1094 | } | |
1010 | - | else sigVerify( | |
1095 | + | else sigVerify(fx.bodyBytes, fx.proofs[0], fz) | |
1011 | 1096 | } | |
1012 | 1097 |
github/deemru/w8io/026f985 291.79 ms ◑