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