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