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