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