tx · 3eEDc483vUdNc5m5mohEr17UZNGSdaynnSA9CP2Acz6m 3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA: -0.04000000 Waves 2023.02.09 22:45 [2442518] smart account 3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA > SELF 0.00000000 Waves
{ "type": 13, "id": "3eEDc483vUdNc5m5mohEr17UZNGSdaynnSA9CP2Acz6m", "fee": 4000000, "feeAssetId": null, "timestamp": 1675971917825, "version": 2, "chainId": 84, "sender": "3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA", "senderPublicKey": "35yd3qw1gxKDxKwGAykHN9fANbXNWwseaUwbWDj24o3x", "proofs": [ "2WrpgKPtwLYtYTAYvJHXxwTBRTnjs5RJ3itqjVSRVdreUahGhBmE5qjWWQ7PQiGhE1CCRueyWrcQkqSXGRPe6buX" ], "script": "base64:BgLlKggCEgQKAgEEEgYKBAEEAQgSAwoBCBIDCgEIEgASBAoCAQQSBAoCAQQSAwoBARIAEgQKAggBEgASBAoCCAESBAoCCAESBAoCAQESAwoBARIFCgMBAQESBQoDAQgBEgQKAgEIEgQKAgEIEgQKAggIEgQKAggIEgQKAggBEgASAwoBCBIFCgMBAQESBAoCCAESBAoCAQESBAoCCAgSCwoJCAEBAgECCAQEEgYKBAgIAQgiBnNjYWxlOCIMc2NhbGU4QmlnSW50IgdzY2FsZTE4Igp6ZXJvQmlnSW50IgRiaWcwIgRiaWcxIgRiaWcyIgRiaWczIgRiaWc0IgpzbGlwcGFnZTREIgt3YXZlc1N0cmluZyILdGVzc3R0dGluZ2ciBUFtdWx0IgVEY29udiIDU0VQIgVFTVBUWSIKUG9vbEFjdGl2ZSIKUG9vbFB1dERpcyIOUG9vbE1hdGNoZXJEaXMiDFBvb2xTaHV0ZG93biIOaWR4UG9vbEFkZHJlc3MiCWlkeFBvb2xTdCIJaWR4TFBBc0lkIglpZHhBbUFzSWQiCWlkeFByQXNJZCILaWR4QW10QXNEY20iDWlkeFByaWNlQX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IIBQJmYQZwcm9vZnMAAAgFAmZhD3NlbmRlclB1YmxpY0tleQQCYUoJAPQDAwgFAmZhCWJvZHlCeXRlcwkAkQMCCAUCZmEGcHJvb2ZzAAEFAmlrAwMDBQJhRwUCYUkHBQJhSgcGCQECYUYEBQJhRwUCYUgFAmFJBQJhSgMJAAECBQJnbQIUU2V0U2NyaXB0VHJhbnNhY3Rpb24EAmNEBQJnbQMJAPQDAwgFAmloCWJvZHlCeXRlcwkAkQMCCAUCaWgGcHJvb2ZzAAAFAmlqBgQCaW0JAPYDAQkBBXZhbHVlAQgFAmNEBnNjcmlwdAQCaW4JANsEAQkBBXZhbHVlAQkAnQgCBQJhUgkBAmFEAAQCaW8JAPEHAQUEdGhpcwMJAAACBQJpbgUCaW0JAQIhPQIFAmlvBQJpbQcJAPQDAwgFAmloCWJvZHlCeXRlcwkAkQMCCAUCaWgGcHJvb2ZzAAAFAmlqbhIQfA==", "height": 2442518, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3YdpRDwmRZgvUagbDG6SzXJgjkXvYsFqQYvvErrY4N9N Next: GHWTSgQfkViaSKDsv6fmsVCz5XZc2CW1a7S3ZdkAvCnV Diff:
Old | New | Differences | |
---|---|---|---|
23 | 23 | ||
24 | 24 | let k = "WAVES" | |
25 | 25 | ||
26 | - | let l = | |
26 | + | let l = 1 | |
27 | 27 | ||
28 | - | let m = " | |
28 | + | let m = "100" | |
29 | 29 | ||
30 | - | let n = " | |
30 | + | let n = "1" | |
31 | 31 | ||
32 | - | let o = "" | |
32 | + | let o = "__" | |
33 | 33 | ||
34 | - | let p = | |
34 | + | let p = "" | |
35 | 35 | ||
36 | - | let q = | |
36 | + | let q = 1 | |
37 | 37 | ||
38 | - | let r = | |
38 | + | let r = 2 | |
39 | 39 | ||
40 | - | let s = | |
40 | + | let s = 3 | |
41 | 41 | ||
42 | - | let t = | |
42 | + | let t = 4 | |
43 | 43 | ||
44 | - | let u = | |
44 | + | let u = 1 | |
45 | 45 | ||
46 | - | let v = | |
46 | + | let v = 2 | |
47 | 47 | ||
48 | - | let w = | |
48 | + | let w = 3 | |
49 | 49 | ||
50 | - | let x = | |
50 | + | let x = 4 | |
51 | 51 | ||
52 | - | let y = | |
52 | + | let y = 5 | |
53 | 53 | ||
54 | - | let z = | |
54 | + | let z = 6 | |
55 | 55 | ||
56 | - | let A = | |
56 | + | let A = 7 | |
57 | 57 | ||
58 | - | let B = | |
58 | + | let B = 8 | |
59 | 59 | ||
60 | - | let C = | |
60 | + | let C = 9 | |
61 | 61 | ||
62 | - | let D = | |
62 | + | let D = 1 | |
63 | 63 | ||
64 | - | let E = | |
64 | + | let E = 6 | |
65 | 65 | ||
66 | - | let F = | |
66 | + | let F = 7 | |
67 | 67 | ||
68 | - | let G = | |
68 | + | let G = 10 | |
69 | 69 | ||
70 | - | func H (I,J) = fraction(toBigInt(I), c, toBigInt(J)) | |
70 | + | let H = fraction(10, a, 10000) | |
71 | + | ||
72 | + | func I (J,K) = fraction(toBigInt(J), c, toBigInt(K)) | |
71 | 73 | ||
72 | 74 | ||
73 | - | func | |
75 | + | func L (J,K) = fraction(J, c, K) | |
74 | 76 | ||
75 | 77 | ||
76 | - | func | |
78 | + | func M (N,O) = toInt(fraction(N, toBigInt(O), c)) | |
77 | 79 | ||
78 | 80 | ||
79 | - | func | |
81 | + | func P (N,O,Q) = toInt(fraction(N, toBigInt(O), c, Q)) | |
80 | 82 | ||
81 | 83 | ||
82 | - | func | |
84 | + | func R (J,K) = fraction(J, c, toBigInt(K)) | |
83 | 85 | ||
84 | 86 | ||
85 | - | func | |
87 | + | func S (N,O) = fraction(N, toBigInt(O), c) | |
86 | 88 | ||
87 | 89 | ||
88 | - | func | |
90 | + | func T (U,V,W) = fraction(U, V, W) | |
89 | 91 | ||
90 | 92 | ||
91 | - | func | |
92 | - | then -( | |
93 | - | else | |
93 | + | func X (N) = if ((d > N)) | |
94 | + | then -(N) | |
95 | + | else N | |
94 | 96 | ||
95 | 97 | ||
96 | - | func | |
97 | - | then -( | |
98 | - | else | |
98 | + | func Y (N) = if ((d > N)) | |
99 | + | then -(N) | |
100 | + | else N | |
99 | 101 | ||
100 | 102 | ||
101 | - | func | |
103 | + | func Z () = "%s__factoryContract" | |
102 | 104 | ||
103 | 105 | ||
104 | - | func | |
106 | + | func aa () = "%s__managerPublicKey" | |
105 | 107 | ||
106 | 108 | ||
107 | - | func | |
109 | + | func ab () = "%s__pendingManagerPublicKey" | |
108 | 110 | ||
109 | 111 | ||
110 | - | func | |
112 | + | func ac () = "%s%s__price__last" | |
111 | 113 | ||
112 | 114 | ||
113 | - | func | |
115 | + | func ad (ae,af) = makeString(["%s%s%d%d__price__history", toString(ae), toString(af)], o) | |
114 | 116 | ||
115 | 117 | ||
116 | - | func | |
118 | + | func ag (ah,ai) = ((("%s%s%s__P__" + ah) + "__") + ai) | |
117 | 119 | ||
118 | 120 | ||
119 | - | func | |
121 | + | func aj (ah,ai) = ((("%s%s%s__G__" + ah) + "__") + ai) | |
120 | 122 | ||
121 | 123 | ||
122 | - | func | |
124 | + | func ak () = "%s__amountAsset" | |
123 | 125 | ||
124 | 126 | ||
125 | - | func | |
127 | + | func al () = "%s__priceAsset" | |
126 | 128 | ||
127 | 129 | ||
128 | - | func | |
130 | + | func am () = "%s__amp" | |
129 | 131 | ||
130 | 132 | ||
131 | - | func | |
133 | + | func an () = "%s__addonAddr" | |
132 | 134 | ||
133 | 135 | ||
134 | - | let | |
136 | + | let ao = "%s__fee" | |
135 | 137 | ||
136 | - | let | |
138 | + | let ap = valueOrElse(getInteger(this, ao), H) | |
137 | 139 | ||
138 | - | let | |
140 | + | let aq = makeString(["%s", "dLp"], o) | |
139 | 141 | ||
140 | - | let | |
142 | + | let ar = makeString(["%s", "dLpRefreshedHeight"], o) | |
141 | 143 | ||
142 | - | let | |
144 | + | let as = makeString(["%s", "refreshDLpDelay"], o) | |
143 | 145 | ||
144 | - | let | |
146 | + | let at = 30 | |
145 | 147 | ||
146 | - | let | |
148 | + | let au = valueOrElse(getInteger(this, as), at) | |
147 | 149 | ||
148 | - | func | |
150 | + | func av () = "%s__factoryConfig" | |
149 | 151 | ||
150 | 152 | ||
151 | - | func | |
153 | + | func aw () = "%s%s__matcher__publicKey" | |
152 | 154 | ||
153 | 155 | ||
154 | - | func | |
156 | + | func ax (ay,az) = (((("%d%d%s__" + ay) + "__") + az) + "__config") | |
155 | 157 | ||
156 | 158 | ||
157 | - | func | |
159 | + | func aA (aB) = ("%s%s%s__mappings__baseAsset2internalId__" + aB) | |
158 | 160 | ||
159 | 161 | ||
160 | - | func | |
162 | + | func aC () = "%s__shutdown" | |
161 | 163 | ||
162 | 164 | ||
163 | - | func | |
165 | + | func aD () = "%s__allowedLpStableScriptHash" | |
164 | 166 | ||
165 | 167 | ||
166 | - | func | |
168 | + | func aE () = "%s__feeCollectorAddress" | |
167 | 169 | ||
168 | 170 | ||
169 | - | func | |
171 | + | func aF (aG,aH,aI,aJ) = throw((((((((("order validation failed: orderValid=" + toString(aG)) + " (") + aH) + ")") + " senderValid=") + toString(aI)) + " matcherValid=") + toString(aJ))) | |
170 | 172 | ||
171 | 173 | ||
172 | - | func | |
174 | + | func aK (aL,aM) = valueOrErrorMessage(getString(aL, aM), makeString(["mandatory ", toString(aL), ".", aM, " not defined"], "")) | |
173 | 175 | ||
174 | 176 | ||
175 | - | func | |
177 | + | func aN (aL,aM) = valueOrErrorMessage(getInteger(aL, aM), makeString(["mandatory ", toString(aL), ".", aM, " not defined"], "")) | |
176 | 178 | ||
177 | 179 | ||
178 | - | func | |
180 | + | func aO (aP) = throw(makeString(["lp_stable.ride:", aP], " ")) | |
179 | 181 | ||
180 | 182 | ||
181 | - | func | |
183 | + | func aQ (aP) = makeString(["lp_stable.ride:", aP], " ") | |
182 | 184 | ||
183 | 185 | ||
184 | - | let | |
186 | + | let aR = addressFromStringValue(aK(this, Z())) | |
185 | 187 | ||
186 | - | let | |
187 | - | let | |
188 | - | if ($isInstanceOf( | |
189 | - | then | |
190 | - | else throw(($getType( | |
188 | + | let aS = { | |
189 | + | let aT = invoke(aR, "getInFeeREADONLY", [toString(this)], nil) | |
190 | + | if ($isInstanceOf(aT, "Int")) | |
191 | + | then aT | |
192 | + | else throw(($getType(aT) + " couldn't be cast to Int")) | |
191 | 193 | } | |
192 | 194 | ||
193 | - | let | |
194 | - | let | |
195 | - | if ($isInstanceOf( | |
196 | - | then | |
197 | - | else throw(($getType( | |
195 | + | let aU = { | |
196 | + | let aT = invoke(aR, "getOutFeeREADONLY", [toString(this)], nil) | |
197 | + | if ($isInstanceOf(aT, "Int")) | |
198 | + | then aT | |
199 | + | else throw(($getType(aT) + " couldn't be cast to Int")) | |
198 | 200 | } | |
199 | 201 | ||
200 | - | let | |
202 | + | let aV = aK(this, am()) | |
201 | 203 | ||
202 | - | func | |
204 | + | func aW () = valueOrElse(getBoolean(aR, aC()), false) | |
203 | 205 | ||
204 | 206 | ||
205 | - | func | |
207 | + | func aX () = fromBase58String(aK(aR, aw())) | |
206 | 208 | ||
207 | 209 | ||
208 | - | let | |
210 | + | let aY = addressFromStringValue(aK(aR, aE())) | |
209 | 211 | ||
210 | - | func | |
211 | - | let | |
212 | - | let | |
213 | - | let | |
214 | - | let | |
215 | - | split( | |
212 | + | func aZ () = { | |
213 | + | let ba = aK(this, ak()) | |
214 | + | let bb = aK(this, al()) | |
215 | + | let bc = aN(aR, aA(bb)) | |
216 | + | let ay = aN(aR, aA(ba)) | |
217 | + | split(aK(aR, ax(toString(ay), toString(bc))), o) | |
216 | 218 | } | |
217 | 219 | ||
218 | 220 | ||
219 | - | func | |
221 | + | func bd (be) = if ((be == k)) | |
220 | 222 | then unit | |
221 | - | else fromBase58String( | |
223 | + | else fromBase58String(be) | |
222 | 224 | ||
223 | 225 | ||
224 | - | func | |
226 | + | func bf (be) = if ((be == unit)) | |
225 | 227 | then k | |
226 | - | else toBase58String(value( | |
228 | + | else toBase58String(value(be)) | |
227 | 229 | ||
228 | 230 | ||
229 | - | func | |
231 | + | func bg (bh) = $Tuple9(addressFromStringValue(bh[u]), parseIntValue(bh[v]), fromBase58String(bh[w]), bd(bh[x]), bd(bh[y]), parseIntValue(bh[z]), parseIntValue(bh[A]), fromBase58String(bh[B]), fromBase58String(bh[C])) | |
230 | 232 | ||
231 | 233 | ||
232 | - | let | |
234 | + | let bi = bg(aZ()) | |
233 | 235 | ||
234 | - | let | |
236 | + | let bj = bi | |
235 | 237 | ||
236 | - | let | |
238 | + | let bk = bj._1 | |
237 | 239 | ||
238 | - | let | |
240 | + | let bl = bj._2 | |
239 | 241 | ||
240 | - | let | |
242 | + | let bm = bj._3 | |
241 | 243 | ||
242 | - | let | |
244 | + | let bn = bj._4 | |
243 | 245 | ||
244 | - | let | |
246 | + | let bo = bj._5 | |
245 | 247 | ||
246 | - | let | |
248 | + | let bp = bj._6 | |
247 | 249 | ||
248 | - | let | |
250 | + | let bq = bj._7 | |
249 | 251 | ||
250 | - | let | |
252 | + | let br = bj._8 | |
251 | 253 | ||
252 | - | let | |
254 | + | let bs = bj._9 | |
253 | 255 | ||
254 | - | func | |
256 | + | func bt () = split(aK(aR, av()), o) | |
255 | 257 | ||
256 | 258 | ||
257 | - | let | |
259 | + | let bu = bt() | |
258 | 260 | ||
259 | - | let | |
261 | + | let bv = valueOrErrorMessage(addressFromString(bu[D]), "Invalid staking contract address") | |
260 | 262 | ||
261 | - | let | |
263 | + | let bw = valueOrErrorMessage(addressFromString(bu[F]), "Invalid slipage contract address") | |
262 | 264 | ||
263 | - | let | |
265 | + | let bx = valueOrErrorMessage(addressFromString(bu[G]), "Invalid gwx contract address") | |
264 | 266 | ||
265 | - | let | |
267 | + | let by = valueOrErrorMessage(addressFromString(bu[E]), "Invalid gwx contract address") | |
266 | 268 | ||
267 | - | func | |
269 | + | func bz (bA,bB,bC,bD,bE,bF,bG,bH,bI,bJ) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bA), toString(bB), toString(bC), toString(bD), toString(bE), toString(bF), toString(bG), toString(bH), toString(bI), toString(bJ)], o) | |
268 | 270 | ||
269 | 271 | ||
270 | - | func | |
272 | + | func bK (bL,bM,bN,bD,bG,bH) = makeString(["%d%d%d%d%d%d", toString(bL), toString(bM), toString(bN), toString(bD), toString(bG), toString(bH)], o) | |
271 | 273 | ||
272 | 274 | ||
273 | - | func | |
275 | + | func bO (bP) = if ((bP == "WAVES")) | |
274 | 276 | then wavesBalance(this).available | |
275 | - | else assetBalance(this, fromBase58String( | |
277 | + | else assetBalance(this, fromBase58String(bP)) | |
276 | 278 | ||
277 | 279 | ||
278 | - | func | |
280 | + | func bQ (bR,bS) = fraction(bR, c, bS) | |
279 | 281 | ||
280 | 282 | ||
281 | - | func | |
283 | + | func bT (bR,bS,Q) = fraction(bR, c, bS, Q) | |
282 | 284 | ||
283 | 285 | ||
284 | - | func | |
285 | - | let | |
286 | - | let | |
287 | - | if (!( | |
288 | - | then throw(("Big slpg: " + toString( | |
289 | - | else $Tuple2( | |
286 | + | func bU (bV,bW,bX) = { | |
287 | + | let bY = fraction((bV - bW), b, bW) | |
288 | + | let bZ = ((bX - X(bY)) > d) | |
289 | + | if (!(bZ)) | |
290 | + | then throw(("Big slpg: " + toString(bY))) | |
291 | + | else $Tuple2(bZ, min([bV, bW])) | |
290 | 292 | } | |
291 | 293 | ||
292 | 294 | ||
293 | - | func | |
294 | - | let | |
295 | - | let | |
296 | - | if (if ( | |
295 | + | func ca (cb,cc,cd) = { | |
296 | + | let bY = fraction(cc, b, cb) | |
297 | + | let ce = (cd > bY) | |
298 | + | if (if (ce) | |
297 | 299 | then true | |
298 | - | else ( | |
299 | - | then throw(((((((toString( | |
300 | - | else | |
300 | + | else (cc > cb)) | |
301 | + | then throw(((((((toString(cc) + " ") + toString(cb)) + " ") + toString(bY)) + " ") + toString(cd))) | |
302 | + | else ce | |
301 | 303 | } | |
302 | 304 | ||
303 | 305 | ||
304 | - | func | |
305 | - | let | |
306 | - | let | |
307 | - | | |
306 | + | func cf (cg,ch,ci,cj) = { | |
307 | + | let ck = I(ci, cg) | |
308 | + | let cl = I(cj, ch) | |
309 | + | bQ(cl, ck) | |
308 | 310 | } | |
309 | 311 | ||
310 | 312 | ||
311 | - | func cl (ch,ci,cm) = { | |
312 | - | let cn = bo | |
313 | + | func cm (ci,cj,cn) = { | |
313 | 314 | let co = bp | |
314 | - | let cp = ce(cn, co, ch, ci) | |
315 | - | let bR = H(ch, cn) | |
316 | - | let bQ = H(ci, co) | |
317 | - | let cq = H(cm, a) | |
318 | - | let cr = bP(bR, cq) | |
319 | - | let cs = bP(bQ, cq) | |
320 | - | [cp, cr, cs] | |
315 | + | let cp = bq | |
316 | + | let cq = cf(co, cp, ci, cj) | |
317 | + | let bS = I(ci, co) | |
318 | + | let bR = I(cj, cp) | |
319 | + | let cr = I(cn, a) | |
320 | + | let cs = bQ(bS, cr) | |
321 | + | let ct = bQ(bR, cr) | |
322 | + | [cq, cs, ct] | |
321 | 323 | } | |
322 | 324 | ||
323 | 325 | ||
324 | - | func | |
325 | - | let | |
326 | - | [ | |
326 | + | func cu (ci,cj,cn) = { | |
327 | + | let cv = cm(ci, cj, cn) | |
328 | + | [M(cv[0], a), M(cv[1], a), M(cv[2], a)] | |
327 | 329 | } | |
328 | 330 | ||
329 | 331 | ||
330 | - | func | |
331 | - | let | |
332 | + | func cw (cx,ap) = { | |
333 | + | let cy = if ((ap == 0)) | |
332 | 334 | then 0 | |
333 | - | else fraction( | |
334 | - | $Tuple2(( | |
335 | + | else fraction(cx, ap, a) | |
336 | + | $Tuple2((cx - cy), cy) | |
335 | 337 | } | |
336 | 338 | ||
337 | 339 | ||
338 | - | func | |
339 | - | let | |
340 | - | let | |
341 | - | let | |
342 | - | if (( | |
340 | + | func cz (cA) = { | |
341 | + | let cB = cA[0] | |
342 | + | let cC = cA[1] | |
343 | + | let cD = (cB + cC) | |
344 | + | if ((cD == e)) | |
343 | 345 | then e | |
344 | 346 | else { | |
345 | - | let | |
346 | - | let | |
347 | - | let | |
348 | - | let | |
349 | - | let | |
350 | - | let | |
351 | - | func | |
352 | - | let | |
353 | - | let | |
354 | - | let | |
355 | - | fraction(( | |
347 | + | let cE = parseIntValue(aV) | |
348 | + | let cF = (cE * 2) | |
349 | + | let cv = fraction(cB, cC, f) | |
350 | + | let cG = fraction(cv, i, f) | |
351 | + | let cH = fraction(toBigInt(cF), cD, f) | |
352 | + | let cI = toBigInt((cF - 1)) | |
353 | + | func cJ (cK) = { | |
354 | + | let cL = fraction(cK, cK, f) | |
355 | + | let cM = fraction(cL, cK, f) | |
356 | + | let cN = fraction(cM, f, cG) | |
357 | + | fraction((cH + fraction(cN, g, f)), cK, (fraction(cI, cK, f) + fraction(h, cN, f))) | |
356 | 358 | } | |
357 | 359 | ||
358 | - | func | |
359 | - | then | |
360 | + | func cO (cP,cQ) = if (cP._2) | |
361 | + | then cP | |
360 | 362 | else { | |
361 | - | let | |
362 | - | let | |
363 | - | let | |
364 | - | let | |
365 | - | then -( | |
366 | - | else | |
367 | - | if ((f >= | |
368 | - | then $Tuple2( | |
369 | - | else $Tuple2( | |
363 | + | let cK = cP._1 | |
364 | + | let cR = cJ(cK) | |
365 | + | let cS = (cR - value(cK)) | |
366 | + | let cT = if ((e > cS)) | |
367 | + | then -(cS) | |
368 | + | else cS | |
369 | + | if ((f >= cT)) | |
370 | + | then $Tuple2(cR, true) | |
371 | + | else $Tuple2(cR, false) | |
370 | 372 | } | |
371 | 373 | ||
372 | - | let | |
373 | - | let | |
374 | - | let | |
375 | - | let | |
376 | - | let | |
377 | - | func | |
378 | - | then | |
379 | - | else | |
374 | + | let cU = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] | |
375 | + | let cV = { | |
376 | + | let cW = cU | |
377 | + | let cX = size(cW) | |
378 | + | let cY = $Tuple2(cD, false) | |
379 | + | func cZ (da,db) = if ((db >= cX)) | |
380 | + | then da | |
381 | + | else cO(da, cW[db]) | |
380 | 382 | ||
381 | - | func | |
382 | - | then | |
383 | + | func dc (da,db) = if ((db >= cX)) | |
384 | + | then da | |
383 | 385 | else throw("List size exceeds 15") | |
384 | 386 | ||
385 | - | | |
387 | + | dc(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cY, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
386 | 388 | } | |
387 | - | let | |
388 | - | let | |
389 | - | if ( | |
390 | - | then | |
391 | - | else throw(("D calculation error, D = " + toString( | |
389 | + | let cK = cV._1 | |
390 | + | let dd = cV._2 | |
391 | + | if (dd) | |
392 | + | then cK | |
393 | + | else throw(("D calculation error, D = " + toString(cK))) | |
392 | 394 | } | |
393 | 395 | } | |
394 | 396 | ||
395 | 397 | ||
396 | - | func dd (de,df,dg,dh) = { | |
397 | - | let di = bl | |
398 | - | let dj = toBase58String(value(bm)) | |
398 | + | func de (df,dg,dh,di) = { | |
399 | + | let dj = bm | |
399 | 400 | let dk = toBase58String(value(bn)) | |
400 | - | let dl = bo | |
401 | + | let dl = toBase58String(value(bo)) | |
401 | 402 | let dm = bp | |
402 | - | let dn = toString(bk) | |
403 | - | let do = valueOrErrorMessage(assetInfo(di), "Wrong LP id").quantity | |
404 | - | if ((toBase58String(di) != df)) | |
403 | + | let dn = bq | |
404 | + | let do = toString(bl) | |
405 | + | let dp = valueOrErrorMessage(assetInfo(dj), "Wrong LP id").quantity | |
406 | + | if ((toBase58String(dj) != dg)) | |
405 | 407 | then throw("Wrong pmt asset") | |
406 | 408 | else { | |
407 | - | let | |
408 | - | let | |
409 | - | let | |
410 | - | let | |
411 | - | let | |
412 | - | let | |
413 | - | let | |
414 | - | let | |
415 | - | let | |
416 | - | let | |
417 | - | let | |
418 | - | let | |
419 | - | let | |
409 | + | let dq = bO(dk) | |
410 | + | let dr = I(dq, dm) | |
411 | + | let ds = bO(dl) | |
412 | + | let dt = I(ds, dn) | |
413 | + | let du = bQ(dt, dr) | |
414 | + | let dv = M(du, a) | |
415 | + | let dw = I(dh, a) | |
416 | + | let dx = I(dp, a) | |
417 | + | let dy = fraction(dr, dw, dx) | |
418 | + | let dz = fraction(dt, dw, dx) | |
419 | + | let dA = P(dy, dm, FLOOR) | |
420 | + | let dB = P(dz, dn, FLOOR) | |
421 | + | let dC = if ((df == "")) | |
420 | 422 | then nil | |
421 | - | else [ScriptTransfer( | |
423 | + | else [ScriptTransfer(di, dA, if ((dk == "WAVES")) | |
422 | 424 | then unit | |
423 | - | else fromBase58String( | |
425 | + | else fromBase58String(dk)), ScriptTransfer(di, dB, if ((dl == "WAVES")) | |
424 | 426 | then unit | |
425 | - | else fromBase58String( | |
426 | - | $Tuple10( | |
427 | + | else fromBase58String(dl)), StringEntry(aj(toString(di), df), bK(dA, dB, dh, dv, height, lastBlock.timestamp)), IntegerEntry(ac(), dv), IntegerEntry(ad(height, lastBlock.timestamp), dv)] | |
428 | + | $Tuple10(dA, dB, dk, dl, dq, ds, dp, du, do, dC) | |
427 | 429 | } | |
428 | 430 | } | |
429 | 431 | ||
430 | 432 | ||
431 | - | func dC (de,bW,dD,dE,dF,dG,dh,dH,dI,dJ,dK,dL,dM) = { | |
432 | - | let di = bl | |
433 | - | let dN = toBase58String(value(bm)) | |
433 | + | func dD (df,bX,dE,dF,dG,dH,di,dI,dJ,dK,dL,dM,dN) = { | |
434 | + | let dj = bm | |
434 | 435 | let dO = toBase58String(value(bn)) | |
435 | - | let dP = | |
436 | + | let dP = toBase58String(value(bo)) | |
436 | 437 | let dQ = br | |
437 | - | let dR = | |
438 | + | let dR = bs | |
438 | 439 | let dS = bp | |
439 | - | let dn = toString(bk) | |
440 | - | let dT = valueOrErrorMessage(assetInfo(di), "Wr lp as").quantity | |
441 | - | let dp = if (dH) | |
442 | - | then bN(dN) | |
443 | - | else if (if (dJ) | |
444 | - | then (dM == dN) | |
440 | + | let dT = bq | |
441 | + | let do = toString(bl) | |
442 | + | let dU = valueOrErrorMessage(assetInfo(dj), "Wr lp as").quantity | |
443 | + | let dq = if (dI) | |
444 | + | then bO(dO) | |
445 | + | else if (if (dK) | |
446 | + | then (dN == dO) | |
445 | 447 | else false) | |
446 | - | then ( | |
447 | - | else if ( | |
448 | - | then | |
449 | - | else ( | |
450 | - | let | |
451 | - | then | |
452 | - | else if (if ( | |
453 | - | then ( | |
448 | + | then (bO(dO) - dM) | |
449 | + | else if (dK) | |
450 | + | then bO(dO) | |
451 | + | else (bO(dO) - dE) | |
452 | + | let ds = if (dI) | |
453 | + | then bO(dP) | |
454 | + | else if (if (dK) | |
455 | + | then (dN == dP) | |
454 | 456 | else false) | |
455 | - | then ( | |
456 | - | else if ( | |
457 | - | then | |
458 | - | else ( | |
459 | - | let | |
460 | - | let | |
461 | - | let | |
462 | - | let | |
463 | - | let | |
464 | - | let | |
465 | - | let | |
457 | + | then (bO(dP) - dM) | |
458 | + | else if (dK) | |
459 | + | then bO(dP) | |
460 | + | else (bO(dP) - dG) | |
461 | + | let dV = I(dE, dS) | |
462 | + | let dW = I(dG, dT) | |
463 | + | let dX = bQ(dW, dV) | |
464 | + | let dr = I(dq, dS) | |
465 | + | let dt = I(ds, dT) | |
466 | + | let cc = cz([dr, dt]) | |
467 | + | let dY = if ((dU == 0)) | |
466 | 468 | then { | |
467 | - | let | |
468 | - | let | |
469 | + | let cb = cz([(dr + dV), (dt + dW)]) | |
470 | + | let dZ = if ((cb > cc)) | |
469 | 471 | then true | |
470 | 472 | else throw("D1 should be greater than D0") | |
471 | - | if (( | |
473 | + | if ((dZ == dZ)) | |
472 | 474 | then { | |
473 | - | let | |
474 | - | let | |
475 | - | let | |
476 | - | $Tuple5( | |
475 | + | let du = d | |
476 | + | let ea = d | |
477 | + | let cr = cb | |
478 | + | $Tuple5(M(cr, a), M(dV, dS), M(dW, dT), bQ((dt + dW), (dr + dV)), ea) | |
477 | 479 | } | |
478 | 480 | else throw("Strict value is not equal to itself.") | |
479 | 481 | } | |
480 | 482 | else { | |
481 | - | let | |
482 | - | let | |
483 | - | let | |
484 | - | if (if (if ( | |
485 | - | then ( | |
483 | + | let du = bQ(dt, dr) | |
484 | + | let eb = fraction(X((du - dX)), c, du) | |
485 | + | let ea = I(bX, a) | |
486 | + | if (if (if (dL) | |
487 | + | then (du != d) | |
486 | 488 | else false) | |
487 | - | then ( | |
489 | + | then (eb > ea) | |
488 | 490 | else false) | |
489 | - | then throw(((("Price slippage " + toString( | |
491 | + | then throw(((("Price slippage " + toString(eb)) + " > ") + toString(ea))) | |
490 | 492 | else { | |
491 | - | let | |
492 | - | let | |
493 | - | let | |
494 | - | let | |
495 | - | then $Tuple2( | |
496 | - | else $Tuple2( | |
497 | - | let | |
498 | - | let | |
499 | - | let | |
500 | - | let | |
493 | + | let ec = I(dU, a) | |
494 | + | let ed = fraction(dV, bT(dt, dr, CEILING), c, CEILING) | |
495 | + | let ee = fraction(dW, c, bT(dt, dr, FLOOR), CEILING) | |
496 | + | let ef = if ((ed > dW)) | |
497 | + | then $Tuple2(ee, dW) | |
498 | + | else $Tuple2(dV, ed) | |
499 | + | let eg = ef._1 | |
500 | + | let eh = ef._2 | |
501 | + | let cb = cz([(dr + eg), (dt + eh)]) | |
502 | + | let dZ = if ((cb > cc)) | |
501 | 503 | then true | |
502 | 504 | else throw("D1 should be greater than D0") | |
503 | - | if (( | |
505 | + | if ((dZ == dZ)) | |
504 | 506 | then { | |
505 | - | let | |
506 | - | $Tuple5( | |
507 | + | let cr = fraction(ec, (cb - cc), cc) | |
508 | + | $Tuple5(P(cr, a, FLOOR), P(eg, dS, CEILING), P(eh, dT, CEILING), du, ea) | |
507 | 509 | } | |
508 | 510 | else throw("Strict value is not equal to itself.") | |
509 | 511 | } | |
510 | 512 | } | |
511 | - | let | |
512 | - | let | |
513 | - | let | |
514 | - | let | |
515 | - | let | |
516 | - | if ((0 >= | |
513 | + | let ei = dY._1 | |
514 | + | let ej = dY._2 | |
515 | + | let ek = dY._3 | |
516 | + | let dv = M(dY._4, a) | |
517 | + | let el = M(dY._5, a) | |
518 | + | if ((0 >= ei)) | |
517 | 519 | then throw("LP <= 0") | |
518 | 520 | else { | |
519 | - | let | |
521 | + | let em = if (!(dJ)) | |
520 | 522 | then 0 | |
521 | - | else | |
522 | - | let | |
523 | - | let | |
524 | - | let | |
525 | - | then ( | |
523 | + | else ei | |
524 | + | let en = (dE - ej) | |
525 | + | let eo = (dG - ek) | |
526 | + | let ep = if (if (dK) | |
527 | + | then (dN == dO) | |
526 | 528 | else false) | |
527 | - | then $Tuple2( | |
528 | - | else if (if ( | |
529 | - | then ( | |
529 | + | then $Tuple2(dM, 0) | |
530 | + | else if (if (dK) | |
531 | + | then (dN == dP) | |
530 | 532 | else false) | |
531 | - | then $Tuple2(0, | |
532 | - | else $Tuple2( | |
533 | - | let | |
534 | - | let | |
535 | - | let | |
536 | - | $Tuple13( | |
533 | + | then $Tuple2(0, dM) | |
534 | + | else $Tuple2(ej, ek) | |
535 | + | let eq = ep._1 | |
536 | + | let er = ep._2 | |
537 | + | let es = [IntegerEntry(ac(), dv), IntegerEntry(ad(height, lastBlock.timestamp), dv), StringEntry(ag(di, df), bz(eq, er, em, dv, bX, el, height, lastBlock.timestamp, en, eo))] | |
538 | + | $Tuple13(ei, em, dv, dq, ds, dU, dj, do, es, en, eo, dF, dH) | |
537 | 539 | } | |
538 | 540 | } | |
539 | 541 | ||
540 | 542 | ||
541 | - | func | |
542 | - | let | |
543 | - | let | |
543 | + | func et (cA,cQ,eu) = { | |
544 | + | let ev = g | |
545 | + | let ew = cA[if ((cQ == 0)) | |
544 | 546 | then 1 | |
545 | 547 | else 0] | |
546 | - | let | |
547 | - | let | |
548 | - | let | |
549 | - | let | |
550 | - | let | |
551 | - | let | |
552 | - | func | |
553 | - | let | |
554 | - | let | |
555 | - | let | |
556 | - | if (( | |
557 | - | then | |
548 | + | let ex = parseBigIntValue(m) | |
549 | + | let cE = (parseBigIntValue(aV) * ex) | |
550 | + | let cD = ew | |
551 | + | let cF = (cE * ev) | |
552 | + | let ey = (((((eu * eu) / (ew * ev)) * eu) * ex) / (cF * ev)) | |
553 | + | let ez = ((cD + ((eu * ex) / cF)) - eu) | |
554 | + | func cO (cP,eA) = { | |
555 | + | let eB = cP | |
556 | + | let eC = eB._1 | |
557 | + | let dd = eB._2 | |
558 | + | if ((dd != unit)) | |
559 | + | then cP | |
558 | 560 | else { | |
559 | - | let | |
560 | - | let | |
561 | - | if ((f >= | |
562 | - | then $Tuple2( | |
563 | - | else $Tuple2( | |
561 | + | let eD = (((eC * eC) + ey) / ((g * eC) + ez)) | |
562 | + | let eE = Y((eD - value(eC))) | |
563 | + | if ((f >= eE)) | |
564 | + | then $Tuple2(eD, eA) | |
565 | + | else $Tuple2(eD, unit) | |
564 | 566 | } | |
565 | 567 | } | |
566 | 568 | ||
567 | - | let | |
568 | - | let | |
569 | - | let | |
570 | - | let | |
571 | - | let | |
572 | - | func | |
573 | - | then | |
574 | - | else | |
569 | + | let cU = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] | |
570 | + | let eF = { | |
571 | + | let cW = cU | |
572 | + | let cX = size(cW) | |
573 | + | let cY = $Tuple2(eu, unit) | |
574 | + | func cZ (da,db) = if ((db >= cX)) | |
575 | + | then da | |
576 | + | else cO(da, cW[db]) | |
575 | 577 | ||
576 | - | func | |
577 | - | then | |
578 | + | func dc (da,db) = if ((db >= cX)) | |
579 | + | then da | |
578 | 580 | else throw("List size exceeds 15") | |
579 | 581 | ||
580 | - | | |
582 | + | dc(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cY, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
581 | 583 | } | |
582 | - | let | |
583 | - | let | |
584 | - | if (( | |
585 | - | then | |
586 | - | else throw(("Y calculation error, Y = " + toString( | |
584 | + | let eC = eF._1 | |
585 | + | let dd = eF._2 | |
586 | + | if ((dd != unit)) | |
587 | + | then eC | |
588 | + | else throw(("Y calculation error, Y = " + toString(eC))) | |
587 | 589 | } | |
588 | 590 | ||
589 | 591 | ||
590 | - | func | |
591 | - | let | |
592 | - | if (( | |
592 | + | func eG (eH,eI,eJ) = { | |
593 | + | let eK = fraction(cz([L(eH, toBigInt(bp)), L(eI, toBigInt(bq))]), c, eJ) | |
594 | + | if ((eJ == e)) | |
593 | 595 | then e | |
594 | - | else | |
596 | + | else eK | |
595 | 597 | } | |
596 | 598 | ||
597 | 599 | ||
598 | - | func | |
599 | - | let | |
600 | - | let | |
601 | - | let | |
602 | - | let | |
603 | - | | |
600 | + | func eL (eM,eN,eO) = { | |
601 | + | let eP = (toBigInt(bO(bf(bn))) - eM) | |
602 | + | let eQ = (toBigInt(bO(bf(bo))) - eN) | |
603 | + | let eR = (toBigInt(value(assetInfo(bm)).quantity) - eO) | |
604 | + | let eS = eG(eP, eQ, eR) | |
605 | + | eS | |
604 | 606 | } | |
605 | 607 | ||
606 | 608 | ||
607 | - | func | |
608 | - | let | |
609 | - | let | |
610 | - | let | |
611 | - | let | |
612 | - | let | |
613 | - | $Tuple2( | |
609 | + | func eT (eU,eV,eO) = { | |
610 | + | let eP = (bO(bf(bn)) + eU) | |
611 | + | let eQ = (bO(bf(bo)) + eV) | |
612 | + | let eR = (value(assetInfo(bm)).quantity + eO) | |
613 | + | let eK = eG(toBigInt(eP), toBigInt(eQ), toBigInt(eR)) | |
614 | + | let eW = [IntegerEntry(ar, height), StringEntry(aq, toString(eK))] | |
615 | + | $Tuple2(eW, eK) | |
614 | 616 | } | |
615 | 617 | ||
616 | 618 | ||
617 | - | func | |
619 | + | func eX (eY,eK) = if ((eK >= eY)) | |
618 | 620 | then true | |
619 | - | else | |
621 | + | else aO("updated DLp lower than current DLp") | |
620 | 622 | ||
621 | 623 | ||
622 | - | func | |
623 | - | let | |
624 | - | let | |
625 | - | let | |
626 | - | let | |
627 | - | let | |
628 | - | then $Tuple2( | |
629 | - | else $Tuple2(-( | |
630 | - | let | |
631 | - | let | |
632 | - | if (if (if ( | |
624 | + | func eZ (fa) = { | |
625 | + | let eP = bO(bf(bn)) | |
626 | + | let eQ = bO(bf(bo)) | |
627 | + | let fb = fa.amount | |
628 | + | let fc = fraction(fa.amount, fa.price, a, FLOOR) | |
629 | + | let fd = if ((fa.orderType == Buy)) | |
630 | + | then $Tuple2(fb, -(fc)) | |
631 | + | else $Tuple2(-(fb), fc) | |
632 | + | let eU = fd._1 | |
633 | + | let eV = fd._2 | |
634 | + | if (if (if (aW()) | |
633 | 635 | then true | |
634 | - | else ( | |
636 | + | else (bl == s)) | |
635 | 637 | then true | |
636 | - | else ( | |
638 | + | else (bl == t)) | |
637 | 639 | then throw("Admin blocked") | |
638 | - | else if (if (( | |
640 | + | else if (if ((fa.assetPair.amountAsset != bn)) | |
639 | 641 | then true | |
640 | - | else ( | |
642 | + | else (fa.assetPair.priceAsset != bo)) | |
641 | 643 | then throw("Wr assets") | |
642 | 644 | else { | |
643 | - | let | |
644 | - | let | |
645 | - | let | |
646 | - | let | |
647 | - | let | |
648 | - | let | |
649 | - | $Tuple2( | |
645 | + | let fe = parseBigIntValue(valueOrElse(getString(this, aq), "0")) | |
646 | + | let ff = eT(eU, eV, 0) | |
647 | + | let fg = ff._1 | |
648 | + | let fh = ff._2 | |
649 | + | let fi = (fh >= fe) | |
650 | + | let fj = makeString(["dLp=", toString(fe), " dLpNew=", toString(fh), " amountAssetBalance=", toString(eP), " priceAssetBalance=", toString(eQ), " amountAssetBalanceDelta=", toString(eU), " priceAssetBalanceDelta=", toString(eV), " height=", toString(height)], "") | |
651 | + | $Tuple2(fi, fj) | |
650 | 652 | } | |
651 | 653 | } | |
652 | 654 | ||
653 | 655 | ||
654 | - | func | |
656 | + | func fk (cQ) = if ((size(cQ.payments) != 1)) | |
655 | 657 | then throw("1 pmnt exp") | |
656 | 658 | else { | |
657 | - | let | |
658 | - | let | |
659 | - | let | |
660 | - | let | |
661 | - | let | |
662 | - | let | |
663 | - | let | |
664 | - | let | |
665 | - | if (if ( | |
659 | + | let fl = value(cQ.payments[0]) | |
660 | + | let dg = value(fl.assetId) | |
661 | + | let dM = fl.amount | |
662 | + | let dY = de(toBase58String(cQ.transactionId), toBase58String(dg), dM, cQ.caller) | |
663 | + | let dA = dY._1 | |
664 | + | let dB = dY._2 | |
665 | + | let do = parseIntValue(dY._9) | |
666 | + | let dC = dY._10 | |
667 | + | if (if (aW()) | |
666 | 668 | then true | |
667 | - | else ( | |
668 | - | then throw(("Admin blocked: " + toString( | |
669 | - | else $Tuple5( | |
669 | + | else (do == t)) | |
670 | + | then throw(("Admin blocked: " + toString(do))) | |
671 | + | else $Tuple5(dA, dB, dM, dg, dC) | |
670 | 672 | } | |
671 | 673 | ||
672 | 674 | ||
673 | - | func | |
674 | - | let | |
675 | - | let | |
676 | - | if (if (if ( | |
675 | + | func fm (fn,ai,fo,fp,bX,dJ,dK,dL,dM,dN) = { | |
676 | + | let dY = dD(ai, bX, value(fo).amount, value(fo).assetId, value(fp).amount, value(fp).assetId, fn, (ai == ""), dJ, dK, dL, dM, dN) | |
677 | + | let do = parseIntValue(dY._8) | |
678 | + | if (if (if (aW()) | |
677 | 679 | then true | |
678 | - | else ( | |
680 | + | else (do == r)) | |
679 | 681 | then true | |
680 | - | else ( | |
681 | - | then throw(("Blocked:" + toString( | |
682 | - | else | |
682 | + | else (do == t)) | |
683 | + | then throw(("Blocked:" + toString(do))) | |
684 | + | else dY | |
683 | 685 | } | |
684 | 686 | ||
685 | 687 | ||
686 | - | func fp (fq,df,dh,ah,fr) = { | |
687 | - | let dj = toBase58String(value(bm)) | |
688 | + | func fq (fr,dg,di,ai,fs) = { | |
688 | 689 | let dk = toBase58String(value(bn)) | |
689 | - | let | |
690 | - | let | |
690 | + | let dl = toBase58String(value(bo)) | |
691 | + | let dj = bm | |
691 | 692 | let dS = bp | |
692 | - | let eQ = toBigInt(valueOrErrorMessage(assetInfo(di), "invalid lp asset").quantity) | |
693 | - | let fs = if ((eQ > e)) | |
693 | + | let dT = bq | |
694 | + | let eR = toBigInt(valueOrErrorMessage(assetInfo(dj), "invalid lp asset").quantity) | |
695 | + | let ft = if ((eR > e)) | |
694 | 696 | then true | |
695 | 697 | else throw("initial deposit requires all coins") | |
696 | - | if (( | |
698 | + | if ((ft == ft)) | |
697 | 699 | then { | |
698 | - | let | |
699 | - | let | |
700 | - | let | |
701 | - | then $Tuple2( | |
702 | - | else if (( | |
703 | - | then if (( | |
700 | + | let dq = bO(dk) | |
701 | + | let ds = bO(dl) | |
702 | + | let fu = if ((ai == "")) | |
703 | + | then $Tuple2(dq, ds) | |
704 | + | else if ((dg == dk)) | |
705 | + | then if ((fr > dq)) | |
704 | 706 | then throw("invalid payment amount") | |
705 | - | else $Tuple2(( | |
706 | - | else if (( | |
707 | - | then if (( | |
707 | + | else $Tuple2((dq - fr), ds) | |
708 | + | else if ((dg == dl)) | |
709 | + | then if ((fr > ds)) | |
708 | 710 | then throw("invalid payment amount") | |
709 | - | else $Tuple2( | |
711 | + | else $Tuple2(dq, (ds - fr)) | |
710 | 712 | else throw("wrong pmtAssetId") | |
711 | - | let | |
712 | - | let | |
713 | - | let | |
714 | - | then $Tuple2( | |
715 | - | else if (( | |
716 | - | then $Tuple2(0, | |
713 | + | let fv = fu._1 | |
714 | + | let fw = fu._2 | |
715 | + | let fx = if ((dg == dk)) | |
716 | + | then $Tuple2(fr, 0) | |
717 | + | else if ((dg == dl)) | |
718 | + | then $Tuple2(0, fr) | |
717 | 719 | else throw("invalid payment") | |
718 | - | let fx = fw._1 | |
719 | - | let fy = fw._2 | |
720 | - | let fz = if (fr) | |
721 | - | then $Tuple3(cv(fx, aR)._1, cv(fy, aR)._1, cv(fq, aR)._2) | |
722 | - | else $Tuple3(fx, fy, 0) | |
723 | - | let fA = fz._1 | |
724 | - | let fB = fz._2 | |
725 | - | let cx = fz._3 | |
726 | - | let fC = (fu + fA) | |
720 | + | let fy = fx._1 | |
721 | + | let fz = fx._2 | |
722 | + | let fA = if (fs) | |
723 | + | then $Tuple3(cw(fy, aS)._1, cw(fz, aS)._1, cw(fr, aS)._2) | |
724 | + | else $Tuple3(fy, fz, 0) | |
725 | + | let fB = fA._1 | |
726 | + | let fC = fA._2 | |
727 | + | let cy = fA._3 | |
727 | 728 | let fD = (fv + fB) | |
728 | - | let cb = cy([H(fu, bo), H(fv, bp)]) | |
729 | - | let ca = cy([H(fC, bo), H(fD, bp)]) | |
730 | - | let dY = if ((ca > cb)) | |
729 | + | let fE = (fw + fC) | |
730 | + | let cc = cz([I(fv, bp), I(fw, bq)]) | |
731 | + | let cb = cz([I(fD, bp), I(fE, bq)]) | |
732 | + | let dZ = if ((cb > cc)) | |
731 | 733 | then true | |
732 | 734 | else throw() | |
733 | - | if (( | |
735 | + | if ((dZ == dZ)) | |
734 | 736 | then { | |
735 | - | let | |
736 | - | let | |
737 | - | let | |
738 | - | let | |
739 | - | let | |
740 | - | let | |
741 | - | let | |
742 | - | let | |
743 | - | $Tuple4(toInt( | |
737 | + | let fF = fraction(eR, (cb - cc), cc, FLOOR) | |
738 | + | let dv = M(bQ(I(fE, dT), I(fD, dS)), a) | |
739 | + | let es = [IntegerEntry(ac(), dv), IntegerEntry(ad(height, lastBlock.timestamp), dv), StringEntry(ag(di, ai), bz(fy, fz, toInt(fF), dv, 0, 0, height, lastBlock.timestamp, 0, 0))] | |
740 | + | let fG = fraction(fw, a, fv) | |
741 | + | let fH = fraction(fr, a, (fG + a)) | |
742 | + | let fI = (fr - fH) | |
743 | + | let fJ = fraction(eR, toBigInt(fI), toBigInt(fw)) | |
744 | + | let fK = toInt(fraction((fF - fJ), b, fJ)) | |
745 | + | $Tuple4(toInt(fF), es, cy, fK) | |
744 | 746 | } | |
745 | 747 | else throw("Strict value is not equal to itself.") | |
746 | 748 | } | |
748 | 750 | } | |
749 | 751 | ||
750 | 752 | ||
751 | - | func fK (fL,fM,fN,fm,fO,fP) = { | |
752 | - | let di = toBase58String(value(bl)) | |
753 | + | func fL (fM,fN,fO,fn,fP,fQ) = { | |
753 | 754 | let dj = toBase58String(value(bm)) | |
754 | 755 | let dk = toBase58String(value(bn)) | |
755 | - | let | |
756 | + | let dl = toBase58String(value(bo)) | |
756 | 757 | let fR = bp | |
757 | - | let fS = bk | |
758 | - | let dh = if ((fm == bx)) | |
759 | - | then fO | |
760 | - | else fm | |
761 | - | let fk = value(fN[0]) | |
762 | - | let df = value(fk.assetId) | |
763 | - | let dL = fk.amount | |
764 | - | let eR = eK(e, e, e) | |
765 | - | if ((eR == eR)) | |
758 | + | let fS = bq | |
759 | + | let fT = bl | |
760 | + | let di = if ((fn == by)) | |
761 | + | then fP | |
762 | + | else fn | |
763 | + | let fl = value(fO[0]) | |
764 | + | let dg = value(fl.assetId) | |
765 | + | let dM = fl.amount | |
766 | + | let eS = eL(e, e, e) | |
767 | + | if ((eS == eS)) | |
766 | 768 | then { | |
767 | - | let | |
768 | - | if (( | |
769 | + | let df = toBase58String(fQ) | |
770 | + | if ((dj != toBase58String(dg))) | |
769 | 771 | then throw("Wrong LP") | |
770 | 772 | else { | |
771 | - | let | |
772 | - | let | |
773 | - | let | |
774 | - | let | |
775 | - | if ($isInstanceOf( | |
776 | - | then | |
777 | - | else throw(($getType( | |
773 | + | let dq = bO(dk) | |
774 | + | let ds = bO(dl) | |
775 | + | let fU = { | |
776 | + | let aT = invoke(this, "getOneTknV2READONLY", [fM, dM], nil) | |
777 | + | if ($isInstanceOf(aT, "(Int, Int)")) | |
778 | + | then aT | |
779 | + | else throw(($getType(aT) + " couldn't be cast to (Int, Int)")) | |
778 | 780 | } | |
779 | - | if (( | |
781 | + | if ((fU == fU)) | |
780 | 782 | then { | |
781 | - | let | |
782 | - | let | |
783 | - | let | |
784 | - | then ( | |
783 | + | let cy = fU._2 | |
784 | + | let fV = fU._1 | |
785 | + | let fW = if (if ((fN > 0)) | |
786 | + | then (fN > fV) | |
785 | 787 | else false) | |
786 | - | then | |
787 | - | else | |
788 | - | let | |
789 | - | then $Tuple4( | |
790 | - | else if (( | |
791 | - | then $Tuple4(0, | |
788 | + | then aO(makeString(["amount to receive is less than ", toString(fN)], "")) | |
789 | + | else fV | |
790 | + | let fX = if ((fM == dk)) | |
791 | + | then $Tuple4(fW, 0, ((dq - fW) - cy), ds) | |
792 | + | else if ((fM == dl)) | |
793 | + | then $Tuple4(0, fW, dq, ((ds - fW) - cy)) | |
792 | 794 | else throw("invalid out asset id") | |
793 | - | let | |
794 | - | let | |
795 | - | let | |
796 | - | let | |
797 | - | let | |
798 | - | let | |
799 | - | let | |
795 | + | let fY = fX._1 | |
796 | + | let fZ = fX._2 | |
797 | + | let fD = fX._3 | |
798 | + | let fE = fX._4 | |
799 | + | let ga = bQ(I(fE, fS), I(fD, fR)) | |
800 | + | let gb = M(ga, a) | |
801 | + | let gc = if ((fM == "WAVES")) | |
800 | 802 | then unit | |
801 | - | else fromBase58String( | |
802 | - | let | |
803 | - | then [ScriptTransfer( | |
803 | + | else fromBase58String(fM) | |
804 | + | let gd = if ((cy > 0)) | |
805 | + | then [ScriptTransfer(aY, cy, gc)] | |
804 | 806 | else nil | |
805 | - | let | |
806 | - | if (( | |
807 | + | let dC = ([ScriptTransfer(di, fW, gc), StringEntry(aj(toString(di), df), bK(fY, fZ, dM, gb, height, lastBlock.timestamp)), IntegerEntry(ac(), gb), IntegerEntry(ad(height, lastBlock.timestamp), gb)] ++ gd) | |
808 | + | if ((dC == dC)) | |
807 | 809 | then { | |
808 | - | let | |
809 | - | if (( | |
810 | + | let ge = invoke(aR, "burn", [dM], [AttachedPayment(dg, dM)]) | |
811 | + | if ((ge == ge)) | |
810 | 812 | then { | |
811 | - | let | |
812 | - | let | |
813 | + | let gf = { | |
814 | + | let gg = if ((this == aY)) | |
813 | 815 | then 0 | |
814 | - | else | |
815 | - | let | |
816 | + | else cy | |
817 | + | let gh = if ((bd(fM) == bn)) | |
816 | 818 | then true | |
817 | 819 | else false | |
818 | - | if ( | |
819 | - | then $Tuple2(-(( | |
820 | - | else $Tuple2(0, -(( | |
820 | + | if (gh) | |
821 | + | then $Tuple2(-((fV + gg)), 0) | |
822 | + | else $Tuple2(0, -((fV + gg))) | |
821 | 823 | } | |
822 | - | let | |
823 | - | let | |
824 | - | let | |
825 | - | let | |
826 | - | let | |
827 | - | let | |
828 | - | if (( | |
829 | - | then $Tuple2(( | |
824 | + | let eU = gf._1 | |
825 | + | let eV = gf._2 | |
826 | + | let gi = eT(eU, eV, 0) | |
827 | + | let gj = gi._1 | |
828 | + | let eK = gi._2 | |
829 | + | let gk = eX(eS, eK) | |
830 | + | if ((gk == gk)) | |
831 | + | then $Tuple2((dC ++ gj), fW) | |
830 | 832 | else throw("Strict value is not equal to itself.") | |
831 | 833 | } | |
832 | 834 | else throw("Strict value is not equal to itself.") | |
840 | 842 | } | |
841 | 843 | ||
842 | 844 | ||
843 | - | func | |
844 | - | let | |
845 | - | if ($isInstanceOf( | |
845 | + | func gl () = { | |
846 | + | let gm = getString(aa()) | |
847 | + | if ($isInstanceOf(gm, "String")) | |
846 | 848 | then { | |
847 | - | let | |
848 | - | fromBase58String( | |
849 | + | let cD = gm | |
850 | + | fromBase58String(cD) | |
849 | 851 | } | |
850 | - | else if ($isInstanceOf( | |
852 | + | else if ($isInstanceOf(gm, "Unit")) | |
851 | 853 | then unit | |
852 | 854 | else throw("Match error") | |
853 | 855 | } | |
854 | 856 | ||
855 | 857 | ||
856 | - | func | |
857 | - | let | |
858 | - | if ($isInstanceOf( | |
858 | + | func gn () = { | |
859 | + | let gm = getString(ab()) | |
860 | + | if ($isInstanceOf(gm, "String")) | |
859 | 861 | then { | |
860 | - | let | |
861 | - | fromBase58String( | |
862 | + | let cD = gm | |
863 | + | fromBase58String(cD) | |
862 | 864 | } | |
863 | - | else if ($isInstanceOf( | |
865 | + | else if ($isInstanceOf(gm, "Unit")) | |
864 | 866 | then unit | |
865 | 867 | else throw("Match error") | |
866 | 868 | } | |
867 | 869 | ||
868 | 870 | ||
869 | - | let | |
871 | + | let go = throw("Permission denied") | |
870 | 872 | ||
871 | - | func | |
872 | - | let | |
873 | - | if ($isInstanceOf( | |
873 | + | func gp (cQ) = { | |
874 | + | let gm = gl() | |
875 | + | if ($isInstanceOf(gm, "ByteVector")) | |
874 | 876 | then { | |
875 | - | let | |
876 | - | ( | |
877 | + | let gq = gm | |
878 | + | (cQ.callerPublicKey == gq) | |
877 | 879 | } | |
878 | - | else if ($isInstanceOf( | |
879 | - | then ( | |
880 | + | else if ($isInstanceOf(gm, "Unit")) | |
881 | + | then (cQ.caller == this) | |
880 | 882 | else throw("Match error") | |
881 | 883 | } | |
882 | 884 | ||
883 | 885 | ||
884 | - | func | |
885 | - | let | |
886 | - | if ($isInstanceOf( | |
886 | + | func gr (cQ) = { | |
887 | + | let gm = gl() | |
888 | + | if ($isInstanceOf(gm, "ByteVector")) | |
887 | 889 | then { | |
888 | - | let | |
889 | - | if (( | |
890 | + | let gq = gm | |
891 | + | if ((cQ.callerPublicKey == gq)) | |
890 | 892 | then true | |
891 | - | else | |
893 | + | else go | |
892 | 894 | } | |
893 | - | else if ($isInstanceOf( | |
894 | - | then if (( | |
895 | + | else if ($isInstanceOf(gm, "Unit")) | |
896 | + | then if ((cQ.caller == this)) | |
895 | 897 | then true | |
896 | - | else | |
898 | + | else go | |
897 | 899 | else throw("Match error") | |
898 | 900 | } | |
899 | 901 | ||
900 | 902 | ||
901 | - | func | |
902 | - | let | |
903 | - | let | |
904 | - | let | |
905 | - | let | |
906 | - | let | |
907 | - | let | |
908 | - | let | |
909 | - | then [(toBigInt( | |
910 | - | else [(toBigInt( | |
911 | - | let | |
912 | - | let | |
913 | - | let | |
914 | - | let | |
915 | - | let | |
916 | - | func | |
917 | - | let | |
918 | - | let | |
919 | - | let | |
920 | - | if (( | |
921 | - | then | |
903 | + | func gs (gt,eu,gu) = { | |
904 | + | let bh = aZ() | |
905 | + | let dk = bh[x] | |
906 | + | let dl = bh[y] | |
907 | + | let ev = g | |
908 | + | let ex = parseBigIntValue(m) | |
909 | + | let cE = (parseBigIntValue(aV) * ex) | |
910 | + | let cA = if ((gt == false)) | |
911 | + | then [(toBigInt(bO(dk)) + gu), toBigInt(bO(dl))] | |
912 | + | else [(toBigInt(bO(dl)) + gu), toBigInt(bO(dk))] | |
913 | + | let ew = cA[0] | |
914 | + | let cD = ew | |
915 | + | let cF = (cE * ev) | |
916 | + | let ey = (((((eu * eu) / (ew * ev)) * eu) * ex) / (cF * ev)) | |
917 | + | let ez = ((cD + ((eu * ex) / cF)) - eu) | |
918 | + | func cO (cP,eA) = { | |
919 | + | let gv = cP | |
920 | + | let eC = gv._1 | |
921 | + | let dd = gv._2 | |
922 | + | if ((dd != unit)) | |
923 | + | then cP | |
922 | 924 | else { | |
923 | - | let | |
924 | - | let | |
925 | - | if ((f >= | |
926 | - | then $Tuple2( | |
927 | - | else $Tuple2( | |
925 | + | let eD = (((eC * eC) + ey) / ((g * eC) + ez)) | |
926 | + | let eE = Y((eD - value(eC))) | |
927 | + | if ((f >= eE)) | |
928 | + | then $Tuple2(eD, eA) | |
929 | + | else $Tuple2(eD, unit) | |
928 | 930 | } | |
929 | 931 | } | |
930 | 932 | ||
931 | - | let | |
932 | - | let | |
933 | - | let | |
934 | - | let | |
935 | - | let | |
936 | - | func | |
937 | - | then | |
938 | - | else | |
933 | + | let cU = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] | |
934 | + | let gw = { | |
935 | + | let cW = cU | |
936 | + | let cX = size(cW) | |
937 | + | let cY = $Tuple2(eu, unit) | |
938 | + | func cZ (da,db) = if ((db >= cX)) | |
939 | + | then da | |
940 | + | else cO(da, cW[db]) | |
939 | 941 | ||
940 | - | func | |
941 | - | then | |
942 | + | func dc (da,db) = if ((db >= cX)) | |
943 | + | then da | |
942 | 944 | else throw("List size exceeds 15") | |
943 | 945 | ||
944 | - | | |
946 | + | dc(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cY, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
945 | 947 | } | |
946 | - | let | |
947 | - | let | |
948 | - | if (( | |
949 | - | then | |
950 | - | else throw(("Y calculation error, Y = " + toString( | |
948 | + | let eC = gw._1 | |
949 | + | let dd = gw._2 | |
950 | + | if ((dd != unit)) | |
951 | + | then eC | |
952 | + | else throw(("Y calculation error, Y = " + toString(eC))) | |
951 | 953 | } | |
952 | 954 | ||
953 | 955 | ||
954 | - | @Callable( | |
955 | - | func calculateAmountOutForSwapREADONLY ( | |
956 | - | let | |
956 | + | @Callable(cQ) | |
957 | + | func calculateAmountOutForSwapREADONLY (gx,gt) = { | |
958 | + | let gy = if ((gt == false)) | |
957 | 959 | then { | |
958 | - | let | |
959 | - | let | |
960 | - | $Tuple2( | |
960 | + | let gz = aK(this, al()) | |
961 | + | let gu = (toBigInt(bO(aK(this, ak()))) + toBigInt(gx)) | |
962 | + | $Tuple2(gz, gu) | |
961 | 963 | } | |
962 | 964 | else { | |
963 | - | let | |
964 | - | let | |
965 | - | $Tuple2( | |
965 | + | let gz = aK(this, ak()) | |
966 | + | let gu = (toBigInt(bO(aK(this, al()))) + toBigInt(gx)) | |
967 | + | $Tuple2(gz, gu) | |
966 | 968 | } | |
967 | - | let | |
968 | - | let | |
969 | - | let | |
970 | - | let | |
971 | - | let | |
972 | - | let | |
973 | - | let | |
974 | - | let | |
975 | - | let | |
976 | - | let | |
977 | - | let | |
978 | - | then [(toBigInt( | |
979 | - | else [(toBigInt( | |
980 | - | let | |
981 | - | let | |
969 | + | let gz = gy._1 | |
970 | + | let gu = gy._2 | |
971 | + | let bh = aZ() | |
972 | + | let dk = bh[x] | |
973 | + | let dl = bh[y] | |
974 | + | let cA = [toBigInt(bO(dk)), toBigInt(bO(dl))] | |
975 | + | let eu = cz(cA) | |
976 | + | let eC = gs(gt, eu, toBigInt(gx)) | |
977 | + | let gA = ((toBigInt(bO(gz)) - eC) - toBigInt(1)) | |
978 | + | let gB = max([0, toInt(gA)]) | |
979 | + | let gC = if ((gt == false)) | |
980 | + | then [(toBigInt(bO(dk)) + toBigInt(gx)), (toBigInt(bO(dl)) - gA)] | |
981 | + | else [(toBigInt(bO(dk)) - gA), (toBigInt(bO(dl)) + toBigInt(gx))] | |
982 | + | let gD = cz(gC) | |
983 | + | let dZ = if ((gD >= eu)) | |
982 | 984 | then true | |
983 | - | else throw(makeString(["new D is fewer error", toString( | |
984 | - | if (( | |
985 | - | then $Tuple2(nil, | |
985 | + | else throw(makeString(["new D is fewer error", toString(eu), toString(gD)], "__")) | |
986 | + | if ((dZ == dZ)) | |
987 | + | then $Tuple2(nil, gB) | |
986 | 988 | else throw("Strict value is not equal to itself.") | |
987 | 989 | } | |
988 | 990 | ||
989 | 991 | ||
990 | 992 | ||
991 | - | @Callable( | |
992 | - | func calculateAmountOutForSwapAndSendTokens ( | |
993 | - | let | |
994 | - | let | |
995 | - | if ($isInstanceOf( | |
996 | - | then | |
997 | - | else throw(($getType( | |
993 | + | @Callable(cQ) | |
994 | + | func calculateAmountOutForSwapAndSendTokens (gx,gt,gE,gF) = { | |
995 | + | let gG = { | |
996 | + | let aT = invoke(aR, "getSwapContractREADONLY", nil, nil) | |
997 | + | if ($isInstanceOf(aT, "String")) | |
998 | + | then aT | |
999 | + | else throw(($getType(aT) + " couldn't be cast to String")) | |
998 | 1000 | } | |
999 | - | let | |
1001 | + | let gH = [if ((value(cQ.payments[0]).amount >= gx)) | |
1000 | 1002 | then true | |
1001 | - | else | |
1003 | + | else aO("Wrong amount"), if ((cQ.caller == addressFromStringValue(gG))) | |
1002 | 1004 | then true | |
1003 | - | else | |
1004 | - | if (( | |
1005 | + | else aO("Permission denied")] | |
1006 | + | if ((gH == gH)) | |
1005 | 1007 | then { | |
1006 | - | let | |
1007 | - | let | |
1008 | + | let fl = value(cQ.payments[0]) | |
1009 | + | let gI = if ((fl.assetId == unit)) | |
1008 | 1010 | then toBase58String(toBytes("WAVES")) | |
1009 | - | else toBase58String(value( | |
1010 | - | let | |
1011 | + | else toBase58String(value(fl.assetId)) | |
1012 | + | let gJ = if ((gt == false)) | |
1011 | 1013 | then { | |
1012 | - | let | |
1013 | - | let | |
1014 | - | $Tuple2( | |
1014 | + | let gz = aK(this, al()) | |
1015 | + | let gu = (bO(gI) - value(cQ.payments[0]).amount) | |
1016 | + | $Tuple2(gz, gu) | |
1015 | 1017 | } | |
1016 | 1018 | else { | |
1017 | - | let | |
1018 | - | let | |
1019 | - | $Tuple2( | |
1019 | + | let gz = aK(this, ak()) | |
1020 | + | let gu = (bO(gI) - value(cQ.payments[0]).amount) | |
1021 | + | $Tuple2(gz, gu) | |
1020 | 1022 | } | |
1021 | - | let | |
1022 | - | let | |
1023 | - | let | |
1024 | - | let | |
1025 | - | let | |
1026 | - | let | |
1027 | - | then [(toBigInt( | |
1028 | - | else [toBigInt( | |
1029 | - | let | |
1030 | - | let | |
1031 | - | let | |
1032 | - | let | |
1033 | - | let | |
1023 | + | let gz = gJ._1 | |
1024 | + | let gu = gJ._2 | |
1025 | + | let bh = aZ() | |
1026 | + | let dk = bh[x] | |
1027 | + | let dl = bh[y] | |
1028 | + | let cA = if ((gt == false)) | |
1029 | + | then [(toBigInt(bO(dk)) - toBigInt(value(cQ.payments[0]).amount)), toBigInt(bO(dl))] | |
1030 | + | else [toBigInt(bO(dk)), (toBigInt(bO(dl)) - toBigInt(value(cQ.payments[0]).amount))] | |
1031 | + | let eu = cz(cA) | |
1032 | + | let eC = gs(gt, eu, toBigInt(0)) | |
1033 | + | let gA = ((toBigInt(bO(gz)) - eC) - toBigInt(1)) | |
1034 | + | let gB = max([0, toInt(gA)]) | |
1035 | + | let gK = if ((gB >= gE)) | |
1034 | 1036 | then true | |
1035 | 1037 | else throw("Exchange result is fewer coins than expected") | |
1036 | - | if (( | |
1038 | + | if ((gK == gK)) | |
1037 | 1039 | then { | |
1038 | - | let | |
1039 | - | then [toBigInt( | |
1040 | - | else [(toBigInt( | |
1041 | - | let | |
1042 | - | let | |
1040 | + | let gC = if ((gt == false)) | |
1041 | + | then [toBigInt(bO(dk)), (toBigInt(bO(dl)) - gA)] | |
1042 | + | else [(toBigInt(bO(dk)) - gA), toBigInt(bO(dl))] | |
1043 | + | let gD = cz(gC) | |
1044 | + | let dZ = if ((gD >= eu)) | |
1043 | 1045 | then true | |
1044 | 1046 | else throw("new D is fewer error") | |
1045 | - | if (( | |
1046 | - | then $Tuple2([ScriptTransfer(addressFromStringValue( | |
1047 | + | if ((dZ == dZ)) | |
1048 | + | then $Tuple2([ScriptTransfer(addressFromStringValue(gF), gB, bd(gz))], gB) | |
1047 | 1049 | else throw("Strict value is not equal to itself.") | |
1048 | 1050 | } | |
1049 | 1051 | else throw("Strict value is not equal to itself.") | |
1053 | 1055 | ||
1054 | 1056 | ||
1055 | 1057 | ||
1056 | - | @Callable( | |
1057 | - | func constructor ( | |
1058 | - | let | |
1059 | - | if (( | |
1060 | - | then [StringEntry( | |
1058 | + | @Callable(cQ) | |
1059 | + | func constructor (Z) = { | |
1060 | + | let ey = gr(cQ) | |
1061 | + | if ((ey == ey)) | |
1062 | + | then [StringEntry(Z(), Z)] | |
1061 | 1063 | else throw("Strict value is not equal to itself.") | |
1062 | 1064 | } | |
1063 | 1065 | ||
1064 | 1066 | ||
1065 | 1067 | ||
1066 | - | @Callable( | |
1067 | - | func setManager ( | |
1068 | - | let | |
1069 | - | if (( | |
1068 | + | @Callable(cQ) | |
1069 | + | func setManager (gL) = { | |
1070 | + | let ey = gr(cQ) | |
1071 | + | if ((ey == ey)) | |
1070 | 1072 | then { | |
1071 | - | let | |
1072 | - | if (( | |
1073 | - | then [StringEntry( | |
1073 | + | let gM = fromBase58String(gL) | |
1074 | + | if ((gM == gM)) | |
1075 | + | then [StringEntry(ab(), gL)] | |
1074 | 1076 | else throw("Strict value is not equal to itself.") | |
1075 | 1077 | } | |
1076 | 1078 | else throw("Strict value is not equal to itself.") | |
1078 | 1080 | ||
1079 | 1081 | ||
1080 | 1082 | ||
1081 | - | @Callable( | |
1083 | + | @Callable(cQ) | |
1082 | 1084 | func confirmManager () = { | |
1083 | - | let | |
1084 | - | let | |
1085 | + | let cv = gn() | |
1086 | + | let gN = if (isDefined(cv)) | |
1085 | 1087 | then true | |
1086 | 1088 | else throw("No pending manager") | |
1087 | - | if (( | |
1089 | + | if ((gN == gN)) | |
1088 | 1090 | then { | |
1089 | - | let | |
1091 | + | let gO = if ((cQ.callerPublicKey == value(cv))) | |
1090 | 1092 | then true | |
1091 | 1093 | else throw("You are not pending manager") | |
1092 | - | if (( | |
1093 | - | then [StringEntry( | |
1094 | + | if ((gO == gO)) | |
1095 | + | then [StringEntry(aa(), toBase58String(value(cv))), DeleteEntry(ab())] | |
1094 | 1096 | else throw("Strict value is not equal to itself.") | |
1095 | 1097 | } | |
1096 | 1098 | else throw("Strict value is not equal to itself.") | |
1098 | 1100 | ||
1099 | 1101 | ||
1100 | 1102 | ||
1101 | - | @Callable( | |
1102 | - | func put ( | |
1103 | - | let | |
1104 | - | let | |
1105 | - | let | |
1106 | - | if ((0 > | |
1103 | + | @Callable(cQ) | |
1104 | + | func put (gP,gQ) = { | |
1105 | + | let gR = bt() | |
1106 | + | let gS = valueOrErrorMessage(addressFromString(gR[D]), "Wr st addr") | |
1107 | + | let gT = valueOrErrorMessage(addressFromString(gR[F]), "Wr sl addr") | |
1108 | + | if ((0 > gP)) | |
1107 | 1109 | then throw("Wrong slippage") | |
1108 | - | else if ((size( | |
1110 | + | else if ((size(cQ.payments) != 2)) | |
1109 | 1111 | then throw("2 pmnts expd") | |
1110 | 1112 | else { | |
1111 | - | let | |
1112 | - | let | |
1113 | - | let | |
1114 | - | if (( | |
1113 | + | let gU = toBigInt(value(cQ.payments[0]).amount) | |
1114 | + | let gV = toBigInt(value(cQ.payments[1]).amount) | |
1115 | + | let eP = (toBigInt(bO(bf(bn))) - gU) | |
1116 | + | if ((eP == eP)) | |
1115 | 1117 | then { | |
1116 | - | let | |
1117 | - | if (( | |
1118 | + | let eQ = (toBigInt(bO(bf(bo))) - gV) | |
1119 | + | if ((eQ == eQ)) | |
1118 | 1120 | then { | |
1119 | - | let | |
1120 | - | if (( | |
1121 | + | let eR = toBigInt(value(assetInfo(bm)).quantity) | |
1122 | + | if ((eR == eR)) | |
1121 | 1123 | then { | |
1122 | - | let | |
1123 | - | if (( | |
1124 | + | let eS = eL(gU, gV, toBigInt(0)) | |
1125 | + | if ((eS == eS)) | |
1124 | 1126 | then { | |
1125 | - | let | |
1126 | - | let | |
1127 | - | let | |
1128 | - | let | |
1129 | - | let | |
1130 | - | let | |
1131 | - | let | |
1132 | - | let | |
1133 | - | let | |
1134 | - | if (( | |
1127 | + | let gW = fm(toString(cQ.caller), toBase58String(cQ.transactionId), AttachedPayment(value(cQ.payments[0]).assetId, value(cQ.payments[0]).amount), cQ.payments[1], gP, true, false, true, 0, "") | |
1128 | + | let em = gW._2 | |
1129 | + | let gX = gW._7 | |
1130 | + | let dC = gW._9 | |
1131 | + | let en = gW._10 | |
1132 | + | let eo = gW._11 | |
1133 | + | let dk = gW._12 | |
1134 | + | let dl = gW._13 | |
1135 | + | let dY = invoke(aR, "emit", [em], nil) | |
1136 | + | if ((dY == dY)) | |
1135 | 1137 | then { | |
1136 | - | let | |
1137 | - | let | |
1138 | - | if ($isInstanceOf( | |
1138 | + | let gY = { | |
1139 | + | let gm = dY | |
1140 | + | if ($isInstanceOf(gm, "Address")) | |
1139 | 1141 | then { | |
1140 | - | let | |
1141 | - | invoke( | |
1142 | + | let gZ = gm | |
1143 | + | invoke(gZ, "emit", [em], nil) | |
1142 | 1144 | } | |
1143 | 1145 | else unit | |
1144 | 1146 | } | |
1145 | - | if (( | |
1147 | + | if ((gY == gY)) | |
1146 | 1148 | then { | |
1147 | - | let | |
1148 | - | then invoke( | |
1149 | + | let ha = if ((en > 0)) | |
1150 | + | then invoke(gT, "put", nil, [AttachedPayment(dk, en)]) | |
1149 | 1151 | else nil | |
1150 | - | if (( | |
1152 | + | if ((ha == ha)) | |
1151 | 1153 | then { | |
1152 | - | let | |
1153 | - | then invoke( | |
1154 | + | let hb = if ((eo > 0)) | |
1155 | + | then invoke(gT, "put", nil, [AttachedPayment(dl, eo)]) | |
1154 | 1156 | else nil | |
1155 | - | if (( | |
1157 | + | if ((hb == hb)) | |
1156 | 1158 | then { | |
1157 | - | let | |
1159 | + | let hc = if (gQ) | |
1158 | 1160 | then { | |
1159 | - | let | |
1160 | - | if (( | |
1161 | + | let hd = invoke(gS, "stake", nil, [AttachedPayment(gX, em)]) | |
1162 | + | if ((hd == hd)) | |
1161 | 1163 | then nil | |
1162 | 1164 | else throw("Strict value is not equal to itself.") | |
1163 | 1165 | } | |
1164 | - | else [ScriptTransfer( | |
1165 | - | let | |
1166 | - | let | |
1167 | - | let | |
1168 | - | let | |
1166 | + | else [ScriptTransfer(cQ.caller, em, gX)] | |
1167 | + | let he = eT(0, 0, 0) | |
1168 | + | let gj = he._1 | |
1169 | + | let eK = he._2 | |
1170 | + | let hf = if ((eK >= eS)) | |
1169 | 1171 | then true | |
1170 | - | else | |
1171 | - | if (( | |
1172 | + | else aO(makeString(["updated DLp lower than current DLp", toString(eP), toString(eQ), toString(eR), toString(eS), toString(eK), toString(en), toString(eo)], " ")) | |
1173 | + | if ((hf == hf)) | |
1172 | 1174 | then { | |
1173 | - | let | |
1174 | - | if (( | |
1175 | - | then (( | |
1175 | + | let hg = value(assetInfo(bm)).quantity | |
1176 | + | if ((hg == hg)) | |
1177 | + | then ((dC ++ hc) ++ gj) | |
1176 | 1178 | else throw("Strict value is not equal to itself.") | |
1177 | 1179 | } | |
1178 | 1180 | else throw("Strict value is not equal to itself.") | |
1197 | 1199 | ||
1198 | 1200 | ||
1199 | 1201 | ||
1200 | - | @Callable( | |
1201 | - | func putOneTknV2 ( | |
1202 | - | let | |
1203 | - | let | |
1204 | - | if ($isInstanceOf( | |
1205 | - | then | |
1206 | - | else throw(($getType( | |
1202 | + | @Callable(cQ) | |
1203 | + | func putOneTknV2 (fN,gQ) = { | |
1204 | + | let hh = { | |
1205 | + | let aT = invoke(aR, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1206 | + | if ($isInstanceOf(aT, "Boolean")) | |
1207 | + | then aT | |
1208 | + | else throw(($getType(aT) + " couldn't be cast to Boolean")) | |
1207 | 1209 | } | |
1208 | - | let | |
1210 | + | let hi = if (if (if (aW()) | |
1209 | 1211 | then true | |
1210 | - | else ( | |
1212 | + | else (bl == r)) | |
1211 | 1213 | then true | |
1212 | - | else ( | |
1214 | + | else (bl == t)) | |
1213 | 1215 | then true | |
1214 | - | else | |
1215 | - | let | |
1216 | + | else hh | |
1217 | + | let gH = [if (if (!(hi)) | |
1216 | 1218 | then true | |
1217 | - | else | |
1219 | + | else gp(cQ)) | |
1218 | 1220 | then true | |
1219 | - | else | |
1221 | + | else aO("put operation is blocked by admin"), if ((size(cQ.payments) == 1)) | |
1220 | 1222 | then true | |
1221 | - | else | |
1222 | - | if (( | |
1223 | + | else aO("exactly 1 payment are expected")] | |
1224 | + | if ((gH == gH)) | |
1223 | 1225 | then { | |
1224 | - | let dj = toBase58String(value(bm)) | |
1225 | 1226 | let dk = toBase58String(value(bn)) | |
1226 | - | let | |
1227 | - | let | |
1227 | + | let dl = toBase58String(value(bo)) | |
1228 | + | let dj = bm | |
1228 | 1229 | let fR = bp | |
1229 | - | let dh = if ((cP.caller == this)) | |
1230 | - | then cP.originCaller | |
1231 | - | else cP.caller | |
1232 | - | let fk = value(cP.payments[0]) | |
1233 | - | let df = toBase58String(value(fk.assetId)) | |
1234 | - | let dL = fk.amount | |
1235 | - | let eR = if ((fk.assetId == bm)) | |
1236 | - | then eK(toBigInt(dL), toBigInt(0), toBigInt(0)) | |
1237 | - | else eK(toBigInt(0), toBigInt(dL), toBigInt(0)) | |
1238 | - | if ((eR == eR)) | |
1230 | + | let fS = bq | |
1231 | + | let di = if ((cQ.caller == this)) | |
1232 | + | then cQ.originCaller | |
1233 | + | else cQ.caller | |
1234 | + | let fl = value(cQ.payments[0]) | |
1235 | + | let dg = toBase58String(value(fl.assetId)) | |
1236 | + | let dM = fl.amount | |
1237 | + | let eS = if ((fl.assetId == bn)) | |
1238 | + | then eL(toBigInt(dM), toBigInt(0), toBigInt(0)) | |
1239 | + | else eL(toBigInt(0), toBigInt(dM), toBigInt(0)) | |
1240 | + | if ((eS == eS)) | |
1239 | 1241 | then { | |
1240 | - | let | |
1241 | - | if (( | |
1242 | + | let hj = fq(dM, dg, toString(di), toBase58String(cQ.transactionId), true) | |
1243 | + | if ((hj == hj)) | |
1242 | 1244 | then { | |
1243 | - | let | |
1244 | - | let | |
1245 | - | let | |
1246 | - | let | |
1247 | - | then ( | |
1245 | + | let cy = hj._3 | |
1246 | + | let dC = hj._2 | |
1247 | + | let hk = hj._1 | |
1248 | + | let em = if (if ((fN > 0)) | |
1249 | + | then (fN > hk) | |
1248 | 1250 | else false) | |
1249 | - | then | |
1250 | - | else | |
1251 | - | let | |
1252 | - | if (( | |
1251 | + | then aO(makeString(["amount to receive is less than ", toString(fN)], "")) | |
1252 | + | else hk | |
1253 | + | let gW = invoke(aR, "emit", [em], nil) | |
1254 | + | if ((gW == gW)) | |
1253 | 1255 | then { | |
1254 | - | let | |
1255 | - | let | |
1256 | - | if ($isInstanceOf( | |
1256 | + | let gY = { | |
1257 | + | let gm = gW | |
1258 | + | if ($isInstanceOf(gm, "Address")) | |
1257 | 1259 | then { | |
1258 | - | let | |
1259 | - | invoke( | |
1260 | + | let gZ = gm | |
1261 | + | invoke(gZ, "emit", [em], nil) | |
1260 | 1262 | } | |
1261 | 1263 | else unit | |
1262 | 1264 | } | |
1263 | - | if (( | |
1265 | + | if ((gY == gY)) | |
1264 | 1266 | then { | |
1265 | - | let | |
1267 | + | let hc = if (gQ) | |
1266 | 1268 | then { | |
1267 | - | let | |
1268 | - | if (( | |
1269 | + | let hd = invoke(bv, "stake", nil, [AttachedPayment(dj, em)]) | |
1270 | + | if ((hd == hd)) | |
1269 | 1271 | then nil | |
1270 | 1272 | else throw("Strict value is not equal to itself.") | |
1271 | 1273 | } | |
1272 | - | else [ScriptTransfer( | |
1273 | - | let | |
1274 | - | then [ScriptTransfer( | |
1274 | + | else [ScriptTransfer(cQ.caller, em, dj)] | |
1275 | + | let gd = if ((cy > 0)) | |
1276 | + | then [ScriptTransfer(aY, cy, fromBase58String(dg))] | |
1275 | 1277 | else nil | |
1276 | - | let | |
1278 | + | let hl = if ((this == aY)) | |
1277 | 1279 | then $Tuple2(0, 0) | |
1278 | 1280 | else { | |
1279 | - | let | |
1281 | + | let hm = if ((fl.assetId == bn)) | |
1280 | 1282 | then true | |
1281 | 1283 | else false | |
1282 | - | if ( | |
1283 | - | then $Tuple2(-( | |
1284 | - | else $Tuple2(0, -( | |
1284 | + | if (hm) | |
1285 | + | then $Tuple2(-(cy), 0) | |
1286 | + | else $Tuple2(0, -(cy)) | |
1285 | 1287 | } | |
1286 | - | let | |
1287 | - | let | |
1288 | - | let | |
1289 | - | let | |
1290 | - | let | |
1291 | - | let | |
1292 | - | if (( | |
1293 | - | then $Tuple2(((( | |
1288 | + | let eU = hl._1 | |
1289 | + | let eV = hl._2 | |
1290 | + | let hn = eT(eU, eV, 0) | |
1291 | + | let gj = hn._1 | |
1292 | + | let eK = hn._2 | |
1293 | + | let gk = eX(eS, eK) | |
1294 | + | if ((gk == gk)) | |
1295 | + | then $Tuple2((((dC ++ hc) ++ gd) ++ gj), em) | |
1294 | 1296 | else throw("Strict value is not equal to itself.") | |
1295 | 1297 | } | |
1296 | 1298 | else throw("Strict value is not equal to itself.") | |
1306 | 1308 | ||
1307 | 1309 | ||
1308 | 1310 | ||
1309 | - | @Callable( | |
1310 | - | func putForFree ( | |
1311 | + | @Callable(cQ) | |
1312 | + | func putForFree (ho) = if ((0 > ho)) | |
1311 | 1313 | then throw("Wrong slpg") | |
1312 | - | else if ((size( | |
1314 | + | else if ((size(cQ.payments) != 2)) | |
1313 | 1315 | then throw("2 pmnts expd") | |
1314 | 1316 | else { | |
1315 | - | let | |
1316 | - | let | |
1317 | - | let | |
1318 | - | let | |
1319 | - | let | |
1320 | - | if (( | |
1317 | + | let hp = fm(toString(cQ.caller), toBase58String(cQ.transactionId), AttachedPayment(value(cQ.payments[0]).assetId, value(cQ.payments[0]).amount), cQ.payments[1], ho, false, false, true, 0, "") | |
1318 | + | let dC = hp._9 | |
1319 | + | let gU = toBigInt(value(cQ.payments[0]).amount) | |
1320 | + | let gV = toBigInt(value(cQ.payments[1]).amount) | |
1321 | + | let eS = eL(gU, gV, toBigInt(0)) | |
1322 | + | if ((eS == eS)) | |
1321 | 1323 | then { | |
1322 | - | let | |
1323 | - | let | |
1324 | - | let | |
1325 | - | let | |
1326 | - | if (( | |
1327 | - | then ( | |
1324 | + | let hq = eT(0, 0, 0) | |
1325 | + | let gj = hq._1 | |
1326 | + | let eK = hq._2 | |
1327 | + | let gk = eX(eS, eK) | |
1328 | + | if ((gk == gk)) | |
1329 | + | then (dC ++ gj) | |
1328 | 1330 | else throw("Strict value is not equal to itself.") | |
1329 | 1331 | } | |
1330 | 1332 | else throw("Strict value is not equal to itself.") | |
1332 | 1334 | ||
1333 | 1335 | ||
1334 | 1336 | ||
1335 | - | @Callable( | |
1337 | + | @Callable(cQ) | |
1336 | 1338 | func get () = { | |
1337 | - | let | |
1338 | - | if (( | |
1339 | + | let eS = eL(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1340 | + | if ((eS == eS)) | |
1339 | 1341 | then { | |
1340 | - | let | |
1341 | - | let | |
1342 | - | let | |
1343 | - | let | |
1344 | - | let | |
1345 | - | let | |
1346 | - | let | |
1347 | - | if (( | |
1342 | + | let dY = fk(cQ) | |
1343 | + | let hr = dY._1 | |
1344 | + | let dB = dY._2 | |
1345 | + | let dM = dY._3 | |
1346 | + | let dg = dY._4 | |
1347 | + | let dC = dY._5 | |
1348 | + | let ez = invoke(aR, "burn", [dM], [AttachedPayment(dg, dM)]) | |
1349 | + | if ((ez == ez)) | |
1348 | 1350 | then { | |
1349 | - | let | |
1350 | - | let | |
1351 | - | let | |
1352 | - | let | |
1353 | - | if (( | |
1354 | - | then ( | |
1351 | + | let hs = eT(-(hr), -(dB), 0) | |
1352 | + | let gj = hs._1 | |
1353 | + | let eK = hs._2 | |
1354 | + | let gk = eX(eS, eK) | |
1355 | + | if ((gk == gk)) | |
1356 | + | then (dC ++ gj) | |
1355 | 1357 | else throw("Strict value is not equal to itself.") | |
1356 | 1358 | } | |
1357 | 1359 | else throw("Strict value is not equal to itself.") | |
1361 | 1363 | ||
1362 | 1364 | ||
1363 | 1365 | ||
1364 | - | @Callable( | |
1365 | - | func getOneTknV2 ( | |
1366 | - | let | |
1367 | - | let | |
1368 | - | if ($isInstanceOf( | |
1369 | - | then | |
1370 | - | else throw(($getType( | |
1366 | + | @Callable(cQ) | |
1367 | + | func getOneTknV2 (fM,fN) = { | |
1368 | + | let hh = { | |
1369 | + | let aT = invoke(aR, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1370 | + | if ($isInstanceOf(aT, "Boolean")) | |
1371 | + | then aT | |
1372 | + | else throw(($getType(aT) + " couldn't be cast to Boolean")) | |
1371 | 1373 | } | |
1372 | - | let | |
1374 | + | let ht = if (if (aW()) | |
1373 | 1375 | then true | |
1374 | - | else ( | |
1376 | + | else (bl == t)) | |
1375 | 1377 | then true | |
1376 | - | else | |
1377 | - | let | |
1378 | + | else hh | |
1379 | + | let gH = [if (if (!(ht)) | |
1378 | 1380 | then true | |
1379 | - | else | |
1381 | + | else gp(cQ)) | |
1380 | 1382 | then true | |
1381 | - | else | |
1383 | + | else aO("get operation is blocked by admin"), if ((size(cQ.payments) == 1)) | |
1382 | 1384 | then true | |
1383 | - | else | |
1384 | - | if (( | |
1385 | + | else aO("exactly 1 payment are expected")] | |
1386 | + | if ((gH == gH)) | |
1385 | 1387 | then { | |
1386 | - | let | |
1387 | - | let | |
1388 | - | let | |
1389 | - | $Tuple2( | |
1388 | + | let hu = fL(fM, fN, cQ.payments, cQ.caller, cQ.originCaller, cQ.transactionId) | |
1389 | + | let dC = hu._1 | |
1390 | + | let fW = hu._2 | |
1391 | + | $Tuple2(dC, fW) | |
1390 | 1392 | } | |
1391 | 1393 | else throw("Strict value is not equal to itself.") | |
1392 | 1394 | } | |
1393 | 1395 | ||
1394 | 1396 | ||
1395 | 1397 | ||
1396 | - | @Callable( | |
1398 | + | @Callable(cQ) | |
1397 | 1399 | func refreshDLp () = { | |
1398 | - | let | |
1399 | - | let | |
1400 | + | let hv = valueOrElse(getInteger(ar), 0) | |
1401 | + | let hw = if (((height - hv) >= au)) | |
1400 | 1402 | then unit | |
1401 | - | else | |
1402 | - | if (( | |
1403 | + | else aO(makeString([toString(au), " blocks have not passed since the previous call"], "")) | |
1404 | + | if ((hw == hw)) | |
1403 | 1405 | then { | |
1404 | - | let | |
1405 | - | let | |
1406 | - | let | |
1407 | - | let | |
1408 | - | let | |
1409 | - | then | |
1410 | - | else | |
1411 | - | $Tuple2( | |
1406 | + | let fe = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, aq), "0")), aQ("invalid dLp")) | |
1407 | + | let hx = eT(0, 0, 0) | |
1408 | + | let hy = hx._1 | |
1409 | + | let eK = hx._2 | |
1410 | + | let eW = if ((fe != eK)) | |
1411 | + | then hy | |
1412 | + | else aO("nothing to refresh") | |
1413 | + | $Tuple2(eW, toString(eK)) | |
1412 | 1414 | } | |
1413 | 1415 | else throw("Strict value is not equal to itself.") | |
1414 | 1416 | } | |
1415 | 1417 | ||
1416 | 1418 | ||
1417 | 1419 | ||
1418 | - | @Callable(cP) | |
1419 | - | func getOneTknV2READONLY (fL,hy) = { | |
1420 | + | @Callable(cQ) | |
1421 | + | func getOneTknV2READONLY (fM,hz) = { | |
1422 | + | let dk = toBase58String(value(bn)) | |
1423 | + | let dl = toBase58String(value(bo)) | |
1420 | 1424 | let dj = toBase58String(value(bm)) | |
1421 | - | let dk = toBase58String(value(bn)) | |
1422 | - | let di = toBase58String(value(bl)) | |
1423 | - | let cz = [toBigInt(bN(dj)), toBigInt(bN(dk))] | |
1424 | - | let eI = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(di)), "invalid lp asset").quantity) | |
1425 | - | let cb = cy(cz) | |
1426 | - | let ca = (cb - fraction(toBigInt(hy), cb, eI)) | |
1427 | - | let hz = if ((fL == dj)) | |
1425 | + | let cA = [toBigInt(bO(dk)), toBigInt(bO(dl))] | |
1426 | + | let eJ = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(dj)), "invalid lp asset").quantity) | |
1427 | + | let cc = cz(cA) | |
1428 | + | let cb = (cc - fraction(toBigInt(hz), cc, eJ)) | |
1429 | + | let hA = if ((fM == dk)) | |
1428 | 1430 | then 0 | |
1429 | - | else if (( | |
1431 | + | else if ((fM == dl)) | |
1430 | 1432 | then 1 | |
1431 | 1433 | else throw("invalid out asset id") | |
1432 | - | let | |
1433 | - | let | |
1434 | - | let | |
1435 | - | let | |
1436 | - | let | |
1437 | - | let | |
1438 | - | $Tuple2(nil, $Tuple2( | |
1434 | + | let hB = et(cA, hA, cb) | |
1435 | + | let gA = (cA[hA] - hB) | |
1436 | + | let gB = max([0, toInt((gA - f))]) | |
1437 | + | let hC = cw(gB, aU) | |
1438 | + | let fV = hC._1 | |
1439 | + | let cy = hC._2 | |
1440 | + | $Tuple2(nil, $Tuple2(fV, cy)) | |
1439 | 1441 | } | |
1440 | 1442 | ||
1441 | 1443 | ||
1442 | 1444 | ||
1443 | - | @Callable(cP) | |
1444 | - | func getOneTknV2WithBonusREADONLY (fL,hy) = { | |
1445 | + | @Callable(cQ) | |
1446 | + | func getOneTknV2WithBonusREADONLY (fM,hz) = { | |
1447 | + | let dk = toBase58String(value(bn)) | |
1448 | + | let dl = toBase58String(value(bo)) | |
1445 | 1449 | let dj = toBase58String(value(bm)) | |
1446 | - | let dk = toBase58String(value(bn)) | |
1447 | - | let di = toBase58String(value(bl)) | |
1448 | - | let dp = bN(dj) | |
1449 | - | let dr = bN(dk) | |
1450 | - | let hC = { | |
1451 | - | let aS = invoke(this, "getOneTknV2READONLY", [fL, hy], nil) | |
1452 | - | if ($isInstanceOf(aS, "(Int, Int)")) | |
1453 | - | then aS | |
1454 | - | else throw(($getType(aS) + " couldn't be cast to (Int, Int)")) | |
1450 | + | let dq = bO(dk) | |
1451 | + | let ds = bO(dl) | |
1452 | + | let hD = { | |
1453 | + | let aT = invoke(this, "getOneTknV2READONLY", [fM, hz], nil) | |
1454 | + | if ($isInstanceOf(aT, "(Int, Int)")) | |
1455 | + | then aT | |
1456 | + | else throw(($getType(aT) + " couldn't be cast to (Int, Int)")) | |
1455 | 1457 | } | |
1456 | - | let | |
1457 | - | let | |
1458 | - | let | |
1459 | - | let | |
1460 | - | let | |
1461 | - | let | |
1462 | - | let | |
1463 | - | then if (( | |
1458 | + | let fV = hD._1 | |
1459 | + | let cy = hD._2 | |
1460 | + | let dY = de("", dj, hz, this) | |
1461 | + | let dA = dY._1 | |
1462 | + | let dB = dY._2 | |
1463 | + | let hE = (dA + dB) | |
1464 | + | let fK = if ((hE == 0)) | |
1465 | + | then if ((fV == 0)) | |
1464 | 1466 | then 0 | |
1465 | 1467 | else throw("bonus calculation error") | |
1466 | - | else fraction(( | |
1467 | - | $Tuple2(nil, $Tuple3( | |
1468 | + | else fraction((fV - hE), a, hE) | |
1469 | + | $Tuple2(nil, $Tuple3(fV, cy, fK)) | |
1468 | 1470 | } | |
1469 | 1471 | ||
1470 | 1472 | ||
1471 | 1473 | ||
1472 | - | @Callable( | |
1473 | - | func getNoLess ( | |
1474 | - | let | |
1475 | - | let | |
1476 | - | let | |
1477 | - | let | |
1478 | - | let | |
1479 | - | let | |
1480 | - | if (( | |
1481 | - | then throw(((("Failed: " + toString( | |
1482 | - | else if (( | |
1483 | - | then throw(((("Failed: " + toString( | |
1474 | + | @Callable(cQ) | |
1475 | + | func getNoLess (hF,hG) = { | |
1476 | + | let dY = fk(cQ) | |
1477 | + | let dA = dY._1 | |
1478 | + | let dB = dY._2 | |
1479 | + | let dM = dY._3 | |
1480 | + | let dg = dY._4 | |
1481 | + | let dC = dY._5 | |
1482 | + | if ((hF > dA)) | |
1483 | + | then throw(((("Failed: " + toString(dA)) + " < ") + toString(hF))) | |
1484 | + | else if ((hG > dB)) | |
1485 | + | then throw(((("Failed: " + toString(dB)) + " < ") + toString(hG))) | |
1484 | 1486 | else { | |
1485 | - | let | |
1486 | - | if (( | |
1487 | + | let eS = eL(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1488 | + | if ((eS == eS)) | |
1487 | 1489 | then { | |
1488 | - | let | |
1489 | - | if (( | |
1490 | + | let hH = invoke(aR, "burn", [dM], [AttachedPayment(dg, dM)]) | |
1491 | + | if ((hH == hH)) | |
1490 | 1492 | then { | |
1491 | - | let | |
1492 | - | let | |
1493 | - | let | |
1494 | - | let | |
1495 | - | if (( | |
1496 | - | then ( | |
1493 | + | let hI = eT(-(dA), -(dB), 0) | |
1494 | + | let gj = hI._1 | |
1495 | + | let eK = hI._2 | |
1496 | + | let gk = eX(eS, eK) | |
1497 | + | if ((gk == gk)) | |
1498 | + | then (dC ++ gj) | |
1497 | 1499 | else throw("Strict value is not equal to itself.") | |
1498 | 1500 | } | |
1499 | 1501 | else throw("Strict value is not equal to itself.") | |
1504 | 1506 | ||
1505 | 1507 | ||
1506 | 1508 | ||
1507 | - | @Callable( | |
1508 | - | func unstakeAndGet ( | |
1509 | - | let | |
1509 | + | @Callable(cQ) | |
1510 | + | func unstakeAndGet (cx) = { | |
1511 | + | let hJ = if ((size(cQ.payments) != 0)) | |
1510 | 1512 | then throw("No pmnts expd") | |
1511 | 1513 | else true | |
1512 | - | if (( | |
1514 | + | if ((hJ == hJ)) | |
1513 | 1515 | then { | |
1514 | - | let | |
1515 | - | let | |
1516 | - | let | |
1517 | - | let | |
1518 | - | if (( | |
1516 | + | let hK = bt() | |
1517 | + | let gX = bm | |
1518 | + | let hL = valueOrErrorMessage(addressFromString(hK[D]), "Wr st addr") | |
1519 | + | let eS = eL(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1520 | + | if ((eS == eS)) | |
1519 | 1521 | then { | |
1520 | - | let | |
1521 | - | if (( | |
1522 | + | let hM = invoke(hL, "unstake", [toBase58String(gX), cx], nil) | |
1523 | + | if ((hM == hM)) | |
1522 | 1524 | then { | |
1523 | - | let | |
1524 | - | let | |
1525 | - | let | |
1526 | - | let | |
1527 | - | let | |
1528 | - | let | |
1525 | + | let dY = de(toBase58String(cQ.transactionId), toBase58String(gX), cx, cQ.caller) | |
1526 | + | let dA = dY._1 | |
1527 | + | let dB = dY._2 | |
1528 | + | let do = parseIntValue(dY._9) | |
1529 | + | let dC = dY._10 | |
1530 | + | let hN = if (if (aW()) | |
1529 | 1531 | then true | |
1530 | - | else ( | |
1531 | - | then throw(("Blocked: " + toString( | |
1532 | + | else (do == t)) | |
1533 | + | then throw(("Blocked: " + toString(do))) | |
1532 | 1534 | else true | |
1533 | - | if (( | |
1535 | + | if ((hN == hN)) | |
1534 | 1536 | then { | |
1535 | - | let | |
1536 | - | if (( | |
1537 | + | let hO = invoke(aR, "burn", [cx], [AttachedPayment(gX, cx)]) | |
1538 | + | if ((hO == hO)) | |
1537 | 1539 | then { | |
1538 | - | let | |
1539 | - | let | |
1540 | - | let | |
1541 | - | let | |
1542 | - | if (( | |
1543 | - | then ( | |
1540 | + | let hP = eT(-(dA), -(dB), 0) | |
1541 | + | let gj = hP._1 | |
1542 | + | let eK = hP._2 | |
1543 | + | let gk = eX(eS, eK) | |
1544 | + | if ((gk == gk)) | |
1545 | + | then (dC ++ gj) | |
1544 | 1546 | else throw("Strict value is not equal to itself.") | |
1545 | 1547 | } | |
1546 | 1548 | else throw("Strict value is not equal to itself.") | |
1556 | 1558 | ||
1557 | 1559 | ||
1558 | 1560 | ||
1559 | - | @Callable( | |
1560 | - | func unstakeAndGetNoLess ( | |
1561 | - | let | |
1561 | + | @Callable(cQ) | |
1562 | + | func unstakeAndGetNoLess (hQ,hR,hG) = { | |
1563 | + | let ht = if (aW()) | |
1562 | 1564 | then true | |
1563 | - | else ( | |
1564 | - | let | |
1565 | + | else (bl == t) | |
1566 | + | let gH = [if (!(ht)) | |
1565 | 1567 | then true | |
1566 | - | else throw("get operation is blocked by admin"), if ((size( | |
1568 | + | else throw("get operation is blocked by admin"), if ((size(cQ.payments) == 0)) | |
1567 | 1569 | then true | |
1568 | 1570 | else throw("no payments are expected")] | |
1569 | - | if (( | |
1571 | + | if ((gH == gH)) | |
1570 | 1572 | then { | |
1571 | - | let | |
1572 | - | if (( | |
1573 | + | let eS = eL(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1574 | + | if ((eS == eS)) | |
1573 | 1575 | then { | |
1574 | - | let | |
1575 | - | if (( | |
1576 | + | let hM = invoke(bv, "unstake", [toBase58String(bm), hQ], nil) | |
1577 | + | if ((hM == hM)) | |
1576 | 1578 | then { | |
1577 | - | let | |
1578 | - | let | |
1579 | - | let | |
1580 | - | let | |
1581 | - | let | |
1579 | + | let hS = de(toBase58String(cQ.transactionId), toBase58String(bm), hQ, cQ.caller) | |
1580 | + | let dA = hS._1 | |
1581 | + | let dB = hS._2 | |
1582 | + | let dC = hS._10 | |
1583 | + | let hT = [if ((dA >= hR)) | |
1582 | 1584 | then true | |
1583 | - | else throw(makeString(["amount asset amount to receive is less than ", toString( | |
1585 | + | else throw(makeString(["amount asset amount to receive is less than ", toString(hR)], "")), if ((dB >= hG)) | |
1584 | 1586 | then true | |
1585 | - | else throw(makeString(["price asset amount to receive is less than ", toString( | |
1586 | - | if (( | |
1587 | + | else throw(makeString(["price asset amount to receive is less than ", toString(hG)], ""))] | |
1588 | + | if ((hT == hT)) | |
1587 | 1589 | then { | |
1588 | - | let | |
1589 | - | if (( | |
1590 | + | let hH = invoke(aR, "burn", [hQ], [AttachedPayment(bm, hQ)]) | |
1591 | + | if ((hH == hH)) | |
1590 | 1592 | then { | |
1591 | - | let | |
1592 | - | let | |
1593 | - | let | |
1594 | - | let | |
1595 | - | if (( | |
1596 | - | then ( | |
1593 | + | let hU = eT(-(dA), -(dB), 0) | |
1594 | + | let gj = hU._1 | |
1595 | + | let eK = hU._2 | |
1596 | + | let gk = eX(eS, eK) | |
1597 | + | if ((gk == gk)) | |
1598 | + | then (dC ++ gj) | |
1597 | 1599 | else throw("Strict value is not equal to itself.") | |
1598 | 1600 | } | |
1599 | 1601 | else throw("Strict value is not equal to itself.") | |
1609 | 1611 | ||
1610 | 1612 | ||
1611 | 1613 | ||
1612 | - | @Callable( | |
1613 | - | func unstakeAndGetOneTknV2 ( | |
1614 | - | let | |
1615 | - | let | |
1616 | - | if ($isInstanceOf( | |
1617 | - | then | |
1618 | - | else throw(($getType( | |
1614 | + | @Callable(cQ) | |
1615 | + | func unstakeAndGetOneTknV2 (hQ,fM,fN) = { | |
1616 | + | let hh = { | |
1617 | + | let aT = invoke(aR, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1618 | + | if ($isInstanceOf(aT, "Boolean")) | |
1619 | + | then aT | |
1620 | + | else throw(($getType(aT) + " couldn't be cast to Boolean")) | |
1619 | 1621 | } | |
1620 | - | let | |
1622 | + | let ht = if (if (aW()) | |
1621 | 1623 | then true | |
1622 | - | else ( | |
1624 | + | else (bl == t)) | |
1623 | 1625 | then true | |
1624 | - | else | |
1625 | - | let | |
1626 | + | else hh | |
1627 | + | let gH = [if (if (!(ht)) | |
1626 | 1628 | then true | |
1627 | - | else | |
1629 | + | else gp(cQ)) | |
1628 | 1630 | then true | |
1629 | - | else | |
1631 | + | else aO("get operation is blocked by admin"), if ((size(cQ.payments) == 0)) | |
1630 | 1632 | then true | |
1631 | - | else | |
1632 | - | if (( | |
1633 | + | else aO("no payments are expected")] | |
1634 | + | if ((gH == gH)) | |
1633 | 1635 | then { | |
1634 | - | let | |
1635 | - | let | |
1636 | - | let | |
1637 | - | let | |
1638 | - | if (( | |
1636 | + | let hK = bt() | |
1637 | + | let gX = bm | |
1638 | + | let hL = valueOrErrorMessage(addressFromString(hK[D]), "Wr st addr") | |
1639 | + | let hM = invoke(hL, "unstake", [toBase58String(gX), hQ], nil) | |
1640 | + | if ((hM == hM)) | |
1639 | 1641 | then { | |
1640 | - | let | |
1641 | - | let | |
1642 | - | let | |
1643 | - | $Tuple2( | |
1642 | + | let hV = fL(fM, fN, [AttachedPayment(gX, hQ)], cQ.caller, cQ.originCaller, cQ.transactionId) | |
1643 | + | let dC = hV._1 | |
1644 | + | let fW = hV._2 | |
1645 | + | $Tuple2(dC, fW) | |
1644 | 1646 | } | |
1645 | 1647 | else throw("Strict value is not equal to itself.") | |
1646 | 1648 | } | |
1649 | 1651 | ||
1650 | 1652 | ||
1651 | 1653 | ||
1652 | - | @Callable( | |
1653 | - | func putOneTknV2WithBonusREADONLY ( | |
1654 | - | let | |
1655 | - | let | |
1656 | - | let | |
1657 | - | let | |
1658 | - | let | |
1659 | - | $Tuple2(nil, $Tuple3( | |
1654 | + | @Callable(cQ) | |
1655 | + | func putOneTknV2WithBonusREADONLY (hW,hX) = { | |
1656 | + | let hY = fq(hW, hX, "", "", true) | |
1657 | + | let fF = hY._1 | |
1658 | + | let dC = hY._2 | |
1659 | + | let cy = hY._3 | |
1660 | + | let fK = hY._4 | |
1661 | + | $Tuple2(nil, $Tuple3(fF, cy, fK)) | |
1660 | 1662 | } | |
1661 | 1663 | ||
1662 | 1664 | ||
1663 | 1665 | ||
1664 | - | @Callable( | |
1665 | - | func putOneTknV2WithoutTakeFeeREADONLY ( | |
1666 | - | let | |
1667 | - | let | |
1668 | - | let | |
1669 | - | let | |
1670 | - | let | |
1671 | - | $Tuple2(nil, $Tuple3( | |
1666 | + | @Callable(cQ) | |
1667 | + | func putOneTknV2WithoutTakeFeeREADONLY (hW,hX) = { | |
1668 | + | let hZ = fq(hW, hX, "", "", false) | |
1669 | + | let fF = hZ._1 | |
1670 | + | let dC = hZ._2 | |
1671 | + | let cy = hZ._3 | |
1672 | + | let fK = hZ._4 | |
1673 | + | $Tuple2(nil, $Tuple3(fF, cy, fK)) | |
1672 | 1674 | } | |
1673 | 1675 | ||
1674 | 1676 | ||
1675 | 1677 | ||
1676 | - | @Callable( | |
1677 | - | func activate ( | |
1678 | + | @Callable(cQ) | |
1679 | + | func activate (ia,ib) = if ((toString(cQ.caller) != toString(aR))) | |
1678 | 1680 | then throw("denied") | |
1679 | - | else $Tuple2([StringEntry( | |
1681 | + | else $Tuple2([StringEntry(ak(), ia), StringEntry(al(), ib)], "success") | |
1680 | 1682 | ||
1681 | 1683 | ||
1682 | 1684 | ||
1683 | - | @Callable( | |
1684 | - | func setS ( | |
1685 | - | then | |
1686 | - | else [StringEntry( | |
1685 | + | @Callable(cQ) | |
1686 | + | func setS (ic,hN) = if ((toString(cQ.caller) != aK(this, an()))) | |
1687 | + | then go | |
1688 | + | else [StringEntry(ic, hN)] | |
1687 | 1689 | ||
1688 | 1690 | ||
1689 | 1691 | ||
1690 | - | @Callable( | |
1691 | - | func setI ( | |
1692 | - | then | |
1693 | - | else [IntegerEntry( | |
1692 | + | @Callable(cQ) | |
1693 | + | func setI (ic,hN) = if ((toString(cQ.caller) != aK(this, an()))) | |
1694 | + | then go | |
1695 | + | else [IntegerEntry(ic, hN)] | |
1694 | 1696 | ||
1695 | 1697 | ||
1696 | 1698 | ||
1697 | - | @Callable( | |
1698 | - | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, | |
1699 | + | @Callable(cQ) | |
1700 | + | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aZ()) | |
1699 | 1701 | ||
1700 | 1702 | ||
1701 | 1703 | ||
1702 | - | @Callable( | |
1703 | - | func getAccBalanceWrapperREADONLY ( | |
1704 | + | @Callable(cQ) | |
1705 | + | func getAccBalanceWrapperREADONLY (bP) = $Tuple2(nil, bO(bP)) | |
1704 | 1706 | ||
1705 | 1707 | ||
1706 | 1708 | ||
1707 | - | @Callable( | |
1708 | - | func calcPricesWrapperREADONLY ( | |
1709 | - | let | |
1710 | - | $Tuple2(nil, [toString( | |
1709 | + | @Callable(cQ) | |
1710 | + | func calcPricesWrapperREADONLY (ci,cj,cn) = { | |
1711 | + | let id = cm(ci, cj, cn) | |
1712 | + | $Tuple2(nil, [toString(id[0]), toString(id[1]), toString(id[2])]) | |
1711 | 1713 | } | |
1712 | 1714 | ||
1713 | 1715 | ||
1714 | 1716 | ||
1715 | - | @Callable( | |
1716 | - | func fromX18WrapperREADONLY ( | |
1717 | + | @Callable(cQ) | |
1718 | + | func fromX18WrapperREADONLY (N,ie) = $Tuple2(nil, M(parseBigIntValue(N), ie)) | |
1717 | 1719 | ||
1718 | 1720 | ||
1719 | 1721 | ||
1720 | - | @Callable( | |
1721 | - | func toX18WrapperREADONLY ( | |
1722 | + | @Callable(cQ) | |
1723 | + | func toX18WrapperREADONLY (J,K) = $Tuple2(nil, toString(I(J, K))) | |
1722 | 1724 | ||
1723 | 1725 | ||
1724 | 1726 | ||
1725 | - | @Callable( | |
1726 | - | func calcPriceBigIntWrapperREADONLY ( | |
1727 | + | @Callable(cQ) | |
1728 | + | func calcPriceBigIntWrapperREADONLY (bR,bS) = $Tuple2(nil, toString(bQ(parseBigIntValue(bR), parseBigIntValue(bS)))) | |
1727 | 1729 | ||
1728 | 1730 | ||
1729 | 1731 | ||
1730 | - | @Callable( | |
1731 | - | func estimatePutOperationWrapperREADONLY ( | |
1732 | + | @Callable(cQ) | |
1733 | + | func estimatePutOperationWrapperREADONLY (df,bX,dE,dF,dG,dH,if,dI,dJ) = $Tuple2(nil, dD(df, bX, dE, dF, dG, dH, if, dI, dJ, true, false, 0, "")) | |
1732 | 1734 | ||
1733 | 1735 | ||
1734 | 1736 | ||
1735 | - | @Callable( | |
1736 | - | func estimateGetOperationWrapperREADONLY ( | |
1737 | - | let | |
1738 | - | $Tuple2(nil, $Tuple10( | |
1737 | + | @Callable(cQ) | |
1738 | + | func estimateGetOperationWrapperREADONLY (df,ig,dh,if) = { | |
1739 | + | let dY = de(df, ig, dh, addressFromStringValue(if)) | |
1740 | + | $Tuple2(nil, $Tuple10(dY._1, dY._2, dY._3, dY._4, dY._5, dY._6, dY._7, toString(dY._8), dY._9, dY._10)) | |
1739 | 1741 | } | |
1740 | 1742 | ||
1741 | 1743 | ||
1742 | - | @Verifier( | |
1743 | - | func | |
1744 | - | let | |
1745 | - | let | |
1746 | - | if ($isInstanceOf( | |
1744 | + | @Verifier(ih) | |
1745 | + | func ii () = { | |
1746 | + | let ij = { | |
1747 | + | let gm = gl() | |
1748 | + | if ($isInstanceOf(gm, "ByteVector")) | |
1747 | 1749 | then { | |
1748 | - | let | |
1749 | - | | |
1750 | + | let gq = gm | |
1751 | + | gq | |
1750 | 1752 | } | |
1751 | - | else if ($isInstanceOf( | |
1752 | - | then | |
1753 | + | else if ($isInstanceOf(gm, "Unit")) | |
1754 | + | then ih.senderPublicKey | |
1753 | 1755 | else throw("Match error") | |
1754 | 1756 | } | |
1755 | - | let | |
1756 | - | if ($isInstanceOf( | |
1757 | + | let gm = ih | |
1758 | + | if ($isInstanceOf(gm, "Order")) | |
1757 | 1759 | then { | |
1758 | - | let eZ = gl | |
1759 | - | let ij = aW() | |
1760 | - | let ik = eY(eZ) | |
1761 | - | let aF = ik._1 | |
1762 | - | let aG = ik._2 | |
1763 | - | let aH = sigVerify(eZ.bodyBytes, eZ.proofs[0], eZ.senderPublicKey) | |
1764 | - | let aI = sigVerify(eZ.bodyBytes, eZ.proofs[1], ij) | |
1765 | - | if (if (if (aF) | |
1766 | - | then aH | |
1767 | - | else false) | |
1760 | + | let fa = gm | |
1761 | + | let ik = aX() | |
1762 | + | let il = eZ(fa) | |
1763 | + | let aG = il._1 | |
1764 | + | let aH = il._2 | |
1765 | + | let aI = sigVerify(fa.bodyBytes, fa.proofs[0], fa.senderPublicKey) | |
1766 | + | let aJ = sigVerify(fa.bodyBytes, fa.proofs[1], ik) | |
1767 | + | if (if (if (aG) | |
1768 | 1768 | then aI | |
1769 | 1769 | else false) | |
1770 | + | then aJ | |
1771 | + | else false) | |
1770 | 1772 | then true | |
1771 | - | else | |
1773 | + | else aF(aG, aH, aI, aJ) | |
1772 | 1774 | } | |
1773 | - | else if ($isInstanceOf( | |
1775 | + | else if ($isInstanceOf(gm, "SetScriptTransaction")) | |
1774 | 1776 | then { | |
1775 | - | let | |
1776 | - | if (sigVerify( | |
1777 | + | let cD = gm | |
1778 | + | if (sigVerify(ih.bodyBytes, ih.proofs[0], ij)) | |
1777 | 1779 | then true | |
1778 | 1780 | else { | |
1779 | - | let | |
1780 | - | let | |
1781 | - | let | |
1782 | - | if (( | |
1783 | - | then ( | |
1781 | + | let im = blake2b256(value(cD.script)) | |
1782 | + | let in = fromBase64String(value(getString(aR, aD()))) | |
1783 | + | let io = scriptHash(this) | |
1784 | + | if ((in == im)) | |
1785 | + | then (io != im) | |
1784 | 1786 | else false | |
1785 | 1787 | } | |
1786 | 1788 | } | |
1787 | - | else sigVerify( | |
1789 | + | else sigVerify(ih.bodyBytes, ih.proofs[0], ij) | |
1788 | 1790 | } | |
1789 | 1791 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = 100000000 | |
5 | 5 | ||
6 | 6 | let b = toBigInt(100000000) | |
7 | 7 | ||
8 | 8 | let c = toBigInt(1000000000000000000) | |
9 | 9 | ||
10 | 10 | let d = toBigInt(0) | |
11 | 11 | ||
12 | 12 | let e = toBigInt(0) | |
13 | 13 | ||
14 | 14 | let f = toBigInt(1) | |
15 | 15 | ||
16 | 16 | let g = toBigInt(2) | |
17 | 17 | ||
18 | 18 | let h = toBigInt(3) | |
19 | 19 | ||
20 | 20 | let i = toBigInt(4) | |
21 | 21 | ||
22 | 22 | let j = toBigInt((a - ((a * 1) / a))) | |
23 | 23 | ||
24 | 24 | let k = "WAVES" | |
25 | 25 | ||
26 | - | let l = | |
26 | + | let l = 1 | |
27 | 27 | ||
28 | - | let m = " | |
28 | + | let m = "100" | |
29 | 29 | ||
30 | - | let n = " | |
30 | + | let n = "1" | |
31 | 31 | ||
32 | - | let o = "" | |
32 | + | let o = "__" | |
33 | 33 | ||
34 | - | let p = | |
34 | + | let p = "" | |
35 | 35 | ||
36 | - | let q = | |
36 | + | let q = 1 | |
37 | 37 | ||
38 | - | let r = | |
38 | + | let r = 2 | |
39 | 39 | ||
40 | - | let s = | |
40 | + | let s = 3 | |
41 | 41 | ||
42 | - | let t = | |
42 | + | let t = 4 | |
43 | 43 | ||
44 | - | let u = | |
44 | + | let u = 1 | |
45 | 45 | ||
46 | - | let v = | |
46 | + | let v = 2 | |
47 | 47 | ||
48 | - | let w = | |
48 | + | let w = 3 | |
49 | 49 | ||
50 | - | let x = | |
50 | + | let x = 4 | |
51 | 51 | ||
52 | - | let y = | |
52 | + | let y = 5 | |
53 | 53 | ||
54 | - | let z = | |
54 | + | let z = 6 | |
55 | 55 | ||
56 | - | let A = | |
56 | + | let A = 7 | |
57 | 57 | ||
58 | - | let B = | |
58 | + | let B = 8 | |
59 | 59 | ||
60 | - | let C = | |
60 | + | let C = 9 | |
61 | 61 | ||
62 | - | let D = | |
62 | + | let D = 1 | |
63 | 63 | ||
64 | - | let E = | |
64 | + | let E = 6 | |
65 | 65 | ||
66 | - | let F = | |
66 | + | let F = 7 | |
67 | 67 | ||
68 | - | let G = | |
68 | + | let G = 10 | |
69 | 69 | ||
70 | - | func H (I,J) = fraction(toBigInt(I), c, toBigInt(J)) | |
70 | + | let H = fraction(10, a, 10000) | |
71 | + | ||
72 | + | func I (J,K) = fraction(toBigInt(J), c, toBigInt(K)) | |
71 | 73 | ||
72 | 74 | ||
73 | - | func | |
75 | + | func L (J,K) = fraction(J, c, K) | |
74 | 76 | ||
75 | 77 | ||
76 | - | func | |
78 | + | func M (N,O) = toInt(fraction(N, toBigInt(O), c)) | |
77 | 79 | ||
78 | 80 | ||
79 | - | func | |
81 | + | func P (N,O,Q) = toInt(fraction(N, toBigInt(O), c, Q)) | |
80 | 82 | ||
81 | 83 | ||
82 | - | func | |
84 | + | func R (J,K) = fraction(J, c, toBigInt(K)) | |
83 | 85 | ||
84 | 86 | ||
85 | - | func | |
87 | + | func S (N,O) = fraction(N, toBigInt(O), c) | |
86 | 88 | ||
87 | 89 | ||
88 | - | func | |
90 | + | func T (U,V,W) = fraction(U, V, W) | |
89 | 91 | ||
90 | 92 | ||
91 | - | func | |
92 | - | then -( | |
93 | - | else | |
93 | + | func X (N) = if ((d > N)) | |
94 | + | then -(N) | |
95 | + | else N | |
94 | 96 | ||
95 | 97 | ||
96 | - | func | |
97 | - | then -( | |
98 | - | else | |
98 | + | func Y (N) = if ((d > N)) | |
99 | + | then -(N) | |
100 | + | else N | |
99 | 101 | ||
100 | 102 | ||
101 | - | func | |
103 | + | func Z () = "%s__factoryContract" | |
102 | 104 | ||
103 | 105 | ||
104 | - | func | |
106 | + | func aa () = "%s__managerPublicKey" | |
105 | 107 | ||
106 | 108 | ||
107 | - | func | |
109 | + | func ab () = "%s__pendingManagerPublicKey" | |
108 | 110 | ||
109 | 111 | ||
110 | - | func | |
112 | + | func ac () = "%s%s__price__last" | |
111 | 113 | ||
112 | 114 | ||
113 | - | func | |
115 | + | func ad (ae,af) = makeString(["%s%s%d%d__price__history", toString(ae), toString(af)], o) | |
114 | 116 | ||
115 | 117 | ||
116 | - | func | |
118 | + | func ag (ah,ai) = ((("%s%s%s__P__" + ah) + "__") + ai) | |
117 | 119 | ||
118 | 120 | ||
119 | - | func | |
121 | + | func aj (ah,ai) = ((("%s%s%s__G__" + ah) + "__") + ai) | |
120 | 122 | ||
121 | 123 | ||
122 | - | func | |
124 | + | func ak () = "%s__amountAsset" | |
123 | 125 | ||
124 | 126 | ||
125 | - | func | |
127 | + | func al () = "%s__priceAsset" | |
126 | 128 | ||
127 | 129 | ||
128 | - | func | |
130 | + | func am () = "%s__amp" | |
129 | 131 | ||
130 | 132 | ||
131 | - | func | |
133 | + | func an () = "%s__addonAddr" | |
132 | 134 | ||
133 | 135 | ||
134 | - | let | |
136 | + | let ao = "%s__fee" | |
135 | 137 | ||
136 | - | let | |
138 | + | let ap = valueOrElse(getInteger(this, ao), H) | |
137 | 139 | ||
138 | - | let | |
140 | + | let aq = makeString(["%s", "dLp"], o) | |
139 | 141 | ||
140 | - | let | |
142 | + | let ar = makeString(["%s", "dLpRefreshedHeight"], o) | |
141 | 143 | ||
142 | - | let | |
144 | + | let as = makeString(["%s", "refreshDLpDelay"], o) | |
143 | 145 | ||
144 | - | let | |
146 | + | let at = 30 | |
145 | 147 | ||
146 | - | let | |
148 | + | let au = valueOrElse(getInteger(this, as), at) | |
147 | 149 | ||
148 | - | func | |
150 | + | func av () = "%s__factoryConfig" | |
149 | 151 | ||
150 | 152 | ||
151 | - | func | |
153 | + | func aw () = "%s%s__matcher__publicKey" | |
152 | 154 | ||
153 | 155 | ||
154 | - | func | |
156 | + | func ax (ay,az) = (((("%d%d%s__" + ay) + "__") + az) + "__config") | |
155 | 157 | ||
156 | 158 | ||
157 | - | func | |
159 | + | func aA (aB) = ("%s%s%s__mappings__baseAsset2internalId__" + aB) | |
158 | 160 | ||
159 | 161 | ||
160 | - | func | |
162 | + | func aC () = "%s__shutdown" | |
161 | 163 | ||
162 | 164 | ||
163 | - | func | |
165 | + | func aD () = "%s__allowedLpStableScriptHash" | |
164 | 166 | ||
165 | 167 | ||
166 | - | func | |
168 | + | func aE () = "%s__feeCollectorAddress" | |
167 | 169 | ||
168 | 170 | ||
169 | - | func | |
171 | + | func aF (aG,aH,aI,aJ) = throw((((((((("order validation failed: orderValid=" + toString(aG)) + " (") + aH) + ")") + " senderValid=") + toString(aI)) + " matcherValid=") + toString(aJ))) | |
170 | 172 | ||
171 | 173 | ||
172 | - | func | |
174 | + | func aK (aL,aM) = valueOrErrorMessage(getString(aL, aM), makeString(["mandatory ", toString(aL), ".", aM, " not defined"], "")) | |
173 | 175 | ||
174 | 176 | ||
175 | - | func | |
177 | + | func aN (aL,aM) = valueOrErrorMessage(getInteger(aL, aM), makeString(["mandatory ", toString(aL), ".", aM, " not defined"], "")) | |
176 | 178 | ||
177 | 179 | ||
178 | - | func | |
180 | + | func aO (aP) = throw(makeString(["lp_stable.ride:", aP], " ")) | |
179 | 181 | ||
180 | 182 | ||
181 | - | func | |
183 | + | func aQ (aP) = makeString(["lp_stable.ride:", aP], " ") | |
182 | 184 | ||
183 | 185 | ||
184 | - | let | |
186 | + | let aR = addressFromStringValue(aK(this, Z())) | |
185 | 187 | ||
186 | - | let | |
187 | - | let | |
188 | - | if ($isInstanceOf( | |
189 | - | then | |
190 | - | else throw(($getType( | |
188 | + | let aS = { | |
189 | + | let aT = invoke(aR, "getInFeeREADONLY", [toString(this)], nil) | |
190 | + | if ($isInstanceOf(aT, "Int")) | |
191 | + | then aT | |
192 | + | else throw(($getType(aT) + " couldn't be cast to Int")) | |
191 | 193 | } | |
192 | 194 | ||
193 | - | let | |
194 | - | let | |
195 | - | if ($isInstanceOf( | |
196 | - | then | |
197 | - | else throw(($getType( | |
195 | + | let aU = { | |
196 | + | let aT = invoke(aR, "getOutFeeREADONLY", [toString(this)], nil) | |
197 | + | if ($isInstanceOf(aT, "Int")) | |
198 | + | then aT | |
199 | + | else throw(($getType(aT) + " couldn't be cast to Int")) | |
198 | 200 | } | |
199 | 201 | ||
200 | - | let | |
202 | + | let aV = aK(this, am()) | |
201 | 203 | ||
202 | - | func | |
204 | + | func aW () = valueOrElse(getBoolean(aR, aC()), false) | |
203 | 205 | ||
204 | 206 | ||
205 | - | func | |
207 | + | func aX () = fromBase58String(aK(aR, aw())) | |
206 | 208 | ||
207 | 209 | ||
208 | - | let | |
210 | + | let aY = addressFromStringValue(aK(aR, aE())) | |
209 | 211 | ||
210 | - | func | |
211 | - | let | |
212 | - | let | |
213 | - | let | |
214 | - | let | |
215 | - | split( | |
212 | + | func aZ () = { | |
213 | + | let ba = aK(this, ak()) | |
214 | + | let bb = aK(this, al()) | |
215 | + | let bc = aN(aR, aA(bb)) | |
216 | + | let ay = aN(aR, aA(ba)) | |
217 | + | split(aK(aR, ax(toString(ay), toString(bc))), o) | |
216 | 218 | } | |
217 | 219 | ||
218 | 220 | ||
219 | - | func | |
221 | + | func bd (be) = if ((be == k)) | |
220 | 222 | then unit | |
221 | - | else fromBase58String( | |
223 | + | else fromBase58String(be) | |
222 | 224 | ||
223 | 225 | ||
224 | - | func | |
226 | + | func bf (be) = if ((be == unit)) | |
225 | 227 | then k | |
226 | - | else toBase58String(value( | |
228 | + | else toBase58String(value(be)) | |
227 | 229 | ||
228 | 230 | ||
229 | - | func | |
231 | + | func bg (bh) = $Tuple9(addressFromStringValue(bh[u]), parseIntValue(bh[v]), fromBase58String(bh[w]), bd(bh[x]), bd(bh[y]), parseIntValue(bh[z]), parseIntValue(bh[A]), fromBase58String(bh[B]), fromBase58String(bh[C])) | |
230 | 232 | ||
231 | 233 | ||
232 | - | let | |
234 | + | let bi = bg(aZ()) | |
233 | 235 | ||
234 | - | let | |
236 | + | let bj = bi | |
235 | 237 | ||
236 | - | let | |
238 | + | let bk = bj._1 | |
237 | 239 | ||
238 | - | let | |
240 | + | let bl = bj._2 | |
239 | 241 | ||
240 | - | let | |
242 | + | let bm = bj._3 | |
241 | 243 | ||
242 | - | let | |
244 | + | let bn = bj._4 | |
243 | 245 | ||
244 | - | let | |
246 | + | let bo = bj._5 | |
245 | 247 | ||
246 | - | let | |
248 | + | let bp = bj._6 | |
247 | 249 | ||
248 | - | let | |
250 | + | let bq = bj._7 | |
249 | 251 | ||
250 | - | let | |
252 | + | let br = bj._8 | |
251 | 253 | ||
252 | - | let | |
254 | + | let bs = bj._9 | |
253 | 255 | ||
254 | - | func | |
256 | + | func bt () = split(aK(aR, av()), o) | |
255 | 257 | ||
256 | 258 | ||
257 | - | let | |
259 | + | let bu = bt() | |
258 | 260 | ||
259 | - | let | |
261 | + | let bv = valueOrErrorMessage(addressFromString(bu[D]), "Invalid staking contract address") | |
260 | 262 | ||
261 | - | let | |
263 | + | let bw = valueOrErrorMessage(addressFromString(bu[F]), "Invalid slipage contract address") | |
262 | 264 | ||
263 | - | let | |
265 | + | let bx = valueOrErrorMessage(addressFromString(bu[G]), "Invalid gwx contract address") | |
264 | 266 | ||
265 | - | let | |
267 | + | let by = valueOrErrorMessage(addressFromString(bu[E]), "Invalid gwx contract address") | |
266 | 268 | ||
267 | - | func | |
269 | + | func bz (bA,bB,bC,bD,bE,bF,bG,bH,bI,bJ) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bA), toString(bB), toString(bC), toString(bD), toString(bE), toString(bF), toString(bG), toString(bH), toString(bI), toString(bJ)], o) | |
268 | 270 | ||
269 | 271 | ||
270 | - | func | |
272 | + | func bK (bL,bM,bN,bD,bG,bH) = makeString(["%d%d%d%d%d%d", toString(bL), toString(bM), toString(bN), toString(bD), toString(bG), toString(bH)], o) | |
271 | 273 | ||
272 | 274 | ||
273 | - | func | |
275 | + | func bO (bP) = if ((bP == "WAVES")) | |
274 | 276 | then wavesBalance(this).available | |
275 | - | else assetBalance(this, fromBase58String( | |
277 | + | else assetBalance(this, fromBase58String(bP)) | |
276 | 278 | ||
277 | 279 | ||
278 | - | func | |
280 | + | func bQ (bR,bS) = fraction(bR, c, bS) | |
279 | 281 | ||
280 | 282 | ||
281 | - | func | |
283 | + | func bT (bR,bS,Q) = fraction(bR, c, bS, Q) | |
282 | 284 | ||
283 | 285 | ||
284 | - | func | |
285 | - | let | |
286 | - | let | |
287 | - | if (!( | |
288 | - | then throw(("Big slpg: " + toString( | |
289 | - | else $Tuple2( | |
286 | + | func bU (bV,bW,bX) = { | |
287 | + | let bY = fraction((bV - bW), b, bW) | |
288 | + | let bZ = ((bX - X(bY)) > d) | |
289 | + | if (!(bZ)) | |
290 | + | then throw(("Big slpg: " + toString(bY))) | |
291 | + | else $Tuple2(bZ, min([bV, bW])) | |
290 | 292 | } | |
291 | 293 | ||
292 | 294 | ||
293 | - | func | |
294 | - | let | |
295 | - | let | |
296 | - | if (if ( | |
295 | + | func ca (cb,cc,cd) = { | |
296 | + | let bY = fraction(cc, b, cb) | |
297 | + | let ce = (cd > bY) | |
298 | + | if (if (ce) | |
297 | 299 | then true | |
298 | - | else ( | |
299 | - | then throw(((((((toString( | |
300 | - | else | |
300 | + | else (cc > cb)) | |
301 | + | then throw(((((((toString(cc) + " ") + toString(cb)) + " ") + toString(bY)) + " ") + toString(cd))) | |
302 | + | else ce | |
301 | 303 | } | |
302 | 304 | ||
303 | 305 | ||
304 | - | func | |
305 | - | let | |
306 | - | let | |
307 | - | | |
306 | + | func cf (cg,ch,ci,cj) = { | |
307 | + | let ck = I(ci, cg) | |
308 | + | let cl = I(cj, ch) | |
309 | + | bQ(cl, ck) | |
308 | 310 | } | |
309 | 311 | ||
310 | 312 | ||
311 | - | func cl (ch,ci,cm) = { | |
312 | - | let cn = bo | |
313 | + | func cm (ci,cj,cn) = { | |
313 | 314 | let co = bp | |
314 | - | let cp = ce(cn, co, ch, ci) | |
315 | - | let bR = H(ch, cn) | |
316 | - | let bQ = H(ci, co) | |
317 | - | let cq = H(cm, a) | |
318 | - | let cr = bP(bR, cq) | |
319 | - | let cs = bP(bQ, cq) | |
320 | - | [cp, cr, cs] | |
315 | + | let cp = bq | |
316 | + | let cq = cf(co, cp, ci, cj) | |
317 | + | let bS = I(ci, co) | |
318 | + | let bR = I(cj, cp) | |
319 | + | let cr = I(cn, a) | |
320 | + | let cs = bQ(bS, cr) | |
321 | + | let ct = bQ(bR, cr) | |
322 | + | [cq, cs, ct] | |
321 | 323 | } | |
322 | 324 | ||
323 | 325 | ||
324 | - | func | |
325 | - | let | |
326 | - | [ | |
326 | + | func cu (ci,cj,cn) = { | |
327 | + | let cv = cm(ci, cj, cn) | |
328 | + | [M(cv[0], a), M(cv[1], a), M(cv[2], a)] | |
327 | 329 | } | |
328 | 330 | ||
329 | 331 | ||
330 | - | func | |
331 | - | let | |
332 | + | func cw (cx,ap) = { | |
333 | + | let cy = if ((ap == 0)) | |
332 | 334 | then 0 | |
333 | - | else fraction( | |
334 | - | $Tuple2(( | |
335 | + | else fraction(cx, ap, a) | |
336 | + | $Tuple2((cx - cy), cy) | |
335 | 337 | } | |
336 | 338 | ||
337 | 339 | ||
338 | - | func | |
339 | - | let | |
340 | - | let | |
341 | - | let | |
342 | - | if (( | |
340 | + | func cz (cA) = { | |
341 | + | let cB = cA[0] | |
342 | + | let cC = cA[1] | |
343 | + | let cD = (cB + cC) | |
344 | + | if ((cD == e)) | |
343 | 345 | then e | |
344 | 346 | else { | |
345 | - | let | |
346 | - | let | |
347 | - | let | |
348 | - | let | |
349 | - | let | |
350 | - | let | |
351 | - | func | |
352 | - | let | |
353 | - | let | |
354 | - | let | |
355 | - | fraction(( | |
347 | + | let cE = parseIntValue(aV) | |
348 | + | let cF = (cE * 2) | |
349 | + | let cv = fraction(cB, cC, f) | |
350 | + | let cG = fraction(cv, i, f) | |
351 | + | let cH = fraction(toBigInt(cF), cD, f) | |
352 | + | let cI = toBigInt((cF - 1)) | |
353 | + | func cJ (cK) = { | |
354 | + | let cL = fraction(cK, cK, f) | |
355 | + | let cM = fraction(cL, cK, f) | |
356 | + | let cN = fraction(cM, f, cG) | |
357 | + | fraction((cH + fraction(cN, g, f)), cK, (fraction(cI, cK, f) + fraction(h, cN, f))) | |
356 | 358 | } | |
357 | 359 | ||
358 | - | func | |
359 | - | then | |
360 | + | func cO (cP,cQ) = if (cP._2) | |
361 | + | then cP | |
360 | 362 | else { | |
361 | - | let | |
362 | - | let | |
363 | - | let | |
364 | - | let | |
365 | - | then -( | |
366 | - | else | |
367 | - | if ((f >= | |
368 | - | then $Tuple2( | |
369 | - | else $Tuple2( | |
363 | + | let cK = cP._1 | |
364 | + | let cR = cJ(cK) | |
365 | + | let cS = (cR - value(cK)) | |
366 | + | let cT = if ((e > cS)) | |
367 | + | then -(cS) | |
368 | + | else cS | |
369 | + | if ((f >= cT)) | |
370 | + | then $Tuple2(cR, true) | |
371 | + | else $Tuple2(cR, false) | |
370 | 372 | } | |
371 | 373 | ||
372 | - | let | |
373 | - | let | |
374 | - | let | |
375 | - | let | |
376 | - | let | |
377 | - | func | |
378 | - | then | |
379 | - | else | |
374 | + | let cU = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] | |
375 | + | let cV = { | |
376 | + | let cW = cU | |
377 | + | let cX = size(cW) | |
378 | + | let cY = $Tuple2(cD, false) | |
379 | + | func cZ (da,db) = if ((db >= cX)) | |
380 | + | then da | |
381 | + | else cO(da, cW[db]) | |
380 | 382 | ||
381 | - | func | |
382 | - | then | |
383 | + | func dc (da,db) = if ((db >= cX)) | |
384 | + | then da | |
383 | 385 | else throw("List size exceeds 15") | |
384 | 386 | ||
385 | - | | |
387 | + | dc(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cY, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
386 | 388 | } | |
387 | - | let | |
388 | - | let | |
389 | - | if ( | |
390 | - | then | |
391 | - | else throw(("D calculation error, D = " + toString( | |
389 | + | let cK = cV._1 | |
390 | + | let dd = cV._2 | |
391 | + | if (dd) | |
392 | + | then cK | |
393 | + | else throw(("D calculation error, D = " + toString(cK))) | |
392 | 394 | } | |
393 | 395 | } | |
394 | 396 | ||
395 | 397 | ||
396 | - | func dd (de,df,dg,dh) = { | |
397 | - | let di = bl | |
398 | - | let dj = toBase58String(value(bm)) | |
398 | + | func de (df,dg,dh,di) = { | |
399 | + | let dj = bm | |
399 | 400 | let dk = toBase58String(value(bn)) | |
400 | - | let dl = bo | |
401 | + | let dl = toBase58String(value(bo)) | |
401 | 402 | let dm = bp | |
402 | - | let dn = toString(bk) | |
403 | - | let do = valueOrErrorMessage(assetInfo(di), "Wrong LP id").quantity | |
404 | - | if ((toBase58String(di) != df)) | |
403 | + | let dn = bq | |
404 | + | let do = toString(bl) | |
405 | + | let dp = valueOrErrorMessage(assetInfo(dj), "Wrong LP id").quantity | |
406 | + | if ((toBase58String(dj) != dg)) | |
405 | 407 | then throw("Wrong pmt asset") | |
406 | 408 | else { | |
407 | - | let | |
408 | - | let | |
409 | - | let | |
410 | - | let | |
411 | - | let | |
412 | - | let | |
413 | - | let | |
414 | - | let | |
415 | - | let | |
416 | - | let | |
417 | - | let | |
418 | - | let | |
419 | - | let | |
409 | + | let dq = bO(dk) | |
410 | + | let dr = I(dq, dm) | |
411 | + | let ds = bO(dl) | |
412 | + | let dt = I(ds, dn) | |
413 | + | let du = bQ(dt, dr) | |
414 | + | let dv = M(du, a) | |
415 | + | let dw = I(dh, a) | |
416 | + | let dx = I(dp, a) | |
417 | + | let dy = fraction(dr, dw, dx) | |
418 | + | let dz = fraction(dt, dw, dx) | |
419 | + | let dA = P(dy, dm, FLOOR) | |
420 | + | let dB = P(dz, dn, FLOOR) | |
421 | + | let dC = if ((df == "")) | |
420 | 422 | then nil | |
421 | - | else [ScriptTransfer( | |
423 | + | else [ScriptTransfer(di, dA, if ((dk == "WAVES")) | |
422 | 424 | then unit | |
423 | - | else fromBase58String( | |
425 | + | else fromBase58String(dk)), ScriptTransfer(di, dB, if ((dl == "WAVES")) | |
424 | 426 | then unit | |
425 | - | else fromBase58String( | |
426 | - | $Tuple10( | |
427 | + | else fromBase58String(dl)), StringEntry(aj(toString(di), df), bK(dA, dB, dh, dv, height, lastBlock.timestamp)), IntegerEntry(ac(), dv), IntegerEntry(ad(height, lastBlock.timestamp), dv)] | |
428 | + | $Tuple10(dA, dB, dk, dl, dq, ds, dp, du, do, dC) | |
427 | 429 | } | |
428 | 430 | } | |
429 | 431 | ||
430 | 432 | ||
431 | - | func dC (de,bW,dD,dE,dF,dG,dh,dH,dI,dJ,dK,dL,dM) = { | |
432 | - | let di = bl | |
433 | - | let dN = toBase58String(value(bm)) | |
433 | + | func dD (df,bX,dE,dF,dG,dH,di,dI,dJ,dK,dL,dM,dN) = { | |
434 | + | let dj = bm | |
434 | 435 | let dO = toBase58String(value(bn)) | |
435 | - | let dP = | |
436 | + | let dP = toBase58String(value(bo)) | |
436 | 437 | let dQ = br | |
437 | - | let dR = | |
438 | + | let dR = bs | |
438 | 439 | let dS = bp | |
439 | - | let dn = toString(bk) | |
440 | - | let dT = valueOrErrorMessage(assetInfo(di), "Wr lp as").quantity | |
441 | - | let dp = if (dH) | |
442 | - | then bN(dN) | |
443 | - | else if (if (dJ) | |
444 | - | then (dM == dN) | |
440 | + | let dT = bq | |
441 | + | let do = toString(bl) | |
442 | + | let dU = valueOrErrorMessage(assetInfo(dj), "Wr lp as").quantity | |
443 | + | let dq = if (dI) | |
444 | + | then bO(dO) | |
445 | + | else if (if (dK) | |
446 | + | then (dN == dO) | |
445 | 447 | else false) | |
446 | - | then ( | |
447 | - | else if ( | |
448 | - | then | |
449 | - | else ( | |
450 | - | let | |
451 | - | then | |
452 | - | else if (if ( | |
453 | - | then ( | |
448 | + | then (bO(dO) - dM) | |
449 | + | else if (dK) | |
450 | + | then bO(dO) | |
451 | + | else (bO(dO) - dE) | |
452 | + | let ds = if (dI) | |
453 | + | then bO(dP) | |
454 | + | else if (if (dK) | |
455 | + | then (dN == dP) | |
454 | 456 | else false) | |
455 | - | then ( | |
456 | - | else if ( | |
457 | - | then | |
458 | - | else ( | |
459 | - | let | |
460 | - | let | |
461 | - | let | |
462 | - | let | |
463 | - | let | |
464 | - | let | |
465 | - | let | |
457 | + | then (bO(dP) - dM) | |
458 | + | else if (dK) | |
459 | + | then bO(dP) | |
460 | + | else (bO(dP) - dG) | |
461 | + | let dV = I(dE, dS) | |
462 | + | let dW = I(dG, dT) | |
463 | + | let dX = bQ(dW, dV) | |
464 | + | let dr = I(dq, dS) | |
465 | + | let dt = I(ds, dT) | |
466 | + | let cc = cz([dr, dt]) | |
467 | + | let dY = if ((dU == 0)) | |
466 | 468 | then { | |
467 | - | let | |
468 | - | let | |
469 | + | let cb = cz([(dr + dV), (dt + dW)]) | |
470 | + | let dZ = if ((cb > cc)) | |
469 | 471 | then true | |
470 | 472 | else throw("D1 should be greater than D0") | |
471 | - | if (( | |
473 | + | if ((dZ == dZ)) | |
472 | 474 | then { | |
473 | - | let | |
474 | - | let | |
475 | - | let | |
476 | - | $Tuple5( | |
475 | + | let du = d | |
476 | + | let ea = d | |
477 | + | let cr = cb | |
478 | + | $Tuple5(M(cr, a), M(dV, dS), M(dW, dT), bQ((dt + dW), (dr + dV)), ea) | |
477 | 479 | } | |
478 | 480 | else throw("Strict value is not equal to itself.") | |
479 | 481 | } | |
480 | 482 | else { | |
481 | - | let | |
482 | - | let | |
483 | - | let | |
484 | - | if (if (if ( | |
485 | - | then ( | |
483 | + | let du = bQ(dt, dr) | |
484 | + | let eb = fraction(X((du - dX)), c, du) | |
485 | + | let ea = I(bX, a) | |
486 | + | if (if (if (dL) | |
487 | + | then (du != d) | |
486 | 488 | else false) | |
487 | - | then ( | |
489 | + | then (eb > ea) | |
488 | 490 | else false) | |
489 | - | then throw(((("Price slippage " + toString( | |
491 | + | then throw(((("Price slippage " + toString(eb)) + " > ") + toString(ea))) | |
490 | 492 | else { | |
491 | - | let | |
492 | - | let | |
493 | - | let | |
494 | - | let | |
495 | - | then $Tuple2( | |
496 | - | else $Tuple2( | |
497 | - | let | |
498 | - | let | |
499 | - | let | |
500 | - | let | |
493 | + | let ec = I(dU, a) | |
494 | + | let ed = fraction(dV, bT(dt, dr, CEILING), c, CEILING) | |
495 | + | let ee = fraction(dW, c, bT(dt, dr, FLOOR), CEILING) | |
496 | + | let ef = if ((ed > dW)) | |
497 | + | then $Tuple2(ee, dW) | |
498 | + | else $Tuple2(dV, ed) | |
499 | + | let eg = ef._1 | |
500 | + | let eh = ef._2 | |
501 | + | let cb = cz([(dr + eg), (dt + eh)]) | |
502 | + | let dZ = if ((cb > cc)) | |
501 | 503 | then true | |
502 | 504 | else throw("D1 should be greater than D0") | |
503 | - | if (( | |
505 | + | if ((dZ == dZ)) | |
504 | 506 | then { | |
505 | - | let | |
506 | - | $Tuple5( | |
507 | + | let cr = fraction(ec, (cb - cc), cc) | |
508 | + | $Tuple5(P(cr, a, FLOOR), P(eg, dS, CEILING), P(eh, dT, CEILING), du, ea) | |
507 | 509 | } | |
508 | 510 | else throw("Strict value is not equal to itself.") | |
509 | 511 | } | |
510 | 512 | } | |
511 | - | let | |
512 | - | let | |
513 | - | let | |
514 | - | let | |
515 | - | let | |
516 | - | if ((0 >= | |
513 | + | let ei = dY._1 | |
514 | + | let ej = dY._2 | |
515 | + | let ek = dY._3 | |
516 | + | let dv = M(dY._4, a) | |
517 | + | let el = M(dY._5, a) | |
518 | + | if ((0 >= ei)) | |
517 | 519 | then throw("LP <= 0") | |
518 | 520 | else { | |
519 | - | let | |
521 | + | let em = if (!(dJ)) | |
520 | 522 | then 0 | |
521 | - | else | |
522 | - | let | |
523 | - | let | |
524 | - | let | |
525 | - | then ( | |
523 | + | else ei | |
524 | + | let en = (dE - ej) | |
525 | + | let eo = (dG - ek) | |
526 | + | let ep = if (if (dK) | |
527 | + | then (dN == dO) | |
526 | 528 | else false) | |
527 | - | then $Tuple2( | |
528 | - | else if (if ( | |
529 | - | then ( | |
529 | + | then $Tuple2(dM, 0) | |
530 | + | else if (if (dK) | |
531 | + | then (dN == dP) | |
530 | 532 | else false) | |
531 | - | then $Tuple2(0, | |
532 | - | else $Tuple2( | |
533 | - | let | |
534 | - | let | |
535 | - | let | |
536 | - | $Tuple13( | |
533 | + | then $Tuple2(0, dM) | |
534 | + | else $Tuple2(ej, ek) | |
535 | + | let eq = ep._1 | |
536 | + | let er = ep._2 | |
537 | + | let es = [IntegerEntry(ac(), dv), IntegerEntry(ad(height, lastBlock.timestamp), dv), StringEntry(ag(di, df), bz(eq, er, em, dv, bX, el, height, lastBlock.timestamp, en, eo))] | |
538 | + | $Tuple13(ei, em, dv, dq, ds, dU, dj, do, es, en, eo, dF, dH) | |
537 | 539 | } | |
538 | 540 | } | |
539 | 541 | ||
540 | 542 | ||
541 | - | func | |
542 | - | let | |
543 | - | let | |
543 | + | func et (cA,cQ,eu) = { | |
544 | + | let ev = g | |
545 | + | let ew = cA[if ((cQ == 0)) | |
544 | 546 | then 1 | |
545 | 547 | else 0] | |
546 | - | let | |
547 | - | let | |
548 | - | let | |
549 | - | let | |
550 | - | let | |
551 | - | let | |
552 | - | func | |
553 | - | let | |
554 | - | let | |
555 | - | let | |
556 | - | if (( | |
557 | - | then | |
548 | + | let ex = parseBigIntValue(m) | |
549 | + | let cE = (parseBigIntValue(aV) * ex) | |
550 | + | let cD = ew | |
551 | + | let cF = (cE * ev) | |
552 | + | let ey = (((((eu * eu) / (ew * ev)) * eu) * ex) / (cF * ev)) | |
553 | + | let ez = ((cD + ((eu * ex) / cF)) - eu) | |
554 | + | func cO (cP,eA) = { | |
555 | + | let eB = cP | |
556 | + | let eC = eB._1 | |
557 | + | let dd = eB._2 | |
558 | + | if ((dd != unit)) | |
559 | + | then cP | |
558 | 560 | else { | |
559 | - | let | |
560 | - | let | |
561 | - | if ((f >= | |
562 | - | then $Tuple2( | |
563 | - | else $Tuple2( | |
561 | + | let eD = (((eC * eC) + ey) / ((g * eC) + ez)) | |
562 | + | let eE = Y((eD - value(eC))) | |
563 | + | if ((f >= eE)) | |
564 | + | then $Tuple2(eD, eA) | |
565 | + | else $Tuple2(eD, unit) | |
564 | 566 | } | |
565 | 567 | } | |
566 | 568 | ||
567 | - | let | |
568 | - | let | |
569 | - | let | |
570 | - | let | |
571 | - | let | |
572 | - | func | |
573 | - | then | |
574 | - | else | |
569 | + | let cU = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] | |
570 | + | let eF = { | |
571 | + | let cW = cU | |
572 | + | let cX = size(cW) | |
573 | + | let cY = $Tuple2(eu, unit) | |
574 | + | func cZ (da,db) = if ((db >= cX)) | |
575 | + | then da | |
576 | + | else cO(da, cW[db]) | |
575 | 577 | ||
576 | - | func | |
577 | - | then | |
578 | + | func dc (da,db) = if ((db >= cX)) | |
579 | + | then da | |
578 | 580 | else throw("List size exceeds 15") | |
579 | 581 | ||
580 | - | | |
582 | + | dc(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cY, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
581 | 583 | } | |
582 | - | let | |
583 | - | let | |
584 | - | if (( | |
585 | - | then | |
586 | - | else throw(("Y calculation error, Y = " + toString( | |
584 | + | let eC = eF._1 | |
585 | + | let dd = eF._2 | |
586 | + | if ((dd != unit)) | |
587 | + | then eC | |
588 | + | else throw(("Y calculation error, Y = " + toString(eC))) | |
587 | 589 | } | |
588 | 590 | ||
589 | 591 | ||
590 | - | func | |
591 | - | let | |
592 | - | if (( | |
592 | + | func eG (eH,eI,eJ) = { | |
593 | + | let eK = fraction(cz([L(eH, toBigInt(bp)), L(eI, toBigInt(bq))]), c, eJ) | |
594 | + | if ((eJ == e)) | |
593 | 595 | then e | |
594 | - | else | |
596 | + | else eK | |
595 | 597 | } | |
596 | 598 | ||
597 | 599 | ||
598 | - | func | |
599 | - | let | |
600 | - | let | |
601 | - | let | |
602 | - | let | |
603 | - | | |
600 | + | func eL (eM,eN,eO) = { | |
601 | + | let eP = (toBigInt(bO(bf(bn))) - eM) | |
602 | + | let eQ = (toBigInt(bO(bf(bo))) - eN) | |
603 | + | let eR = (toBigInt(value(assetInfo(bm)).quantity) - eO) | |
604 | + | let eS = eG(eP, eQ, eR) | |
605 | + | eS | |
604 | 606 | } | |
605 | 607 | ||
606 | 608 | ||
607 | - | func | |
608 | - | let | |
609 | - | let | |
610 | - | let | |
611 | - | let | |
612 | - | let | |
613 | - | $Tuple2( | |
609 | + | func eT (eU,eV,eO) = { | |
610 | + | let eP = (bO(bf(bn)) + eU) | |
611 | + | let eQ = (bO(bf(bo)) + eV) | |
612 | + | let eR = (value(assetInfo(bm)).quantity + eO) | |
613 | + | let eK = eG(toBigInt(eP), toBigInt(eQ), toBigInt(eR)) | |
614 | + | let eW = [IntegerEntry(ar, height), StringEntry(aq, toString(eK))] | |
615 | + | $Tuple2(eW, eK) | |
614 | 616 | } | |
615 | 617 | ||
616 | 618 | ||
617 | - | func | |
619 | + | func eX (eY,eK) = if ((eK >= eY)) | |
618 | 620 | then true | |
619 | - | else | |
621 | + | else aO("updated DLp lower than current DLp") | |
620 | 622 | ||
621 | 623 | ||
622 | - | func | |
623 | - | let | |
624 | - | let | |
625 | - | let | |
626 | - | let | |
627 | - | let | |
628 | - | then $Tuple2( | |
629 | - | else $Tuple2(-( | |
630 | - | let | |
631 | - | let | |
632 | - | if (if (if ( | |
624 | + | func eZ (fa) = { | |
625 | + | let eP = bO(bf(bn)) | |
626 | + | let eQ = bO(bf(bo)) | |
627 | + | let fb = fa.amount | |
628 | + | let fc = fraction(fa.amount, fa.price, a, FLOOR) | |
629 | + | let fd = if ((fa.orderType == Buy)) | |
630 | + | then $Tuple2(fb, -(fc)) | |
631 | + | else $Tuple2(-(fb), fc) | |
632 | + | let eU = fd._1 | |
633 | + | let eV = fd._2 | |
634 | + | if (if (if (aW()) | |
633 | 635 | then true | |
634 | - | else ( | |
636 | + | else (bl == s)) | |
635 | 637 | then true | |
636 | - | else ( | |
638 | + | else (bl == t)) | |
637 | 639 | then throw("Admin blocked") | |
638 | - | else if (if (( | |
640 | + | else if (if ((fa.assetPair.amountAsset != bn)) | |
639 | 641 | then true | |
640 | - | else ( | |
642 | + | else (fa.assetPair.priceAsset != bo)) | |
641 | 643 | then throw("Wr assets") | |
642 | 644 | else { | |
643 | - | let | |
644 | - | let | |
645 | - | let | |
646 | - | let | |
647 | - | let | |
648 | - | let | |
649 | - | $Tuple2( | |
645 | + | let fe = parseBigIntValue(valueOrElse(getString(this, aq), "0")) | |
646 | + | let ff = eT(eU, eV, 0) | |
647 | + | let fg = ff._1 | |
648 | + | let fh = ff._2 | |
649 | + | let fi = (fh >= fe) | |
650 | + | let fj = makeString(["dLp=", toString(fe), " dLpNew=", toString(fh), " amountAssetBalance=", toString(eP), " priceAssetBalance=", toString(eQ), " amountAssetBalanceDelta=", toString(eU), " priceAssetBalanceDelta=", toString(eV), " height=", toString(height)], "") | |
651 | + | $Tuple2(fi, fj) | |
650 | 652 | } | |
651 | 653 | } | |
652 | 654 | ||
653 | 655 | ||
654 | - | func | |
656 | + | func fk (cQ) = if ((size(cQ.payments) != 1)) | |
655 | 657 | then throw("1 pmnt exp") | |
656 | 658 | else { | |
657 | - | let | |
658 | - | let | |
659 | - | let | |
660 | - | let | |
661 | - | let | |
662 | - | let | |
663 | - | let | |
664 | - | let | |
665 | - | if (if ( | |
659 | + | let fl = value(cQ.payments[0]) | |
660 | + | let dg = value(fl.assetId) | |
661 | + | let dM = fl.amount | |
662 | + | let dY = de(toBase58String(cQ.transactionId), toBase58String(dg), dM, cQ.caller) | |
663 | + | let dA = dY._1 | |
664 | + | let dB = dY._2 | |
665 | + | let do = parseIntValue(dY._9) | |
666 | + | let dC = dY._10 | |
667 | + | if (if (aW()) | |
666 | 668 | then true | |
667 | - | else ( | |
668 | - | then throw(("Admin blocked: " + toString( | |
669 | - | else $Tuple5( | |
669 | + | else (do == t)) | |
670 | + | then throw(("Admin blocked: " + toString(do))) | |
671 | + | else $Tuple5(dA, dB, dM, dg, dC) | |
670 | 672 | } | |
671 | 673 | ||
672 | 674 | ||
673 | - | func | |
674 | - | let | |
675 | - | let | |
676 | - | if (if (if ( | |
675 | + | func fm (fn,ai,fo,fp,bX,dJ,dK,dL,dM,dN) = { | |
676 | + | let dY = dD(ai, bX, value(fo).amount, value(fo).assetId, value(fp).amount, value(fp).assetId, fn, (ai == ""), dJ, dK, dL, dM, dN) | |
677 | + | let do = parseIntValue(dY._8) | |
678 | + | if (if (if (aW()) | |
677 | 679 | then true | |
678 | - | else ( | |
680 | + | else (do == r)) | |
679 | 681 | then true | |
680 | - | else ( | |
681 | - | then throw(("Blocked:" + toString( | |
682 | - | else | |
682 | + | else (do == t)) | |
683 | + | then throw(("Blocked:" + toString(do))) | |
684 | + | else dY | |
683 | 685 | } | |
684 | 686 | ||
685 | 687 | ||
686 | - | func fp (fq,df,dh,ah,fr) = { | |
687 | - | let dj = toBase58String(value(bm)) | |
688 | + | func fq (fr,dg,di,ai,fs) = { | |
688 | 689 | let dk = toBase58String(value(bn)) | |
689 | - | let | |
690 | - | let | |
690 | + | let dl = toBase58String(value(bo)) | |
691 | + | let dj = bm | |
691 | 692 | let dS = bp | |
692 | - | let eQ = toBigInt(valueOrErrorMessage(assetInfo(di), "invalid lp asset").quantity) | |
693 | - | let fs = if ((eQ > e)) | |
693 | + | let dT = bq | |
694 | + | let eR = toBigInt(valueOrErrorMessage(assetInfo(dj), "invalid lp asset").quantity) | |
695 | + | let ft = if ((eR > e)) | |
694 | 696 | then true | |
695 | 697 | else throw("initial deposit requires all coins") | |
696 | - | if (( | |
698 | + | if ((ft == ft)) | |
697 | 699 | then { | |
698 | - | let | |
699 | - | let | |
700 | - | let | |
701 | - | then $Tuple2( | |
702 | - | else if (( | |
703 | - | then if (( | |
700 | + | let dq = bO(dk) | |
701 | + | let ds = bO(dl) | |
702 | + | let fu = if ((ai == "")) | |
703 | + | then $Tuple2(dq, ds) | |
704 | + | else if ((dg == dk)) | |
705 | + | then if ((fr > dq)) | |
704 | 706 | then throw("invalid payment amount") | |
705 | - | else $Tuple2(( | |
706 | - | else if (( | |
707 | - | then if (( | |
707 | + | else $Tuple2((dq - fr), ds) | |
708 | + | else if ((dg == dl)) | |
709 | + | then if ((fr > ds)) | |
708 | 710 | then throw("invalid payment amount") | |
709 | - | else $Tuple2( | |
711 | + | else $Tuple2(dq, (ds - fr)) | |
710 | 712 | else throw("wrong pmtAssetId") | |
711 | - | let | |
712 | - | let | |
713 | - | let | |
714 | - | then $Tuple2( | |
715 | - | else if (( | |
716 | - | then $Tuple2(0, | |
713 | + | let fv = fu._1 | |
714 | + | let fw = fu._2 | |
715 | + | let fx = if ((dg == dk)) | |
716 | + | then $Tuple2(fr, 0) | |
717 | + | else if ((dg == dl)) | |
718 | + | then $Tuple2(0, fr) | |
717 | 719 | else throw("invalid payment") | |
718 | - | let fx = fw._1 | |
719 | - | let fy = fw._2 | |
720 | - | let fz = if (fr) | |
721 | - | then $Tuple3(cv(fx, aR)._1, cv(fy, aR)._1, cv(fq, aR)._2) | |
722 | - | else $Tuple3(fx, fy, 0) | |
723 | - | let fA = fz._1 | |
724 | - | let fB = fz._2 | |
725 | - | let cx = fz._3 | |
726 | - | let fC = (fu + fA) | |
720 | + | let fy = fx._1 | |
721 | + | let fz = fx._2 | |
722 | + | let fA = if (fs) | |
723 | + | then $Tuple3(cw(fy, aS)._1, cw(fz, aS)._1, cw(fr, aS)._2) | |
724 | + | else $Tuple3(fy, fz, 0) | |
725 | + | let fB = fA._1 | |
726 | + | let fC = fA._2 | |
727 | + | let cy = fA._3 | |
727 | 728 | let fD = (fv + fB) | |
728 | - | let cb = cy([H(fu, bo), H(fv, bp)]) | |
729 | - | let ca = cy([H(fC, bo), H(fD, bp)]) | |
730 | - | let dY = if ((ca > cb)) | |
729 | + | let fE = (fw + fC) | |
730 | + | let cc = cz([I(fv, bp), I(fw, bq)]) | |
731 | + | let cb = cz([I(fD, bp), I(fE, bq)]) | |
732 | + | let dZ = if ((cb > cc)) | |
731 | 733 | then true | |
732 | 734 | else throw() | |
733 | - | if (( | |
735 | + | if ((dZ == dZ)) | |
734 | 736 | then { | |
735 | - | let | |
736 | - | let | |
737 | - | let | |
738 | - | let | |
739 | - | let | |
740 | - | let | |
741 | - | let | |
742 | - | let | |
743 | - | $Tuple4(toInt( | |
737 | + | let fF = fraction(eR, (cb - cc), cc, FLOOR) | |
738 | + | let dv = M(bQ(I(fE, dT), I(fD, dS)), a) | |
739 | + | let es = [IntegerEntry(ac(), dv), IntegerEntry(ad(height, lastBlock.timestamp), dv), StringEntry(ag(di, ai), bz(fy, fz, toInt(fF), dv, 0, 0, height, lastBlock.timestamp, 0, 0))] | |
740 | + | let fG = fraction(fw, a, fv) | |
741 | + | let fH = fraction(fr, a, (fG + a)) | |
742 | + | let fI = (fr - fH) | |
743 | + | let fJ = fraction(eR, toBigInt(fI), toBigInt(fw)) | |
744 | + | let fK = toInt(fraction((fF - fJ), b, fJ)) | |
745 | + | $Tuple4(toInt(fF), es, cy, fK) | |
744 | 746 | } | |
745 | 747 | else throw("Strict value is not equal to itself.") | |
746 | 748 | } | |
747 | 749 | else throw("Strict value is not equal to itself.") | |
748 | 750 | } | |
749 | 751 | ||
750 | 752 | ||
751 | - | func fK (fL,fM,fN,fm,fO,fP) = { | |
752 | - | let di = toBase58String(value(bl)) | |
753 | + | func fL (fM,fN,fO,fn,fP,fQ) = { | |
753 | 754 | let dj = toBase58String(value(bm)) | |
754 | 755 | let dk = toBase58String(value(bn)) | |
755 | - | let | |
756 | + | let dl = toBase58String(value(bo)) | |
756 | 757 | let fR = bp | |
757 | - | let fS = bk | |
758 | - | let dh = if ((fm == bx)) | |
759 | - | then fO | |
760 | - | else fm | |
761 | - | let fk = value(fN[0]) | |
762 | - | let df = value(fk.assetId) | |
763 | - | let dL = fk.amount | |
764 | - | let eR = eK(e, e, e) | |
765 | - | if ((eR == eR)) | |
758 | + | let fS = bq | |
759 | + | let fT = bl | |
760 | + | let di = if ((fn == by)) | |
761 | + | then fP | |
762 | + | else fn | |
763 | + | let fl = value(fO[0]) | |
764 | + | let dg = value(fl.assetId) | |
765 | + | let dM = fl.amount | |
766 | + | let eS = eL(e, e, e) | |
767 | + | if ((eS == eS)) | |
766 | 768 | then { | |
767 | - | let | |
768 | - | if (( | |
769 | + | let df = toBase58String(fQ) | |
770 | + | if ((dj != toBase58String(dg))) | |
769 | 771 | then throw("Wrong LP") | |
770 | 772 | else { | |
771 | - | let | |
772 | - | let | |
773 | - | let | |
774 | - | let | |
775 | - | if ($isInstanceOf( | |
776 | - | then | |
777 | - | else throw(($getType( | |
773 | + | let dq = bO(dk) | |
774 | + | let ds = bO(dl) | |
775 | + | let fU = { | |
776 | + | let aT = invoke(this, "getOneTknV2READONLY", [fM, dM], nil) | |
777 | + | if ($isInstanceOf(aT, "(Int, Int)")) | |
778 | + | then aT | |
779 | + | else throw(($getType(aT) + " couldn't be cast to (Int, Int)")) | |
778 | 780 | } | |
779 | - | if (( | |
781 | + | if ((fU == fU)) | |
780 | 782 | then { | |
781 | - | let | |
782 | - | let | |
783 | - | let | |
784 | - | then ( | |
783 | + | let cy = fU._2 | |
784 | + | let fV = fU._1 | |
785 | + | let fW = if (if ((fN > 0)) | |
786 | + | then (fN > fV) | |
785 | 787 | else false) | |
786 | - | then | |
787 | - | else | |
788 | - | let | |
789 | - | then $Tuple4( | |
790 | - | else if (( | |
791 | - | then $Tuple4(0, | |
788 | + | then aO(makeString(["amount to receive is less than ", toString(fN)], "")) | |
789 | + | else fV | |
790 | + | let fX = if ((fM == dk)) | |
791 | + | then $Tuple4(fW, 0, ((dq - fW) - cy), ds) | |
792 | + | else if ((fM == dl)) | |
793 | + | then $Tuple4(0, fW, dq, ((ds - fW) - cy)) | |
792 | 794 | else throw("invalid out asset id") | |
793 | - | let | |
794 | - | let | |
795 | - | let | |
796 | - | let | |
797 | - | let | |
798 | - | let | |
799 | - | let | |
795 | + | let fY = fX._1 | |
796 | + | let fZ = fX._2 | |
797 | + | let fD = fX._3 | |
798 | + | let fE = fX._4 | |
799 | + | let ga = bQ(I(fE, fS), I(fD, fR)) | |
800 | + | let gb = M(ga, a) | |
801 | + | let gc = if ((fM == "WAVES")) | |
800 | 802 | then unit | |
801 | - | else fromBase58String( | |
802 | - | let | |
803 | - | then [ScriptTransfer( | |
803 | + | else fromBase58String(fM) | |
804 | + | let gd = if ((cy > 0)) | |
805 | + | then [ScriptTransfer(aY, cy, gc)] | |
804 | 806 | else nil | |
805 | - | let | |
806 | - | if (( | |
807 | + | let dC = ([ScriptTransfer(di, fW, gc), StringEntry(aj(toString(di), df), bK(fY, fZ, dM, gb, height, lastBlock.timestamp)), IntegerEntry(ac(), gb), IntegerEntry(ad(height, lastBlock.timestamp), gb)] ++ gd) | |
808 | + | if ((dC == dC)) | |
807 | 809 | then { | |
808 | - | let | |
809 | - | if (( | |
810 | + | let ge = invoke(aR, "burn", [dM], [AttachedPayment(dg, dM)]) | |
811 | + | if ((ge == ge)) | |
810 | 812 | then { | |
811 | - | let | |
812 | - | let | |
813 | + | let gf = { | |
814 | + | let gg = if ((this == aY)) | |
813 | 815 | then 0 | |
814 | - | else | |
815 | - | let | |
816 | + | else cy | |
817 | + | let gh = if ((bd(fM) == bn)) | |
816 | 818 | then true | |
817 | 819 | else false | |
818 | - | if ( | |
819 | - | then $Tuple2(-(( | |
820 | - | else $Tuple2(0, -(( | |
820 | + | if (gh) | |
821 | + | then $Tuple2(-((fV + gg)), 0) | |
822 | + | else $Tuple2(0, -((fV + gg))) | |
821 | 823 | } | |
822 | - | let | |
823 | - | let | |
824 | - | let | |
825 | - | let | |
826 | - | let | |
827 | - | let | |
828 | - | if (( | |
829 | - | then $Tuple2(( | |
824 | + | let eU = gf._1 | |
825 | + | let eV = gf._2 | |
826 | + | let gi = eT(eU, eV, 0) | |
827 | + | let gj = gi._1 | |
828 | + | let eK = gi._2 | |
829 | + | let gk = eX(eS, eK) | |
830 | + | if ((gk == gk)) | |
831 | + | then $Tuple2((dC ++ gj), fW) | |
830 | 832 | else throw("Strict value is not equal to itself.") | |
831 | 833 | } | |
832 | 834 | else throw("Strict value is not equal to itself.") | |
833 | 835 | } | |
834 | 836 | else throw("Strict value is not equal to itself.") | |
835 | 837 | } | |
836 | 838 | else throw("Strict value is not equal to itself.") | |
837 | 839 | } | |
838 | 840 | } | |
839 | 841 | else throw("Strict value is not equal to itself.") | |
840 | 842 | } | |
841 | 843 | ||
842 | 844 | ||
843 | - | func | |
844 | - | let | |
845 | - | if ($isInstanceOf( | |
845 | + | func gl () = { | |
846 | + | let gm = getString(aa()) | |
847 | + | if ($isInstanceOf(gm, "String")) | |
846 | 848 | then { | |
847 | - | let | |
848 | - | fromBase58String( | |
849 | + | let cD = gm | |
850 | + | fromBase58String(cD) | |
849 | 851 | } | |
850 | - | else if ($isInstanceOf( | |
852 | + | else if ($isInstanceOf(gm, "Unit")) | |
851 | 853 | then unit | |
852 | 854 | else throw("Match error") | |
853 | 855 | } | |
854 | 856 | ||
855 | 857 | ||
856 | - | func | |
857 | - | let | |
858 | - | if ($isInstanceOf( | |
858 | + | func gn () = { | |
859 | + | let gm = getString(ab()) | |
860 | + | if ($isInstanceOf(gm, "String")) | |
859 | 861 | then { | |
860 | - | let | |
861 | - | fromBase58String( | |
862 | + | let cD = gm | |
863 | + | fromBase58String(cD) | |
862 | 864 | } | |
863 | - | else if ($isInstanceOf( | |
865 | + | else if ($isInstanceOf(gm, "Unit")) | |
864 | 866 | then unit | |
865 | 867 | else throw("Match error") | |
866 | 868 | } | |
867 | 869 | ||
868 | 870 | ||
869 | - | let | |
871 | + | let go = throw("Permission denied") | |
870 | 872 | ||
871 | - | func | |
872 | - | let | |
873 | - | if ($isInstanceOf( | |
873 | + | func gp (cQ) = { | |
874 | + | let gm = gl() | |
875 | + | if ($isInstanceOf(gm, "ByteVector")) | |
874 | 876 | then { | |
875 | - | let | |
876 | - | ( | |
877 | + | let gq = gm | |
878 | + | (cQ.callerPublicKey == gq) | |
877 | 879 | } | |
878 | - | else if ($isInstanceOf( | |
879 | - | then ( | |
880 | + | else if ($isInstanceOf(gm, "Unit")) | |
881 | + | then (cQ.caller == this) | |
880 | 882 | else throw("Match error") | |
881 | 883 | } | |
882 | 884 | ||
883 | 885 | ||
884 | - | func | |
885 | - | let | |
886 | - | if ($isInstanceOf( | |
886 | + | func gr (cQ) = { | |
887 | + | let gm = gl() | |
888 | + | if ($isInstanceOf(gm, "ByteVector")) | |
887 | 889 | then { | |
888 | - | let | |
889 | - | if (( | |
890 | + | let gq = gm | |
891 | + | if ((cQ.callerPublicKey == gq)) | |
890 | 892 | then true | |
891 | - | else | |
893 | + | else go | |
892 | 894 | } | |
893 | - | else if ($isInstanceOf( | |
894 | - | then if (( | |
895 | + | else if ($isInstanceOf(gm, "Unit")) | |
896 | + | then if ((cQ.caller == this)) | |
895 | 897 | then true | |
896 | - | else | |
898 | + | else go | |
897 | 899 | else throw("Match error") | |
898 | 900 | } | |
899 | 901 | ||
900 | 902 | ||
901 | - | func | |
902 | - | let | |
903 | - | let | |
904 | - | let | |
905 | - | let | |
906 | - | let | |
907 | - | let | |
908 | - | let | |
909 | - | then [(toBigInt( | |
910 | - | else [(toBigInt( | |
911 | - | let | |
912 | - | let | |
913 | - | let | |
914 | - | let | |
915 | - | let | |
916 | - | func | |
917 | - | let | |
918 | - | let | |
919 | - | let | |
920 | - | if (( | |
921 | - | then | |
903 | + | func gs (gt,eu,gu) = { | |
904 | + | let bh = aZ() | |
905 | + | let dk = bh[x] | |
906 | + | let dl = bh[y] | |
907 | + | let ev = g | |
908 | + | let ex = parseBigIntValue(m) | |
909 | + | let cE = (parseBigIntValue(aV) * ex) | |
910 | + | let cA = if ((gt == false)) | |
911 | + | then [(toBigInt(bO(dk)) + gu), toBigInt(bO(dl))] | |
912 | + | else [(toBigInt(bO(dl)) + gu), toBigInt(bO(dk))] | |
913 | + | let ew = cA[0] | |
914 | + | let cD = ew | |
915 | + | let cF = (cE * ev) | |
916 | + | let ey = (((((eu * eu) / (ew * ev)) * eu) * ex) / (cF * ev)) | |
917 | + | let ez = ((cD + ((eu * ex) / cF)) - eu) | |
918 | + | func cO (cP,eA) = { | |
919 | + | let gv = cP | |
920 | + | let eC = gv._1 | |
921 | + | let dd = gv._2 | |
922 | + | if ((dd != unit)) | |
923 | + | then cP | |
922 | 924 | else { | |
923 | - | let | |
924 | - | let | |
925 | - | if ((f >= | |
926 | - | then $Tuple2( | |
927 | - | else $Tuple2( | |
925 | + | let eD = (((eC * eC) + ey) / ((g * eC) + ez)) | |
926 | + | let eE = Y((eD - value(eC))) | |
927 | + | if ((f >= eE)) | |
928 | + | then $Tuple2(eD, eA) | |
929 | + | else $Tuple2(eD, unit) | |
928 | 930 | } | |
929 | 931 | } | |
930 | 932 | ||
931 | - | let | |
932 | - | let | |
933 | - | let | |
934 | - | let | |
935 | - | let | |
936 | - | func | |
937 | - | then | |
938 | - | else | |
933 | + | let cU = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] | |
934 | + | let gw = { | |
935 | + | let cW = cU | |
936 | + | let cX = size(cW) | |
937 | + | let cY = $Tuple2(eu, unit) | |
938 | + | func cZ (da,db) = if ((db >= cX)) | |
939 | + | then da | |
940 | + | else cO(da, cW[db]) | |
939 | 941 | ||
940 | - | func | |
941 | - | then | |
942 | + | func dc (da,db) = if ((db >= cX)) | |
943 | + | then da | |
942 | 944 | else throw("List size exceeds 15") | |
943 | 945 | ||
944 | - | | |
946 | + | dc(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cZ(cY, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
945 | 947 | } | |
946 | - | let | |
947 | - | let | |
948 | - | if (( | |
949 | - | then | |
950 | - | else throw(("Y calculation error, Y = " + toString( | |
948 | + | let eC = gw._1 | |
949 | + | let dd = gw._2 | |
950 | + | if ((dd != unit)) | |
951 | + | then eC | |
952 | + | else throw(("Y calculation error, Y = " + toString(eC))) | |
951 | 953 | } | |
952 | 954 | ||
953 | 955 | ||
954 | - | @Callable( | |
955 | - | func calculateAmountOutForSwapREADONLY ( | |
956 | - | let | |
956 | + | @Callable(cQ) | |
957 | + | func calculateAmountOutForSwapREADONLY (gx,gt) = { | |
958 | + | let gy = if ((gt == false)) | |
957 | 959 | then { | |
958 | - | let | |
959 | - | let | |
960 | - | $Tuple2( | |
960 | + | let gz = aK(this, al()) | |
961 | + | let gu = (toBigInt(bO(aK(this, ak()))) + toBigInt(gx)) | |
962 | + | $Tuple2(gz, gu) | |
961 | 963 | } | |
962 | 964 | else { | |
963 | - | let | |
964 | - | let | |
965 | - | $Tuple2( | |
965 | + | let gz = aK(this, ak()) | |
966 | + | let gu = (toBigInt(bO(aK(this, al()))) + toBigInt(gx)) | |
967 | + | $Tuple2(gz, gu) | |
966 | 968 | } | |
967 | - | let | |
968 | - | let | |
969 | - | let | |
970 | - | let | |
971 | - | let | |
972 | - | let | |
973 | - | let | |
974 | - | let | |
975 | - | let | |
976 | - | let | |
977 | - | let | |
978 | - | then [(toBigInt( | |
979 | - | else [(toBigInt( | |
980 | - | let | |
981 | - | let | |
969 | + | let gz = gy._1 | |
970 | + | let gu = gy._2 | |
971 | + | let bh = aZ() | |
972 | + | let dk = bh[x] | |
973 | + | let dl = bh[y] | |
974 | + | let cA = [toBigInt(bO(dk)), toBigInt(bO(dl))] | |
975 | + | let eu = cz(cA) | |
976 | + | let eC = gs(gt, eu, toBigInt(gx)) | |
977 | + | let gA = ((toBigInt(bO(gz)) - eC) - toBigInt(1)) | |
978 | + | let gB = max([0, toInt(gA)]) | |
979 | + | let gC = if ((gt == false)) | |
980 | + | then [(toBigInt(bO(dk)) + toBigInt(gx)), (toBigInt(bO(dl)) - gA)] | |
981 | + | else [(toBigInt(bO(dk)) - gA), (toBigInt(bO(dl)) + toBigInt(gx))] | |
982 | + | let gD = cz(gC) | |
983 | + | let dZ = if ((gD >= eu)) | |
982 | 984 | then true | |
983 | - | else throw(makeString(["new D is fewer error", toString( | |
984 | - | if (( | |
985 | - | then $Tuple2(nil, | |
985 | + | else throw(makeString(["new D is fewer error", toString(eu), toString(gD)], "__")) | |
986 | + | if ((dZ == dZ)) | |
987 | + | then $Tuple2(nil, gB) | |
986 | 988 | else throw("Strict value is not equal to itself.") | |
987 | 989 | } | |
988 | 990 | ||
989 | 991 | ||
990 | 992 | ||
991 | - | @Callable( | |
992 | - | func calculateAmountOutForSwapAndSendTokens ( | |
993 | - | let | |
994 | - | let | |
995 | - | if ($isInstanceOf( | |
996 | - | then | |
997 | - | else throw(($getType( | |
993 | + | @Callable(cQ) | |
994 | + | func calculateAmountOutForSwapAndSendTokens (gx,gt,gE,gF) = { | |
995 | + | let gG = { | |
996 | + | let aT = invoke(aR, "getSwapContractREADONLY", nil, nil) | |
997 | + | if ($isInstanceOf(aT, "String")) | |
998 | + | then aT | |
999 | + | else throw(($getType(aT) + " couldn't be cast to String")) | |
998 | 1000 | } | |
999 | - | let | |
1001 | + | let gH = [if ((value(cQ.payments[0]).amount >= gx)) | |
1000 | 1002 | then true | |
1001 | - | else | |
1003 | + | else aO("Wrong amount"), if ((cQ.caller == addressFromStringValue(gG))) | |
1002 | 1004 | then true | |
1003 | - | else | |
1004 | - | if (( | |
1005 | + | else aO("Permission denied")] | |
1006 | + | if ((gH == gH)) | |
1005 | 1007 | then { | |
1006 | - | let | |
1007 | - | let | |
1008 | + | let fl = value(cQ.payments[0]) | |
1009 | + | let gI = if ((fl.assetId == unit)) | |
1008 | 1010 | then toBase58String(toBytes("WAVES")) | |
1009 | - | else toBase58String(value( | |
1010 | - | let | |
1011 | + | else toBase58String(value(fl.assetId)) | |
1012 | + | let gJ = if ((gt == false)) | |
1011 | 1013 | then { | |
1012 | - | let | |
1013 | - | let | |
1014 | - | $Tuple2( | |
1014 | + | let gz = aK(this, al()) | |
1015 | + | let gu = (bO(gI) - value(cQ.payments[0]).amount) | |
1016 | + | $Tuple2(gz, gu) | |
1015 | 1017 | } | |
1016 | 1018 | else { | |
1017 | - | let | |
1018 | - | let | |
1019 | - | $Tuple2( | |
1019 | + | let gz = aK(this, ak()) | |
1020 | + | let gu = (bO(gI) - value(cQ.payments[0]).amount) | |
1021 | + | $Tuple2(gz, gu) | |
1020 | 1022 | } | |
1021 | - | let | |
1022 | - | let | |
1023 | - | let | |
1024 | - | let | |
1025 | - | let | |
1026 | - | let | |
1027 | - | then [(toBigInt( | |
1028 | - | else [toBigInt( | |
1029 | - | let | |
1030 | - | let | |
1031 | - | let | |
1032 | - | let | |
1033 | - | let | |
1023 | + | let gz = gJ._1 | |
1024 | + | let gu = gJ._2 | |
1025 | + | let bh = aZ() | |
1026 | + | let dk = bh[x] | |
1027 | + | let dl = bh[y] | |
1028 | + | let cA = if ((gt == false)) | |
1029 | + | then [(toBigInt(bO(dk)) - toBigInt(value(cQ.payments[0]).amount)), toBigInt(bO(dl))] | |
1030 | + | else [toBigInt(bO(dk)), (toBigInt(bO(dl)) - toBigInt(value(cQ.payments[0]).amount))] | |
1031 | + | let eu = cz(cA) | |
1032 | + | let eC = gs(gt, eu, toBigInt(0)) | |
1033 | + | let gA = ((toBigInt(bO(gz)) - eC) - toBigInt(1)) | |
1034 | + | let gB = max([0, toInt(gA)]) | |
1035 | + | let gK = if ((gB >= gE)) | |
1034 | 1036 | then true | |
1035 | 1037 | else throw("Exchange result is fewer coins than expected") | |
1036 | - | if (( | |
1038 | + | if ((gK == gK)) | |
1037 | 1039 | then { | |
1038 | - | let | |
1039 | - | then [toBigInt( | |
1040 | - | else [(toBigInt( | |
1041 | - | let | |
1042 | - | let | |
1040 | + | let gC = if ((gt == false)) | |
1041 | + | then [toBigInt(bO(dk)), (toBigInt(bO(dl)) - gA)] | |
1042 | + | else [(toBigInt(bO(dk)) - gA), toBigInt(bO(dl))] | |
1043 | + | let gD = cz(gC) | |
1044 | + | let dZ = if ((gD >= eu)) | |
1043 | 1045 | then true | |
1044 | 1046 | else throw("new D is fewer error") | |
1045 | - | if (( | |
1046 | - | then $Tuple2([ScriptTransfer(addressFromStringValue( | |
1047 | + | if ((dZ == dZ)) | |
1048 | + | then $Tuple2([ScriptTransfer(addressFromStringValue(gF), gB, bd(gz))], gB) | |
1047 | 1049 | else throw("Strict value is not equal to itself.") | |
1048 | 1050 | } | |
1049 | 1051 | else throw("Strict value is not equal to itself.") | |
1050 | 1052 | } | |
1051 | 1053 | else throw("Strict value is not equal to itself.") | |
1052 | 1054 | } | |
1053 | 1055 | ||
1054 | 1056 | ||
1055 | 1057 | ||
1056 | - | @Callable( | |
1057 | - | func constructor ( | |
1058 | - | let | |
1059 | - | if (( | |
1060 | - | then [StringEntry( | |
1058 | + | @Callable(cQ) | |
1059 | + | func constructor (Z) = { | |
1060 | + | let ey = gr(cQ) | |
1061 | + | if ((ey == ey)) | |
1062 | + | then [StringEntry(Z(), Z)] | |
1061 | 1063 | else throw("Strict value is not equal to itself.") | |
1062 | 1064 | } | |
1063 | 1065 | ||
1064 | 1066 | ||
1065 | 1067 | ||
1066 | - | @Callable( | |
1067 | - | func setManager ( | |
1068 | - | let | |
1069 | - | if (( | |
1068 | + | @Callable(cQ) | |
1069 | + | func setManager (gL) = { | |
1070 | + | let ey = gr(cQ) | |
1071 | + | if ((ey == ey)) | |
1070 | 1072 | then { | |
1071 | - | let | |
1072 | - | if (( | |
1073 | - | then [StringEntry( | |
1073 | + | let gM = fromBase58String(gL) | |
1074 | + | if ((gM == gM)) | |
1075 | + | then [StringEntry(ab(), gL)] | |
1074 | 1076 | else throw("Strict value is not equal to itself.") | |
1075 | 1077 | } | |
1076 | 1078 | else throw("Strict value is not equal to itself.") | |
1077 | 1079 | } | |
1078 | 1080 | ||
1079 | 1081 | ||
1080 | 1082 | ||
1081 | - | @Callable( | |
1083 | + | @Callable(cQ) | |
1082 | 1084 | func confirmManager () = { | |
1083 | - | let | |
1084 | - | let | |
1085 | + | let cv = gn() | |
1086 | + | let gN = if (isDefined(cv)) | |
1085 | 1087 | then true | |
1086 | 1088 | else throw("No pending manager") | |
1087 | - | if (( | |
1089 | + | if ((gN == gN)) | |
1088 | 1090 | then { | |
1089 | - | let | |
1091 | + | let gO = if ((cQ.callerPublicKey == value(cv))) | |
1090 | 1092 | then true | |
1091 | 1093 | else throw("You are not pending manager") | |
1092 | - | if (( | |
1093 | - | then [StringEntry( | |
1094 | + | if ((gO == gO)) | |
1095 | + | then [StringEntry(aa(), toBase58String(value(cv))), DeleteEntry(ab())] | |
1094 | 1096 | else throw("Strict value is not equal to itself.") | |
1095 | 1097 | } | |
1096 | 1098 | else throw("Strict value is not equal to itself.") | |
1097 | 1099 | } | |
1098 | 1100 | ||
1099 | 1101 | ||
1100 | 1102 | ||
1101 | - | @Callable( | |
1102 | - | func put ( | |
1103 | - | let | |
1104 | - | let | |
1105 | - | let | |
1106 | - | if ((0 > | |
1103 | + | @Callable(cQ) | |
1104 | + | func put (gP,gQ) = { | |
1105 | + | let gR = bt() | |
1106 | + | let gS = valueOrErrorMessage(addressFromString(gR[D]), "Wr st addr") | |
1107 | + | let gT = valueOrErrorMessage(addressFromString(gR[F]), "Wr sl addr") | |
1108 | + | if ((0 > gP)) | |
1107 | 1109 | then throw("Wrong slippage") | |
1108 | - | else if ((size( | |
1110 | + | else if ((size(cQ.payments) != 2)) | |
1109 | 1111 | then throw("2 pmnts expd") | |
1110 | 1112 | else { | |
1111 | - | let | |
1112 | - | let | |
1113 | - | let | |
1114 | - | if (( | |
1113 | + | let gU = toBigInt(value(cQ.payments[0]).amount) | |
1114 | + | let gV = toBigInt(value(cQ.payments[1]).amount) | |
1115 | + | let eP = (toBigInt(bO(bf(bn))) - gU) | |
1116 | + | if ((eP == eP)) | |
1115 | 1117 | then { | |
1116 | - | let | |
1117 | - | if (( | |
1118 | + | let eQ = (toBigInt(bO(bf(bo))) - gV) | |
1119 | + | if ((eQ == eQ)) | |
1118 | 1120 | then { | |
1119 | - | let | |
1120 | - | if (( | |
1121 | + | let eR = toBigInt(value(assetInfo(bm)).quantity) | |
1122 | + | if ((eR == eR)) | |
1121 | 1123 | then { | |
1122 | - | let | |
1123 | - | if (( | |
1124 | + | let eS = eL(gU, gV, toBigInt(0)) | |
1125 | + | if ((eS == eS)) | |
1124 | 1126 | then { | |
1125 | - | let | |
1126 | - | let | |
1127 | - | let | |
1128 | - | let | |
1129 | - | let | |
1130 | - | let | |
1131 | - | let | |
1132 | - | let | |
1133 | - | let | |
1134 | - | if (( | |
1127 | + | let gW = fm(toString(cQ.caller), toBase58String(cQ.transactionId), AttachedPayment(value(cQ.payments[0]).assetId, value(cQ.payments[0]).amount), cQ.payments[1], gP, true, false, true, 0, "") | |
1128 | + | let em = gW._2 | |
1129 | + | let gX = gW._7 | |
1130 | + | let dC = gW._9 | |
1131 | + | let en = gW._10 | |
1132 | + | let eo = gW._11 | |
1133 | + | let dk = gW._12 | |
1134 | + | let dl = gW._13 | |
1135 | + | let dY = invoke(aR, "emit", [em], nil) | |
1136 | + | if ((dY == dY)) | |
1135 | 1137 | then { | |
1136 | - | let | |
1137 | - | let | |
1138 | - | if ($isInstanceOf( | |
1138 | + | let gY = { | |
1139 | + | let gm = dY | |
1140 | + | if ($isInstanceOf(gm, "Address")) | |
1139 | 1141 | then { | |
1140 | - | let | |
1141 | - | invoke( | |
1142 | + | let gZ = gm | |
1143 | + | invoke(gZ, "emit", [em], nil) | |
1142 | 1144 | } | |
1143 | 1145 | else unit | |
1144 | 1146 | } | |
1145 | - | if (( | |
1147 | + | if ((gY == gY)) | |
1146 | 1148 | then { | |
1147 | - | let | |
1148 | - | then invoke( | |
1149 | + | let ha = if ((en > 0)) | |
1150 | + | then invoke(gT, "put", nil, [AttachedPayment(dk, en)]) | |
1149 | 1151 | else nil | |
1150 | - | if (( | |
1152 | + | if ((ha == ha)) | |
1151 | 1153 | then { | |
1152 | - | let | |
1153 | - | then invoke( | |
1154 | + | let hb = if ((eo > 0)) | |
1155 | + | then invoke(gT, "put", nil, [AttachedPayment(dl, eo)]) | |
1154 | 1156 | else nil | |
1155 | - | if (( | |
1157 | + | if ((hb == hb)) | |
1156 | 1158 | then { | |
1157 | - | let | |
1159 | + | let hc = if (gQ) | |
1158 | 1160 | then { | |
1159 | - | let | |
1160 | - | if (( | |
1161 | + | let hd = invoke(gS, "stake", nil, [AttachedPayment(gX, em)]) | |
1162 | + | if ((hd == hd)) | |
1161 | 1163 | then nil | |
1162 | 1164 | else throw("Strict value is not equal to itself.") | |
1163 | 1165 | } | |
1164 | - | else [ScriptTransfer( | |
1165 | - | let | |
1166 | - | let | |
1167 | - | let | |
1168 | - | let | |
1166 | + | else [ScriptTransfer(cQ.caller, em, gX)] | |
1167 | + | let he = eT(0, 0, 0) | |
1168 | + | let gj = he._1 | |
1169 | + | let eK = he._2 | |
1170 | + | let hf = if ((eK >= eS)) | |
1169 | 1171 | then true | |
1170 | - | else | |
1171 | - | if (( | |
1172 | + | else aO(makeString(["updated DLp lower than current DLp", toString(eP), toString(eQ), toString(eR), toString(eS), toString(eK), toString(en), toString(eo)], " ")) | |
1173 | + | if ((hf == hf)) | |
1172 | 1174 | then { | |
1173 | - | let | |
1174 | - | if (( | |
1175 | - | then (( | |
1175 | + | let hg = value(assetInfo(bm)).quantity | |
1176 | + | if ((hg == hg)) | |
1177 | + | then ((dC ++ hc) ++ gj) | |
1176 | 1178 | else throw("Strict value is not equal to itself.") | |
1177 | 1179 | } | |
1178 | 1180 | else throw("Strict value is not equal to itself.") | |
1179 | 1181 | } | |
1180 | 1182 | else throw("Strict value is not equal to itself.") | |
1181 | 1183 | } | |
1182 | 1184 | else throw("Strict value is not equal to itself.") | |
1183 | 1185 | } | |
1184 | 1186 | else throw("Strict value is not equal to itself.") | |
1185 | 1187 | } | |
1186 | 1188 | else throw("Strict value is not equal to itself.") | |
1187 | 1189 | } | |
1188 | 1190 | else throw("Strict value is not equal to itself.") | |
1189 | 1191 | } | |
1190 | 1192 | else throw("Strict value is not equal to itself.") | |
1191 | 1193 | } | |
1192 | 1194 | else throw("Strict value is not equal to itself.") | |
1193 | 1195 | } | |
1194 | 1196 | else throw("Strict value is not equal to itself.") | |
1195 | 1197 | } | |
1196 | 1198 | } | |
1197 | 1199 | ||
1198 | 1200 | ||
1199 | 1201 | ||
1200 | - | @Callable( | |
1201 | - | func putOneTknV2 ( | |
1202 | - | let | |
1203 | - | let | |
1204 | - | if ($isInstanceOf( | |
1205 | - | then | |
1206 | - | else throw(($getType( | |
1202 | + | @Callable(cQ) | |
1203 | + | func putOneTknV2 (fN,gQ) = { | |
1204 | + | let hh = { | |
1205 | + | let aT = invoke(aR, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1206 | + | if ($isInstanceOf(aT, "Boolean")) | |
1207 | + | then aT | |
1208 | + | else throw(($getType(aT) + " couldn't be cast to Boolean")) | |
1207 | 1209 | } | |
1208 | - | let | |
1210 | + | let hi = if (if (if (aW()) | |
1209 | 1211 | then true | |
1210 | - | else ( | |
1212 | + | else (bl == r)) | |
1211 | 1213 | then true | |
1212 | - | else ( | |
1214 | + | else (bl == t)) | |
1213 | 1215 | then true | |
1214 | - | else | |
1215 | - | let | |
1216 | + | else hh | |
1217 | + | let gH = [if (if (!(hi)) | |
1216 | 1218 | then true | |
1217 | - | else | |
1219 | + | else gp(cQ)) | |
1218 | 1220 | then true | |
1219 | - | else | |
1221 | + | else aO("put operation is blocked by admin"), if ((size(cQ.payments) == 1)) | |
1220 | 1222 | then true | |
1221 | - | else | |
1222 | - | if (( | |
1223 | + | else aO("exactly 1 payment are expected")] | |
1224 | + | if ((gH == gH)) | |
1223 | 1225 | then { | |
1224 | - | let dj = toBase58String(value(bm)) | |
1225 | 1226 | let dk = toBase58String(value(bn)) | |
1226 | - | let | |
1227 | - | let | |
1227 | + | let dl = toBase58String(value(bo)) | |
1228 | + | let dj = bm | |
1228 | 1229 | let fR = bp | |
1229 | - | let dh = if ((cP.caller == this)) | |
1230 | - | then cP.originCaller | |
1231 | - | else cP.caller | |
1232 | - | let fk = value(cP.payments[0]) | |
1233 | - | let df = toBase58String(value(fk.assetId)) | |
1234 | - | let dL = fk.amount | |
1235 | - | let eR = if ((fk.assetId == bm)) | |
1236 | - | then eK(toBigInt(dL), toBigInt(0), toBigInt(0)) | |
1237 | - | else eK(toBigInt(0), toBigInt(dL), toBigInt(0)) | |
1238 | - | if ((eR == eR)) | |
1230 | + | let fS = bq | |
1231 | + | let di = if ((cQ.caller == this)) | |
1232 | + | then cQ.originCaller | |
1233 | + | else cQ.caller | |
1234 | + | let fl = value(cQ.payments[0]) | |
1235 | + | let dg = toBase58String(value(fl.assetId)) | |
1236 | + | let dM = fl.amount | |
1237 | + | let eS = if ((fl.assetId == bn)) | |
1238 | + | then eL(toBigInt(dM), toBigInt(0), toBigInt(0)) | |
1239 | + | else eL(toBigInt(0), toBigInt(dM), toBigInt(0)) | |
1240 | + | if ((eS == eS)) | |
1239 | 1241 | then { | |
1240 | - | let | |
1241 | - | if (( | |
1242 | + | let hj = fq(dM, dg, toString(di), toBase58String(cQ.transactionId), true) | |
1243 | + | if ((hj == hj)) | |
1242 | 1244 | then { | |
1243 | - | let | |
1244 | - | let | |
1245 | - | let | |
1246 | - | let | |
1247 | - | then ( | |
1245 | + | let cy = hj._3 | |
1246 | + | let dC = hj._2 | |
1247 | + | let hk = hj._1 | |
1248 | + | let em = if (if ((fN > 0)) | |
1249 | + | then (fN > hk) | |
1248 | 1250 | else false) | |
1249 | - | then | |
1250 | - | else | |
1251 | - | let | |
1252 | - | if (( | |
1251 | + | then aO(makeString(["amount to receive is less than ", toString(fN)], "")) | |
1252 | + | else hk | |
1253 | + | let gW = invoke(aR, "emit", [em], nil) | |
1254 | + | if ((gW == gW)) | |
1253 | 1255 | then { | |
1254 | - | let | |
1255 | - | let | |
1256 | - | if ($isInstanceOf( | |
1256 | + | let gY = { | |
1257 | + | let gm = gW | |
1258 | + | if ($isInstanceOf(gm, "Address")) | |
1257 | 1259 | then { | |
1258 | - | let | |
1259 | - | invoke( | |
1260 | + | let gZ = gm | |
1261 | + | invoke(gZ, "emit", [em], nil) | |
1260 | 1262 | } | |
1261 | 1263 | else unit | |
1262 | 1264 | } | |
1263 | - | if (( | |
1265 | + | if ((gY == gY)) | |
1264 | 1266 | then { | |
1265 | - | let | |
1267 | + | let hc = if (gQ) | |
1266 | 1268 | then { | |
1267 | - | let | |
1268 | - | if (( | |
1269 | + | let hd = invoke(bv, "stake", nil, [AttachedPayment(dj, em)]) | |
1270 | + | if ((hd == hd)) | |
1269 | 1271 | then nil | |
1270 | 1272 | else throw("Strict value is not equal to itself.") | |
1271 | 1273 | } | |
1272 | - | else [ScriptTransfer( | |
1273 | - | let | |
1274 | - | then [ScriptTransfer( | |
1274 | + | else [ScriptTransfer(cQ.caller, em, dj)] | |
1275 | + | let gd = if ((cy > 0)) | |
1276 | + | then [ScriptTransfer(aY, cy, fromBase58String(dg))] | |
1275 | 1277 | else nil | |
1276 | - | let | |
1278 | + | let hl = if ((this == aY)) | |
1277 | 1279 | then $Tuple2(0, 0) | |
1278 | 1280 | else { | |
1279 | - | let | |
1281 | + | let hm = if ((fl.assetId == bn)) | |
1280 | 1282 | then true | |
1281 | 1283 | else false | |
1282 | - | if ( | |
1283 | - | then $Tuple2(-( | |
1284 | - | else $Tuple2(0, -( | |
1284 | + | if (hm) | |
1285 | + | then $Tuple2(-(cy), 0) | |
1286 | + | else $Tuple2(0, -(cy)) | |
1285 | 1287 | } | |
1286 | - | let | |
1287 | - | let | |
1288 | - | let | |
1289 | - | let | |
1290 | - | let | |
1291 | - | let | |
1292 | - | if (( | |
1293 | - | then $Tuple2(((( | |
1288 | + | let eU = hl._1 | |
1289 | + | let eV = hl._2 | |
1290 | + | let hn = eT(eU, eV, 0) | |
1291 | + | let gj = hn._1 | |
1292 | + | let eK = hn._2 | |
1293 | + | let gk = eX(eS, eK) | |
1294 | + | if ((gk == gk)) | |
1295 | + | then $Tuple2((((dC ++ hc) ++ gd) ++ gj), em) | |
1294 | 1296 | else throw("Strict value is not equal to itself.") | |
1295 | 1297 | } | |
1296 | 1298 | else throw("Strict value is not equal to itself.") | |
1297 | 1299 | } | |
1298 | 1300 | else throw("Strict value is not equal to itself.") | |
1299 | 1301 | } | |
1300 | 1302 | else throw("Strict value is not equal to itself.") | |
1301 | 1303 | } | |
1302 | 1304 | else throw("Strict value is not equal to itself.") | |
1303 | 1305 | } | |
1304 | 1306 | else throw("Strict value is not equal to itself.") | |
1305 | 1307 | } | |
1306 | 1308 | ||
1307 | 1309 | ||
1308 | 1310 | ||
1309 | - | @Callable( | |
1310 | - | func putForFree ( | |
1311 | + | @Callable(cQ) | |
1312 | + | func putForFree (ho) = if ((0 > ho)) | |
1311 | 1313 | then throw("Wrong slpg") | |
1312 | - | else if ((size( | |
1314 | + | else if ((size(cQ.payments) != 2)) | |
1313 | 1315 | then throw("2 pmnts expd") | |
1314 | 1316 | else { | |
1315 | - | let | |
1316 | - | let | |
1317 | - | let | |
1318 | - | let | |
1319 | - | let | |
1320 | - | if (( | |
1317 | + | let hp = fm(toString(cQ.caller), toBase58String(cQ.transactionId), AttachedPayment(value(cQ.payments[0]).assetId, value(cQ.payments[0]).amount), cQ.payments[1], ho, false, false, true, 0, "") | |
1318 | + | let dC = hp._9 | |
1319 | + | let gU = toBigInt(value(cQ.payments[0]).amount) | |
1320 | + | let gV = toBigInt(value(cQ.payments[1]).amount) | |
1321 | + | let eS = eL(gU, gV, toBigInt(0)) | |
1322 | + | if ((eS == eS)) | |
1321 | 1323 | then { | |
1322 | - | let | |
1323 | - | let | |
1324 | - | let | |
1325 | - | let | |
1326 | - | if (( | |
1327 | - | then ( | |
1324 | + | let hq = eT(0, 0, 0) | |
1325 | + | let gj = hq._1 | |
1326 | + | let eK = hq._2 | |
1327 | + | let gk = eX(eS, eK) | |
1328 | + | if ((gk == gk)) | |
1329 | + | then (dC ++ gj) | |
1328 | 1330 | else throw("Strict value is not equal to itself.") | |
1329 | 1331 | } | |
1330 | 1332 | else throw("Strict value is not equal to itself.") | |
1331 | 1333 | } | |
1332 | 1334 | ||
1333 | 1335 | ||
1334 | 1336 | ||
1335 | - | @Callable( | |
1337 | + | @Callable(cQ) | |
1336 | 1338 | func get () = { | |
1337 | - | let | |
1338 | - | if (( | |
1339 | + | let eS = eL(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1340 | + | if ((eS == eS)) | |
1339 | 1341 | then { | |
1340 | - | let | |
1341 | - | let | |
1342 | - | let | |
1343 | - | let | |
1344 | - | let | |
1345 | - | let | |
1346 | - | let | |
1347 | - | if (( | |
1342 | + | let dY = fk(cQ) | |
1343 | + | let hr = dY._1 | |
1344 | + | let dB = dY._2 | |
1345 | + | let dM = dY._3 | |
1346 | + | let dg = dY._4 | |
1347 | + | let dC = dY._5 | |
1348 | + | let ez = invoke(aR, "burn", [dM], [AttachedPayment(dg, dM)]) | |
1349 | + | if ((ez == ez)) | |
1348 | 1350 | then { | |
1349 | - | let | |
1350 | - | let | |
1351 | - | let | |
1352 | - | let | |
1353 | - | if (( | |
1354 | - | then ( | |
1351 | + | let hs = eT(-(hr), -(dB), 0) | |
1352 | + | let gj = hs._1 | |
1353 | + | let eK = hs._2 | |
1354 | + | let gk = eX(eS, eK) | |
1355 | + | if ((gk == gk)) | |
1356 | + | then (dC ++ gj) | |
1355 | 1357 | else throw("Strict value is not equal to itself.") | |
1356 | 1358 | } | |
1357 | 1359 | else throw("Strict value is not equal to itself.") | |
1358 | 1360 | } | |
1359 | 1361 | else throw("Strict value is not equal to itself.") | |
1360 | 1362 | } | |
1361 | 1363 | ||
1362 | 1364 | ||
1363 | 1365 | ||
1364 | - | @Callable( | |
1365 | - | func getOneTknV2 ( | |
1366 | - | let | |
1367 | - | let | |
1368 | - | if ($isInstanceOf( | |
1369 | - | then | |
1370 | - | else throw(($getType( | |
1366 | + | @Callable(cQ) | |
1367 | + | func getOneTknV2 (fM,fN) = { | |
1368 | + | let hh = { | |
1369 | + | let aT = invoke(aR, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1370 | + | if ($isInstanceOf(aT, "Boolean")) | |
1371 | + | then aT | |
1372 | + | else throw(($getType(aT) + " couldn't be cast to Boolean")) | |
1371 | 1373 | } | |
1372 | - | let | |
1374 | + | let ht = if (if (aW()) | |
1373 | 1375 | then true | |
1374 | - | else ( | |
1376 | + | else (bl == t)) | |
1375 | 1377 | then true | |
1376 | - | else | |
1377 | - | let | |
1378 | + | else hh | |
1379 | + | let gH = [if (if (!(ht)) | |
1378 | 1380 | then true | |
1379 | - | else | |
1381 | + | else gp(cQ)) | |
1380 | 1382 | then true | |
1381 | - | else | |
1383 | + | else aO("get operation is blocked by admin"), if ((size(cQ.payments) == 1)) | |
1382 | 1384 | then true | |
1383 | - | else | |
1384 | - | if (( | |
1385 | + | else aO("exactly 1 payment are expected")] | |
1386 | + | if ((gH == gH)) | |
1385 | 1387 | then { | |
1386 | - | let | |
1387 | - | let | |
1388 | - | let | |
1389 | - | $Tuple2( | |
1388 | + | let hu = fL(fM, fN, cQ.payments, cQ.caller, cQ.originCaller, cQ.transactionId) | |
1389 | + | let dC = hu._1 | |
1390 | + | let fW = hu._2 | |
1391 | + | $Tuple2(dC, fW) | |
1390 | 1392 | } | |
1391 | 1393 | else throw("Strict value is not equal to itself.") | |
1392 | 1394 | } | |
1393 | 1395 | ||
1394 | 1396 | ||
1395 | 1397 | ||
1396 | - | @Callable( | |
1398 | + | @Callable(cQ) | |
1397 | 1399 | func refreshDLp () = { | |
1398 | - | let | |
1399 | - | let | |
1400 | + | let hv = valueOrElse(getInteger(ar), 0) | |
1401 | + | let hw = if (((height - hv) >= au)) | |
1400 | 1402 | then unit | |
1401 | - | else | |
1402 | - | if (( | |
1403 | + | else aO(makeString([toString(au), " blocks have not passed since the previous call"], "")) | |
1404 | + | if ((hw == hw)) | |
1403 | 1405 | then { | |
1404 | - | let | |
1405 | - | let | |
1406 | - | let | |
1407 | - | let | |
1408 | - | let | |
1409 | - | then | |
1410 | - | else | |
1411 | - | $Tuple2( | |
1406 | + | let fe = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, aq), "0")), aQ("invalid dLp")) | |
1407 | + | let hx = eT(0, 0, 0) | |
1408 | + | let hy = hx._1 | |
1409 | + | let eK = hx._2 | |
1410 | + | let eW = if ((fe != eK)) | |
1411 | + | then hy | |
1412 | + | else aO("nothing to refresh") | |
1413 | + | $Tuple2(eW, toString(eK)) | |
1412 | 1414 | } | |
1413 | 1415 | else throw("Strict value is not equal to itself.") | |
1414 | 1416 | } | |
1415 | 1417 | ||
1416 | 1418 | ||
1417 | 1419 | ||
1418 | - | @Callable(cP) | |
1419 | - | func getOneTknV2READONLY (fL,hy) = { | |
1420 | + | @Callable(cQ) | |
1421 | + | func getOneTknV2READONLY (fM,hz) = { | |
1422 | + | let dk = toBase58String(value(bn)) | |
1423 | + | let dl = toBase58String(value(bo)) | |
1420 | 1424 | let dj = toBase58String(value(bm)) | |
1421 | - | let dk = toBase58String(value(bn)) | |
1422 | - | let di = toBase58String(value(bl)) | |
1423 | - | let cz = [toBigInt(bN(dj)), toBigInt(bN(dk))] | |
1424 | - | let eI = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(di)), "invalid lp asset").quantity) | |
1425 | - | let cb = cy(cz) | |
1426 | - | let ca = (cb - fraction(toBigInt(hy), cb, eI)) | |
1427 | - | let hz = if ((fL == dj)) | |
1425 | + | let cA = [toBigInt(bO(dk)), toBigInt(bO(dl))] | |
1426 | + | let eJ = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(dj)), "invalid lp asset").quantity) | |
1427 | + | let cc = cz(cA) | |
1428 | + | let cb = (cc - fraction(toBigInt(hz), cc, eJ)) | |
1429 | + | let hA = if ((fM == dk)) | |
1428 | 1430 | then 0 | |
1429 | - | else if (( | |
1431 | + | else if ((fM == dl)) | |
1430 | 1432 | then 1 | |
1431 | 1433 | else throw("invalid out asset id") | |
1432 | - | let | |
1433 | - | let | |
1434 | - | let | |
1435 | - | let | |
1436 | - | let | |
1437 | - | let | |
1438 | - | $Tuple2(nil, $Tuple2( | |
1434 | + | let hB = et(cA, hA, cb) | |
1435 | + | let gA = (cA[hA] - hB) | |
1436 | + | let gB = max([0, toInt((gA - f))]) | |
1437 | + | let hC = cw(gB, aU) | |
1438 | + | let fV = hC._1 | |
1439 | + | let cy = hC._2 | |
1440 | + | $Tuple2(nil, $Tuple2(fV, cy)) | |
1439 | 1441 | } | |
1440 | 1442 | ||
1441 | 1443 | ||
1442 | 1444 | ||
1443 | - | @Callable(cP) | |
1444 | - | func getOneTknV2WithBonusREADONLY (fL,hy) = { | |
1445 | + | @Callable(cQ) | |
1446 | + | func getOneTknV2WithBonusREADONLY (fM,hz) = { | |
1447 | + | let dk = toBase58String(value(bn)) | |
1448 | + | let dl = toBase58String(value(bo)) | |
1445 | 1449 | let dj = toBase58String(value(bm)) | |
1446 | - | let dk = toBase58String(value(bn)) | |
1447 | - | let di = toBase58String(value(bl)) | |
1448 | - | let dp = bN(dj) | |
1449 | - | let dr = bN(dk) | |
1450 | - | let hC = { | |
1451 | - | let aS = invoke(this, "getOneTknV2READONLY", [fL, hy], nil) | |
1452 | - | if ($isInstanceOf(aS, "(Int, Int)")) | |
1453 | - | then aS | |
1454 | - | else throw(($getType(aS) + " couldn't be cast to (Int, Int)")) | |
1450 | + | let dq = bO(dk) | |
1451 | + | let ds = bO(dl) | |
1452 | + | let hD = { | |
1453 | + | let aT = invoke(this, "getOneTknV2READONLY", [fM, hz], nil) | |
1454 | + | if ($isInstanceOf(aT, "(Int, Int)")) | |
1455 | + | then aT | |
1456 | + | else throw(($getType(aT) + " couldn't be cast to (Int, Int)")) | |
1455 | 1457 | } | |
1456 | - | let | |
1457 | - | let | |
1458 | - | let | |
1459 | - | let | |
1460 | - | let | |
1461 | - | let | |
1462 | - | let | |
1463 | - | then if (( | |
1458 | + | let fV = hD._1 | |
1459 | + | let cy = hD._2 | |
1460 | + | let dY = de("", dj, hz, this) | |
1461 | + | let dA = dY._1 | |
1462 | + | let dB = dY._2 | |
1463 | + | let hE = (dA + dB) | |
1464 | + | let fK = if ((hE == 0)) | |
1465 | + | then if ((fV == 0)) | |
1464 | 1466 | then 0 | |
1465 | 1467 | else throw("bonus calculation error") | |
1466 | - | else fraction(( | |
1467 | - | $Tuple2(nil, $Tuple3( | |
1468 | + | else fraction((fV - hE), a, hE) | |
1469 | + | $Tuple2(nil, $Tuple3(fV, cy, fK)) | |
1468 | 1470 | } | |
1469 | 1471 | ||
1470 | 1472 | ||
1471 | 1473 | ||
1472 | - | @Callable( | |
1473 | - | func getNoLess ( | |
1474 | - | let | |
1475 | - | let | |
1476 | - | let | |
1477 | - | let | |
1478 | - | let | |
1479 | - | let | |
1480 | - | if (( | |
1481 | - | then throw(((("Failed: " + toString( | |
1482 | - | else if (( | |
1483 | - | then throw(((("Failed: " + toString( | |
1474 | + | @Callable(cQ) | |
1475 | + | func getNoLess (hF,hG) = { | |
1476 | + | let dY = fk(cQ) | |
1477 | + | let dA = dY._1 | |
1478 | + | let dB = dY._2 | |
1479 | + | let dM = dY._3 | |
1480 | + | let dg = dY._4 | |
1481 | + | let dC = dY._5 | |
1482 | + | if ((hF > dA)) | |
1483 | + | then throw(((("Failed: " + toString(dA)) + " < ") + toString(hF))) | |
1484 | + | else if ((hG > dB)) | |
1485 | + | then throw(((("Failed: " + toString(dB)) + " < ") + toString(hG))) | |
1484 | 1486 | else { | |
1485 | - | let | |
1486 | - | if (( | |
1487 | + | let eS = eL(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1488 | + | if ((eS == eS)) | |
1487 | 1489 | then { | |
1488 | - | let | |
1489 | - | if (( | |
1490 | + | let hH = invoke(aR, "burn", [dM], [AttachedPayment(dg, dM)]) | |
1491 | + | if ((hH == hH)) | |
1490 | 1492 | then { | |
1491 | - | let | |
1492 | - | let | |
1493 | - | let | |
1494 | - | let | |
1495 | - | if (( | |
1496 | - | then ( | |
1493 | + | let hI = eT(-(dA), -(dB), 0) | |
1494 | + | let gj = hI._1 | |
1495 | + | let eK = hI._2 | |
1496 | + | let gk = eX(eS, eK) | |
1497 | + | if ((gk == gk)) | |
1498 | + | then (dC ++ gj) | |
1497 | 1499 | else throw("Strict value is not equal to itself.") | |
1498 | 1500 | } | |
1499 | 1501 | else throw("Strict value is not equal to itself.") | |
1500 | 1502 | } | |
1501 | 1503 | else throw("Strict value is not equal to itself.") | |
1502 | 1504 | } | |
1503 | 1505 | } | |
1504 | 1506 | ||
1505 | 1507 | ||
1506 | 1508 | ||
1507 | - | @Callable( | |
1508 | - | func unstakeAndGet ( | |
1509 | - | let | |
1509 | + | @Callable(cQ) | |
1510 | + | func unstakeAndGet (cx) = { | |
1511 | + | let hJ = if ((size(cQ.payments) != 0)) | |
1510 | 1512 | then throw("No pmnts expd") | |
1511 | 1513 | else true | |
1512 | - | if (( | |
1514 | + | if ((hJ == hJ)) | |
1513 | 1515 | then { | |
1514 | - | let | |
1515 | - | let | |
1516 | - | let | |
1517 | - | let | |
1518 | - | if (( | |
1516 | + | let hK = bt() | |
1517 | + | let gX = bm | |
1518 | + | let hL = valueOrErrorMessage(addressFromString(hK[D]), "Wr st addr") | |
1519 | + | let eS = eL(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1520 | + | if ((eS == eS)) | |
1519 | 1521 | then { | |
1520 | - | let | |
1521 | - | if (( | |
1522 | + | let hM = invoke(hL, "unstake", [toBase58String(gX), cx], nil) | |
1523 | + | if ((hM == hM)) | |
1522 | 1524 | then { | |
1523 | - | let | |
1524 | - | let | |
1525 | - | let | |
1526 | - | let | |
1527 | - | let | |
1528 | - | let | |
1525 | + | let dY = de(toBase58String(cQ.transactionId), toBase58String(gX), cx, cQ.caller) | |
1526 | + | let dA = dY._1 | |
1527 | + | let dB = dY._2 | |
1528 | + | let do = parseIntValue(dY._9) | |
1529 | + | let dC = dY._10 | |
1530 | + | let hN = if (if (aW()) | |
1529 | 1531 | then true | |
1530 | - | else ( | |
1531 | - | then throw(("Blocked: " + toString( | |
1532 | + | else (do == t)) | |
1533 | + | then throw(("Blocked: " + toString(do))) | |
1532 | 1534 | else true | |
1533 | - | if (( | |
1535 | + | if ((hN == hN)) | |
1534 | 1536 | then { | |
1535 | - | let | |
1536 | - | if (( | |
1537 | + | let hO = invoke(aR, "burn", [cx], [AttachedPayment(gX, cx)]) | |
1538 | + | if ((hO == hO)) | |
1537 | 1539 | then { | |
1538 | - | let | |
1539 | - | let | |
1540 | - | let | |
1541 | - | let | |
1542 | - | if (( | |
1543 | - | then ( | |
1540 | + | let hP = eT(-(dA), -(dB), 0) | |
1541 | + | let gj = hP._1 | |
1542 | + | let eK = hP._2 | |
1543 | + | let gk = eX(eS, eK) | |
1544 | + | if ((gk == gk)) | |
1545 | + | then (dC ++ gj) | |
1544 | 1546 | else throw("Strict value is not equal to itself.") | |
1545 | 1547 | } | |
1546 | 1548 | else throw("Strict value is not equal to itself.") | |
1547 | 1549 | } | |
1548 | 1550 | else throw("Strict value is not equal to itself.") | |
1549 | 1551 | } | |
1550 | 1552 | else throw("Strict value is not equal to itself.") | |
1551 | 1553 | } | |
1552 | 1554 | else throw("Strict value is not equal to itself.") | |
1553 | 1555 | } | |
1554 | 1556 | else throw("Strict value is not equal to itself.") | |
1555 | 1557 | } | |
1556 | 1558 | ||
1557 | 1559 | ||
1558 | 1560 | ||
1559 | - | @Callable( | |
1560 | - | func unstakeAndGetNoLess ( | |
1561 | - | let | |
1561 | + | @Callable(cQ) | |
1562 | + | func unstakeAndGetNoLess (hQ,hR,hG) = { | |
1563 | + | let ht = if (aW()) | |
1562 | 1564 | then true | |
1563 | - | else ( | |
1564 | - | let | |
1565 | + | else (bl == t) | |
1566 | + | let gH = [if (!(ht)) | |
1565 | 1567 | then true | |
1566 | - | else throw("get operation is blocked by admin"), if ((size( | |
1568 | + | else throw("get operation is blocked by admin"), if ((size(cQ.payments) == 0)) | |
1567 | 1569 | then true | |
1568 | 1570 | else throw("no payments are expected")] | |
1569 | - | if (( | |
1571 | + | if ((gH == gH)) | |
1570 | 1572 | then { | |
1571 | - | let | |
1572 | - | if (( | |
1573 | + | let eS = eL(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1574 | + | if ((eS == eS)) | |
1573 | 1575 | then { | |
1574 | - | let | |
1575 | - | if (( | |
1576 | + | let hM = invoke(bv, "unstake", [toBase58String(bm), hQ], nil) | |
1577 | + | if ((hM == hM)) | |
1576 | 1578 | then { | |
1577 | - | let | |
1578 | - | let | |
1579 | - | let | |
1580 | - | let | |
1581 | - | let | |
1579 | + | let hS = de(toBase58String(cQ.transactionId), toBase58String(bm), hQ, cQ.caller) | |
1580 | + | let dA = hS._1 | |
1581 | + | let dB = hS._2 | |
1582 | + | let dC = hS._10 | |
1583 | + | let hT = [if ((dA >= hR)) | |
1582 | 1584 | then true | |
1583 | - | else throw(makeString(["amount asset amount to receive is less than ", toString( | |
1585 | + | else throw(makeString(["amount asset amount to receive is less than ", toString(hR)], "")), if ((dB >= hG)) | |
1584 | 1586 | then true | |
1585 | - | else throw(makeString(["price asset amount to receive is less than ", toString( | |
1586 | - | if (( | |
1587 | + | else throw(makeString(["price asset amount to receive is less than ", toString(hG)], ""))] | |
1588 | + | if ((hT == hT)) | |
1587 | 1589 | then { | |
1588 | - | let | |
1589 | - | if (( | |
1590 | + | let hH = invoke(aR, "burn", [hQ], [AttachedPayment(bm, hQ)]) | |
1591 | + | if ((hH == hH)) | |
1590 | 1592 | then { | |
1591 | - | let | |
1592 | - | let | |
1593 | - | let | |
1594 | - | let | |
1595 | - | if (( | |
1596 | - | then ( | |
1593 | + | let hU = eT(-(dA), -(dB), 0) | |
1594 | + | let gj = hU._1 | |
1595 | + | let eK = hU._2 | |
1596 | + | let gk = eX(eS, eK) | |
1597 | + | if ((gk == gk)) | |
1598 | + | then (dC ++ gj) | |
1597 | 1599 | else throw("Strict value is not equal to itself.") | |
1598 | 1600 | } | |
1599 | 1601 | else throw("Strict value is not equal to itself.") | |
1600 | 1602 | } | |
1601 | 1603 | else throw("Strict value is not equal to itself.") | |
1602 | 1604 | } | |
1603 | 1605 | else throw("Strict value is not equal to itself.") | |
1604 | 1606 | } | |
1605 | 1607 | else throw("Strict value is not equal to itself.") | |
1606 | 1608 | } | |
1607 | 1609 | else throw("Strict value is not equal to itself.") | |
1608 | 1610 | } | |
1609 | 1611 | ||
1610 | 1612 | ||
1611 | 1613 | ||
1612 | - | @Callable( | |
1613 | - | func unstakeAndGetOneTknV2 ( | |
1614 | - | let | |
1615 | - | let | |
1616 | - | if ($isInstanceOf( | |
1617 | - | then | |
1618 | - | else throw(($getType( | |
1614 | + | @Callable(cQ) | |
1615 | + | func unstakeAndGetOneTknV2 (hQ,fM,fN) = { | |
1616 | + | let hh = { | |
1617 | + | let aT = invoke(aR, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1618 | + | if ($isInstanceOf(aT, "Boolean")) | |
1619 | + | then aT | |
1620 | + | else throw(($getType(aT) + " couldn't be cast to Boolean")) | |
1619 | 1621 | } | |
1620 | - | let | |
1622 | + | let ht = if (if (aW()) | |
1621 | 1623 | then true | |
1622 | - | else ( | |
1624 | + | else (bl == t)) | |
1623 | 1625 | then true | |
1624 | - | else | |
1625 | - | let | |
1626 | + | else hh | |
1627 | + | let gH = [if (if (!(ht)) | |
1626 | 1628 | then true | |
1627 | - | else | |
1629 | + | else gp(cQ)) | |
1628 | 1630 | then true | |
1629 | - | else | |
1631 | + | else aO("get operation is blocked by admin"), if ((size(cQ.payments) == 0)) | |
1630 | 1632 | then true | |
1631 | - | else | |
1632 | - | if (( | |
1633 | + | else aO("no payments are expected")] | |
1634 | + | if ((gH == gH)) | |
1633 | 1635 | then { | |
1634 | - | let | |
1635 | - | let | |
1636 | - | let | |
1637 | - | let | |
1638 | - | if (( | |
1636 | + | let hK = bt() | |
1637 | + | let gX = bm | |
1638 | + | let hL = valueOrErrorMessage(addressFromString(hK[D]), "Wr st addr") | |
1639 | + | let hM = invoke(hL, "unstake", [toBase58String(gX), hQ], nil) | |
1640 | + | if ((hM == hM)) | |
1639 | 1641 | then { | |
1640 | - | let | |
1641 | - | let | |
1642 | - | let | |
1643 | - | $Tuple2( | |
1642 | + | let hV = fL(fM, fN, [AttachedPayment(gX, hQ)], cQ.caller, cQ.originCaller, cQ.transactionId) | |
1643 | + | let dC = hV._1 | |
1644 | + | let fW = hV._2 | |
1645 | + | $Tuple2(dC, fW) | |
1644 | 1646 | } | |
1645 | 1647 | else throw("Strict value is not equal to itself.") | |
1646 | 1648 | } | |
1647 | 1649 | else throw("Strict value is not equal to itself.") | |
1648 | 1650 | } | |
1649 | 1651 | ||
1650 | 1652 | ||
1651 | 1653 | ||
1652 | - | @Callable( | |
1653 | - | func putOneTknV2WithBonusREADONLY ( | |
1654 | - | let | |
1655 | - | let | |
1656 | - | let | |
1657 | - | let | |
1658 | - | let | |
1659 | - | $Tuple2(nil, $Tuple3( | |
1654 | + | @Callable(cQ) | |
1655 | + | func putOneTknV2WithBonusREADONLY (hW,hX) = { | |
1656 | + | let hY = fq(hW, hX, "", "", true) | |
1657 | + | let fF = hY._1 | |
1658 | + | let dC = hY._2 | |
1659 | + | let cy = hY._3 | |
1660 | + | let fK = hY._4 | |
1661 | + | $Tuple2(nil, $Tuple3(fF, cy, fK)) | |
1660 | 1662 | } | |
1661 | 1663 | ||
1662 | 1664 | ||
1663 | 1665 | ||
1664 | - | @Callable( | |
1665 | - | func putOneTknV2WithoutTakeFeeREADONLY ( | |
1666 | - | let | |
1667 | - | let | |
1668 | - | let | |
1669 | - | let | |
1670 | - | let | |
1671 | - | $Tuple2(nil, $Tuple3( | |
1666 | + | @Callable(cQ) | |
1667 | + | func putOneTknV2WithoutTakeFeeREADONLY (hW,hX) = { | |
1668 | + | let hZ = fq(hW, hX, "", "", false) | |
1669 | + | let fF = hZ._1 | |
1670 | + | let dC = hZ._2 | |
1671 | + | let cy = hZ._3 | |
1672 | + | let fK = hZ._4 | |
1673 | + | $Tuple2(nil, $Tuple3(fF, cy, fK)) | |
1672 | 1674 | } | |
1673 | 1675 | ||
1674 | 1676 | ||
1675 | 1677 | ||
1676 | - | @Callable( | |
1677 | - | func activate ( | |
1678 | + | @Callable(cQ) | |
1679 | + | func activate (ia,ib) = if ((toString(cQ.caller) != toString(aR))) | |
1678 | 1680 | then throw("denied") | |
1679 | - | else $Tuple2([StringEntry( | |
1681 | + | else $Tuple2([StringEntry(ak(), ia), StringEntry(al(), ib)], "success") | |
1680 | 1682 | ||
1681 | 1683 | ||
1682 | 1684 | ||
1683 | - | @Callable( | |
1684 | - | func setS ( | |
1685 | - | then | |
1686 | - | else [StringEntry( | |
1685 | + | @Callable(cQ) | |
1686 | + | func setS (ic,hN) = if ((toString(cQ.caller) != aK(this, an()))) | |
1687 | + | then go | |
1688 | + | else [StringEntry(ic, hN)] | |
1687 | 1689 | ||
1688 | 1690 | ||
1689 | 1691 | ||
1690 | - | @Callable( | |
1691 | - | func setI ( | |
1692 | - | then | |
1693 | - | else [IntegerEntry( | |
1692 | + | @Callable(cQ) | |
1693 | + | func setI (ic,hN) = if ((toString(cQ.caller) != aK(this, an()))) | |
1694 | + | then go | |
1695 | + | else [IntegerEntry(ic, hN)] | |
1694 | 1696 | ||
1695 | 1697 | ||
1696 | 1698 | ||
1697 | - | @Callable( | |
1698 | - | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, | |
1699 | + | @Callable(cQ) | |
1700 | + | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aZ()) | |
1699 | 1701 | ||
1700 | 1702 | ||
1701 | 1703 | ||
1702 | - | @Callable( | |
1703 | - | func getAccBalanceWrapperREADONLY ( | |
1704 | + | @Callable(cQ) | |
1705 | + | func getAccBalanceWrapperREADONLY (bP) = $Tuple2(nil, bO(bP)) | |
1704 | 1706 | ||
1705 | 1707 | ||
1706 | 1708 | ||
1707 | - | @Callable( | |
1708 | - | func calcPricesWrapperREADONLY ( | |
1709 | - | let | |
1710 | - | $Tuple2(nil, [toString( | |
1709 | + | @Callable(cQ) | |
1710 | + | func calcPricesWrapperREADONLY (ci,cj,cn) = { | |
1711 | + | let id = cm(ci, cj, cn) | |
1712 | + | $Tuple2(nil, [toString(id[0]), toString(id[1]), toString(id[2])]) | |
1711 | 1713 | } | |
1712 | 1714 | ||
1713 | 1715 | ||
1714 | 1716 | ||
1715 | - | @Callable( | |
1716 | - | func fromX18WrapperREADONLY ( | |
1717 | + | @Callable(cQ) | |
1718 | + | func fromX18WrapperREADONLY (N,ie) = $Tuple2(nil, M(parseBigIntValue(N), ie)) | |
1717 | 1719 | ||
1718 | 1720 | ||
1719 | 1721 | ||
1720 | - | @Callable( | |
1721 | - | func toX18WrapperREADONLY ( | |
1722 | + | @Callable(cQ) | |
1723 | + | func toX18WrapperREADONLY (J,K) = $Tuple2(nil, toString(I(J, K))) | |
1722 | 1724 | ||
1723 | 1725 | ||
1724 | 1726 | ||
1725 | - | @Callable( | |
1726 | - | func calcPriceBigIntWrapperREADONLY ( | |
1727 | + | @Callable(cQ) | |
1728 | + | func calcPriceBigIntWrapperREADONLY (bR,bS) = $Tuple2(nil, toString(bQ(parseBigIntValue(bR), parseBigIntValue(bS)))) | |
1727 | 1729 | ||
1728 | 1730 | ||
1729 | 1731 | ||
1730 | - | @Callable( | |
1731 | - | func estimatePutOperationWrapperREADONLY ( | |
1732 | + | @Callable(cQ) | |
1733 | + | func estimatePutOperationWrapperREADONLY (df,bX,dE,dF,dG,dH,if,dI,dJ) = $Tuple2(nil, dD(df, bX, dE, dF, dG, dH, if, dI, dJ, true, false, 0, "")) | |
1732 | 1734 | ||
1733 | 1735 | ||
1734 | 1736 | ||
1735 | - | @Callable( | |
1736 | - | func estimateGetOperationWrapperREADONLY ( | |
1737 | - | let | |
1738 | - | $Tuple2(nil, $Tuple10( | |
1737 | + | @Callable(cQ) | |
1738 | + | func estimateGetOperationWrapperREADONLY (df,ig,dh,if) = { | |
1739 | + | let dY = de(df, ig, dh, addressFromStringValue(if)) | |
1740 | + | $Tuple2(nil, $Tuple10(dY._1, dY._2, dY._3, dY._4, dY._5, dY._6, dY._7, toString(dY._8), dY._9, dY._10)) | |
1739 | 1741 | } | |
1740 | 1742 | ||
1741 | 1743 | ||
1742 | - | @Verifier( | |
1743 | - | func | |
1744 | - | let | |
1745 | - | let | |
1746 | - | if ($isInstanceOf( | |
1744 | + | @Verifier(ih) | |
1745 | + | func ii () = { | |
1746 | + | let ij = { | |
1747 | + | let gm = gl() | |
1748 | + | if ($isInstanceOf(gm, "ByteVector")) | |
1747 | 1749 | then { | |
1748 | - | let | |
1749 | - | | |
1750 | + | let gq = gm | |
1751 | + | gq | |
1750 | 1752 | } | |
1751 | - | else if ($isInstanceOf( | |
1752 | - | then | |
1753 | + | else if ($isInstanceOf(gm, "Unit")) | |
1754 | + | then ih.senderPublicKey | |
1753 | 1755 | else throw("Match error") | |
1754 | 1756 | } | |
1755 | - | let | |
1756 | - | if ($isInstanceOf( | |
1757 | + | let gm = ih | |
1758 | + | if ($isInstanceOf(gm, "Order")) | |
1757 | 1759 | then { | |
1758 | - | let eZ = gl | |
1759 | - | let ij = aW() | |
1760 | - | let ik = eY(eZ) | |
1761 | - | let aF = ik._1 | |
1762 | - | let aG = ik._2 | |
1763 | - | let aH = sigVerify(eZ.bodyBytes, eZ.proofs[0], eZ.senderPublicKey) | |
1764 | - | let aI = sigVerify(eZ.bodyBytes, eZ.proofs[1], ij) | |
1765 | - | if (if (if (aF) | |
1766 | - | then aH | |
1767 | - | else false) | |
1760 | + | let fa = gm | |
1761 | + | let ik = aX() | |
1762 | + | let il = eZ(fa) | |
1763 | + | let aG = il._1 | |
1764 | + | let aH = il._2 | |
1765 | + | let aI = sigVerify(fa.bodyBytes, fa.proofs[0], fa.senderPublicKey) | |
1766 | + | let aJ = sigVerify(fa.bodyBytes, fa.proofs[1], ik) | |
1767 | + | if (if (if (aG) | |
1768 | 1768 | then aI | |
1769 | 1769 | else false) | |
1770 | + | then aJ | |
1771 | + | else false) | |
1770 | 1772 | then true | |
1771 | - | else | |
1773 | + | else aF(aG, aH, aI, aJ) | |
1772 | 1774 | } | |
1773 | - | else if ($isInstanceOf( | |
1775 | + | else if ($isInstanceOf(gm, "SetScriptTransaction")) | |
1774 | 1776 | then { | |
1775 | - | let | |
1776 | - | if (sigVerify( | |
1777 | + | let cD = gm | |
1778 | + | if (sigVerify(ih.bodyBytes, ih.proofs[0], ij)) | |
1777 | 1779 | then true | |
1778 | 1780 | else { | |
1779 | - | let | |
1780 | - | let | |
1781 | - | let | |
1782 | - | if (( | |
1783 | - | then ( | |
1781 | + | let im = blake2b256(value(cD.script)) | |
1782 | + | let in = fromBase64String(value(getString(aR, aD()))) | |
1783 | + | let io = scriptHash(this) | |
1784 | + | if ((in == im)) | |
1785 | + | then (io != im) | |
1784 | 1786 | else false | |
1785 | 1787 | } | |
1786 | 1788 | } | |
1787 | - | else sigVerify( | |
1789 | + | else sigVerify(ih.bodyBytes, ih.proofs[0], ij) | |
1788 | 1790 | } | |
1789 | 1791 |
github/deemru/w8io/169f3d6 750.92 ms ◑