tx · J5Lh9MkQ91t9KECkv7tAdt17itVkLFbzdZMGejJ2G3RB 3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA: -0.02900000 Waves 2022.09.12 17:24 [2226003] smart account 3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA > SELF 0.00000000 Waves
{ "type": 13, "id": "J5Lh9MkQ91t9KECkv7tAdt17itVkLFbzdZMGejJ2G3RB", "fee": 2900000, "feeAssetId": null, "timestamp": 1662992756587, "version": 1, "sender": "3MzKSdTH2jFbypLsoNfrH7QgkzSbx3EYwCA", "senderPublicKey": "35yd3qw1gxKDxKwGAykHN9fANbXNWwseaUwbWDj24o3x", "proofs": [ "2mCyJRU8eUmxJzfXbFvsqyVHASyNERrZpJvc3SrfARmjE6qA5RbADyXkM5d5PTkpCq3YozsA7nngTDPzwoApb9oM" ], "script": "base64:BgJ/CAISAwoBCBIDCgEIEgASBAoCAQQSBwoFAQEBAQQSAwoBARIAEgcKBQEBAQgBEgQKAgEBEgMKAQESBAoCCAgSBAoCCAgSBAoCCAESABIDCgEIEgUKAwEBARIECgIIARIECgIBARIECgIICBILCgkIAQECAQIIBAQSBgoECAgBCFIABnNjYWxlOACAwtcvAAxzY2FsZThCaWdJbnQJALYCAQCAwtcvAAdzY2FsZTE4CQC2AgEAgICQu7rWrfANAAh0aG91c2FuZADoBwAKemVyb0JpZ0ludAkAtgIBAAAACW9uZUJpZ0ludAkAtgIBAAEACnNsaXBwYWdlNEQJALYCAQkAZQIFBnNjYWxlOAkAaQIJAGgCBQZzY2FsZTgAAQUGc2NhbGU4AAVBbXVsdAIDMTAwAAVEY29udgIBMQADU0VQAgJfXwAFRU1QVFkCAAAKUG9vbEFjdGl2ZQABAApQb29sUHV0RGlzAAIADlBvb2xNYXRjaGVyRGlzAAMADFBvb2xTaHV0ZG93bgAEAA5pZHhQb29sQWRkcmVzcwABAAlpZHhQb29sU3QAAgAJaWR4TFBBc0lkAAMACWlkeEFtQXNJZAAEAAlpZHhQckFz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4BnByb29mcwAABQ90YXJnZXRQdWJsaWNLZXkJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAFD3RhcmdldFB1YmxpY0tleei8Leo=", "chainId": 84, "height": 2226003, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Hmt2U1HBWakXvid12118nvFqEyxFqneteFfGBCYMEsos Next: 5kH5x73nCt9s9dRMZ7VFN2GWQ6AyeAiCMReMkWsNFbdw 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 | - | func | |
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) | |
172 | 177 | ||
173 | 178 | ||
174 | - | 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) | |
175 | 180 | ||
176 | 181 | ||
177 | - | func | |
182 | + | func aY (aZ) = if ((aZ == "WAVES")) | |
178 | 183 | then wavesBalance(this).available | |
179 | - | else assetBalance(this, fromBase58String( | |
184 | + | else assetBalance(this, fromBase58String(aZ)) | |
180 | 185 | ||
181 | 186 | ||
182 | - | func | |
187 | + | func ba (bb,bc) = fraction(bb, c, bc) | |
183 | 188 | ||
184 | 189 | ||
185 | - | func | |
186 | - | let | |
187 | - | let | |
188 | - | if (!( | |
189 | - | then throw(("Big slpg: " + toString( | |
190 | - | 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])) | |
191 | 196 | } | |
192 | 197 | ||
193 | 198 | ||
194 | - | func | |
195 | - | let | |
196 | - | let | |
197 | - | if (if ( | |
199 | + | func bj (bk,bl,bm) = { | |
200 | + | let bh = fraction(bl, b, bk) | |
201 | + | let bn = (bm > bh) | |
202 | + | if (if (bn) | |
198 | 203 | then true | |
199 | - | else ( | |
200 | - | then throw(((((((toString( | |
201 | - | else | |
204 | + | else (bl > bk)) | |
205 | + | then throw(((((((toString(bl) + " ") + toString(bk)) + " ") + toString(bh)) + " ") + toString(bm))) | |
206 | + | else bn | |
202 | 207 | } | |
203 | 208 | ||
204 | 209 | ||
205 | - | func | |
206 | - | let | |
207 | - | let | |
208 | - | | |
210 | + | func bo (bp,bq,br,bs) = { | |
211 | + | let bt = C(br, bp) | |
212 | + | let bu = C(bs, bq) | |
213 | + | ba(bu, bt) | |
209 | 214 | } | |
210 | 215 | ||
211 | 216 | ||
212 | - | func | |
213 | - | let | |
214 | - | let | |
215 | - | let | |
216 | - | let | |
217 | - | let | |
218 | - | let | |
219 | - | let | |
220 | - | let | |
221 | - | let | |
222 | - | [ | |
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] | |
223 | 228 | } | |
224 | 229 | ||
225 | 230 | ||
226 | - | func | |
227 | - | let | |
228 | - | [ | |
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)] | |
229 | 234 | } | |
230 | 235 | ||
231 | 236 | ||
232 | - | func | |
233 | - | let | |
234 | - | let | |
235 | - | let | |
236 | - | let | |
237 | - | let | |
238 | - | let | |
239 | - | let | |
240 | - | let | |
241 | - | 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)) | |
242 | 247 | then throw("Wrong pmt asset") | |
243 | 248 | else { | |
244 | - | let | |
245 | - | let | |
246 | - | let | |
247 | - | let | |
248 | - | let | |
249 | - | let | |
250 | - | let | |
251 | - | let | |
252 | - | let | |
253 | - | let | |
254 | - | let | |
255 | - | let | |
256 | - | 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 == "")) | |
257 | 262 | then nil | |
258 | - | else [ScriptTransfer( | |
263 | + | else [ScriptTransfer(bK, cc, if ((bM == "WAVES")) | |
259 | 264 | then unit | |
260 | - | else fromBase58String( | |
265 | + | else fromBase58String(bM)), ScriptTransfer(bK, cd, if ((bN == "WAVES")) | |
261 | 266 | then unit | |
262 | - | else fromBase58String( | |
263 | - | $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) | |
264 | 269 | } | |
265 | 270 | } | |
266 | 271 | ||
267 | 272 | ||
268 | - | func | |
269 | - | let | |
270 | - | let | |
271 | - | let | |
272 | - | let | |
273 | - | let | |
274 | - | let | |
275 | - | let | |
276 | - | let | |
277 | - | let | |
278 | - | let | |
279 | - | let | |
280 | - | then | |
281 | - | else if (if ( | |
282 | - | 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) | |
283 | 288 | else false) | |
284 | - | then ( | |
285 | - | else if ( | |
286 | - | then | |
287 | - | else ( | |
288 | - | let | |
289 | - | then | |
290 | - | else if (if ( | |
291 | - | 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) | |
292 | 297 | else false) | |
293 | - | then ( | |
294 | - | else if ( | |
295 | - | then | |
296 | - | else ( | |
297 | - | let | |
298 | - | let | |
299 | - | let | |
300 | - | let | |
301 | - | let | |
302 | - | 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)) | |
303 | 308 | then { | |
304 | - | let | |
305 | - | let | |
306 | - | let | |
307 | - | $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) | |
308 | 313 | } | |
309 | 314 | else { | |
310 | - | let | |
311 | - | let | |
312 | - | let | |
313 | - | if (if (( | |
314 | - | 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) | |
315 | 320 | else false) | |
316 | - | then throw(((("Price slippage " + toString( | |
321 | + | then throw(((("Price slippage " + toString(cB)) + " > ") + toString(cA))) | |
317 | 322 | else { | |
318 | - | let | |
319 | - | let | |
320 | - | let | |
321 | - | let | |
322 | - | then $Tuple2( | |
323 | - | else $Tuple2( | |
324 | - | let | |
325 | - | let | |
326 | - | let | |
327 | - | $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) | |
328 | 333 | } | |
329 | 334 | } | |
330 | - | let | |
331 | - | let | |
332 | - | let | |
333 | - | let | |
334 | - | let | |
335 | - | 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)) | |
336 | 341 | then throw("LP <= 0") | |
337 | 342 | else { | |
338 | - | let | |
343 | + | let cM = if (!(cl)) | |
339 | 344 | then 0 | |
340 | - | else | |
341 | - | let | |
342 | - | let | |
343 | - | let | |
344 | - | then ( | |
345 | + | else cI | |
346 | + | let cN = (cg - cJ) | |
347 | + | let cO = (ci - cK) | |
348 | + | let cP = if (if (cm) | |
349 | + | then (co == cp) | |
345 | 350 | else false) | |
346 | - | then $Tuple2( | |
347 | - | else if (if ( | |
348 | - | then ( | |
351 | + | then $Tuple2(cn, 0) | |
352 | + | else if (if (cm) | |
353 | + | then (co == cq) | |
349 | 354 | else false) | |
350 | - | then $Tuple2(0, | |
351 | - | else $Tuple2( | |
352 | - | let | |
353 | - | let | |
354 | - | let | |
355 | - | $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) | |
356 | 361 | } | |
357 | 362 | } | |
358 | 363 | ||
359 | 364 | ||
360 | - | func | |
361 | - | let | |
362 | - | let | |
363 | - | let | |
364 | - | let | |
365 | - | let | |
366 | - | let | |
367 | - | let | |
368 | - | let | |
369 | - | let | |
370 | - | then | |
371 | - | else | |
372 | - | let | |
373 | - | 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()) | |
374 | 379 | then true | |
375 | - | else ( | |
380 | + | else (bQ == n)) | |
376 | 381 | then true | |
377 | - | else ( | |
382 | + | else (bQ == o)) | |
378 | 383 | then throw("Admin blocked") | |
379 | 384 | else { | |
380 | - | let cX = cS.assetPair.amountAsset | |
381 | - | let cY = if ((cX == unit)) | |
382 | - | then "WAVES" | |
383 | - | else toBase58String(value(cX)) | |
384 | - | let cZ = cS.assetPair.priceAsset | |
385 | + | let cZ = cU.assetPair.amountAsset | |
385 | 386 | let da = if ((cZ == unit)) | |
386 | 387 | then "WAVES" | |
387 | 388 | else toBase58String(value(cZ)) | |
388 | - | if (if ((cY != cT)) | |
389 | + | let db = cU.assetPair.priceAsset | |
390 | + | let dc = if ((db == unit)) | |
391 | + | then "WAVES" | |
392 | + | else toBase58String(value(db)) | |
393 | + | if (if ((da != cV)) | |
389 | 394 | then true | |
390 | - | else ( | |
395 | + | else (dc != cW)) | |
391 | 396 | then throw("Wr assets") | |
392 | 397 | else { | |
393 | - | let | |
394 | - | let | |
395 | - | let | |
396 | - | let | |
397 | - | then ( | |
398 | - | 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) | |
399 | 404 | true | |
400 | 405 | } | |
401 | 406 | } | |
402 | 407 | } | |
403 | 408 | ||
404 | 409 | ||
405 | - | func | |
410 | + | func dg (dh) = if ((size(dh.payments) != 1)) | |
406 | 411 | then throw("1 pmnt exp") | |
407 | 412 | else { | |
408 | - | let | |
409 | - | let | |
410 | - | let | |
411 | - | let | |
412 | - | let | |
413 | - | let | |
414 | - | let | |
415 | - | let | |
416 | - | 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()) | |
417 | 422 | then true | |
418 | - | else ( | |
419 | - | then throw(("Admin blocked: " + toString( | |
420 | - | else $Tuple5( | |
423 | + | else (bQ == o)) | |
424 | + | then throw(("Admin blocked: " + toString(bQ))) | |
425 | + | else $Tuple5(cc, cd, cn, bI, ce) | |
421 | 426 | } | |
422 | 427 | ||
423 | 428 | ||
424 | - | func | |
425 | - | let | |
426 | - | let | |
427 | - | 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()) | |
428 | 433 | then true | |
429 | - | else ( | |
434 | + | else (bQ == m)) | |
430 | 435 | then true | |
431 | - | else ( | |
432 | - | then throw(("Blocked:" + toString( | |
433 | - | else | |
436 | + | else (bQ == o)) | |
437 | + | then throw(("Blocked:" + toString(bQ))) | |
438 | + | else cz | |
434 | 439 | } | |
435 | 440 | ||
436 | 441 | ||
437 | - | func dk () = { | |
438 | - | let as = getString(N()) | |
439 | - | if ($isInstanceOf(as, "String")) | |
442 | + | func dn (do) = { | |
443 | + | let dp = fraction(do, ad, d) | |
444 | + | $Tuple2((do - dp), dp) | |
445 | + | } | |
446 | + | ||
447 | + | ||
448 | + | func dq () = { | |
449 | + | let at = getString(O()) | |
450 | + | if ($isInstanceOf(at, "String")) | |
440 | 451 | then { | |
441 | - | let | |
442 | - | fromBase58String( | |
452 | + | let dr = at | |
453 | + | fromBase58String(dr) | |
443 | 454 | } | |
444 | - | else if ($isInstanceOf( | |
455 | + | else if ($isInstanceOf(at, "Unit")) | |
445 | 456 | then unit | |
446 | 457 | else throw("Match error") | |
447 | 458 | } | |
448 | 459 | ||
449 | 460 | ||
450 | - | func | |
451 | - | let | |
452 | - | if ($isInstanceOf( | |
461 | + | func ds () = { | |
462 | + | let at = getString(P()) | |
463 | + | if ($isInstanceOf(at, "String")) | |
453 | 464 | then { | |
454 | - | let | |
455 | - | fromBase58String( | |
465 | + | let dr = at | |
466 | + | fromBase58String(dr) | |
456 | 467 | } | |
457 | - | else if ($isInstanceOf( | |
468 | + | else if ($isInstanceOf(at, "Unit")) | |
458 | 469 | then unit | |
459 | 470 | else throw("Match error") | |
460 | 471 | } | |
461 | 472 | ||
462 | 473 | ||
463 | - | let | |
474 | + | let dt = throw("Permission denied") | |
464 | 475 | ||
465 | - | func | |
466 | - | let | |
467 | - | if ($isInstanceOf( | |
476 | + | func du (dh) = { | |
477 | + | let at = dq() | |
478 | + | if ($isInstanceOf(at, "ByteVector")) | |
468 | 479 | then { | |
469 | - | let | |
470 | - | if (( | |
480 | + | let dv = at | |
481 | + | if ((dh.callerPublicKey == dv)) | |
471 | 482 | then true | |
472 | - | else | |
483 | + | else dt | |
473 | 484 | } | |
474 | - | else if ($isInstanceOf( | |
475 | - | then if (( | |
485 | + | else if ($isInstanceOf(at, "Unit")) | |
486 | + | then if ((dh.caller == this)) | |
476 | 487 | then true | |
477 | - | else | |
488 | + | else dt | |
478 | 489 | else throw("Match error") | |
479 | 490 | } | |
480 | 491 | ||
481 | 492 | ||
482 | - | @Callable( | |
483 | - | func constructor ( | |
484 | - | let | |
485 | - | if (( | |
486 | - | then [StringEntry( | |
493 | + | @Callable(dh) | |
494 | + | func constructor (N) = { | |
495 | + | let dw = du(dh) | |
496 | + | if ((dw == dw)) | |
497 | + | then [StringEntry(N(), N)] | |
487 | 498 | else throw("Strict value is not equal to itself.") | |
488 | 499 | } | |
489 | 500 | ||
490 | 501 | ||
491 | 502 | ||
492 | - | @Callable( | |
493 | - | func setManager ( | |
494 | - | let | |
495 | - | if (( | |
503 | + | @Callable(dh) | |
504 | + | func setManager (dx) = { | |
505 | + | let dw = du(dh) | |
506 | + | if ((dw == dw)) | |
496 | 507 | then { | |
497 | - | let | |
498 | - | if (( | |
499 | - | then [StringEntry( | |
508 | + | let dy = fromBase58String(dx) | |
509 | + | if ((dy == dy)) | |
510 | + | then [StringEntry(P(), dx)] | |
500 | 511 | else throw("Strict value is not equal to itself.") | |
501 | 512 | } | |
502 | 513 | else throw("Strict value is not equal to itself.") | |
504 | 515 | ||
505 | 516 | ||
506 | 517 | ||
507 | - | @Callable( | |
518 | + | @Callable(dh) | |
508 | 519 | func confirmManager () = { | |
509 | - | let | |
510 | - | let | |
520 | + | let bF = ds() | |
521 | + | let dz = if (isDefined(bF)) | |
511 | 522 | then true | |
512 | 523 | else throw("No pending manager") | |
513 | - | if (( | |
524 | + | if ((dz == dz)) | |
514 | 525 | then { | |
515 | - | let | |
526 | + | let dA = if ((dh.callerPublicKey == value(bF))) | |
516 | 527 | then true | |
517 | 528 | else throw("You are not pending manager") | |
518 | - | if (( | |
519 | - | then [StringEntry( | |
529 | + | if ((dA == dA)) | |
530 | + | then [StringEntry(O(), toBase58String(value(bF))), DeleteEntry(P())] | |
520 | 531 | else throw("Strict value is not equal to itself.") | |
521 | 532 | } | |
522 | 533 | else throw("Strict value is not equal to itself.") | |
524 | 535 | ||
525 | 536 | ||
526 | 537 | ||
527 | - | @Callable( | |
528 | - | func put ( | |
529 | - | let | |
530 | - | let | |
531 | - | let | |
532 | - | 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)) | |
533 | 544 | then throw("Wrong slippage") | |
534 | - | else if ((size( | |
545 | + | else if ((size(dh.payments) != 2)) | |
535 | 546 | then throw("2 pmnts expd") | |
536 | 547 | else { | |
537 | - | let | |
538 | - | let | |
539 | - | let | |
540 | - | let | |
541 | - | let | |
542 | - | let | |
543 | - | let | |
544 | - | let | |
545 | - | let | |
546 | - | 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)) | |
547 | 558 | then { | |
548 | - | let | |
549 | - | let | |
550 | - | if ($isInstanceOf( | |
559 | + | let dI = { | |
560 | + | let at = cz | |
561 | + | if ($isInstanceOf(at, "Address")) | |
551 | 562 | then { | |
552 | - | let | |
553 | - | invoke( | |
563 | + | let dJ = at | |
564 | + | invoke(dJ, "emit", [cM], nil) | |
554 | 565 | } | |
555 | 566 | else unit | |
556 | 567 | } | |
557 | - | if (( | |
568 | + | if ((dI == dI)) | |
558 | 569 | then { | |
559 | - | let | |
560 | - | then invoke( | |
570 | + | let dK = if ((cN > 0)) | |
571 | + | then invoke(dF, "put", nil, [AttachedPayment(bM, cN)]) | |
561 | 572 | else nil | |
562 | - | if (( | |
573 | + | if ((dK == dK)) | |
563 | 574 | then { | |
564 | - | let | |
565 | - | then invoke( | |
575 | + | let dL = if ((cO > 0)) | |
576 | + | then invoke(dF, "put", nil, [AttachedPayment(bN, cO)]) | |
566 | 577 | else nil | |
567 | - | if (( | |
578 | + | if ((dL == dL)) | |
568 | 579 | then { | |
569 | - | let | |
580 | + | let dM = if (dC) | |
570 | 581 | then { | |
571 | - | let | |
572 | - | if (( | |
582 | + | let dN = invoke(dE, "stake", nil, [AttachedPayment(dH, cM)]) | |
583 | + | if ((dN == dN)) | |
573 | 584 | then nil | |
574 | 585 | else throw("Strict value is not equal to itself.") | |
575 | 586 | } | |
576 | - | else [ScriptTransfer( | |
577 | - | ( | |
587 | + | else [ScriptTransfer(dh.caller, cM, dH)] | |
588 | + | (ce ++ dM) | |
578 | 589 | } | |
579 | 590 | else throw("Strict value is not equal to itself.") | |
580 | 591 | } | |
588 | 599 | ||
589 | 600 | ||
590 | 601 | ||
591 | - | @Callable(df) | |
592 | - | func putOneTkn (dI,dJ,dK,be,dw) = { | |
593 | - | let bv = aG() | |
594 | - | let dy = valueOrErrorMessage(addressFromString(bv[x]), "Wr st addr") | |
595 | - | let dz = valueOrErrorMessage(addressFromString(bv[y]), "Wr sl addr") | |
596 | - | let dL = valueOrErrorMessage(addressFromString(bv[z]), "Wr gwx addr") | |
597 | - | let dM = aC() | |
598 | - | let bK = dM[r] | |
599 | - | let bL = dM[s] | |
600 | - | let bM = parseIntValue(dM[t]) | |
601 | - | let bN = parseIntValue(dM[u]) | |
602 | - | let dN = valueOrElse(getString(this, aa()), "") | |
603 | - | let bI = if ((dN == toString(df.caller))) | |
604 | - | then df.originCaller | |
605 | - | else df.caller | |
606 | - | let dO = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(aa()), "no addons")), "addon address in not valid") | |
607 | - | let dP = reentrantInvoke(dO, "ensureCanPutOneTkn", [toString(bI)], nil) | |
608 | - | if ((dP == dP)) | |
609 | - | then if (if (if (if ((0 >= be)) | |
610 | - | then true | |
611 | - | else (0 >= dI)) | |
612 | - | then true | |
613 | - | else (0 >= dJ)) | |
614 | - | then true | |
615 | - | else (0 >= dK)) | |
616 | - | then throw("Wrong params") | |
617 | - | else if ((size(df.payments) != 1)) | |
618 | - | then throw("1 pmnt expd") | |
619 | - | else { | |
620 | - | let dg = value(df.payments[0]) | |
621 | - | let bG = toBase58String(value(dg.assetId)) | |
622 | - | let cl = dg.amount | |
623 | - | if ((10000000 > cl)) | |
624 | - | then throw("Wrong pmt amt") | |
625 | - | else { | |
626 | - | let bQ = aW(bK) | |
627 | - | let bS = aW(bL) | |
628 | - | let dQ = if ((bG == bK)) | |
629 | - | then if (if ((cl > bQ)) | |
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)) | |
630 | 647 | then true | |
631 | - | else ( | |
648 | + | else (dP > cn)) | |
632 | 649 | then throw("invalid payment amount") | |
633 | - | else $Tuple6((bQ - cl), bS, (cl - dI), dJ, 0, 0) | |
634 | - | else if ((bG == bL)) | |
635 | - | then if (if ((cl > bS)) | |
636 | - | then true | |
637 | - | else (dJ > cl)) | |
638 | - | then throw("invalid payment amount") | |
639 | - | else $Tuple6(bQ, (bS - cl), 0, 0, (cl - dJ), dI) | |
640 | - | else throw("wrong pmtAssetId") | |
641 | - | let dR = dQ._1 | |
642 | - | let dS = dQ._2 | |
643 | - | let dT = dQ._3 | |
644 | - | let dU = dQ._4 | |
645 | - | let dV = dQ._5 | |
646 | - | let dW = dQ._6 | |
647 | - | let bj = invoke(dL, "calcD", [toString(dR), toString(dS), az, g, h], nil) | |
648 | - | let bi = invoke(dL, "calcD", [toString(toBigInt(((dR + dT) - dW))), toString(toBigInt(((dS + dV) - dU))), az, g, h], nil) | |
649 | - | let dX = bh(parseBigIntValue(ar(bi)), parseBigIntValue(ar(bj)), f) | |
650 | - | if ((dX == dX)) | |
651 | - | then { | |
652 | - | let dY = dh(toString(df.caller), toBase58String(df.transactionId), AttachedPayment(fromBase58String(bK), dI), AttachedPayment(fromBase58String(bL), dJ), be, true, true, cl, bG) | |
653 | - | let dZ = dY._2 | |
654 | - | let dB = dY._7 | |
655 | - | let cc = dY._9 | |
656 | - | let cL = dY._10 | |
657 | - | let cM = dY._11 | |
658 | - | let ea = bb(toBigInt(dZ), toBigInt(dK), toBigInt(be)) | |
659 | - | let cK = toInt(ea._2) | |
660 | - | let dA = invoke(ay, "emit", [cK], nil) | |
661 | - | if ((dA == dA)) | |
662 | - | then { | |
663 | - | let dC = { | |
664 | - | let as = dA | |
665 | - | 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)) | |
666 | 689 | then { | |
667 | - | let dD = as | |
668 | - | invoke(dD, "emit", [cK], 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 | + | } | |
708 | + | else throw("Strict value is not equal to itself.") | |
669 | 709 | } | |
670 | - | else | |
710 | + | else throw("Strict value is not equal to itself.") | |
671 | 711 | } | |
672 | - | if ((dC == dC)) | |
673 | - | then { | |
674 | - | let dE = if ((cL > 0)) | |
675 | - | then invoke(dz, "put", nil, [AttachedPayment(fromBase58String(bK), cL)]) | |
676 | - | else nil | |
677 | - | if ((dE == dE)) | |
678 | - | then { | |
679 | - | let dF = if ((cM > 0)) | |
680 | - | then invoke(dz, "put", nil, [AttachedPayment(fromBase58String(bL), cM)]) | |
681 | - | else nil | |
682 | - | if ((dF == dF)) | |
683 | - | then { | |
684 | - | let dG = if (dw) | |
685 | - | then { | |
686 | - | let dH = invoke(dy, "stake", nil, [AttachedPayment(dB, cK)]) | |
687 | - | if ((dH == dH)) | |
688 | - | then nil | |
689 | - | else throw("Strict value is not equal to itself.") | |
690 | - | } | |
691 | - | else [ScriptTransfer(df.caller, cK, dB)] | |
692 | - | (cc ++ dG) | |
693 | - | } | |
694 | - | else throw("Strict value is not equal to itself.") | |
695 | - | } | |
696 | - | else throw("Strict value is not equal to itself.") | |
697 | - | } | |
698 | - | else throw("Strict value is not equal to itself.") | |
699 | - | } | |
700 | - | else throw("Strict value is not equal to itself.") | |
701 | - | } | |
702 | - | else throw("Strict value is not equal to itself.") | |
703 | - | } | |
704 | - | } | |
712 | + | else throw("Strict value is not equal to itself.") | |
713 | + | } | |
714 | + | else throw("Strict value is not equal to itself.") | |
715 | + | } | |
716 | + | else throw("Strict value is not equal to itself.") | |
717 | + | } | |
718 | + | } | |
719 | + | } | |
720 | + | ||
721 | + | ||
722 | + | ||
723 | + | @Callable(dh) | |
724 | + | func putForFree (ej) = if ((0 > ej)) | |
725 | + | then throw("Wrong slpg") | |
726 | + | else if ((size(dh.payments) != 2)) | |
727 | + | then throw("2 pmnts expd") | |
728 | + | else { | |
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 | |
731 | + | } | |
732 | + | ||
733 | + | ||
734 | + | ||
735 | + | @Callable(dh) | |
736 | + | func get () = { | |
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 | |
705 | 746 | else throw("Strict value is not equal to itself.") | |
706 | 747 | } | |
707 | 748 | ||
708 | 749 | ||
709 | 750 | ||
710 | - | @Callable(df) | |
711 | - | func putOneTknV2 (dK,be,dw) = { | |
712 | - | let bv = aG() | |
713 | - | let dy = valueOrErrorMessage(addressFromString(bv[x]), "Wr st addr") | |
714 | - | let dz = valueOrErrorMessage(addressFromString(bv[y]), "Wr sl addr") | |
715 | - | let dL = valueOrErrorMessage(addressFromString(bv[z]), "Wr gwx addr") | |
716 | - | let dM = aC() | |
717 | - | let bK = dM[r] | |
718 | - | let bL = dM[s] | |
719 | - | let bM = parseIntValue(dM[t]) | |
720 | - | let bN = parseIntValue(dM[u]) | |
721 | - | let dN = valueOrElse(getString(this, aa()), "") | |
722 | - | let bI = if ((dN == toString(df.caller))) | |
723 | - | then df.originCaller | |
724 | - | else df.caller | |
725 | - | let dO = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(aa()), "no addons")), "addon address in not valid") | |
726 | - | if ((size(df.payments) != 1)) | |
727 | - | then throw("1 pmnt expd") | |
728 | - | else { | |
729 | - | let dg = value(df.payments[0]) | |
730 | - | let bG = toBase58String(value(dg.assetId)) | |
731 | - | let cl = dg.amount | |
732 | - | if ((10000000 > cl)) | |
733 | - | then throw("Wrong pmt amt") | |
734 | - | else { | |
735 | - | let bQ = aW(bK) | |
736 | - | let bS = aW(bL) | |
737 | - | let eb = if ((bG == bK)) | |
738 | - | then if ((cl > bQ)) | |
739 | - | then throw("invalid payment amount") | |
740 | - | else $Tuple2((bQ - cl), bS) | |
741 | - | else if ((bG == bL)) | |
742 | - | then if ((cl > bS)) | |
743 | - | then throw("invalid payment amount") | |
744 | - | else $Tuple2(bQ, (bS - cl)) | |
745 | - | else throw("wrong pmtAssetId") | |
746 | - | let dR = eb._1 | |
747 | - | let dS = eb._2 | |
748 | - | let ec = if ((bG == bK)) | |
749 | - | then $Tuple2(dR, dS) | |
750 | - | else $Tuple2(dS, dR) | |
751 | - | let ed = ec._1 | |
752 | - | let ee = ec._2 | |
753 | - | let ef = 1 | |
754 | - | let eg = { | |
755 | - | let eh = invoke(dL, "calcPutXOnly", [toString(cl), toString(ed), toString(ee), "", az, g, toString(ef), h], nil) | |
756 | - | if ($isInstanceOf(eh, "(Int, Int)")) | |
757 | - | then eh | |
758 | - | else throw(($getType(invoke(dL, "calcPutXOnly", [toString(cl), toString(ed), toString(ee), "", az, g, toString(ef), h], nil)) + " couldn't be cast to (Int, Int)")) | |
759 | - | } | |
760 | - | let ei = if ((bG == bK)) | |
761 | - | then eg | |
762 | - | else $Tuple2(eg._2, eg._1) | |
763 | - | let dI = ei._1 | |
764 | - | let dJ = ei._2 | |
765 | - | let dY = dh(toString(df.caller), toBase58String(df.transactionId), AttachedPayment(fromBase58String(bK), dI), AttachedPayment(fromBase58String(bL), dJ), be, true, true, cl, bG) | |
766 | - | let dZ = dY._2 | |
767 | - | let dB = dY._7 | |
768 | - | let cc = dY._9 | |
769 | - | let cL = dY._10 | |
770 | - | let cM = dY._11 | |
771 | - | let cK = if ((dK > 0)) | |
772 | - | then { | |
773 | - | let ea = bb(toBigInt(dZ), toBigInt(dK), toBigInt(be)) | |
774 | - | toInt(ea._2) | |
775 | - | } | |
776 | - | else dZ | |
777 | - | let dA = invoke(ay, "emit", [cK], nil) | |
778 | - | if ((dA == dA)) | |
779 | - | then { | |
780 | - | let dC = { | |
781 | - | let as = dA | |
782 | - | if ($isInstanceOf(as, "Address")) | |
783 | - | then { | |
784 | - | let dD = as | |
785 | - | invoke(dD, "emit", [cK], nil) | |
786 | - | } | |
787 | - | else unit | |
788 | - | } | |
789 | - | if ((dC == dC)) | |
790 | - | then { | |
791 | - | let dE = if ((cL > 0)) | |
792 | - | then invoke(dz, "put", nil, [AttachedPayment(fromBase58String(bK), cL)]) | |
793 | - | else nil | |
794 | - | if ((dE == dE)) | |
795 | - | then { | |
796 | - | let dF = if ((cM > 0)) | |
797 | - | then invoke(dz, "put", nil, [AttachedPayment(fromBase58String(bL), cM)]) | |
798 | - | else nil | |
799 | - | if ((dF == dF)) | |
800 | - | then { | |
801 | - | let dG = if (dw) | |
802 | - | then { | |
803 | - | let dH = invoke(dy, "stake", nil, [AttachedPayment(dB, cK)]) | |
804 | - | if ((dH == dH)) | |
805 | - | then nil | |
806 | - | else throw("Strict value is not equal to itself.") | |
807 | - | } | |
808 | - | else [ScriptTransfer(df.caller, cK, dB)] | |
809 | - | (cc ++ dG) | |
810 | - | } | |
811 | - | else throw("Strict value is not equal to itself.") | |
812 | - | } | |
813 | - | else throw("Strict value is not equal to itself.") | |
814 | - | } | |
815 | - | else throw("Strict value is not equal to itself.") | |
816 | - | } | |
817 | - | else throw("Strict value is not equal to itself.") | |
818 | - | } | |
819 | - | } | |
820 | - | } | |
821 | - | ||
822 | - | ||
823 | - | ||
824 | - | @Callable(df) | |
825 | - | func putForFree (ej) = if ((0 > ej)) | |
826 | - | then throw("Wrong slpg") | |
827 | - | else if ((size(df.payments) != 2)) | |
828 | - | then throw("2 pmnts expd") | |
829 | - | else { | |
830 | - | let dY = dh(toString(df.caller), toBase58String(df.transactionId), AttachedPayment(value(df.payments[0]).assetId, value(df.payments[0]).amount), df.payments[1], ej, false, false, 0, "") | |
831 | - | dY._9 | |
832 | - | } | |
833 | - | ||
834 | - | ||
835 | - | ||
836 | - | @Callable(df) | |
837 | - | func get () = { | |
838 | - | let cx = de(df) | |
839 | - | let ek = cx._1 | |
840 | - | let cb = cx._2 | |
841 | - | let cl = cx._3 | |
842 | - | let bG = cx._4 | |
843 | - | let cc = cx._5 | |
844 | - | let el = invoke(ay, "burn", [cl], [AttachedPayment(bG, cl)]) | |
845 | - | if ((el == el)) | |
846 | - | then cc | |
847 | - | else throw("Strict value is not equal to itself.") | |
848 | - | } | |
849 | - | ||
850 | - | ||
851 | - | ||
852 | - | @Callable(df) | |
853 | - | func getOneTkn (em,en,eo,ep,be) = if ((size(df.payments) != 1)) | |
751 | + | @Callable(dh) | |
752 | + | func getOneTkn (em,en,eo,ep,bg) = if ((size(dh.payments) != 1)) | |
854 | 753 | then throw("1 pmnt expd") | |
855 | 754 | else { | |
856 | - | let bv = aC() | |
857 | - | let bJ = bv[q] | |
858 | - | let bK = bv[r] | |
859 | - | let bL = bv[s] | |
860 | - | let bM = parseIntValue(bv[t]) | |
861 | - | let bN = parseIntValue(bv[u]) | |
862 | - | let bO = bv[p] | |
863 | - | let dx = aG() | |
864 | - | let dL = valueOrErrorMessage(addressFromString(dx[z]), "Wr sl addr") | |
865 | - | let dg = value(df.payments[0]) | |
866 | - | let dN = valueOrElse(getString(this, aa()), "") | |
867 | - | let bI = if ((dN == toString(df.caller))) | |
868 | - | then df.originCaller | |
869 | - | else df.caller | |
870 | - | let bF = toBase58String(df.transactionId) | |
871 | - | let bG = value(dg.assetId) | |
872 | - | let cl = dg.amount | |
873 | - | let dO = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(aa()), "no addons")), "addon address in not valid") | |
874 | - | let dP = reentrantInvoke(dO, "ensureCanGetOneTkn", [toString(bI)], nil) | |
875 | - | if ((dP == dP)) | |
876 | - | then if ((1000000000 > cl)) | |
877 | - | then throw("Min pmt 10 LP") | |
878 | - | else if (if (if ((0 > be)) | |
879 | - | then true | |
880 | - | else (0 > em)) | |
881 | - | then true | |
882 | - | else (0 > eo)) | |
883 | - | then throw("Wrong params") | |
884 | - | else if ((bJ != toBase58String(bG))) | |
885 | - | then throw("Wrong LP") | |
886 | - | else { | |
887 | - | let cx = bE(toBase58String(df.transactionId), toBase58String(bG), cl, df.caller) | |
888 | - | let eq = cx._1 | |
889 | - | let er = cx._2 | |
890 | - | let bQ = aW(bK) | |
891 | - | let bS = aW(bL) | |
892 | - | let es = if ((ep == bK)) | |
893 | - | then $Tuple7((bQ - eq), (bS - er), em, er, 0, 0, (eq + em)) | |
894 | - | else if ((ep == bL)) | |
895 | - | then $Tuple7((bQ - eq), (bS - er), 0, 0, em, eq, (er + em)) | |
896 | - | else throw("wrong outAssetId") | |
897 | - | let dR = es._1 | |
898 | - | let dS = es._2 | |
899 | - | let dT = es._3 | |
900 | - | let dU = es._4 | |
901 | - | let dV = es._5 | |
902 | - | let dW = es._6 | |
903 | - | let et = es._7 | |
904 | - | if (if ((0 > dT)) | |
905 | - | then true | |
906 | - | else (0 > dV)) | |
907 | - | then throw("Wrong calc") | |
908 | - | else { | |
909 | - | let bj = invoke(dL, "calcD", [toString(dR), toString(dS), az, g, h], nil) | |
910 | - | let bi = invoke(dL, "calcD", [toString(((dR - dT) + dW)), toString(((dS + dU) - dV)), az, g, h], nil) | |
911 | - | let dX = bh(parseBigIntValue(ar(bi)), parseBigIntValue(ar(bj)), f) | |
912 | - | if ((dX == dX)) | |
913 | - | then { | |
914 | - | let eu = bb(toBigInt(et), toBigInt(eo), toBigInt(be)) | |
915 | - | if ((eu == eu)) | |
916 | - | then { | |
917 | - | let ev = if ((ep == bK)) | |
918 | - | then $Tuple2(toInt(eu._2), 0) | |
919 | - | else $Tuple2(0, toInt(eu._2)) | |
920 | - | let ew = ev._1 | |
921 | - | let ex = ev._2 | |
922 | - | let ey = aY(B(bS, bN), B(bQ, bM)) | |
923 | - | let ez = E(ey, a) | |
924 | - | let cc = [ScriptTransfer(bI, (ew + ex), if ((ep == "WAVES")) | |
925 | - | then unit | |
926 | - | else fromBase58String(ep)), StringEntry(W(toString(bI), bF), aS(ew, ex, cl, ez, height, lastBlock.timestamp)), IntegerEntry(P(), ez), IntegerEntry(Q(height, lastBlock.timestamp), ez)] | |
927 | - | if ((cc == cc)) | |
928 | - | then { | |
929 | - | let eA = invoke(ay, "burn", [cl], [AttachedPayment(bG, cl)]) | |
930 | - | if ((eA == eA)) | |
931 | - | then cc | |
932 | - | else throw("Strict value is not equal to itself.") | |
933 | - | } | |
934 | - | else throw("Strict value is not equal to itself.") | |
935 | - | } | |
936 | - | else throw("Strict value is not equal to itself.") | |
937 | - | } | |
938 | - | else throw("Strict value is not equal to itself.") | |
939 | - | } | |
940 | - | } | |
941 | - | 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 | + | } | |
942 | 844 | } | |
943 | 845 | ||
944 | 846 | ||
945 | 847 | ||
946 | - | @Callable( | |
947 | - | func getNoLess ( | |
948 | - | let | |
949 | - | let | |
950 | - | let | |
951 | - | let | |
952 | - | let | |
953 | - | let | |
954 | - | if (( | |
955 | - | then throw(((("Failed: " + toString( | |
956 | - | else if (( | |
957 | - | then throw(((("Failed: " + toString( | |
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))) | |
958 | 860 | else { | |
959 | - | let | |
960 | - | if (( | |
961 | - | then | |
861 | + | let eG = invoke(az, "burn", [cn], [AttachedPayment(bI, cn)]) | |
862 | + | if ((eG == eG)) | |
863 | + | then ce | |
962 | 864 | else throw("Strict value is not equal to itself.") | |
963 | 865 | } | |
964 | 866 | } | |
965 | 867 | ||
966 | 868 | ||
967 | 869 | ||
968 | - | @Callable( | |
969 | - | func unstakeAndGet ( | |
970 | - | let | |
870 | + | @Callable(dh) | |
871 | + | func unstakeAndGet (do) = { | |
872 | + | let eH = if ((size(dh.payments) != 0)) | |
971 | 873 | then throw("No pmnts expd") | |
972 | 874 | else true | |
973 | - | if (( | |
875 | + | if ((eH == eH)) | |
974 | 876 | then { | |
975 | - | let | |
976 | - | let | |
977 | - | let | |
978 | - | let | |
979 | - | let | |
980 | - | 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)) | |
981 | 883 | then { | |
982 | - | let | |
983 | - | let | |
984 | - | let | |
985 | - | 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()) | |
986 | 888 | then true | |
987 | - | else ( | |
988 | - | then throw(("Blocked: " + toString( | |
889 | + | else (bQ == o)) | |
890 | + | then throw(("Blocked: " + toString(bQ))) | |
989 | 891 | else true | |
990 | - | if (( | |
892 | + | if ((eL == eL)) | |
991 | 893 | then { | |
992 | - | let | |
993 | - | if (( | |
994 | - | then | |
894 | + | let eM = invoke(az, "burn", [do], [AttachedPayment(dH, do)]) | |
895 | + | if ((eM == eM)) | |
896 | + | then ce | |
995 | 897 | else throw("Strict value is not equal to itself.") | |
996 | 898 | } | |
997 | 899 | else throw("Strict value is not equal to itself.") | |
1003 | 905 | ||
1004 | 906 | ||
1005 | 907 | ||
1006 | - | @Callable( | |
1007 | - | func activate ( | |
908 | + | @Callable(dh) | |
909 | + | func activate (eN,eO) = if ((toString(dh.caller) != toString(az))) | |
1008 | 910 | then throw("denied") | |
1009 | - | else $Tuple2([StringEntry( | |
911 | + | else $Tuple2([StringEntry(Y(), eN), StringEntry(Z(), eO)], "success") | |
1010 | 912 | ||
1011 | 913 | ||
1012 | 914 | ||
1013 | - | @Callable( | |
1014 | - | func setS ( | |
1015 | - | then | |
1016 | - | else [StringEntry( | |
915 | + | @Callable(dh) | |
916 | + | func setS (eP,eL) = if ((toString(dh.caller) != av(this, ab()))) | |
917 | + | then dt | |
918 | + | else [StringEntry(eP, eL)] | |
1017 | 919 | ||
1018 | 920 | ||
1019 | 921 | ||
1020 | - | @Callable( | |
1021 | - | func setI ( | |
1022 | - | then | |
1023 | - | else [IntegerEntry( | |
922 | + | @Callable(dh) | |
923 | + | func setI (eP,eL) = if ((toString(dh.caller) != av(this, ab()))) | |
924 | + | then dt | |
925 | + | else [IntegerEntry(eP, eL)] | |
1024 | 926 | ||
1025 | 927 | ||
1026 | 928 | ||
1027 | - | @Callable( | |
1028 | - | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, | |
929 | + | @Callable(dh) | |
930 | + | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aE()) | |
1029 | 931 | ||
1030 | 932 | ||
1031 | 933 | ||
1032 | - | @Callable( | |
1033 | - | func getAccBalanceWrapperREADONLY ( | |
934 | + | @Callable(dh) | |
935 | + | func getAccBalanceWrapperREADONLY (aZ) = $Tuple2(nil, aY(aZ)) | |
1034 | 936 | ||
1035 | 937 | ||
1036 | 938 | ||
1037 | - | @Callable( | |
1038 | - | func calcPricesWrapperREADONLY ( | |
1039 | - | let | |
1040 | - | $Tuple2(nil, [toString( | |
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])]) | |
1041 | 943 | } | |
1042 | 944 | ||
1043 | 945 | ||
1044 | 946 | ||
1045 | - | @Callable( | |
1046 | - | func fromX18WrapperREADONLY ( | |
947 | + | @Callable(dh) | |
948 | + | func fromX18WrapperREADONLY (G,eR) = $Tuple2(nil, F(parseBigIntValue(G), eR)) | |
1047 | 949 | ||
1048 | 950 | ||
1049 | 951 | ||
1050 | - | @Callable( | |
1051 | - | func toX18WrapperREADONLY ( | |
952 | + | @Callable(dh) | |
953 | + | func toX18WrapperREADONLY (D,E) = $Tuple2(nil, toString(C(D, E))) | |
1052 | 954 | ||
1053 | 955 | ||
1054 | 956 | ||
1055 | - | @Callable( | |
1056 | - | func calcPriceBigIntWrapperREADONLY ( | |
957 | + | @Callable(dh) | |
958 | + | func calcPriceBigIntWrapperREADONLY (bb,bc) = $Tuple2(nil, toString(ba(parseBigIntValue(bb), parseBigIntValue(bc)))) | |
1057 | 959 | ||
1058 | 960 | ||
1059 | 961 | ||
1060 | - | @Callable( | |
1061 | - | func estimatePutOperationWrapperREADONLY ( | |
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, "")) | |
1062 | 964 | ||
1063 | 965 | ||
1064 | 966 | ||
1065 | - | @Callable( | |
1066 | - | func estimateGetOperationWrapperREADONLY ( | |
1067 | - | let | |
1068 | - | $Tuple2(nil, $Tuple10( | |
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)) | |
1069 | 971 | } | |
1070 | 972 | ||
1071 | 973 | ||
1072 | - | @Verifier( | |
1073 | - | func | |
1074 | - | let | |
1075 | - | let | |
1076 | - | if ($isInstanceOf( | |
974 | + | @Verifier(eU) | |
975 | + | func eV () = { | |
976 | + | let eW = { | |
977 | + | let at = dq() | |
978 | + | if ($isInstanceOf(at, "ByteVector")) | |
1077 | 979 | then { | |
1078 | - | let | |
1079 | - | | |
980 | + | let dv = at | |
981 | + | dv | |
1080 | 982 | } | |
1081 | - | else if ($isInstanceOf( | |
1082 | - | then | |
983 | + | else if ($isInstanceOf(at, "Unit")) | |
984 | + | then eU.senderPublicKey | |
1083 | 985 | else throw("Match error") | |
1084 | 986 | } | |
1085 | - | let | |
1086 | - | if ($isInstanceOf( | |
987 | + | let at = eU | |
988 | + | if ($isInstanceOf(at, "Order")) | |
1087 | 989 | then { | |
1088 | - | let | |
1089 | - | let | |
1090 | - | let | |
1091 | - | let | |
1092 | - | let | |
1093 | - | if (if (if ( | |
1094 | - | 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 | |
1095 | 997 | else false) | |
1096 | - | then | |
998 | + | then fa | |
1097 | 999 | else false) | |
1098 | 1000 | then true | |
1099 | - | else | |
1001 | + | else ao(eY, eZ, fa) | |
1100 | 1002 | } | |
1101 | - | else if ($isInstanceOf( | |
1003 | + | else if ($isInstanceOf(at, "SetScriptTransaction")) | |
1102 | 1004 | then { | |
1103 | - | let | |
1104 | - | let | |
1105 | - | let | |
1106 | - | let | |
1107 | - | if (if (( | |
1108 | - | 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) | |
1109 | 1011 | else false) | |
1110 | 1012 | then true | |
1111 | - | else sigVerify( | |
1013 | + | else sigVerify(eU.bodyBytes, eU.proofs[0], eW) | |
1112 | 1014 | } | |
1113 | - | else sigVerify( | |
1015 | + | else sigVerify(eU.bodyBytes, eU.proofs[0], eW) | |
1114 | 1016 | } | |
1115 | 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 | - | func | |
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) | |
172 | 177 | ||
173 | 178 | ||
174 | - | 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) | |
175 | 180 | ||
176 | 181 | ||
177 | - | func | |
182 | + | func aY (aZ) = if ((aZ == "WAVES")) | |
178 | 183 | then wavesBalance(this).available | |
179 | - | else assetBalance(this, fromBase58String( | |
184 | + | else assetBalance(this, fromBase58String(aZ)) | |
180 | 185 | ||
181 | 186 | ||
182 | - | func | |
187 | + | func ba (bb,bc) = fraction(bb, c, bc) | |
183 | 188 | ||
184 | 189 | ||
185 | - | func | |
186 | - | let | |
187 | - | let | |
188 | - | if (!( | |
189 | - | then throw(("Big slpg: " + toString( | |
190 | - | 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])) | |
191 | 196 | } | |
192 | 197 | ||
193 | 198 | ||
194 | - | func | |
195 | - | let | |
196 | - | let | |
197 | - | if (if ( | |
199 | + | func bj (bk,bl,bm) = { | |
200 | + | let bh = fraction(bl, b, bk) | |
201 | + | let bn = (bm > bh) | |
202 | + | if (if (bn) | |
198 | 203 | then true | |
199 | - | else ( | |
200 | - | then throw(((((((toString( | |
201 | - | else | |
204 | + | else (bl > bk)) | |
205 | + | then throw(((((((toString(bl) + " ") + toString(bk)) + " ") + toString(bh)) + " ") + toString(bm))) | |
206 | + | else bn | |
202 | 207 | } | |
203 | 208 | ||
204 | 209 | ||
205 | - | func | |
206 | - | let | |
207 | - | let | |
208 | - | | |
210 | + | func bo (bp,bq,br,bs) = { | |
211 | + | let bt = C(br, bp) | |
212 | + | let bu = C(bs, bq) | |
213 | + | ba(bu, bt) | |
209 | 214 | } | |
210 | 215 | ||
211 | 216 | ||
212 | - | func | |
213 | - | let | |
214 | - | let | |
215 | - | let | |
216 | - | let | |
217 | - | let | |
218 | - | let | |
219 | - | let | |
220 | - | let | |
221 | - | let | |
222 | - | [ | |
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] | |
223 | 228 | } | |
224 | 229 | ||
225 | 230 | ||
226 | - | func | |
227 | - | let | |
228 | - | [ | |
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)] | |
229 | 234 | } | |
230 | 235 | ||
231 | 236 | ||
232 | - | func | |
233 | - | let | |
234 | - | let | |
235 | - | let | |
236 | - | let | |
237 | - | let | |
238 | - | let | |
239 | - | let | |
240 | - | let | |
241 | - | 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)) | |
242 | 247 | then throw("Wrong pmt asset") | |
243 | 248 | else { | |
244 | - | let | |
245 | - | let | |
246 | - | let | |
247 | - | let | |
248 | - | let | |
249 | - | let | |
250 | - | let | |
251 | - | let | |
252 | - | let | |
253 | - | let | |
254 | - | let | |
255 | - | let | |
256 | - | 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 == "")) | |
257 | 262 | then nil | |
258 | - | else [ScriptTransfer( | |
263 | + | else [ScriptTransfer(bK, cc, if ((bM == "WAVES")) | |
259 | 264 | then unit | |
260 | - | else fromBase58String( | |
265 | + | else fromBase58String(bM)), ScriptTransfer(bK, cd, if ((bN == "WAVES")) | |
261 | 266 | then unit | |
262 | - | else fromBase58String( | |
263 | - | $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) | |
264 | 269 | } | |
265 | 270 | } | |
266 | 271 | ||
267 | 272 | ||
268 | - | func | |
269 | - | let | |
270 | - | let | |
271 | - | let | |
272 | - | let | |
273 | - | let | |
274 | - | let | |
275 | - | let | |
276 | - | let | |
277 | - | let | |
278 | - | let | |
279 | - | let | |
280 | - | then | |
281 | - | else if (if ( | |
282 | - | 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) | |
283 | 288 | else false) | |
284 | - | then ( | |
285 | - | else if ( | |
286 | - | then | |
287 | - | else ( | |
288 | - | let | |
289 | - | then | |
290 | - | else if (if ( | |
291 | - | 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) | |
292 | 297 | else false) | |
293 | - | then ( | |
294 | - | else if ( | |
295 | - | then | |
296 | - | else ( | |
297 | - | let | |
298 | - | let | |
299 | - | let | |
300 | - | let | |
301 | - | let | |
302 | - | 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)) | |
303 | 308 | then { | |
304 | - | let | |
305 | - | let | |
306 | - | let | |
307 | - | $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) | |
308 | 313 | } | |
309 | 314 | else { | |
310 | - | let | |
311 | - | let | |
312 | - | let | |
313 | - | if (if (( | |
314 | - | 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) | |
315 | 320 | else false) | |
316 | - | then throw(((("Price slippage " + toString( | |
321 | + | then throw(((("Price slippage " + toString(cB)) + " > ") + toString(cA))) | |
317 | 322 | else { | |
318 | - | let | |
319 | - | let | |
320 | - | let | |
321 | - | let | |
322 | - | then $Tuple2( | |
323 | - | else $Tuple2( | |
324 | - | let | |
325 | - | let | |
326 | - | let | |
327 | - | $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) | |
328 | 333 | } | |
329 | 334 | } | |
330 | - | let | |
331 | - | let | |
332 | - | let | |
333 | - | let | |
334 | - | let | |
335 | - | 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)) | |
336 | 341 | then throw("LP <= 0") | |
337 | 342 | else { | |
338 | - | let | |
343 | + | let cM = if (!(cl)) | |
339 | 344 | then 0 | |
340 | - | else | |
341 | - | let | |
342 | - | let | |
343 | - | let | |
344 | - | then ( | |
345 | + | else cI | |
346 | + | let cN = (cg - cJ) | |
347 | + | let cO = (ci - cK) | |
348 | + | let cP = if (if (cm) | |
349 | + | then (co == cp) | |
345 | 350 | else false) | |
346 | - | then $Tuple2( | |
347 | - | else if (if ( | |
348 | - | then ( | |
351 | + | then $Tuple2(cn, 0) | |
352 | + | else if (if (cm) | |
353 | + | then (co == cq) | |
349 | 354 | else false) | |
350 | - | then $Tuple2(0, | |
351 | - | else $Tuple2( | |
352 | - | let | |
353 | - | let | |
354 | - | let | |
355 | - | $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) | |
356 | 361 | } | |
357 | 362 | } | |
358 | 363 | ||
359 | 364 | ||
360 | - | func | |
361 | - | let | |
362 | - | let | |
363 | - | let | |
364 | - | let | |
365 | - | let | |
366 | - | let | |
367 | - | let | |
368 | - | let | |
369 | - | let | |
370 | - | then | |
371 | - | else | |
372 | - | let | |
373 | - | 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()) | |
374 | 379 | then true | |
375 | - | else ( | |
380 | + | else (bQ == n)) | |
376 | 381 | then true | |
377 | - | else ( | |
382 | + | else (bQ == o)) | |
378 | 383 | then throw("Admin blocked") | |
379 | 384 | else { | |
380 | - | let cX = cS.assetPair.amountAsset | |
381 | - | let cY = if ((cX == unit)) | |
382 | - | then "WAVES" | |
383 | - | else toBase58String(value(cX)) | |
384 | - | let cZ = cS.assetPair.priceAsset | |
385 | + | let cZ = cU.assetPair.amountAsset | |
385 | 386 | let da = if ((cZ == unit)) | |
386 | 387 | then "WAVES" | |
387 | 388 | else toBase58String(value(cZ)) | |
388 | - | if (if ((cY != cT)) | |
389 | + | let db = cU.assetPair.priceAsset | |
390 | + | let dc = if ((db == unit)) | |
391 | + | then "WAVES" | |
392 | + | else toBase58String(value(db)) | |
393 | + | if (if ((da != cV)) | |
389 | 394 | then true | |
390 | - | else ( | |
395 | + | else (dc != cW)) | |
391 | 396 | then throw("Wr assets") | |
392 | 397 | else { | |
393 | - | let | |
394 | - | let | |
395 | - | let | |
396 | - | let | |
397 | - | then ( | |
398 | - | 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) | |
399 | 404 | true | |
400 | 405 | } | |
401 | 406 | } | |
402 | 407 | } | |
403 | 408 | ||
404 | 409 | ||
405 | - | func | |
410 | + | func dg (dh) = if ((size(dh.payments) != 1)) | |
406 | 411 | then throw("1 pmnt exp") | |
407 | 412 | else { | |
408 | - | let | |
409 | - | let | |
410 | - | let | |
411 | - | let | |
412 | - | let | |
413 | - | let | |
414 | - | let | |
415 | - | let | |
416 | - | 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()) | |
417 | 422 | then true | |
418 | - | else ( | |
419 | - | then throw(("Admin blocked: " + toString( | |
420 | - | else $Tuple5( | |
423 | + | else (bQ == o)) | |
424 | + | then throw(("Admin blocked: " + toString(bQ))) | |
425 | + | else $Tuple5(cc, cd, cn, bI, ce) | |
421 | 426 | } | |
422 | 427 | ||
423 | 428 | ||
424 | - | func | |
425 | - | let | |
426 | - | let | |
427 | - | 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()) | |
428 | 433 | then true | |
429 | - | else ( | |
434 | + | else (bQ == m)) | |
430 | 435 | then true | |
431 | - | else ( | |
432 | - | then throw(("Blocked:" + toString( | |
433 | - | else | |
436 | + | else (bQ == o)) | |
437 | + | then throw(("Blocked:" + toString(bQ))) | |
438 | + | else cz | |
434 | 439 | } | |
435 | 440 | ||
436 | 441 | ||
437 | - | func dk () = { | |
438 | - | let as = getString(N()) | |
439 | - | if ($isInstanceOf(as, "String")) | |
442 | + | func dn (do) = { | |
443 | + | let dp = fraction(do, ad, d) | |
444 | + | $Tuple2((do - dp), dp) | |
445 | + | } | |
446 | + | ||
447 | + | ||
448 | + | func dq () = { | |
449 | + | let at = getString(O()) | |
450 | + | if ($isInstanceOf(at, "String")) | |
440 | 451 | then { | |
441 | - | let | |
442 | - | fromBase58String( | |
452 | + | let dr = at | |
453 | + | fromBase58String(dr) | |
443 | 454 | } | |
444 | - | else if ($isInstanceOf( | |
455 | + | else if ($isInstanceOf(at, "Unit")) | |
445 | 456 | then unit | |
446 | 457 | else throw("Match error") | |
447 | 458 | } | |
448 | 459 | ||
449 | 460 | ||
450 | - | func | |
451 | - | let | |
452 | - | if ($isInstanceOf( | |
461 | + | func ds () = { | |
462 | + | let at = getString(P()) | |
463 | + | if ($isInstanceOf(at, "String")) | |
453 | 464 | then { | |
454 | - | let | |
455 | - | fromBase58String( | |
465 | + | let dr = at | |
466 | + | fromBase58String(dr) | |
456 | 467 | } | |
457 | - | else if ($isInstanceOf( | |
468 | + | else if ($isInstanceOf(at, "Unit")) | |
458 | 469 | then unit | |
459 | 470 | else throw("Match error") | |
460 | 471 | } | |
461 | 472 | ||
462 | 473 | ||
463 | - | let | |
474 | + | let dt = throw("Permission denied") | |
464 | 475 | ||
465 | - | func | |
466 | - | let | |
467 | - | if ($isInstanceOf( | |
476 | + | func du (dh) = { | |
477 | + | let at = dq() | |
478 | + | if ($isInstanceOf(at, "ByteVector")) | |
468 | 479 | then { | |
469 | - | let | |
470 | - | if (( | |
480 | + | let dv = at | |
481 | + | if ((dh.callerPublicKey == dv)) | |
471 | 482 | then true | |
472 | - | else | |
483 | + | else dt | |
473 | 484 | } | |
474 | - | else if ($isInstanceOf( | |
475 | - | then if (( | |
485 | + | else if ($isInstanceOf(at, "Unit")) | |
486 | + | then if ((dh.caller == this)) | |
476 | 487 | then true | |
477 | - | else | |
488 | + | else dt | |
478 | 489 | else throw("Match error") | |
479 | 490 | } | |
480 | 491 | ||
481 | 492 | ||
482 | - | @Callable( | |
483 | - | func constructor ( | |
484 | - | let | |
485 | - | if (( | |
486 | - | then [StringEntry( | |
493 | + | @Callable(dh) | |
494 | + | func constructor (N) = { | |
495 | + | let dw = du(dh) | |
496 | + | if ((dw == dw)) | |
497 | + | then [StringEntry(N(), N)] | |
487 | 498 | else throw("Strict value is not equal to itself.") | |
488 | 499 | } | |
489 | 500 | ||
490 | 501 | ||
491 | 502 | ||
492 | - | @Callable( | |
493 | - | func setManager ( | |
494 | - | let | |
495 | - | if (( | |
503 | + | @Callable(dh) | |
504 | + | func setManager (dx) = { | |
505 | + | let dw = du(dh) | |
506 | + | if ((dw == dw)) | |
496 | 507 | then { | |
497 | - | let | |
498 | - | if (( | |
499 | - | then [StringEntry( | |
508 | + | let dy = fromBase58String(dx) | |
509 | + | if ((dy == dy)) | |
510 | + | then [StringEntry(P(), dx)] | |
500 | 511 | else throw("Strict value is not equal to itself.") | |
501 | 512 | } | |
502 | 513 | else throw("Strict value is not equal to itself.") | |
503 | 514 | } | |
504 | 515 | ||
505 | 516 | ||
506 | 517 | ||
507 | - | @Callable( | |
518 | + | @Callable(dh) | |
508 | 519 | func confirmManager () = { | |
509 | - | let | |
510 | - | let | |
520 | + | let bF = ds() | |
521 | + | let dz = if (isDefined(bF)) | |
511 | 522 | then true | |
512 | 523 | else throw("No pending manager") | |
513 | - | if (( | |
524 | + | if ((dz == dz)) | |
514 | 525 | then { | |
515 | - | let | |
526 | + | let dA = if ((dh.callerPublicKey == value(bF))) | |
516 | 527 | then true | |
517 | 528 | else throw("You are not pending manager") | |
518 | - | if (( | |
519 | - | then [StringEntry( | |
529 | + | if ((dA == dA)) | |
530 | + | then [StringEntry(O(), toBase58String(value(bF))), DeleteEntry(P())] | |
520 | 531 | else throw("Strict value is not equal to itself.") | |
521 | 532 | } | |
522 | 533 | else throw("Strict value is not equal to itself.") | |
523 | 534 | } | |
524 | 535 | ||
525 | 536 | ||
526 | 537 | ||
527 | - | @Callable( | |
528 | - | func put ( | |
529 | - | let | |
530 | - | let | |
531 | - | let | |
532 | - | 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)) | |
533 | 544 | then throw("Wrong slippage") | |
534 | - | else if ((size( | |
545 | + | else if ((size(dh.payments) != 2)) | |
535 | 546 | then throw("2 pmnts expd") | |
536 | 547 | else { | |
537 | - | let | |
538 | - | let | |
539 | - | let | |
540 | - | let | |
541 | - | let | |
542 | - | let | |
543 | - | let | |
544 | - | let | |
545 | - | let | |
546 | - | 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)) | |
547 | 558 | then { | |
548 | - | let | |
549 | - | let | |
550 | - | if ($isInstanceOf( | |
559 | + | let dI = { | |
560 | + | let at = cz | |
561 | + | if ($isInstanceOf(at, "Address")) | |
551 | 562 | then { | |
552 | - | let | |
553 | - | invoke( | |
563 | + | let dJ = at | |
564 | + | invoke(dJ, "emit", [cM], nil) | |
554 | 565 | } | |
555 | 566 | else unit | |
556 | 567 | } | |
557 | - | if (( | |
568 | + | if ((dI == dI)) | |
558 | 569 | then { | |
559 | - | let | |
560 | - | then invoke( | |
570 | + | let dK = if ((cN > 0)) | |
571 | + | then invoke(dF, "put", nil, [AttachedPayment(bM, cN)]) | |
561 | 572 | else nil | |
562 | - | if (( | |
573 | + | if ((dK == dK)) | |
563 | 574 | then { | |
564 | - | let | |
565 | - | then invoke( | |
575 | + | let dL = if ((cO > 0)) | |
576 | + | then invoke(dF, "put", nil, [AttachedPayment(bN, cO)]) | |
566 | 577 | else nil | |
567 | - | if (( | |
578 | + | if ((dL == dL)) | |
568 | 579 | then { | |
569 | - | let | |
580 | + | let dM = if (dC) | |
570 | 581 | then { | |
571 | - | let | |
572 | - | if (( | |
582 | + | let dN = invoke(dE, "stake", nil, [AttachedPayment(dH, cM)]) | |
583 | + | if ((dN == dN)) | |
573 | 584 | then nil | |
574 | 585 | else throw("Strict value is not equal to itself.") | |
575 | 586 | } | |
576 | - | else [ScriptTransfer( | |
577 | - | ( | |
587 | + | else [ScriptTransfer(dh.caller, cM, dH)] | |
588 | + | (ce ++ dM) | |
578 | 589 | } | |
579 | 590 | else throw("Strict value is not equal to itself.") | |
580 | 591 | } | |
581 | 592 | else throw("Strict value is not equal to itself.") | |
582 | 593 | } | |
583 | 594 | else throw("Strict value is not equal to itself.") | |
584 | 595 | } | |
585 | 596 | else throw("Strict value is not equal to itself.") | |
586 | 597 | } | |
587 | 598 | } | |
588 | 599 | ||
589 | 600 | ||
590 | 601 | ||
591 | - | @Callable(df) | |
592 | - | func putOneTkn (dI,dJ,dK,be,dw) = { | |
593 | - | let bv = aG() | |
594 | - | let dy = valueOrErrorMessage(addressFromString(bv[x]), "Wr st addr") | |
595 | - | let dz = valueOrErrorMessage(addressFromString(bv[y]), "Wr sl addr") | |
596 | - | let dL = valueOrErrorMessage(addressFromString(bv[z]), "Wr gwx addr") | |
597 | - | let dM = aC() | |
598 | - | let bK = dM[r] | |
599 | - | let bL = dM[s] | |
600 | - | let bM = parseIntValue(dM[t]) | |
601 | - | let bN = parseIntValue(dM[u]) | |
602 | - | let dN = valueOrElse(getString(this, aa()), "") | |
603 | - | let bI = if ((dN == toString(df.caller))) | |
604 | - | then df.originCaller | |
605 | - | else df.caller | |
606 | - | let dO = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(aa()), "no addons")), "addon address in not valid") | |
607 | - | let dP = reentrantInvoke(dO, "ensureCanPutOneTkn", [toString(bI)], nil) | |
608 | - | if ((dP == dP)) | |
609 | - | then if (if (if (if ((0 >= be)) | |
610 | - | then true | |
611 | - | else (0 >= dI)) | |
612 | - | then true | |
613 | - | else (0 >= dJ)) | |
614 | - | then true | |
615 | - | else (0 >= dK)) | |
616 | - | then throw("Wrong params") | |
617 | - | else if ((size(df.payments) != 1)) | |
618 | - | then throw("1 pmnt expd") | |
619 | - | else { | |
620 | - | let dg = value(df.payments[0]) | |
621 | - | let bG = toBase58String(value(dg.assetId)) | |
622 | - | let cl = dg.amount | |
623 | - | if ((10000000 > cl)) | |
624 | - | then throw("Wrong pmt amt") | |
625 | - | else { | |
626 | - | let bQ = aW(bK) | |
627 | - | let bS = aW(bL) | |
628 | - | let dQ = if ((bG == bK)) | |
629 | - | then if (if ((cl > bQ)) | |
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)) | |
630 | 647 | then true | |
631 | - | else ( | |
648 | + | else (dP > cn)) | |
632 | 649 | then throw("invalid payment amount") | |
633 | - | else $Tuple6((bQ - cl), bS, (cl - dI), dJ, 0, 0) | |
634 | - | else if ((bG == bL)) | |
635 | - | then if (if ((cl > bS)) | |
636 | - | then true | |
637 | - | else (dJ > cl)) | |
638 | - | then throw("invalid payment amount") | |
639 | - | else $Tuple6(bQ, (bS - cl), 0, 0, (cl - dJ), dI) | |
640 | - | else throw("wrong pmtAssetId") | |
641 | - | let dR = dQ._1 | |
642 | - | let dS = dQ._2 | |
643 | - | let dT = dQ._3 | |
644 | - | let dU = dQ._4 | |
645 | - | let dV = dQ._5 | |
646 | - | let dW = dQ._6 | |
647 | - | let bj = invoke(dL, "calcD", [toString(dR), toString(dS), az, g, h], nil) | |
648 | - | let bi = invoke(dL, "calcD", [toString(toBigInt(((dR + dT) - dW))), toString(toBigInt(((dS + dV) - dU))), az, g, h], nil) | |
649 | - | let dX = bh(parseBigIntValue(ar(bi)), parseBigIntValue(ar(bj)), f) | |
650 | - | if ((dX == dX)) | |
651 | - | then { | |
652 | - | let dY = dh(toString(df.caller), toBase58String(df.transactionId), AttachedPayment(fromBase58String(bK), dI), AttachedPayment(fromBase58String(bL), dJ), be, true, true, cl, bG) | |
653 | - | let dZ = dY._2 | |
654 | - | let dB = dY._7 | |
655 | - | let cc = dY._9 | |
656 | - | let cL = dY._10 | |
657 | - | let cM = dY._11 | |
658 | - | let ea = bb(toBigInt(dZ), toBigInt(dK), toBigInt(be)) | |
659 | - | let cK = toInt(ea._2) | |
660 | - | let dA = invoke(ay, "emit", [cK], nil) | |
661 | - | if ((dA == dA)) | |
662 | - | then { | |
663 | - | let dC = { | |
664 | - | let as = dA | |
665 | - | 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)) | |
666 | 689 | then { | |
667 | - | let dD = as | |
668 | - | invoke(dD, "emit", [cK], 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 | + | } | |
708 | + | else throw("Strict value is not equal to itself.") | |
669 | 709 | } | |
670 | - | else | |
710 | + | else throw("Strict value is not equal to itself.") | |
671 | 711 | } | |
672 | - | if ((dC == dC)) | |
673 | - | then { | |
674 | - | let dE = if ((cL > 0)) | |
675 | - | then invoke(dz, "put", nil, [AttachedPayment(fromBase58String(bK), cL)]) | |
676 | - | else nil | |
677 | - | if ((dE == dE)) | |
678 | - | then { | |
679 | - | let dF = if ((cM > 0)) | |
680 | - | then invoke(dz, "put", nil, [AttachedPayment(fromBase58String(bL), cM)]) | |
681 | - | else nil | |
682 | - | if ((dF == dF)) | |
683 | - | then { | |
684 | - | let dG = if (dw) | |
685 | - | then { | |
686 | - | let dH = invoke(dy, "stake", nil, [AttachedPayment(dB, cK)]) | |
687 | - | if ((dH == dH)) | |
688 | - | then nil | |
689 | - | else throw("Strict value is not equal to itself.") | |
690 | - | } | |
691 | - | else [ScriptTransfer(df.caller, cK, dB)] | |
692 | - | (cc ++ dG) | |
693 | - | } | |
694 | - | else throw("Strict value is not equal to itself.") | |
695 | - | } | |
696 | - | else throw("Strict value is not equal to itself.") | |
697 | - | } | |
698 | - | else throw("Strict value is not equal to itself.") | |
699 | - | } | |
700 | - | else throw("Strict value is not equal to itself.") | |
701 | - | } | |
702 | - | else throw("Strict value is not equal to itself.") | |
703 | - | } | |
704 | - | } | |
712 | + | else throw("Strict value is not equal to itself.") | |
713 | + | } | |
714 | + | else throw("Strict value is not equal to itself.") | |
715 | + | } | |
716 | + | else throw("Strict value is not equal to itself.") | |
717 | + | } | |
718 | + | } | |
719 | + | } | |
720 | + | ||
721 | + | ||
722 | + | ||
723 | + | @Callable(dh) | |
724 | + | func putForFree (ej) = if ((0 > ej)) | |
725 | + | then throw("Wrong slpg") | |
726 | + | else if ((size(dh.payments) != 2)) | |
727 | + | then throw("2 pmnts expd") | |
728 | + | else { | |
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 | |
731 | + | } | |
732 | + | ||
733 | + | ||
734 | + | ||
735 | + | @Callable(dh) | |
736 | + | func get () = { | |
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 | |
705 | 746 | else throw("Strict value is not equal to itself.") | |
706 | 747 | } | |
707 | 748 | ||
708 | 749 | ||
709 | 750 | ||
710 | - | @Callable(df) | |
711 | - | func putOneTknV2 (dK,be,dw) = { | |
712 | - | let bv = aG() | |
713 | - | let dy = valueOrErrorMessage(addressFromString(bv[x]), "Wr st addr") | |
714 | - | let dz = valueOrErrorMessage(addressFromString(bv[y]), "Wr sl addr") | |
715 | - | let dL = valueOrErrorMessage(addressFromString(bv[z]), "Wr gwx addr") | |
716 | - | let dM = aC() | |
717 | - | let bK = dM[r] | |
718 | - | let bL = dM[s] | |
719 | - | let bM = parseIntValue(dM[t]) | |
720 | - | let bN = parseIntValue(dM[u]) | |
721 | - | let dN = valueOrElse(getString(this, aa()), "") | |
722 | - | let bI = if ((dN == toString(df.caller))) | |
723 | - | then df.originCaller | |
724 | - | else df.caller | |
725 | - | let dO = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(aa()), "no addons")), "addon address in not valid") | |
726 | - | if ((size(df.payments) != 1)) | |
727 | - | then throw("1 pmnt expd") | |
728 | - | else { | |
729 | - | let dg = value(df.payments[0]) | |
730 | - | let bG = toBase58String(value(dg.assetId)) | |
731 | - | let cl = dg.amount | |
732 | - | if ((10000000 > cl)) | |
733 | - | then throw("Wrong pmt amt") | |
734 | - | else { | |
735 | - | let bQ = aW(bK) | |
736 | - | let bS = aW(bL) | |
737 | - | let eb = if ((bG == bK)) | |
738 | - | then if ((cl > bQ)) | |
739 | - | then throw("invalid payment amount") | |
740 | - | else $Tuple2((bQ - cl), bS) | |
741 | - | else if ((bG == bL)) | |
742 | - | then if ((cl > bS)) | |
743 | - | then throw("invalid payment amount") | |
744 | - | else $Tuple2(bQ, (bS - cl)) | |
745 | - | else throw("wrong pmtAssetId") | |
746 | - | let dR = eb._1 | |
747 | - | let dS = eb._2 | |
748 | - | let ec = if ((bG == bK)) | |
749 | - | then $Tuple2(dR, dS) | |
750 | - | else $Tuple2(dS, dR) | |
751 | - | let ed = ec._1 | |
752 | - | let ee = ec._2 | |
753 | - | let ef = 1 | |
754 | - | let eg = { | |
755 | - | let eh = invoke(dL, "calcPutXOnly", [toString(cl), toString(ed), toString(ee), "", az, g, toString(ef), h], nil) | |
756 | - | if ($isInstanceOf(eh, "(Int, Int)")) | |
757 | - | then eh | |
758 | - | else throw(($getType(invoke(dL, "calcPutXOnly", [toString(cl), toString(ed), toString(ee), "", az, g, toString(ef), h], nil)) + " couldn't be cast to (Int, Int)")) | |
759 | - | } | |
760 | - | let ei = if ((bG == bK)) | |
761 | - | then eg | |
762 | - | else $Tuple2(eg._2, eg._1) | |
763 | - | let dI = ei._1 | |
764 | - | let dJ = ei._2 | |
765 | - | let dY = dh(toString(df.caller), toBase58String(df.transactionId), AttachedPayment(fromBase58String(bK), dI), AttachedPayment(fromBase58String(bL), dJ), be, true, true, cl, bG) | |
766 | - | let dZ = dY._2 | |
767 | - | let dB = dY._7 | |
768 | - | let cc = dY._9 | |
769 | - | let cL = dY._10 | |
770 | - | let cM = dY._11 | |
771 | - | let cK = if ((dK > 0)) | |
772 | - | then { | |
773 | - | let ea = bb(toBigInt(dZ), toBigInt(dK), toBigInt(be)) | |
774 | - | toInt(ea._2) | |
775 | - | } | |
776 | - | else dZ | |
777 | - | let dA = invoke(ay, "emit", [cK], nil) | |
778 | - | if ((dA == dA)) | |
779 | - | then { | |
780 | - | let dC = { | |
781 | - | let as = dA | |
782 | - | if ($isInstanceOf(as, "Address")) | |
783 | - | then { | |
784 | - | let dD = as | |
785 | - | invoke(dD, "emit", [cK], nil) | |
786 | - | } | |
787 | - | else unit | |
788 | - | } | |
789 | - | if ((dC == dC)) | |
790 | - | then { | |
791 | - | let dE = if ((cL > 0)) | |
792 | - | then invoke(dz, "put", nil, [AttachedPayment(fromBase58String(bK), cL)]) | |
793 | - | else nil | |
794 | - | if ((dE == dE)) | |
795 | - | then { | |
796 | - | let dF = if ((cM > 0)) | |
797 | - | then invoke(dz, "put", nil, [AttachedPayment(fromBase58String(bL), cM)]) | |
798 | - | else nil | |
799 | - | if ((dF == dF)) | |
800 | - | then { | |
801 | - | let dG = if (dw) | |
802 | - | then { | |
803 | - | let dH = invoke(dy, "stake", nil, [AttachedPayment(dB, cK)]) | |
804 | - | if ((dH == dH)) | |
805 | - | then nil | |
806 | - | else throw("Strict value is not equal to itself.") | |
807 | - | } | |
808 | - | else [ScriptTransfer(df.caller, cK, dB)] | |
809 | - | (cc ++ dG) | |
810 | - | } | |
811 | - | else throw("Strict value is not equal to itself.") | |
812 | - | } | |
813 | - | else throw("Strict value is not equal to itself.") | |
814 | - | } | |
815 | - | else throw("Strict value is not equal to itself.") | |
816 | - | } | |
817 | - | else throw("Strict value is not equal to itself.") | |
818 | - | } | |
819 | - | } | |
820 | - | } | |
821 | - | ||
822 | - | ||
823 | - | ||
824 | - | @Callable(df) | |
825 | - | func putForFree (ej) = if ((0 > ej)) | |
826 | - | then throw("Wrong slpg") | |
827 | - | else if ((size(df.payments) != 2)) | |
828 | - | then throw("2 pmnts expd") | |
829 | - | else { | |
830 | - | let dY = dh(toString(df.caller), toBase58String(df.transactionId), AttachedPayment(value(df.payments[0]).assetId, value(df.payments[0]).amount), df.payments[1], ej, false, false, 0, "") | |
831 | - | dY._9 | |
832 | - | } | |
833 | - | ||
834 | - | ||
835 | - | ||
836 | - | @Callable(df) | |
837 | - | func get () = { | |
838 | - | let cx = de(df) | |
839 | - | let ek = cx._1 | |
840 | - | let cb = cx._2 | |
841 | - | let cl = cx._3 | |
842 | - | let bG = cx._4 | |
843 | - | let cc = cx._5 | |
844 | - | let el = invoke(ay, "burn", [cl], [AttachedPayment(bG, cl)]) | |
845 | - | if ((el == el)) | |
846 | - | then cc | |
847 | - | else throw("Strict value is not equal to itself.") | |
848 | - | } | |
849 | - | ||
850 | - | ||
851 | - | ||
852 | - | @Callable(df) | |
853 | - | func getOneTkn (em,en,eo,ep,be) = if ((size(df.payments) != 1)) | |
751 | + | @Callable(dh) | |
752 | + | func getOneTkn (em,en,eo,ep,bg) = if ((size(dh.payments) != 1)) | |
854 | 753 | then throw("1 pmnt expd") | |
855 | 754 | else { | |
856 | - | let bv = aC() | |
857 | - | let bJ = bv[q] | |
858 | - | let bK = bv[r] | |
859 | - | let bL = bv[s] | |
860 | - | let bM = parseIntValue(bv[t]) | |
861 | - | let bN = parseIntValue(bv[u]) | |
862 | - | let bO = bv[p] | |
863 | - | let dx = aG() | |
864 | - | let dL = valueOrErrorMessage(addressFromString(dx[z]), "Wr sl addr") | |
865 | - | let dg = value(df.payments[0]) | |
866 | - | let dN = valueOrElse(getString(this, aa()), "") | |
867 | - | let bI = if ((dN == toString(df.caller))) | |
868 | - | then df.originCaller | |
869 | - | else df.caller | |
870 | - | let bF = toBase58String(df.transactionId) | |
871 | - | let bG = value(dg.assetId) | |
872 | - | let cl = dg.amount | |
873 | - | let dO = valueOrErrorMessage(addressFromString(valueOrErrorMessage(getString(aa()), "no addons")), "addon address in not valid") | |
874 | - | let dP = reentrantInvoke(dO, "ensureCanGetOneTkn", [toString(bI)], nil) | |
875 | - | if ((dP == dP)) | |
876 | - | then if ((1000000000 > cl)) | |
877 | - | then throw("Min pmt 10 LP") | |
878 | - | else if (if (if ((0 > be)) | |
879 | - | then true | |
880 | - | else (0 > em)) | |
881 | - | then true | |
882 | - | else (0 > eo)) | |
883 | - | then throw("Wrong params") | |
884 | - | else if ((bJ != toBase58String(bG))) | |
885 | - | then throw("Wrong LP") | |
886 | - | else { | |
887 | - | let cx = bE(toBase58String(df.transactionId), toBase58String(bG), cl, df.caller) | |
888 | - | let eq = cx._1 | |
889 | - | let er = cx._2 | |
890 | - | let bQ = aW(bK) | |
891 | - | let bS = aW(bL) | |
892 | - | let es = if ((ep == bK)) | |
893 | - | then $Tuple7((bQ - eq), (bS - er), em, er, 0, 0, (eq + em)) | |
894 | - | else if ((ep == bL)) | |
895 | - | then $Tuple7((bQ - eq), (bS - er), 0, 0, em, eq, (er + em)) | |
896 | - | else throw("wrong outAssetId") | |
897 | - | let dR = es._1 | |
898 | - | let dS = es._2 | |
899 | - | let dT = es._3 | |
900 | - | let dU = es._4 | |
901 | - | let dV = es._5 | |
902 | - | let dW = es._6 | |
903 | - | let et = es._7 | |
904 | - | if (if ((0 > dT)) | |
905 | - | then true | |
906 | - | else (0 > dV)) | |
907 | - | then throw("Wrong calc") | |
908 | - | else { | |
909 | - | let bj = invoke(dL, "calcD", [toString(dR), toString(dS), az, g, h], nil) | |
910 | - | let bi = invoke(dL, "calcD", [toString(((dR - dT) + dW)), toString(((dS + dU) - dV)), az, g, h], nil) | |
911 | - | let dX = bh(parseBigIntValue(ar(bi)), parseBigIntValue(ar(bj)), f) | |
912 | - | if ((dX == dX)) | |
913 | - | then { | |
914 | - | let eu = bb(toBigInt(et), toBigInt(eo), toBigInt(be)) | |
915 | - | if ((eu == eu)) | |
916 | - | then { | |
917 | - | let ev = if ((ep == bK)) | |
918 | - | then $Tuple2(toInt(eu._2), 0) | |
919 | - | else $Tuple2(0, toInt(eu._2)) | |
920 | - | let ew = ev._1 | |
921 | - | let ex = ev._2 | |
922 | - | let ey = aY(B(bS, bN), B(bQ, bM)) | |
923 | - | let ez = E(ey, a) | |
924 | - | let cc = [ScriptTransfer(bI, (ew + ex), if ((ep == "WAVES")) | |
925 | - | then unit | |
926 | - | else fromBase58String(ep)), StringEntry(W(toString(bI), bF), aS(ew, ex, cl, ez, height, lastBlock.timestamp)), IntegerEntry(P(), ez), IntegerEntry(Q(height, lastBlock.timestamp), ez)] | |
927 | - | if ((cc == cc)) | |
928 | - | then { | |
929 | - | let eA = invoke(ay, "burn", [cl], [AttachedPayment(bG, cl)]) | |
930 | - | if ((eA == eA)) | |
931 | - | then cc | |
932 | - | else throw("Strict value is not equal to itself.") | |
933 | - | } | |
934 | - | else throw("Strict value is not equal to itself.") | |
935 | - | } | |
936 | - | else throw("Strict value is not equal to itself.") | |
937 | - | } | |
938 | - | else throw("Strict value is not equal to itself.") | |
939 | - | } | |
940 | - | } | |
941 | - | 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 | + | } | |
942 | 844 | } | |
943 | 845 | ||
944 | 846 | ||
945 | 847 | ||
946 | - | @Callable( | |
947 | - | func getNoLess ( | |
948 | - | let | |
949 | - | let | |
950 | - | let | |
951 | - | let | |
952 | - | let | |
953 | - | let | |
954 | - | if (( | |
955 | - | then throw(((("Failed: " + toString( | |
956 | - | else if (( | |
957 | - | then throw(((("Failed: " + toString( | |
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))) | |
958 | 860 | else { | |
959 | - | let | |
960 | - | if (( | |
961 | - | then | |
861 | + | let eG = invoke(az, "burn", [cn], [AttachedPayment(bI, cn)]) | |
862 | + | if ((eG == eG)) | |
863 | + | then ce | |
962 | 864 | else throw("Strict value is not equal to itself.") | |
963 | 865 | } | |
964 | 866 | } | |
965 | 867 | ||
966 | 868 | ||
967 | 869 | ||
968 | - | @Callable( | |
969 | - | func unstakeAndGet ( | |
970 | - | let | |
870 | + | @Callable(dh) | |
871 | + | func unstakeAndGet (do) = { | |
872 | + | let eH = if ((size(dh.payments) != 0)) | |
971 | 873 | then throw("No pmnts expd") | |
972 | 874 | else true | |
973 | - | if (( | |
875 | + | if ((eH == eH)) | |
974 | 876 | then { | |
975 | - | let | |
976 | - | let | |
977 | - | let | |
978 | - | let | |
979 | - | let | |
980 | - | 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)) | |
981 | 883 | then { | |
982 | - | let | |
983 | - | let | |
984 | - | let | |
985 | - | 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()) | |
986 | 888 | then true | |
987 | - | else ( | |
988 | - | then throw(("Blocked: " + toString( | |
889 | + | else (bQ == o)) | |
890 | + | then throw(("Blocked: " + toString(bQ))) | |
989 | 891 | else true | |
990 | - | if (( | |
892 | + | if ((eL == eL)) | |
991 | 893 | then { | |
992 | - | let | |
993 | - | if (( | |
994 | - | then | |
894 | + | let eM = invoke(az, "burn", [do], [AttachedPayment(dH, do)]) | |
895 | + | if ((eM == eM)) | |
896 | + | then ce | |
995 | 897 | else throw("Strict value is not equal to itself.") | |
996 | 898 | } | |
997 | 899 | else throw("Strict value is not equal to itself.") | |
998 | 900 | } | |
999 | 901 | else throw("Strict value is not equal to itself.") | |
1000 | 902 | } | |
1001 | 903 | else throw("Strict value is not equal to itself.") | |
1002 | 904 | } | |
1003 | 905 | ||
1004 | 906 | ||
1005 | 907 | ||
1006 | - | @Callable( | |
1007 | - | func activate ( | |
908 | + | @Callable(dh) | |
909 | + | func activate (eN,eO) = if ((toString(dh.caller) != toString(az))) | |
1008 | 910 | then throw("denied") | |
1009 | - | else $Tuple2([StringEntry( | |
911 | + | else $Tuple2([StringEntry(Y(), eN), StringEntry(Z(), eO)], "success") | |
1010 | 912 | ||
1011 | 913 | ||
1012 | 914 | ||
1013 | - | @Callable( | |
1014 | - | func setS ( | |
1015 | - | then | |
1016 | - | else [StringEntry( | |
915 | + | @Callable(dh) | |
916 | + | func setS (eP,eL) = if ((toString(dh.caller) != av(this, ab()))) | |
917 | + | then dt | |
918 | + | else [StringEntry(eP, eL)] | |
1017 | 919 | ||
1018 | 920 | ||
1019 | 921 | ||
1020 | - | @Callable( | |
1021 | - | func setI ( | |
1022 | - | then | |
1023 | - | else [IntegerEntry( | |
922 | + | @Callable(dh) | |
923 | + | func setI (eP,eL) = if ((toString(dh.caller) != av(this, ab()))) | |
924 | + | then dt | |
925 | + | else [IntegerEntry(eP, eL)] | |
1024 | 926 | ||
1025 | 927 | ||
1026 | 928 | ||
1027 | - | @Callable( | |
1028 | - | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, | |
929 | + | @Callable(dh) | |
930 | + | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, aE()) | |
1029 | 931 | ||
1030 | 932 | ||
1031 | 933 | ||
1032 | - | @Callable( | |
1033 | - | func getAccBalanceWrapperREADONLY ( | |
934 | + | @Callable(dh) | |
935 | + | func getAccBalanceWrapperREADONLY (aZ) = $Tuple2(nil, aY(aZ)) | |
1034 | 936 | ||
1035 | 937 | ||
1036 | 938 | ||
1037 | - | @Callable( | |
1038 | - | func calcPricesWrapperREADONLY ( | |
1039 | - | let | |
1040 | - | $Tuple2(nil, [toString( | |
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])]) | |
1041 | 943 | } | |
1042 | 944 | ||
1043 | 945 | ||
1044 | 946 | ||
1045 | - | @Callable( | |
1046 | - | func fromX18WrapperREADONLY ( | |
947 | + | @Callable(dh) | |
948 | + | func fromX18WrapperREADONLY (G,eR) = $Tuple2(nil, F(parseBigIntValue(G), eR)) | |
1047 | 949 | ||
1048 | 950 | ||
1049 | 951 | ||
1050 | - | @Callable( | |
1051 | - | func toX18WrapperREADONLY ( | |
952 | + | @Callable(dh) | |
953 | + | func toX18WrapperREADONLY (D,E) = $Tuple2(nil, toString(C(D, E))) | |
1052 | 954 | ||
1053 | 955 | ||
1054 | 956 | ||
1055 | - | @Callable( | |
1056 | - | func calcPriceBigIntWrapperREADONLY ( | |
957 | + | @Callable(dh) | |
958 | + | func calcPriceBigIntWrapperREADONLY (bb,bc) = $Tuple2(nil, toString(ba(parseBigIntValue(bb), parseBigIntValue(bc)))) | |
1057 | 959 | ||
1058 | 960 | ||
1059 | 961 | ||
1060 | - | @Callable( | |
1061 | - | func estimatePutOperationWrapperREADONLY ( | |
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, "")) | |
1062 | 964 | ||
1063 | 965 | ||
1064 | 966 | ||
1065 | - | @Callable( | |
1066 | - | func estimateGetOperationWrapperREADONLY ( | |
1067 | - | let | |
1068 | - | $Tuple2(nil, $Tuple10( | |
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)) | |
1069 | 971 | } | |
1070 | 972 | ||
1071 | 973 | ||
1072 | - | @Verifier( | |
1073 | - | func | |
1074 | - | let | |
1075 | - | let | |
1076 | - | if ($isInstanceOf( | |
974 | + | @Verifier(eU) | |
975 | + | func eV () = { | |
976 | + | let eW = { | |
977 | + | let at = dq() | |
978 | + | if ($isInstanceOf(at, "ByteVector")) | |
1077 | 979 | then { | |
1078 | - | let | |
1079 | - | | |
980 | + | let dv = at | |
981 | + | dv | |
1080 | 982 | } | |
1081 | - | else if ($isInstanceOf( | |
1082 | - | then | |
983 | + | else if ($isInstanceOf(at, "Unit")) | |
984 | + | then eU.senderPublicKey | |
1083 | 985 | else throw("Match error") | |
1084 | 986 | } | |
1085 | - | let | |
1086 | - | if ($isInstanceOf( | |
987 | + | let at = eU | |
988 | + | if ($isInstanceOf(at, "Order")) | |
1087 | 989 | then { | |
1088 | - | let | |
1089 | - | let | |
1090 | - | let | |
1091 | - | let | |
1092 | - | let | |
1093 | - | if (if (if ( | |
1094 | - | 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 | |
1095 | 997 | else false) | |
1096 | - | then | |
998 | + | then fa | |
1097 | 999 | else false) | |
1098 | 1000 | then true | |
1099 | - | else | |
1001 | + | else ao(eY, eZ, fa) | |
1100 | 1002 | } | |
1101 | - | else if ($isInstanceOf( | |
1003 | + | else if ($isInstanceOf(at, "SetScriptTransaction")) | |
1102 | 1004 | then { | |
1103 | - | let | |
1104 | - | let | |
1105 | - | let | |
1106 | - | let | |
1107 | - | if (if (( | |
1108 | - | 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) | |
1109 | 1011 | else false) | |
1110 | 1012 | then true | |
1111 | - | else sigVerify( | |
1013 | + | else sigVerify(eU.bodyBytes, eU.proofs[0], eW) | |
1112 | 1014 | } | |
1113 | - | else sigVerify( | |
1015 | + | else sigVerify(eU.bodyBytes, eU.proofs[0], eW) | |
1114 | 1016 | } | |
1115 | 1017 |
github/deemru/w8io/169f3d6 309.79 ms ◑