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