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