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