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