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