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