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