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