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