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