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