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