tx · CzYd5gpdUE4aiRggosp9MUzFxZfoKWKSJetmw8n5cq6P 3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT: -0.04100000 Waves 2023.06.01 12:21 [2603410] smart account 3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT > SELF 0.00000000 Waves
{ "type": 13, "id": "CzYd5gpdUE4aiRggosp9MUzFxZfoKWKSJetmw8n5cq6P", "fee": 4100000, "feeAssetId": null, "timestamp": 1685611319739, "version": 2, "chainId": 84, "sender": "3NAefciWv6f9fWvEXdGgpHfanJFG8HqfjuT", "senderPublicKey": "D1BL65meykxFZTCuq7jq9HSGLLnWvQamQPUNrguW5w39", "proofs": [ "2jtMdBVjrPgXN48DrgNmq98w5Kr2Aav7j11ukfk21j4xuC82xSyqfcyGdufXbqfQBh4MZXxfryY3ZBmDdpR85aCT" ], "script": "base64:BgKxLQgCEgUKAwEEARIHCgUBBAEIARIDCgEIEgQKAgEEEgQKAgEEEgMKAQESABIECgIIARIAEgQKAggBEgQKAggBEgQKAgEBEgMKAQESBQoDAQEBEgUKAwEIARIECgIBCBIECgIBCBIECgIICBIAEgMKAQgSBQoDAQEBEgQKAggBEgQKAgEBEgQKAggIEgsKCQgBAQIBAggEBBIGCgQICAEIEgAiBnNjYWxlOCIMc2NhbGU4QmlnSW50IgdzY2FsZTE4Igp6ZXJvQmlnSW50IgRiaWcwIgRiaWcxIgRiaWcyIgRiaWczIgRiaWc0IgpzbGlwcGFnZTREIgt3YXZlc1N0cmluZyIFQW11bHQiBURjb252IgNTRVAiBUVNUFRZIgpQb29sQWN0aXZlIgpQb29sUHV0RGlzIg5Qb29sTWF0Y2hlckRpcyIMUG9vbFNodXRkb3duIg5pZHhQb29sQWRkcmVzcyIJaWR4UG9vbFN0IglpZHhMUEFzSWQiCWlkeEFtQXNJZCIJaWR4UHJBc0lkIgtpZHhBbXRBc0RjbSINaWR4UHJpY2VBc0RjbSILaWR4SUFtdEFzSWQiDWlkeElQcmljZUFzSWQiD2lke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AgpCeXRlVmVjdG9yBAJneAUCYVAFAmd4AwkAAQIFAmFQAgRVbml0CAUCaXgPc2VuZGVyUHVibGljS2V5CQACAQILTWF0Y2ggZXJyb3IEAmFQBQJpeAMJAAECBQJhUAIFT3JkZXIEAmZpBQJhUAQCaUEJAQJiaAAEAmlCAwkBAmdFAAkAlAoCBgIACQECZmgBBQJmaQQCYUoIBQJpQgJfMQQCYUsIBQJpQgJfMgQCYUwJAPQDAwgFAmZpCWJvZHlCeXRlcwkAkQMCCAUCZmkGcHJvb2ZzAAAIBQJmaQ9zZW5kZXJQdWJsaWNLZXkEAmFNCQD0AwMIBQJmaQlib2R5Qnl0ZXMJAJEDAggFAmZpBnByb29mcwABBQJpQQMDAwUCYUoFAmFMBwUCYU0HBgkBAmFJBAUCYUoFAmFLBQJhTAUCYU0DCQABAgUCYVACFFNldFNjcmlwdFRyYW5zYWN0aW9uBAJhVQUCYVADCQD0AwMIBQJpeAlib2R5Qnl0ZXMJAJEDAggFAml4BnByb29mcwAABQJpegYEAmlDCQD2AwEJAQV2YWx1ZQEIBQJhVQZzY3JpcHQEAmlECQDbBAEJAQV2YWx1ZQEJAJ0IAgUCYVQJAQJhRQAEAmlFCQDxBwEFBHRoaXMDCQAAAgUCaUQFAmlDCQECIT0CBQJpRQUCaUMHCQD0AwMIBQJpeAlib2R5Qnl0ZXMJAJEDAggFAml4BnByb29mcwAABQJpek7bkhU=", "height": 2603410, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6M83SbtA3zqQtFyUkYp84rEcE5XJHKaE1zgvEcAe9n7m Next: 5faL8vCW1iEJYJpK8MHGGuwyWwgN7oPsw5HzGCKQrm3d Diff:
Old | New | Differences | |
---|---|---|---|
23 | 23 | ||
24 | 24 | let k = "WAVES" | |
25 | 25 | ||
26 | - | let l = | |
26 | + | let l = "100" | |
27 | 27 | ||
28 | - | let m = " | |
28 | + | let m = "1" | |
29 | 29 | ||
30 | - | let n = " | |
30 | + | let n = "__" | |
31 | 31 | ||
32 | - | let o = " | |
32 | + | let o = "" | |
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 = 1 | |
43 | 43 | ||
44 | - | let u = | |
44 | + | let u = 2 | |
45 | 45 | ||
46 | - | let v = | |
46 | + | let v = 3 | |
47 | 47 | ||
48 | - | let w = | |
48 | + | let w = 4 | |
49 | 49 | ||
50 | - | let x = | |
50 | + | let x = 5 | |
51 | 51 | ||
52 | - | let y = | |
52 | + | let y = 6 | |
53 | 53 | ||
54 | - | let z = | |
54 | + | let z = 7 | |
55 | 55 | ||
56 | - | let A = | |
56 | + | let A = 8 | |
57 | 57 | ||
58 | - | let B = | |
58 | + | let B = 9 | |
59 | 59 | ||
60 | - | let C = | |
60 | + | let C = 1 | |
61 | 61 | ||
62 | - | let D = | |
62 | + | let D = 6 | |
63 | 63 | ||
64 | - | let E = | |
64 | + | let E = 7 | |
65 | 65 | ||
66 | - | let F = | |
66 | + | let F = 10 | |
67 | 67 | ||
68 | - | let G = 10 | |
68 | + | let G = fraction(10, a, 10000) | |
69 | 69 | ||
70 | - | let H = fraction(10, a, 10000) | |
71 | - | ||
72 | - | func I (J,K) = fraction(toBigInt(J), c, toBigInt(K)) | |
70 | + | func H (I,J) = fraction(toBigInt(I), c, toBigInt(J)) | |
73 | 71 | ||
74 | 72 | ||
75 | - | func | |
73 | + | func K (I,J) = fraction(I, c, J) | |
76 | 74 | ||
77 | 75 | ||
78 | - | func | |
76 | + | func L (M,N) = toInt(fraction(M, toBigInt(N), c)) | |
79 | 77 | ||
80 | 78 | ||
81 | - | func | |
79 | + | func O (M,N,P) = toInt(fraction(M, toBigInt(N), c, P)) | |
82 | 80 | ||
83 | 81 | ||
84 | - | func | |
82 | + | func Q (I,J) = fraction(I, c, toBigInt(J)) | |
85 | 83 | ||
86 | 84 | ||
87 | - | func | |
85 | + | func R (M,N) = fraction(M, toBigInt(N), c) | |
88 | 86 | ||
89 | 87 | ||
90 | - | func | |
88 | + | func S (T,U,V) = fraction(T, U, V) | |
91 | 89 | ||
92 | 90 | ||
93 | - | func | |
94 | - | then -( | |
95 | - | else | |
91 | + | func W (M) = if ((d > M)) | |
92 | + | then -(M) | |
93 | + | else M | |
96 | 94 | ||
97 | 95 | ||
98 | - | func | |
99 | - | then -( | |
100 | - | else | |
96 | + | func X (M) = if ((d > M)) | |
97 | + | then -(M) | |
98 | + | else M | |
101 | 99 | ||
102 | 100 | ||
103 | - | func | |
101 | + | func Y () = "%s__factoryContract" | |
104 | 102 | ||
105 | 103 | ||
106 | - | func | |
104 | + | func Z () = "%s__managerPublicKey" | |
107 | 105 | ||
108 | 106 | ||
109 | - | func | |
107 | + | func aa () = "%s__managerVaultAddress" | |
110 | 108 | ||
111 | 109 | ||
112 | - | func | |
110 | + | func ab () = "%s%s__price__last" | |
113 | 111 | ||
114 | 112 | ||
115 | - | func | |
113 | + | func ac (ad,ae) = makeString(["%s%s%d%d__price__history", toString(ad), toString(ae)], n) | |
116 | 114 | ||
117 | 115 | ||
118 | - | func | |
116 | + | func af (ag,ah) = ((("%s%s%s__P__" + ag) + "__") + ah) | |
119 | 117 | ||
120 | 118 | ||
121 | - | func | |
119 | + | func ai (ag,ah) = ((("%s%s%s__G__" + ag) + "__") + ah) | |
122 | 120 | ||
123 | 121 | ||
124 | - | func | |
122 | + | func aj () = "%s__amountAsset" | |
125 | 123 | ||
126 | 124 | ||
127 | - | func | |
125 | + | func ak () = "%s__priceAsset" | |
128 | 126 | ||
129 | 127 | ||
130 | - | func | |
128 | + | func al () = "%s__amp" | |
131 | 129 | ||
132 | 130 | ||
133 | - | func | |
131 | + | func am (an) = ("%s%d__amp__" + toString(an)) | |
134 | 132 | ||
135 | 133 | ||
136 | - | func | |
134 | + | func ao () = "%s__changeAmpLastCall" | |
137 | 135 | ||
138 | 136 | ||
139 | - | let | |
137 | + | let ap = "%s__fee" | |
140 | 138 | ||
141 | - | let | |
139 | + | let aq = valueOrElse(getInteger(this, ap), G) | |
142 | 140 | ||
143 | - | let | |
141 | + | let ar = makeString(["%s", "dLp"], n) | |
144 | 142 | ||
145 | - | let | |
143 | + | let as = makeString(["%s", "dLpRefreshedHeight"], n) | |
146 | 144 | ||
147 | - | let | |
145 | + | let at = makeString(["%s", "refreshDLpDelay"], n) | |
148 | 146 | ||
149 | - | let | |
147 | + | let au = 30 | |
150 | 148 | ||
151 | - | let | |
149 | + | let av = valueOrElse(getInteger(this, at), au) | |
152 | 150 | ||
153 | - | func | |
151 | + | func aw () = "%s__factoryConfig" | |
154 | 152 | ||
155 | 153 | ||
156 | - | func | |
154 | + | func ax () = "%s%s__matcher__publicKey" | |
157 | 155 | ||
158 | 156 | ||
159 | - | func | |
157 | + | func ay (az,aA) = (((("%d%d%s__" + az) + "__") + aA) + "__config") | |
160 | 158 | ||
161 | 159 | ||
162 | - | func | |
160 | + | func aB (aC) = ("%s%s%s__mappings__baseAsset2internalId__" + aC) | |
163 | 161 | ||
164 | 162 | ||
165 | - | func | |
163 | + | func aD () = "%s__shutdown" | |
166 | 164 | ||
167 | 165 | ||
168 | - | func | |
166 | + | func aE () = "%s__allowedLpStableScriptHash" | |
169 | 167 | ||
170 | 168 | ||
171 | - | func | |
169 | + | func aF () = "%s__feeCollectorAddress" | |
172 | 170 | ||
173 | 171 | ||
174 | - | func | |
172 | + | func aG (aH) = ("%s%s__skipOrderValidation__" + aH) | |
175 | 173 | ||
176 | 174 | ||
177 | - | func | |
175 | + | func aI (aJ,aK,aL,aM) = throw((((((((("order validation failed: orderValid=" + toString(aJ)) + " (") + aK) + ")") + " senderValid=") + toString(aL)) + " matcherValid=") + toString(aM))) | |
178 | 176 | ||
179 | 177 | ||
180 | - | func | |
181 | - | let | |
182 | - | if ($isInstanceOf( | |
178 | + | func aN (aO) = { | |
179 | + | let aP = addressFromString(aO) | |
180 | + | if ($isInstanceOf(aP, "Address")) | |
183 | 181 | then { | |
184 | - | let | |
185 | - | | |
182 | + | let aQ = aP | |
183 | + | aQ | |
186 | 184 | } | |
187 | 185 | else this | |
188 | 186 | } | |
189 | 187 | ||
190 | 188 | ||
191 | - | func | |
192 | - | let | |
193 | - | let | |
194 | - | if ($isInstanceOf( | |
189 | + | func aR () = { | |
190 | + | let aS = { | |
191 | + | let aP = getString(Y()) | |
192 | + | if ($isInstanceOf(aP, "String")) | |
195 | 193 | then { | |
196 | - | let | |
197 | - | | |
194 | + | let aT = aP | |
195 | + | aN(aT) | |
198 | 196 | } | |
199 | 197 | else this | |
200 | 198 | } | |
201 | - | let | |
202 | - | if ($isInstanceOf( | |
199 | + | let aP = getString(aS, aa()) | |
200 | + | if ($isInstanceOf(aP, "String")) | |
203 | 201 | then { | |
204 | - | let | |
205 | - | | |
202 | + | let aU = aP | |
203 | + | aN(aU) | |
206 | 204 | } | |
207 | 205 | else this | |
208 | 206 | } | |
209 | 207 | ||
210 | 208 | ||
211 | - | func | |
209 | + | func aV (aW,aX) = valueOrErrorMessage(getString(aW, aX), makeString(["mandatory ", toString(aW), ".", aX, " not defined"], "")) | |
212 | 210 | ||
213 | 211 | ||
214 | - | func | |
212 | + | func aY (aW,aX) = valueOrErrorMessage(getInteger(aW, aX), makeString(["mandatory ", toString(aW), ".", aX, " not defined"], "")) | |
215 | 213 | ||
216 | 214 | ||
217 | - | func | |
215 | + | func aZ (ba) = throw(makeString(["lp_stable.ride:", ba], " ")) | |
218 | 216 | ||
219 | 217 | ||
220 | - | func | |
218 | + | func bb (ba) = makeString(["lp_stable.ride:", ba], " ") | |
221 | 219 | ||
222 | 220 | ||
223 | - | let | |
221 | + | let aT = addressFromStringValue(aV(this, Y())) | |
224 | 222 | ||
225 | - | let | |
226 | - | let | |
227 | - | if ($isInstanceOf( | |
228 | - | then | |
229 | - | else throw(($getType( | |
223 | + | let bc = { | |
224 | + | let bd = invoke(aT, "getInFeeREADONLY", [toString(this)], nil) | |
225 | + | if ($isInstanceOf(bd, "Int")) | |
226 | + | then bd | |
227 | + | else throw(($getType(bd) + " couldn't be cast to Int")) | |
230 | 228 | } | |
231 | 229 | ||
232 | - | let | |
233 | - | let | |
234 | - | if ($isInstanceOf( | |
235 | - | then | |
236 | - | else throw(($getType( | |
230 | + | let be = { | |
231 | + | let bd = invoke(aT, "getOutFeeREADONLY", [toString(this)], nil) | |
232 | + | if ($isInstanceOf(bd, "Int")) | |
233 | + | then bd | |
234 | + | else throw(($getType(bd) + " couldn't be cast to Int")) | |
237 | 235 | } | |
238 | 236 | ||
239 | - | let | |
237 | + | let bf = aV(this, al()) | |
240 | 238 | ||
241 | - | func | |
239 | + | func bg () = valueOrElse(getBoolean(aT, aD()), false) | |
242 | 240 | ||
243 | 241 | ||
244 | - | func | |
242 | + | func bh () = fromBase58String(aV(aT, ax())) | |
245 | 243 | ||
246 | 244 | ||
247 | - | let | |
245 | + | let bi = addressFromStringValue(aV(aT, aF())) | |
248 | 246 | ||
249 | - | func | |
250 | - | let | |
251 | - | let | |
252 | - | let | |
253 | - | let | |
254 | - | split( | |
247 | + | func bj () = { | |
248 | + | let bk = aV(this, aj()) | |
249 | + | let bl = aV(this, ak()) | |
250 | + | let bm = aY(aT, aB(bl)) | |
251 | + | let az = aY(aT, aB(bk)) | |
252 | + | split(aV(aT, ay(toString(az), toString(bm))), n) | |
255 | 253 | } | |
256 | 254 | ||
257 | 255 | ||
258 | - | func | |
256 | + | func bn (bo) = if ((bo == k)) | |
259 | 257 | then unit | |
260 | - | else fromBase58String( | |
258 | + | else fromBase58String(bo) | |
261 | 259 | ||
262 | 260 | ||
263 | - | func | |
261 | + | func bp (bo) = if ((bo == unit)) | |
264 | 262 | then k | |
265 | - | else toBase58String(value( | |
263 | + | else toBase58String(value(bo)) | |
266 | 264 | ||
267 | 265 | ||
268 | - | func | |
266 | + | func bq (br) = $Tuple9(addressFromStringValue(br[t]), parseIntValue(br[u]), fromBase58String(br[v]), bn(br[w]), bn(br[x]), parseIntValue(br[y]), parseIntValue(br[z]), fromBase58String(br[A]), fromBase58String(br[B])) | |
269 | 267 | ||
270 | 268 | ||
271 | - | let | |
269 | + | let bs = bq(bj()) | |
272 | 270 | ||
273 | - | let | |
271 | + | let bt = bs | |
274 | 272 | ||
275 | - | let | |
273 | + | let bu = bt._1 | |
276 | 274 | ||
277 | - | let | |
275 | + | let bv = bt._2 | |
278 | 276 | ||
279 | - | let | |
277 | + | let bw = bt._3 | |
280 | 278 | ||
281 | - | let | |
279 | + | let bx = bt._4 | |
282 | 280 | ||
283 | - | let | |
281 | + | let by = bt._5 | |
284 | 282 | ||
285 | - | let | |
283 | + | let bz = bt._6 | |
286 | 284 | ||
287 | - | let | |
285 | + | let bA = bt._7 | |
288 | 286 | ||
289 | - | func bC () = split(aW(aU, ax()), o) | |
287 | + | let bB = bt._8 | |
288 | + | ||
289 | + | let bC = bt._9 | |
290 | + | ||
291 | + | func bD () = split(aV(aT, aw()), n) | |
290 | 292 | ||
291 | 293 | ||
292 | - | let | |
294 | + | let bE = bD() | |
293 | 295 | ||
294 | - | let | |
296 | + | let bF = valueOrErrorMessage(addressFromString(bE[C]), "Invalid staking contract address") | |
295 | 297 | ||
296 | - | let | |
298 | + | let bG = valueOrErrorMessage(addressFromString(bE[E]), "Invalid slipage contract address") | |
297 | 299 | ||
298 | - | let | |
300 | + | let bH = valueOrErrorMessage(addressFromString(bE[F]), "Invalid gwx contract address") | |
299 | 301 | ||
300 | - | let | |
302 | + | let bI = valueOrErrorMessage(addressFromString(bE[D]), "Invalid gwx contract address") | |
301 | 303 | ||
302 | - | func | |
304 | + | func bJ (bK,bL,bM,bN,bO,bP,bQ,bR,bS,bT) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bK), toString(bL), toString(bM), toString(bN), toString(bO), toString(bP), toString(bQ), toString(bR), toString(bS), toString(bT)], n) | |
303 | 305 | ||
304 | 306 | ||
305 | - | func | |
307 | + | func bU (bV,bW,bX,bN,bQ,bR) = makeString(["%d%d%d%d%d%d", toString(bV), toString(bW), toString(bX), toString(bN), toString(bQ), toString(bR)], n) | |
306 | 308 | ||
307 | 309 | ||
308 | - | func | |
310 | + | func bY (bZ) = if ((bZ == "WAVES")) | |
309 | 311 | then wavesBalance(this).available | |
310 | - | else assetBalance(this, fromBase58String( | |
312 | + | else assetBalance(this, fromBase58String(bZ)) | |
311 | 313 | ||
312 | 314 | ||
313 | - | func | |
315 | + | func ca (cb,cc) = fraction(cb, c, cc) | |
314 | 316 | ||
315 | 317 | ||
316 | - | func | |
318 | + | func cd (cb,cc,P) = fraction(cb, c, cc, P) | |
317 | 319 | ||
318 | 320 | ||
319 | - | func | |
320 | - | let | |
321 | - | let | |
322 | - | if (!( | |
323 | - | then throw(("Big slpg: " + toString( | |
324 | - | else $Tuple2( | |
321 | + | func ce (cf,cg,ch) = { | |
322 | + | let ci = fraction((cf - cg), b, cg) | |
323 | + | let cj = ((ch - W(ci)) > d) | |
324 | + | if (!(cj)) | |
325 | + | then throw(("Big slpg: " + toString(ci))) | |
326 | + | else $Tuple2(cj, min([cf, cg])) | |
325 | 327 | } | |
326 | 328 | ||
327 | 329 | ||
328 | - | func | |
329 | - | let | |
330 | - | let | |
331 | - | if (if ( | |
330 | + | func ck (cl,cm,cn) = { | |
331 | + | let ci = fraction(cm, b, cl) | |
332 | + | let co = (cn > ci) | |
333 | + | if (if (co) | |
332 | 334 | then true | |
333 | - | else ( | |
334 | - | then throw(((((((toString( | |
335 | - | else | |
335 | + | else (cm > cl)) | |
336 | + | then throw(((((((toString(cm) + " ") + toString(cl)) + " ") + toString(ci)) + " ") + toString(cn))) | |
337 | + | else co | |
336 | 338 | } | |
337 | 339 | ||
338 | 340 | ||
339 | - | func | |
340 | - | let | |
341 | - | let | |
342 | - | | |
341 | + | func cp (cq,cr,cs,ct) = { | |
342 | + | let cu = H(cs, cq) | |
343 | + | let cv = H(ct, cr) | |
344 | + | ca(cv, cu) | |
343 | 345 | } | |
344 | 346 | ||
345 | 347 | ||
346 | - | func | |
347 | - | let | |
348 | - | let | |
349 | - | let | |
350 | - | let | |
351 | - | let | |
352 | - | let | |
353 | - | let | |
354 | - | let | |
355 | - | [ | |
348 | + | func cw (cs,ct,cx) = { | |
349 | + | let cy = bz | |
350 | + | let cz = bA | |
351 | + | let cA = cp(cy, cz, cs, ct) | |
352 | + | let cc = H(cs, cy) | |
353 | + | let cb = H(ct, cz) | |
354 | + | let cB = H(cx, a) | |
355 | + | let cC = ca(cc, cB) | |
356 | + | let cD = ca(cb, cB) | |
357 | + | [cA, cC, cD] | |
356 | 358 | } | |
357 | 359 | ||
358 | 360 | ||
359 | - | func | |
360 | - | let | |
361 | - | [ | |
361 | + | func cE (cs,ct,cx) = { | |
362 | + | let cF = cw(cs, ct, cx) | |
363 | + | [L(cF[0], a), L(cF[1], a), L(cF[2], a)] | |
362 | 364 | } | |
363 | 365 | ||
364 | 366 | ||
365 | - | func | |
366 | - | let | |
367 | + | func cG (cH,aq) = { | |
368 | + | let cI = if ((aq == 0)) | |
367 | 369 | then 0 | |
368 | - | else fraction( | |
369 | - | $Tuple2(( | |
370 | + | else fraction(cH, aq, a) | |
371 | + | $Tuple2((cH - cI), cI) | |
370 | 372 | } | |
371 | 373 | ||
372 | 374 | ||
373 | - | func | |
374 | - | let | |
375 | - | let | |
376 | - | let | |
377 | - | if (( | |
375 | + | func cJ (cK) = { | |
376 | + | let cL = cK[0] | |
377 | + | let cM = cK[1] | |
378 | + | let aU = (cL + cM) | |
379 | + | if ((aU == e)) | |
378 | 380 | then e | |
379 | 381 | else { | |
380 | - | let | |
381 | - | let | |
382 | - | let | |
383 | - | let | |
384 | - | let | |
385 | - | let | |
386 | - | func | |
387 | - | let | |
388 | - | let | |
389 | - | let | |
390 | - | fraction(( | |
382 | + | let aQ = parseIntValue(bf) | |
383 | + | let cN = (aQ * 2) | |
384 | + | let cF = fraction(cL, cM, f) | |
385 | + | let cO = fraction(cF, i, f) | |
386 | + | let cP = fraction(toBigInt(cN), aU, f) | |
387 | + | let cQ = toBigInt((cN - 1)) | |
388 | + | func cR (cS) = { | |
389 | + | let cT = fraction(cS, cS, f) | |
390 | + | let cU = fraction(cT, cS, f) | |
391 | + | let cV = fraction(cU, f, cO) | |
392 | + | fraction((cP + fraction(cV, g, f)), cS, (fraction(cQ, cS, f) + fraction(h, cV, f))) | |
391 | 393 | } | |
392 | 394 | ||
393 | - | func | |
394 | - | then | |
395 | + | func cW (cX,cY) = if (cX._2) | |
396 | + | then cX | |
395 | 397 | else { | |
396 | - | let | |
397 | - | let | |
398 | - | let | |
399 | - | let | |
400 | - | then -( | |
401 | - | else | |
402 | - | if ((f >= | |
403 | - | then $Tuple2( | |
404 | - | else $Tuple2( | |
398 | + | let cS = cX._1 | |
399 | + | let cZ = cR(cS) | |
400 | + | let da = (cZ - value(cS)) | |
401 | + | let db = if ((e > da)) | |
402 | + | then -(da) | |
403 | + | else da | |
404 | + | if ((f >= db)) | |
405 | + | then $Tuple2(cZ, true) | |
406 | + | else $Tuple2(cZ, false) | |
405 | 407 | } | |
406 | 408 | ||
407 | - | let | |
408 | - | let | |
409 | - | let | |
410 | - | let | |
411 | - | let | |
412 | - | func | |
413 | - | then | |
414 | - | else | |
409 | + | let dc = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16] | |
410 | + | let dd = { | |
411 | + | let de = dc | |
412 | + | let df = size(de) | |
413 | + | let dg = $Tuple2(aU, false) | |
414 | + | func dh (di,dj) = if ((dj >= df)) | |
415 | + | then di | |
416 | + | else cW(di, de[dj]) | |
415 | 417 | ||
416 | - | func | |
417 | - | then | |
418 | + | func dk (di,dj) = if ((dj >= df)) | |
419 | + | then di | |
418 | 420 | else throw("List size exceeds 17") | |
419 | 421 | ||
420 | - | | |
422 | + | dk(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dg, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17) | |
421 | 423 | } | |
422 | - | let | |
423 | - | let | |
424 | - | if ( | |
425 | - | then | |
426 | - | else throw(("D calculation error, D = " + toString( | |
424 | + | let cS = dd._1 | |
425 | + | let dl = dd._2 | |
426 | + | if (dl) | |
427 | + | then cS | |
428 | + | else throw(("D calculation error, D = " + toString(cS))) | |
427 | 429 | } | |
428 | 430 | } | |
429 | 431 | ||
430 | 432 | ||
431 | - | func | |
432 | - | let | |
433 | - | let | |
434 | - | let | |
435 | - | let | |
436 | - | let | |
437 | - | let | |
438 | - | let | |
439 | - | if ((toBase58String( | |
433 | + | func dm (dn,do,dp,dq) = { | |
434 | + | let dr = bw | |
435 | + | let ds = toBase58String(value(bx)) | |
436 | + | let dt = toBase58String(value(by)) | |
437 | + | let du = bz | |
438 | + | let dv = bA | |
439 | + | let dw = toString(bv) | |
440 | + | let dx = valueOrErrorMessage(assetInfo(dr), "Wrong LP id").quantity | |
441 | + | if ((toBase58String(dr) != do)) | |
440 | 442 | then throw("Wrong pmt asset") | |
441 | 443 | else { | |
442 | - | let | |
443 | - | let | |
444 | - | let | |
445 | - | let | |
446 | - | let | |
447 | - | let | |
448 | - | let | |
449 | - | let | |
450 | - | let | |
451 | - | let | |
452 | - | let | |
453 | - | let | |
454 | - | let | |
444 | + | let dy = bY(ds) | |
445 | + | let dz = H(dy, du) | |
446 | + | let dA = bY(dt) | |
447 | + | let dB = H(dA, dv) | |
448 | + | let dC = ca(dB, dz) | |
449 | + | let dD = L(dC, a) | |
450 | + | let dE = H(dp, a) | |
451 | + | let dF = H(dx, a) | |
452 | + | let dG = fraction(dz, dE, dF) | |
453 | + | let dH = fraction(dB, dE, dF) | |
454 | + | let dI = O(dG, du, FLOOR) | |
455 | + | let dJ = O(dH, dv, FLOOR) | |
456 | + | let dK = if ((dn == "")) | |
455 | 457 | then nil | |
456 | - | else [ScriptTransfer( | |
458 | + | else [ScriptTransfer(dq, dI, if ((ds == "WAVES")) | |
457 | 459 | then unit | |
458 | - | else fromBase58String( | |
460 | + | else fromBase58String(ds)), ScriptTransfer(dq, dJ, if ((dt == "WAVES")) | |
459 | 461 | then unit | |
460 | - | else fromBase58String( | |
461 | - | $Tuple10( | |
462 | + | else fromBase58String(dt)), StringEntry(ai(toString(dq), dn), bU(dI, dJ, dp, dD, height, lastBlock.timestamp)), IntegerEntry(ab(), dD), IntegerEntry(ac(height, lastBlock.timestamp), dD)] | |
463 | + | $Tuple10(dI, dJ, ds, dt, dy, dA, dx, dC, dw, dK) | |
462 | 464 | } | |
463 | 465 | } | |
464 | 466 | ||
465 | 467 | ||
466 | - | func dK (dm,cg,dL,dM,dN,dO,dp,dP,dQ,dR,dS,dT,dU) = { | |
467 | - | let dq = bx | |
468 | - | let dV = toBase58String(value(by)) | |
469 | - | let dW = toBase58String(value(bz)) | |
470 | - | let dX = bA | |
468 | + | func dL (dn,ch,dM,dN,dO,dP,dq,dQ,dR,dS,dT,dU,dV) = { | |
469 | + | let dr = bw | |
470 | + | let dW = toBase58String(value(bx)) | |
471 | + | let dX = toBase58String(value(by)) | |
471 | 472 | let dY = bB | |
472 | - | let dv = toString(bw) | |
473 | - | let dZ = valueOrErrorMessage(assetInfo(dq), "Wr lp as").quantity | |
474 | - | let dx = if (dP) | |
475 | - | then bX(dV) | |
476 | - | else if (if (dR) | |
477 | - | then (dU == dV) | |
473 | + | let dZ = bC | |
474 | + | let ea = bz | |
475 | + | let eb = bA | |
476 | + | let dw = toString(bv) | |
477 | + | let ec = valueOrErrorMessage(assetInfo(dr), "Wr lp as").quantity | |
478 | + | let dy = if (dQ) | |
479 | + | then bY(dW) | |
480 | + | else if (if (dS) | |
481 | + | then (dV == dW) | |
478 | 482 | else false) | |
479 | - | then ( | |
480 | - | else if ( | |
481 | - | then | |
482 | - | else ( | |
483 | - | let | |
484 | - | then | |
485 | - | else if (if ( | |
486 | - | then ( | |
483 | + | then (bY(dW) - dU) | |
484 | + | else if (dS) | |
485 | + | then bY(dW) | |
486 | + | else (bY(dW) - dM) | |
487 | + | let dA = if (dQ) | |
488 | + | then bY(dX) | |
489 | + | else if (if (dS) | |
490 | + | then (dV == dX) | |
487 | 491 | else false) | |
488 | - | then ( | |
489 | - | else if ( | |
490 | - | then | |
491 | - | else ( | |
492 | - | let | |
493 | - | let | |
494 | - | let | |
495 | - | let | |
496 | - | let | |
497 | - | let | |
498 | - | let | |
492 | + | then (bY(dX) - dU) | |
493 | + | else if (dS) | |
494 | + | then bY(dX) | |
495 | + | else (bY(dX) - dO) | |
496 | + | let ed = H(dM, ea) | |
497 | + | let ee = H(dO, eb) | |
498 | + | let ef = ca(ee, ed) | |
499 | + | let dz = H(dy, ea) | |
500 | + | let dB = H(dA, eb) | |
501 | + | let cm = cJ([dz, dB]) | |
502 | + | let eg = if ((ec == 0)) | |
499 | 503 | then { | |
500 | - | let | |
501 | - | let | |
504 | + | let cl = cJ([(dz + ed), (dB + ee)]) | |
505 | + | let eh = if ((cl > cm)) | |
502 | 506 | then true | |
503 | 507 | else throw("D1 should be greater than D0") | |
504 | - | if (( | |
508 | + | if ((eh == eh)) | |
505 | 509 | then { | |
506 | - | let | |
507 | - | let | |
508 | - | let | |
509 | - | $Tuple5( | |
510 | + | let dC = d | |
511 | + | let ei = d | |
512 | + | let cB = cl | |
513 | + | $Tuple5(L(cB, a), L(ed, ea), L(ee, eb), ca((dB + ee), (dz + ed)), ei) | |
510 | 514 | } | |
511 | 515 | else throw("Strict value is not equal to itself.") | |
512 | 516 | } | |
513 | 517 | else { | |
514 | - | let | |
515 | - | let | |
516 | - | let | |
517 | - | if (if (if ( | |
518 | - | then ( | |
518 | + | let dC = ca(dB, dz) | |
519 | + | let ej = fraction(W((dC - ef)), c, dC) | |
520 | + | let ei = H(ch, a) | |
521 | + | if (if (if (dT) | |
522 | + | then (dC != d) | |
519 | 523 | else false) | |
520 | - | then ( | |
524 | + | then (ej > ei) | |
521 | 525 | else false) | |
522 | - | then throw(((("Price slippage " + toString( | |
526 | + | then throw(((("Price slippage " + toString(ej)) + " > ") + toString(ei))) | |
523 | 527 | else { | |
524 | - | let | |
525 | - | let | |
526 | - | let | |
527 | - | let | |
528 | - | then $Tuple2( | |
529 | - | else $Tuple2( | |
530 | - | let | |
531 | - | let | |
532 | - | let | |
533 | - | let | |
528 | + | let ek = H(ec, a) | |
529 | + | let el = fraction(ed, cd(dB, dz, CEILING), c, CEILING) | |
530 | + | let em = fraction(ee, c, cd(dB, dz, FLOOR), CEILING) | |
531 | + | let en = if ((el > ee)) | |
532 | + | then $Tuple2(em, ee) | |
533 | + | else $Tuple2(ed, el) | |
534 | + | let eo = en._1 | |
535 | + | let ep = en._2 | |
536 | + | let cl = cJ([(dz + eo), (dB + ep)]) | |
537 | + | let eh = if ((cl > cm)) | |
534 | 538 | then true | |
535 | 539 | else throw("D1 should be greater than D0") | |
536 | - | if (( | |
540 | + | if ((eh == eh)) | |
537 | 541 | then { | |
538 | - | let | |
539 | - | $Tuple5( | |
542 | + | let cB = fraction(ek, (cl - cm), cm) | |
543 | + | $Tuple5(O(cB, a, FLOOR), O(eo, ea, CEILING), O(ep, eb, CEILING), dC, ei) | |
540 | 544 | } | |
541 | 545 | else throw("Strict value is not equal to itself.") | |
542 | 546 | } | |
543 | 547 | } | |
544 | - | let | |
545 | - | let | |
546 | - | let | |
547 | - | let | |
548 | - | let | |
549 | - | if ((0 >= | |
548 | + | let eq = eg._1 | |
549 | + | let er = eg._2 | |
550 | + | let es = eg._3 | |
551 | + | let dD = L(eg._4, a) | |
552 | + | let et = L(eg._5, a) | |
553 | + | if ((0 >= eq)) | |
550 | 554 | then throw("LP <= 0") | |
551 | 555 | else { | |
552 | - | let | |
556 | + | let eu = if (!(dR)) | |
553 | 557 | then 0 | |
554 | - | else | |
555 | - | let | |
556 | - | let | |
557 | - | let | |
558 | - | then ( | |
558 | + | else eq | |
559 | + | let ev = (dM - er) | |
560 | + | let ew = (dO - es) | |
561 | + | let ex = if (if (dS) | |
562 | + | then (dV == dW) | |
559 | 563 | else false) | |
560 | - | then $Tuple2( | |
561 | - | else if (if ( | |
562 | - | then ( | |
564 | + | then $Tuple2(dU, 0) | |
565 | + | else if (if (dS) | |
566 | + | then (dV == dX) | |
563 | 567 | else false) | |
564 | - | then $Tuple2(0, | |
565 | - | else $Tuple2( | |
566 | - | let | |
567 | - | let | |
568 | - | let | |
569 | - | $Tuple13( | |
568 | + | then $Tuple2(0, dU) | |
569 | + | else $Tuple2(er, es) | |
570 | + | let ey = ex._1 | |
571 | + | let ez = ex._2 | |
572 | + | let eA = [IntegerEntry(ab(), dD), IntegerEntry(ac(height, lastBlock.timestamp), dD), StringEntry(af(dq, dn), bJ(ey, ez, eu, dD, ch, et, height, lastBlock.timestamp, ev, ew))] | |
573 | + | $Tuple13(eq, eu, dD, dy, dA, ec, dr, dw, eA, ev, ew, dN, dP) | |
570 | 574 | } | |
571 | 575 | } | |
572 | 576 | ||
573 | 577 | ||
574 | - | func | |
575 | - | let | |
576 | - | let | |
578 | + | func eB (cK,cY,eC) = { | |
579 | + | let eD = g | |
580 | + | let eE = cK[if ((cY == 0)) | |
577 | 581 | then 1 | |
578 | 582 | else 0] | |
579 | - | let | |
580 | - | let | |
581 | - | let | |
582 | - | let | |
583 | - | let | |
584 | - | let | |
585 | - | func | |
586 | - | let | |
587 | - | let | |
588 | - | let | |
589 | - | if (( | |
590 | - | then | |
583 | + | let eF = parseBigIntValue(l) | |
584 | + | let aQ = (parseBigIntValue(bf) * eF) | |
585 | + | let aU = eE | |
586 | + | let cN = (aQ * eD) | |
587 | + | let eG = (((((eC * eC) / (eE * eD)) * eC) * eF) / (cN * eD)) | |
588 | + | let eH = ((aU + ((eC * eF) / cN)) - eC) | |
589 | + | func cW (cX,eI) = { | |
590 | + | let eJ = cX | |
591 | + | let eK = eJ._1 | |
592 | + | let dl = eJ._2 | |
593 | + | if ((dl != unit)) | |
594 | + | then cX | |
591 | 595 | else { | |
592 | - | let | |
593 | - | let | |
594 | - | if ((f >= | |
595 | - | then $Tuple2( | |
596 | - | else $Tuple2( | |
596 | + | let eL = (((eK * eK) + eG) / ((g * eK) + eH)) | |
597 | + | let eM = X((eL - value(eK))) | |
598 | + | if ((f >= eM)) | |
599 | + | then $Tuple2(eL, eI) | |
600 | + | else $Tuple2(eL, unit) | |
597 | 601 | } | |
598 | 602 | } | |
599 | 603 | ||
600 | - | let | |
601 | - | let | |
602 | - | let | |
603 | - | let | |
604 | - | let | |
605 | - | func | |
606 | - | then | |
607 | - | else | |
604 | + | let dc = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] | |
605 | + | let eN = { | |
606 | + | let de = dc | |
607 | + | let df = size(de) | |
608 | + | let dg = $Tuple2(eC, unit) | |
609 | + | func dh (di,dj) = if ((dj >= df)) | |
610 | + | then di | |
611 | + | else cW(di, de[dj]) | |
608 | 612 | ||
609 | - | func | |
610 | - | then | |
613 | + | func dk (di,dj) = if ((dj >= df)) | |
614 | + | then di | |
611 | 615 | else throw("List size exceeds 15") | |
612 | 616 | ||
613 | - | | |
617 | + | dk(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dg, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
614 | 618 | } | |
615 | - | let | |
616 | - | let | |
617 | - | if (( | |
618 | - | then | |
619 | - | else throw(("Y calculation error, Y = " + toString( | |
619 | + | let eK = eN._1 | |
620 | + | let dl = eN._2 | |
621 | + | if ((dl != unit)) | |
622 | + | then eK | |
623 | + | else throw(("Y calculation error, Y = " + toString(eK))) | |
620 | 624 | } | |
621 | 625 | ||
622 | 626 | ||
623 | - | func | |
624 | - | let | |
625 | - | if (( | |
627 | + | func eO (eP,eQ,eR) = { | |
628 | + | let eS = fraction(cJ([K(eP, toBigInt(bz)), K(eQ, toBigInt(bA))]), c, eR) | |
629 | + | if ((eR == e)) | |
626 | 630 | then e | |
627 | - | else | |
631 | + | else eS | |
628 | 632 | } | |
629 | 633 | ||
630 | 634 | ||
631 | - | func | |
632 | - | let | |
633 | - | let | |
634 | - | let | |
635 | - | let | |
636 | - | | |
635 | + | func eT (eU,eV,eW) = { | |
636 | + | let eX = (toBigInt(bY(bp(bx))) - eU) | |
637 | + | let eY = (toBigInt(bY(bp(by))) - eV) | |
638 | + | let eZ = (toBigInt(value(assetInfo(bw)).quantity) - eW) | |
639 | + | let fa = eO(eX, eY, eZ) | |
640 | + | fa | |
637 | 641 | } | |
638 | 642 | ||
639 | 643 | ||
640 | - | func | |
641 | - | let | |
642 | - | let | |
643 | - | let | |
644 | - | let | |
645 | - | let | |
646 | - | $Tuple2( | |
644 | + | func fb (fc,fd,eW) = { | |
645 | + | let eX = (bY(bp(bx)) + fc) | |
646 | + | let eY = (bY(bp(by)) + fd) | |
647 | + | let eZ = (value(assetInfo(bw)).quantity + eW) | |
648 | + | let eS = eO(toBigInt(eX), toBigInt(eY), toBigInt(eZ)) | |
649 | + | let fe = [IntegerEntry(as, height), StringEntry(ar, toString(eS))] | |
650 | + | $Tuple2(fe, eS) | |
647 | 651 | } | |
648 | 652 | ||
649 | 653 | ||
650 | - | func | |
654 | + | func ff (fg,eS) = if ((eS >= fg)) | |
651 | 655 | then true | |
652 | - | else | |
656 | + | else aZ("updated DLp lower than current DLp") | |
653 | 657 | ||
654 | 658 | ||
655 | - | func | |
656 | - | let | |
657 | - | let | |
658 | - | let | |
659 | - | let | |
660 | - | let | |
661 | - | then $Tuple2( | |
662 | - | else $Tuple2(-( | |
663 | - | let | |
664 | - | let | |
665 | - | if (if (if ( | |
659 | + | func fh (fi) = { | |
660 | + | let eX = bY(bp(bx)) | |
661 | + | let eY = bY(bp(by)) | |
662 | + | let fj = fi.amount | |
663 | + | let fk = fraction(fi.amount, fi.price, a, FLOOR) | |
664 | + | let fl = if ((fi.orderType == Buy)) | |
665 | + | then $Tuple2(fj, -(fk)) | |
666 | + | else $Tuple2(-(fj), fk) | |
667 | + | let fc = fl._1 | |
668 | + | let fd = fl._2 | |
669 | + | if (if (if (bg()) | |
666 | 670 | then true | |
667 | - | else ( | |
671 | + | else (bv == r)) | |
668 | 672 | then true | |
669 | - | else ( | |
673 | + | else (bv == s)) | |
670 | 674 | then throw("Admin blocked") | |
671 | - | else if (if (( | |
675 | + | else if (if ((fi.assetPair.amountAsset != bx)) | |
672 | 676 | then true | |
673 | - | else ( | |
677 | + | else (fi.assetPair.priceAsset != by)) | |
674 | 678 | then throw("Wr assets") | |
675 | 679 | else { | |
676 | - | let | |
677 | - | let | |
678 | - | let | |
679 | - | let | |
680 | - | let | |
681 | - | let | |
682 | - | $Tuple2( | |
680 | + | let fm = parseBigIntValue(valueOrElse(getString(this, ar), "0")) | |
681 | + | let fn = fb(fc, fd, 0) | |
682 | + | let fo = fn._1 | |
683 | + | let fp = fn._2 | |
684 | + | let fq = (fp >= fm) | |
685 | + | let fr = makeString(["dLp=", toString(fm), " dLpNew=", toString(fp), " amountAssetBalance=", toString(eX), " priceAssetBalance=", toString(eY), " amountAssetBalanceDelta=", toString(fc), " priceAssetBalanceDelta=", toString(fd), " height=", toString(height)], "") | |
686 | + | $Tuple2(fq, fr) | |
683 | 687 | } | |
684 | 688 | } | |
685 | 689 | ||
686 | 690 | ||
687 | - | func | |
691 | + | func fs (cY) = if ((size(cY.payments) != 1)) | |
688 | 692 | then throw("1 pmnt exp") | |
689 | 693 | else { | |
690 | - | let | |
691 | - | let | |
692 | - | let | |
693 | - | let | |
694 | - | let | |
695 | - | let | |
696 | - | let | |
697 | - | let | |
698 | - | if (if ( | |
694 | + | let ft = value(cY.payments[0]) | |
695 | + | let do = value(ft.assetId) | |
696 | + | let dU = ft.amount | |
697 | + | let eg = dm(toBase58String(cY.transactionId), toBase58String(do), dU, cY.caller) | |
698 | + | let dI = eg._1 | |
699 | + | let dJ = eg._2 | |
700 | + | let dw = parseIntValue(eg._9) | |
701 | + | let dK = eg._10 | |
702 | + | if (if (bg()) | |
699 | 703 | then true | |
700 | - | else ( | |
701 | - | then throw(("Admin blocked: " + toString( | |
702 | - | else $Tuple5( | |
704 | + | else (dw == s)) | |
705 | + | then throw(("Admin blocked: " + toString(dw))) | |
706 | + | else $Tuple5(dI, dJ, dU, do, dK) | |
703 | 707 | } | |
704 | 708 | ||
705 | 709 | ||
706 | - | func | |
707 | - | let | |
708 | - | let | |
709 | - | if (if (if ( | |
710 | + | func fu (fv,ah,fw,fx,ch,dR,dS,dT,dU,dV) = { | |
711 | + | let eg = dL(ah, ch, value(fw).amount, value(fw).assetId, value(fx).amount, value(fx).assetId, fv, (ah == ""), dR, dS, dT, dU, dV) | |
712 | + | let dw = parseIntValue(eg._8) | |
713 | + | if (if (if (bg()) | |
710 | 714 | then true | |
711 | - | else ( | |
715 | + | else (dw == q)) | |
712 | 716 | then true | |
713 | - | else ( | |
714 | - | then throw(("Blocked:" + toString( | |
715 | - | else | |
717 | + | else (dw == s)) | |
718 | + | then throw(("Blocked:" + toString(dw))) | |
719 | + | else eg | |
716 | 720 | } | |
717 | 721 | ||
718 | 722 | ||
719 | - | func | |
720 | - | let | |
721 | - | let | |
722 | - | let | |
723 | - | let | |
724 | - | let | |
725 | - | let | |
726 | - | let | |
723 | + | func fy (fz,do,dq,ah,fA) = { | |
724 | + | let ds = toBase58String(value(bx)) | |
725 | + | let dt = toBase58String(value(by)) | |
726 | + | let dr = bw | |
727 | + | let ea = bz | |
728 | + | let eb = bA | |
729 | + | let eZ = toBigInt(valueOrErrorMessage(assetInfo(dr), "invalid lp asset").quantity) | |
730 | + | let fB = if ((eZ > e)) | |
727 | 731 | then true | |
728 | 732 | else throw("initial deposit requires all coins") | |
729 | - | if (( | |
733 | + | if ((fB == fB)) | |
730 | 734 | then { | |
731 | - | let | |
732 | - | let | |
733 | - | let | |
734 | - | then $Tuple2( | |
735 | - | else if (( | |
736 | - | then if (( | |
735 | + | let dy = bY(ds) | |
736 | + | let dA = bY(dt) | |
737 | + | let fC = if ((ah == "")) | |
738 | + | then $Tuple2(dy, dA) | |
739 | + | else if ((do == ds)) | |
740 | + | then if ((fz > dy)) | |
737 | 741 | then throw("invalid payment amount") | |
738 | - | else $Tuple2(( | |
739 | - | else if (( | |
740 | - | then if (( | |
742 | + | else $Tuple2((dy - fz), dA) | |
743 | + | else if ((do == dt)) | |
744 | + | then if ((fz > dA)) | |
741 | 745 | then throw("invalid payment amount") | |
742 | - | else $Tuple2( | |
746 | + | else $Tuple2(dy, (dA - fz)) | |
743 | 747 | else throw("wrong pmtAssetId") | |
744 | - | let fA = fz._1 | |
745 | - | let fB = fz._2 | |
746 | - | let fC = if ((dn == dr)) | |
747 | - | then $Tuple2(fw, 0) | |
748 | - | else if ((dn == ds)) | |
749 | - | then $Tuple2(0, fw) | |
750 | - | else throw("invalid payment") | |
751 | 748 | let fD = fC._1 | |
752 | 749 | let fE = fC._2 | |
753 | - | let fF = if (fx) | |
754 | - | then $Tuple3(cF(fD, bd)._1, cF(fE, bd)._1, cF(fw, bd)._2) | |
755 | - | else $Tuple3(fD, fE, 0) | |
750 | + | let fF = if ((do == ds)) | |
751 | + | then $Tuple2(fz, 0) | |
752 | + | else if ((do == dt)) | |
753 | + | then $Tuple2(0, fz) | |
754 | + | else throw("invalid payment") | |
756 | 755 | let fG = fF._1 | |
757 | 756 | let fH = fF._2 | |
758 | - | let cH = fF._3 | |
759 | - | let fI = (fA + fG) | |
760 | - | let fJ = (fB + fH) | |
761 | - | let cl = cI([I(fA, bA), I(fB, bB)]) | |
762 | - | let ck = cI([I(fI, bA), I(fJ, bB)]) | |
763 | - | let ee = if ((ck > cl)) | |
757 | + | let fI = if (fA) | |
758 | + | then $Tuple3(cG(fG, bc)._1, cG(fH, bc)._1, cG(fz, bc)._2) | |
759 | + | else $Tuple3(fG, fH, 0) | |
760 | + | let fJ = fI._1 | |
761 | + | let fK = fI._2 | |
762 | + | let cI = fI._3 | |
763 | + | let fL = (fD + fJ) | |
764 | + | let fM = (fE + fK) | |
765 | + | let cm = cJ([H(fD, bz), H(fE, bA)]) | |
766 | + | let cl = cJ([H(fL, bz), H(fM, bA)]) | |
767 | + | let eh = if ((cl > cm)) | |
764 | 768 | then true | |
765 | 769 | else throw() | |
766 | - | if (( | |
770 | + | if ((eh == eh)) | |
767 | 771 | then { | |
768 | - | let | |
769 | - | let | |
770 | - | let | |
771 | - | let | |
772 | - | let | |
773 | - | let | |
774 | - | let | |
775 | - | let | |
776 | - | $Tuple4(toInt( | |
772 | + | let fN = fraction(eZ, (cl - cm), cm, FLOOR) | |
773 | + | let dD = L(ca(H(fM, eb), H(fL, ea)), a) | |
774 | + | let eA = [IntegerEntry(ab(), dD), IntegerEntry(ac(height, lastBlock.timestamp), dD), StringEntry(af(dq, ah), bJ(fG, fH, toInt(fN), dD, 0, 0, height, lastBlock.timestamp, 0, 0))] | |
775 | + | let fO = fraction(fE, a, fD) | |
776 | + | let fP = fraction(fz, a, (fO + a)) | |
777 | + | let fQ = (fz - fP) | |
778 | + | let fR = fraction(eZ, toBigInt(fQ), toBigInt(fE)) | |
779 | + | let fS = toInt(fraction((fN - fR), b, fR)) | |
780 | + | $Tuple4(toInt(fN), eA, cI, fS) | |
777 | 781 | } | |
778 | 782 | else throw("Strict value is not equal to itself.") | |
779 | 783 | } | |
781 | 785 | } | |
782 | 786 | ||
783 | 787 | ||
784 | - | func | |
785 | - | let | |
786 | - | let | |
787 | - | let | |
788 | - | let | |
789 | - | let | |
790 | - | let | |
791 | - | let | |
792 | - | then | |
793 | - | else | |
794 | - | let | |
795 | - | let | |
796 | - | let | |
797 | - | let | |
798 | - | if (( | |
788 | + | func fT (fU,fV,fW,fv,fX,fY) = { | |
789 | + | let dr = toBase58String(value(bw)) | |
790 | + | let ds = toBase58String(value(bx)) | |
791 | + | let dt = toBase58String(value(by)) | |
792 | + | let fZ = bz | |
793 | + | let ga = bA | |
794 | + | let gb = bv | |
795 | + | let dq = if ((fv == bI)) | |
796 | + | then fX | |
797 | + | else fv | |
798 | + | let ft = value(fW[0]) | |
799 | + | let do = value(ft.assetId) | |
800 | + | let dU = ft.amount | |
801 | + | let fa = eT(e, e, e) | |
802 | + | if ((fa == fa)) | |
799 | 803 | then { | |
800 | - | let | |
801 | - | if (( | |
804 | + | let dn = toBase58String(fY) | |
805 | + | if ((dr != toBase58String(do))) | |
802 | 806 | then throw("Wrong LP") | |
803 | 807 | else { | |
804 | - | let | |
805 | - | let | |
806 | - | let | |
807 | - | let | |
808 | - | if ($isInstanceOf( | |
809 | - | then | |
810 | - | else throw(($getType( | |
808 | + | let dy = bY(ds) | |
809 | + | let dA = bY(dt) | |
810 | + | let gc = { | |
811 | + | let bd = invoke(this, "getOneTknV2READONLY", [fU, dU], nil) | |
812 | + | if ($isInstanceOf(bd, "(Int, Int)")) | |
813 | + | then bd | |
814 | + | else throw(($getType(bd) + " couldn't be cast to (Int, Int)")) | |
811 | 815 | } | |
812 | - | if (( | |
816 | + | if ((gc == gc)) | |
813 | 817 | then { | |
814 | - | let | |
815 | - | let | |
816 | - | let | |
817 | - | then ( | |
818 | + | let cI = gc._2 | |
819 | + | let gd = gc._1 | |
820 | + | let ge = if (if ((fV > 0)) | |
821 | + | then (fV > gd) | |
818 | 822 | else false) | |
819 | - | then | |
820 | - | else | |
821 | - | let | |
822 | - | then $Tuple4( | |
823 | - | else if (( | |
824 | - | then $Tuple4(0, | |
823 | + | then aZ(makeString(["amount to receive is less than ", toString(fV)], "")) | |
824 | + | else gd | |
825 | + | let gf = if ((fU == ds)) | |
826 | + | then $Tuple4(ge, 0, ((dy - ge) - cI), dA) | |
827 | + | else if ((fU == dt)) | |
828 | + | then $Tuple4(0, ge, dy, ((dA - ge) - cI)) | |
825 | 829 | else throw("invalid out asset id") | |
826 | - | let | |
827 | - | let | |
828 | - | let | |
829 | - | let | |
830 | - | let | |
831 | - | let | |
832 | - | let | |
830 | + | let gg = gf._1 | |
831 | + | let gh = gf._2 | |
832 | + | let fL = gf._3 | |
833 | + | let fM = gf._4 | |
834 | + | let gi = ca(H(fM, ga), H(fL, fZ)) | |
835 | + | let gj = L(gi, a) | |
836 | + | let gk = if ((fU == "WAVES")) | |
833 | 837 | then unit | |
834 | - | else fromBase58String( | |
835 | - | let | |
836 | - | then [ScriptTransfer( | |
838 | + | else fromBase58String(fU) | |
839 | + | let gl = if ((cI > 0)) | |
840 | + | then [ScriptTransfer(bi, cI, gk)] | |
837 | 841 | else nil | |
838 | - | let | |
839 | - | if (( | |
842 | + | let dK = ([ScriptTransfer(dq, ge, gk), StringEntry(ai(toString(dq), dn), bU(gg, gh, dU, gj, height, lastBlock.timestamp)), IntegerEntry(ab(), gj), IntegerEntry(ac(height, lastBlock.timestamp), gj)] ++ gl) | |
843 | + | if ((dK == dK)) | |
840 | 844 | then { | |
841 | - | let | |
842 | - | if (( | |
845 | + | let gm = invoke(aT, "burn", [dU], [AttachedPayment(do, dU)]) | |
846 | + | if ((gm == gm)) | |
843 | 847 | then { | |
844 | - | let | |
845 | - | let | |
848 | + | let gn = { | |
849 | + | let go = if ((this == bi)) | |
846 | 850 | then 0 | |
847 | - | else | |
848 | - | let | |
851 | + | else cI | |
852 | + | let gp = if ((bn(fU) == bx)) | |
849 | 853 | then true | |
850 | 854 | else false | |
851 | - | if ( | |
852 | - | then $Tuple2(-(( | |
853 | - | else $Tuple2(0, -(( | |
855 | + | if (gp) | |
856 | + | then $Tuple2(-((gd + go)), 0) | |
857 | + | else $Tuple2(0, -((gd + go))) | |
854 | 858 | } | |
855 | - | let | |
856 | - | let | |
857 | - | let | |
858 | - | let | |
859 | - | let | |
860 | - | let | |
861 | - | if (( | |
862 | - | then $Tuple2(( | |
859 | + | let fc = gn._1 | |
860 | + | let fd = gn._2 | |
861 | + | let gq = fb(fc, fd, 0) | |
862 | + | let gr = gq._1 | |
863 | + | let eS = gq._2 | |
864 | + | let gs = ff(fa, eS) | |
865 | + | if ((gs == gs)) | |
866 | + | then $Tuple2((dK ++ gr), ge) | |
863 | 867 | else throw("Strict value is not equal to itself.") | |
864 | 868 | } | |
865 | 869 | else throw("Strict value is not equal to itself.") | |
873 | 877 | } | |
874 | 878 | ||
875 | 879 | ||
876 | - | func | |
877 | - | let | |
878 | - | let | |
879 | - | if ($isInstanceOf( | |
880 | + | func gt () = { | |
881 | + | let gu = aR() | |
882 | + | let aP = getString(gu, Z()) | |
883 | + | if ($isInstanceOf(aP, "String")) | |
880 | 884 | then { | |
881 | - | let | |
882 | - | fromBase58String( | |
885 | + | let aU = aP | |
886 | + | fromBase58String(aU) | |
883 | 887 | } | |
884 | - | else if ($isInstanceOf( | |
888 | + | else if ($isInstanceOf(aP, "Unit")) | |
885 | 889 | then unit | |
886 | 890 | else throw("Match error") | |
887 | 891 | } | |
888 | 892 | ||
889 | 893 | ||
890 | - | let | |
894 | + | let gv = throw("Permission denied") | |
891 | 895 | ||
892 | - | func | |
893 | - | let | |
894 | - | if ($isInstanceOf( | |
896 | + | func gw (cY) = { | |
897 | + | let aP = gt() | |
898 | + | if ($isInstanceOf(aP, "ByteVector")) | |
895 | 899 | then { | |
896 | - | let | |
897 | - | ( | |
900 | + | let gx = aP | |
901 | + | (cY.callerPublicKey == gx) | |
898 | 902 | } | |
899 | - | else if ($isInstanceOf( | |
900 | - | then ( | |
903 | + | else if ($isInstanceOf(aP, "Unit")) | |
904 | + | then (cY.caller == this) | |
901 | 905 | else throw("Match error") | |
902 | 906 | } | |
903 | 907 | ||
904 | 908 | ||
905 | - | func | |
906 | - | let | |
907 | - | if ($isInstanceOf( | |
909 | + | func gy (cY) = { | |
910 | + | let aP = gt() | |
911 | + | if ($isInstanceOf(aP, "ByteVector")) | |
908 | 912 | then { | |
909 | - | let | |
910 | - | if (( | |
913 | + | let gx = aP | |
914 | + | if ((cY.callerPublicKey == gx)) | |
911 | 915 | then true | |
912 | - | else | |
916 | + | else gv | |
913 | 917 | } | |
914 | - | else if ($isInstanceOf( | |
915 | - | then if (( | |
918 | + | else if ($isInstanceOf(aP, "Unit")) | |
919 | + | then if ((cY.caller == this)) | |
916 | 920 | then true | |
917 | - | else | |
921 | + | else gv | |
918 | 922 | else throw("Match error") | |
919 | 923 | } | |
920 | 924 | ||
921 | 925 | ||
922 | - | func | |
923 | - | let | |
924 | - | let | |
925 | - | let | |
926 | - | let | |
927 | - | let | |
928 | - | let | |
929 | - | let | |
930 | - | then [(toBigInt( | |
931 | - | else [(toBigInt( | |
932 | - | let | |
933 | - | let | |
934 | - | let | |
935 | - | let | |
936 | - | let | |
937 | - | func | |
938 | - | let | |
939 | - | let | |
940 | - | let | |
941 | - | if (( | |
942 | - | then | |
926 | + | func gz (gA,eC,gB) = { | |
927 | + | let br = bj() | |
928 | + | let ds = br[w] | |
929 | + | let dt = br[x] | |
930 | + | let eD = g | |
931 | + | let eF = parseBigIntValue(l) | |
932 | + | let aQ = (parseBigIntValue(bf) * eF) | |
933 | + | let cK = if ((gA == false)) | |
934 | + | then [(toBigInt(bY(ds)) + gB), toBigInt(bY(dt))] | |
935 | + | else [(toBigInt(bY(dt)) + gB), toBigInt(bY(ds))] | |
936 | + | let eE = cK[0] | |
937 | + | let aU = eE | |
938 | + | let cN = (aQ * eD) | |
939 | + | let eG = (((((eC * eC) / (eE * eD)) * eC) * eF) / (cN * eD)) | |
940 | + | let eH = ((aU + ((eC * eF) / cN)) - eC) | |
941 | + | func cW (cX,eI) = { | |
942 | + | let gC = cX | |
943 | + | let eK = gC._1 | |
944 | + | let dl = gC._2 | |
945 | + | if ((dl != unit)) | |
946 | + | then cX | |
943 | 947 | else { | |
944 | - | let | |
945 | - | let | |
946 | - | if ((f >= | |
947 | - | then $Tuple2( | |
948 | - | else $Tuple2( | |
948 | + | let eL = (((eK * eK) + eG) / ((g * eK) + eH)) | |
949 | + | let eM = X((eL - value(eK))) | |
950 | + | if ((f >= eM)) | |
951 | + | then $Tuple2(eL, eI) | |
952 | + | else $Tuple2(eL, unit) | |
949 | 953 | } | |
950 | 954 | } | |
951 | 955 | ||
952 | - | let | |
953 | - | let | |
954 | - | let | |
955 | - | let | |
956 | - | let | |
957 | - | func | |
958 | - | then | |
959 | - | else | |
956 | + | let dc = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] | |
957 | + | let gD = { | |
958 | + | let de = dc | |
959 | + | let df = size(de) | |
960 | + | let dg = $Tuple2(eC, unit) | |
961 | + | func dh (di,dj) = if ((dj >= df)) | |
962 | + | then di | |
963 | + | else cW(di, de[dj]) | |
960 | 964 | ||
961 | - | func | |
962 | - | then | |
965 | + | func dk (di,dj) = if ((dj >= df)) | |
966 | + | then di | |
963 | 967 | else throw("List size exceeds 15") | |
964 | 968 | ||
965 | - | | |
969 | + | dk(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dg, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
966 | 970 | } | |
967 | - | let | |
968 | - | let | |
969 | - | if (( | |
970 | - | then | |
971 | - | else throw(("Y calculation error, Y = " + toString( | |
971 | + | let eK = gD._1 | |
972 | + | let dl = gD._2 | |
973 | + | if ((dl != unit)) | |
974 | + | then eK | |
975 | + | else throw(("Y calculation error, Y = " + toString(eK))) | |
972 | 976 | } | |
973 | 977 | ||
974 | 978 | ||
975 | - | func | |
979 | + | func gE () = valueOrElse(getBoolean(aT, aG(toString(this))), false) | |
976 | 980 | ||
977 | 981 | ||
978 | - | @Callable( | |
979 | - | func calculateAmountOutForSwapREADONLY ( | |
980 | - | let | |
982 | + | @Callable(cY) | |
983 | + | func calculateAmountOutForSwapREADONLY (gF,gA,gG) = { | |
984 | + | let gH = if ((gA == false)) | |
981 | 985 | then { | |
982 | - | let | |
983 | - | let | |
984 | - | $Tuple2( | |
986 | + | let gI = aV(this, ak()) | |
987 | + | let gB = (toBigInt(bY(aV(this, aj()))) + toBigInt(gF)) | |
988 | + | $Tuple2(gI, gB) | |
985 | 989 | } | |
986 | 990 | else { | |
987 | - | let | |
988 | - | let | |
989 | - | $Tuple2( | |
991 | + | let gI = aV(this, aj()) | |
992 | + | let gB = (toBigInt(bY(aV(this, ak()))) + toBigInt(gF)) | |
993 | + | $Tuple2(gI, gB) | |
990 | 994 | } | |
991 | - | let | |
992 | - | let | |
993 | - | let | |
994 | - | let | |
995 | - | let | |
996 | - | let | |
997 | - | let | |
998 | - | let | |
999 | - | let | |
1000 | - | let | |
1001 | - | let | |
1002 | - | then [((toBigInt( | |
1003 | - | else [(toBigInt( | |
1004 | - | let | |
1005 | - | let | |
995 | + | let gI = gH._1 | |
996 | + | let gB = gH._2 | |
997 | + | let br = bj() | |
998 | + | let ds = br[w] | |
999 | + | let dt = br[x] | |
1000 | + | let cK = [toBigInt(bY(ds)), toBigInt(bY(dt))] | |
1001 | + | let eC = cJ(cK) | |
1002 | + | let eK = gz(gA, eC, toBigInt(gF)) | |
1003 | + | let gJ = ((toBigInt(bY(gI)) - eK) - toBigInt(1)) | |
1004 | + | let gK = max([0, toInt(gJ)]) | |
1005 | + | let gL = if ((gA == false)) | |
1006 | + | then [((toBigInt(bY(ds)) + toBigInt(gF)) + toBigInt(gG)), (toBigInt(bY(dt)) - gJ)] | |
1007 | + | else [(toBigInt(bY(ds)) - gJ), ((toBigInt(bY(dt)) + toBigInt(gF)) + toBigInt(gG))] | |
1008 | + | let gM = cJ(gL) | |
1009 | + | let eh = if ((gM >= eC)) | |
1006 | 1010 | then true | |
1007 | - | else throw(makeString(["new D is fewer error", toString( | |
1008 | - | if (( | |
1009 | - | then $Tuple2(nil, | |
1011 | + | else throw(makeString(["new D is fewer error", toString(eC), toString(gM)], "__")) | |
1012 | + | if ((eh == eh)) | |
1013 | + | then $Tuple2(nil, gK) | |
1010 | 1014 | else throw("Strict value is not equal to itself.") | |
1011 | 1015 | } | |
1012 | 1016 | ||
1013 | 1017 | ||
1014 | 1018 | ||
1015 | - | @Callable( | |
1016 | - | func calculateAmountOutForSwapAndSendTokens ( | |
1017 | - | let | |
1018 | - | let | |
1019 | - | if ($isInstanceOf( | |
1020 | - | then | |
1021 | - | else throw(($getType( | |
1019 | + | @Callable(cY) | |
1020 | + | func calculateAmountOutForSwapAndSendTokens (gF,gA,gN,gO,gG) = { | |
1021 | + | let gP = { | |
1022 | + | let bd = invoke(aT, "getSwapContractREADONLY", nil, nil) | |
1023 | + | if ($isInstanceOf(bd, "String")) | |
1024 | + | then bd | |
1025 | + | else throw(($getType(bd) + " couldn't be cast to String")) | |
1022 | 1026 | } | |
1023 | - | let | |
1027 | + | let gQ = [if ((value(cY.payments[0]).amount >= gF)) | |
1024 | 1028 | then true | |
1025 | - | else | |
1029 | + | else aZ("Wrong amount"), if ((cY.caller == addressFromStringValue(gP))) | |
1026 | 1030 | then true | |
1027 | - | else | |
1028 | - | if (( | |
1031 | + | else aZ("Permission denied")] | |
1032 | + | if ((gQ == gQ)) | |
1029 | 1033 | then { | |
1030 | - | let | |
1031 | - | let | |
1032 | - | let | |
1034 | + | let ft = value(cY.payments[0]) | |
1035 | + | let gR = bp(ft.assetId) | |
1036 | + | let gS = if ((gA == false)) | |
1033 | 1037 | then { | |
1034 | - | let | |
1035 | - | let | |
1036 | - | $Tuple2( | |
1038 | + | let gI = aV(this, ak()) | |
1039 | + | let gB = (bY(gR) - value(cY.payments[0]).amount) | |
1040 | + | $Tuple2(gI, gB) | |
1037 | 1041 | } | |
1038 | 1042 | else { | |
1039 | - | let | |
1040 | - | let | |
1041 | - | $Tuple2( | |
1043 | + | let gI = aV(this, aj()) | |
1044 | + | let gB = (bY(gR) - value(cY.payments[0]).amount) | |
1045 | + | $Tuple2(gI, gB) | |
1042 | 1046 | } | |
1043 | - | let | |
1044 | - | let | |
1045 | - | let | |
1046 | - | let | |
1047 | - | let | |
1048 | - | let | |
1049 | - | then [(toBigInt( | |
1050 | - | else [toBigInt( | |
1051 | - | let | |
1052 | - | let | |
1053 | - | let | |
1054 | - | let | |
1055 | - | let | |
1047 | + | let gI = gS._1 | |
1048 | + | let gB = gS._2 | |
1049 | + | let br = bj() | |
1050 | + | let ds = br[w] | |
1051 | + | let dt = br[x] | |
1052 | + | let cK = if ((gA == false)) | |
1053 | + | then [(toBigInt(bY(ds)) - toBigInt(value(cY.payments[0]).amount)), toBigInt(bY(dt))] | |
1054 | + | else [toBigInt(bY(ds)), (toBigInt(bY(dt)) - toBigInt(value(cY.payments[0]).amount))] | |
1055 | + | let eC = cJ(cK) | |
1056 | + | let eK = gz(gA, eC, toBigInt(0)) | |
1057 | + | let gJ = ((toBigInt(bY(gI)) - eK) - toBigInt(1)) | |
1058 | + | let gK = max([0, toInt(gJ)]) | |
1059 | + | let gT = if ((gK >= gN)) | |
1056 | 1060 | then true | |
1057 | 1061 | else throw("Exchange result is fewer coins than expected") | |
1058 | - | if (( | |
1062 | + | if ((gT == gT)) | |
1059 | 1063 | then { | |
1060 | - | let | |
1061 | - | then [(toBigInt( | |
1062 | - | else [(toBigInt( | |
1063 | - | let | |
1064 | - | let | |
1064 | + | let gL = if ((gA == false)) | |
1065 | + | then [(toBigInt(bY(ds)) + toBigInt(gG)), (toBigInt(bY(dt)) - gJ)] | |
1066 | + | else [(toBigInt(bY(ds)) - gJ), (toBigInt(bY(dt)) + toBigInt(gG))] | |
1067 | + | let gM = cJ(gL) | |
1068 | + | let eh = if ((gM >= eC)) | |
1065 | 1069 | then true | |
1066 | 1070 | else throw("new D is fewer error") | |
1067 | - | if (( | |
1068 | - | then $Tuple2([ScriptTransfer(addressFromStringValue( | |
1071 | + | if ((eh == eh)) | |
1072 | + | then $Tuple2([ScriptTransfer(addressFromStringValue(gO), gK, bn(gI))], gK) | |
1069 | 1073 | else throw("Strict value is not equal to itself.") | |
1070 | 1074 | } | |
1071 | 1075 | else throw("Strict value is not equal to itself.") | |
1075 | 1079 | ||
1076 | 1080 | ||
1077 | 1081 | ||
1078 | - | @Callable( | |
1079 | - | func constructor ( | |
1080 | - | let | |
1081 | - | if (( | |
1082 | - | then [StringEntry( | |
1082 | + | @Callable(cY) | |
1083 | + | func constructor (Y) = { | |
1084 | + | let eG = gy(cY) | |
1085 | + | if ((eG == eG)) | |
1086 | + | then [StringEntry(Y(), Y)] | |
1083 | 1087 | else throw("Strict value is not equal to itself.") | |
1084 | 1088 | } | |
1085 | 1089 | ||
1086 | 1090 | ||
1087 | 1091 | ||
1088 | - | @Callable( | |
1089 | - | func put ( | |
1090 | - | let | |
1091 | - | let | |
1092 | - | let | |
1093 | - | if ((0 > | |
1092 | + | @Callable(cY) | |
1093 | + | func put (gU,gV) = { | |
1094 | + | let gW = bD() | |
1095 | + | let gX = valueOrErrorMessage(addressFromString(gW[C]), "Wr st addr") | |
1096 | + | let gY = valueOrErrorMessage(addressFromString(gW[E]), "Wr sl addr") | |
1097 | + | if ((0 > gU)) | |
1094 | 1098 | then throw("Wrong slippage") | |
1095 | - | else if ((size( | |
1099 | + | else if ((size(cY.payments) != 2)) | |
1096 | 1100 | then throw("2 pmnts expd") | |
1097 | 1101 | else { | |
1098 | - | let | |
1099 | - | let | |
1100 | - | let | |
1101 | - | if (( | |
1102 | + | let gZ = toBigInt(value(cY.payments[0]).amount) | |
1103 | + | let ha = toBigInt(value(cY.payments[1]).amount) | |
1104 | + | let eX = (toBigInt(bY(bp(bx))) - gZ) | |
1105 | + | if ((eX == eX)) | |
1102 | 1106 | then { | |
1103 | - | let | |
1104 | - | if (( | |
1107 | + | let eY = (toBigInt(bY(bp(by))) - ha) | |
1108 | + | if ((eY == eY)) | |
1105 | 1109 | then { | |
1106 | - | let | |
1107 | - | if (( | |
1110 | + | let eZ = toBigInt(value(assetInfo(bw)).quantity) | |
1111 | + | if ((eZ == eZ)) | |
1108 | 1112 | then { | |
1109 | - | let | |
1110 | - | if (( | |
1113 | + | let fa = eT(gZ, ha, toBigInt(0)) | |
1114 | + | if ((fa == fa)) | |
1111 | 1115 | then { | |
1112 | - | let | |
1113 | - | let | |
1114 | - | let | |
1115 | - | let | |
1116 | - | let | |
1117 | - | let | |
1118 | - | let | |
1119 | - | let | |
1120 | - | let | |
1121 | - | if (( | |
1116 | + | let hb = fu(toString(cY.caller), toBase58String(cY.transactionId), AttachedPayment(value(cY.payments[0]).assetId, value(cY.payments[0]).amount), cY.payments[1], gU, true, false, true, 0, "") | |
1117 | + | let eu = hb._2 | |
1118 | + | let hc = hb._7 | |
1119 | + | let dK = hb._9 | |
1120 | + | let ev = hb._10 | |
1121 | + | let ew = hb._11 | |
1122 | + | let ds = hb._12 | |
1123 | + | let dt = hb._13 | |
1124 | + | let eg = invoke(aT, "emit", [eu], nil) | |
1125 | + | if ((eg == eg)) | |
1122 | 1126 | then { | |
1123 | - | let | |
1124 | - | let | |
1125 | - | if ($isInstanceOf( | |
1127 | + | let hd = { | |
1128 | + | let aP = eg | |
1129 | + | if ($isInstanceOf(aP, "Address")) | |
1126 | 1130 | then { | |
1127 | - | let | |
1128 | - | invoke( | |
1131 | + | let he = aP | |
1132 | + | invoke(he, "emit", [eu], nil) | |
1129 | 1133 | } | |
1130 | 1134 | else unit | |
1131 | 1135 | } | |
1132 | - | if (( | |
1136 | + | if ((hd == hd)) | |
1133 | 1137 | then { | |
1134 | - | let | |
1135 | - | then invoke( | |
1138 | + | let hf = if ((ev > 0)) | |
1139 | + | then invoke(gY, "put", nil, [AttachedPayment(ds, ev)]) | |
1136 | 1140 | else nil | |
1137 | - | if (( | |
1141 | + | if ((hf == hf)) | |
1138 | 1142 | then { | |
1139 | - | let | |
1140 | - | then invoke( | |
1143 | + | let hg = if ((ew > 0)) | |
1144 | + | then invoke(gY, "put", nil, [AttachedPayment(dt, ew)]) | |
1141 | 1145 | else nil | |
1142 | - | if (( | |
1146 | + | if ((hg == hg)) | |
1143 | 1147 | then { | |
1144 | - | let | |
1148 | + | let hh = if (gV) | |
1145 | 1149 | then { | |
1146 | - | let | |
1147 | - | if (( | |
1150 | + | let hi = invoke(gX, "stake", nil, [AttachedPayment(hc, eu)]) | |
1151 | + | if ((hi == hi)) | |
1148 | 1152 | then nil | |
1149 | 1153 | else throw("Strict value is not equal to itself.") | |
1150 | 1154 | } | |
1151 | - | else [ScriptTransfer( | |
1152 | - | let | |
1153 | - | let | |
1154 | - | let | |
1155 | - | let | |
1155 | + | else [ScriptTransfer(cY.caller, eu, hc)] | |
1156 | + | let hj = fb(0, 0, 0) | |
1157 | + | let gr = hj._1 | |
1158 | + | let eS = hj._2 | |
1159 | + | let hk = if ((eS >= fa)) | |
1156 | 1160 | then true | |
1157 | - | else | |
1158 | - | if (( | |
1161 | + | else aZ(makeString(["updated DLp lower than current DLp", toString(eX), toString(eY), toString(eZ), toString(fa), toString(eS), toString(ev), toString(ew)], " ")) | |
1162 | + | if ((hk == hk)) | |
1159 | 1163 | then { | |
1160 | - | let | |
1161 | - | if (( | |
1162 | - | then (( | |
1164 | + | let hl = value(assetInfo(bw)).quantity | |
1165 | + | if ((hl == hl)) | |
1166 | + | then ((dK ++ hh) ++ gr) | |
1163 | 1167 | else throw("Strict value is not equal to itself.") | |
1164 | 1168 | } | |
1165 | 1169 | else throw("Strict value is not equal to itself.") | |
1184 | 1188 | ||
1185 | 1189 | ||
1186 | 1190 | ||
1187 | - | @Callable( | |
1188 | - | func putOneTknV2 ( | |
1189 | - | let | |
1190 | - | let | |
1191 | - | if ($isInstanceOf( | |
1192 | - | then | |
1193 | - | else throw(($getType( | |
1191 | + | @Callable(cY) | |
1192 | + | func putOneTknV2 (fV,gV) = { | |
1193 | + | let hm = { | |
1194 | + | let bd = invoke(aT, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1195 | + | if ($isInstanceOf(bd, "Boolean")) | |
1196 | + | then bd | |
1197 | + | else throw(($getType(bd) + " couldn't be cast to Boolean")) | |
1194 | 1198 | } | |
1195 | - | let | |
1199 | + | let hn = if (if (if (bg()) | |
1196 | 1200 | then true | |
1197 | - | else ( | |
1201 | + | else (bv == q)) | |
1198 | 1202 | then true | |
1199 | - | else ( | |
1203 | + | else (bv == s)) | |
1200 | 1204 | then true | |
1201 | - | else | |
1202 | - | let | |
1205 | + | else hm | |
1206 | + | let gQ = [if (if (!(hn)) | |
1203 | 1207 | then true | |
1204 | - | else | |
1208 | + | else gw(cY)) | |
1205 | 1209 | then true | |
1206 | - | else | |
1210 | + | else aZ("put operation is blocked by admin"), if ((size(cY.payments) == 1)) | |
1207 | 1211 | then true | |
1208 | - | else | |
1209 | - | if (( | |
1212 | + | else aZ("exactly 1 payment are expected")] | |
1213 | + | if ((gQ == gQ)) | |
1210 | 1214 | then { | |
1211 | - | let | |
1212 | - | let | |
1213 | - | let | |
1214 | - | let | |
1215 | - | let | |
1216 | - | let | |
1217 | - | then | |
1218 | - | else | |
1219 | - | let | |
1220 | - | let | |
1221 | - | let | |
1222 | - | let | |
1223 | - | then | |
1224 | - | else | |
1225 | - | if (( | |
1215 | + | let ds = toBase58String(value(bx)) | |
1216 | + | let dt = toBase58String(value(by)) | |
1217 | + | let dr = bw | |
1218 | + | let fZ = bz | |
1219 | + | let ga = bA | |
1220 | + | let dq = if ((cY.caller == this)) | |
1221 | + | then cY.originCaller | |
1222 | + | else cY.caller | |
1223 | + | let ft = value(cY.payments[0]) | |
1224 | + | let do = toBase58String(value(ft.assetId)) | |
1225 | + | let dU = ft.amount | |
1226 | + | let fa = if ((ft.assetId == bx)) | |
1227 | + | then eT(toBigInt(dU), toBigInt(0), toBigInt(0)) | |
1228 | + | else eT(toBigInt(0), toBigInt(dU), toBigInt(0)) | |
1229 | + | if ((fa == fa)) | |
1226 | 1230 | then { | |
1227 | - | let | |
1228 | - | if (( | |
1231 | + | let ho = fy(dU, do, toString(dq), toBase58String(cY.transactionId), true) | |
1232 | + | if ((ho == ho)) | |
1229 | 1233 | then { | |
1230 | - | let | |
1231 | - | let | |
1232 | - | let | |
1233 | - | let | |
1234 | - | then ( | |
1234 | + | let cI = ho._3 | |
1235 | + | let dK = ho._2 | |
1236 | + | let hp = ho._1 | |
1237 | + | let eu = if (if ((fV > 0)) | |
1238 | + | then (fV > hp) | |
1235 | 1239 | else false) | |
1236 | - | then | |
1237 | - | else | |
1238 | - | let | |
1239 | - | if (( | |
1240 | + | then aZ(makeString(["amount to receive is less than ", toString(fV)], "")) | |
1241 | + | else hp | |
1242 | + | let hb = invoke(aT, "emit", [eu], nil) | |
1243 | + | if ((hb == hb)) | |
1240 | 1244 | then { | |
1241 | - | let | |
1242 | - | let | |
1243 | - | if ($isInstanceOf( | |
1245 | + | let hd = { | |
1246 | + | let aP = hb | |
1247 | + | if ($isInstanceOf(aP, "Address")) | |
1244 | 1248 | then { | |
1245 | - | let | |
1246 | - | invoke( | |
1249 | + | let he = aP | |
1250 | + | invoke(he, "emit", [eu], nil) | |
1247 | 1251 | } | |
1248 | 1252 | else unit | |
1249 | 1253 | } | |
1250 | - | if (( | |
1254 | + | if ((hd == hd)) | |
1251 | 1255 | then { | |
1252 | - | let | |
1256 | + | let hh = if (gV) | |
1253 | 1257 | then { | |
1254 | - | let | |
1255 | - | if (( | |
1258 | + | let hi = invoke(bF, "stakeFor", [toString(cY.caller)], [AttachedPayment(dr, eu)]) | |
1259 | + | if ((hi == hi)) | |
1256 | 1260 | then nil | |
1257 | 1261 | else throw("Strict value is not equal to itself.") | |
1258 | 1262 | } | |
1259 | - | else [ScriptTransfer( | |
1260 | - | let | |
1261 | - | then [ScriptTransfer( | |
1263 | + | else [ScriptTransfer(cY.caller, eu, dr)] | |
1264 | + | let gl = if ((cI > 0)) | |
1265 | + | then [ScriptTransfer(bi, cI, fromBase58String(do))] | |
1262 | 1266 | else nil | |
1263 | - | let | |
1267 | + | let hq = if ((this == bi)) | |
1264 | 1268 | then $Tuple2(0, 0) | |
1265 | 1269 | else { | |
1266 | - | let | |
1270 | + | let hr = if ((ft.assetId == bx)) | |
1267 | 1271 | then true | |
1268 | 1272 | else false | |
1269 | - | if ( | |
1270 | - | then $Tuple2(-( | |
1271 | - | else $Tuple2(0, -( | |
1273 | + | if (hr) | |
1274 | + | then $Tuple2(-(cI), 0) | |
1275 | + | else $Tuple2(0, -(cI)) | |
1272 | 1276 | } | |
1273 | - | let | |
1274 | - | let | |
1275 | - | let | |
1276 | - | let | |
1277 | - | let | |
1278 | - | let | |
1279 | - | if (( | |
1280 | - | then $Tuple2(((( | |
1277 | + | let fc = hq._1 | |
1278 | + | let fd = hq._2 | |
1279 | + | let hs = fb(fc, fd, 0) | |
1280 | + | let gr = hs._1 | |
1281 | + | let eS = hs._2 | |
1282 | + | let gs = ff(fa, eS) | |
1283 | + | if ((gs == gs)) | |
1284 | + | then $Tuple2((((dK ++ hh) ++ gl) ++ gr), eu) | |
1281 | 1285 | else throw("Strict value is not equal to itself.") | |
1282 | 1286 | } | |
1283 | 1287 | else throw("Strict value is not equal to itself.") | |
1293 | 1297 | ||
1294 | 1298 | ||
1295 | 1299 | ||
1296 | - | @Callable( | |
1297 | - | func putForFree ( | |
1300 | + | @Callable(cY) | |
1301 | + | func putForFree (ht) = if ((0 > ht)) | |
1298 | 1302 | then throw("Wrong slpg") | |
1299 | - | else if ((size( | |
1303 | + | else if ((size(cY.payments) != 2)) | |
1300 | 1304 | then throw("2 pmnts expd") | |
1301 | 1305 | else { | |
1302 | - | let | |
1303 | - | let | |
1304 | - | let | |
1305 | - | let | |
1306 | - | let | |
1307 | - | if (( | |
1306 | + | let hu = fu(toString(cY.caller), toBase58String(cY.transactionId), AttachedPayment(value(cY.payments[0]).assetId, value(cY.payments[0]).amount), cY.payments[1], ht, false, false, true, 0, "") | |
1307 | + | let dK = hu._9 | |
1308 | + | let gZ = toBigInt(value(cY.payments[0]).amount) | |
1309 | + | let ha = toBigInt(value(cY.payments[1]).amount) | |
1310 | + | let fa = eT(gZ, ha, toBigInt(0)) | |
1311 | + | if ((fa == fa)) | |
1308 | 1312 | then { | |
1309 | - | let | |
1310 | - | let | |
1311 | - | let | |
1312 | - | let | |
1313 | - | if (( | |
1314 | - | then ( | |
1313 | + | let hv = fb(0, 0, 0) | |
1314 | + | let gr = hv._1 | |
1315 | + | let eS = hv._2 | |
1316 | + | let gs = ff(fa, eS) | |
1317 | + | if ((gs == gs)) | |
1318 | + | then (dK ++ gr) | |
1315 | 1319 | else throw("Strict value is not equal to itself.") | |
1316 | 1320 | } | |
1317 | 1321 | else throw("Strict value is not equal to itself.") | |
1319 | 1323 | ||
1320 | 1324 | ||
1321 | 1325 | ||
1322 | - | @Callable( | |
1326 | + | @Callable(cY) | |
1323 | 1327 | func get () = { | |
1324 | - | let | |
1325 | - | if (( | |
1328 | + | let fa = eT(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1329 | + | if ((fa == fa)) | |
1326 | 1330 | then { | |
1327 | - | let | |
1328 | - | let | |
1329 | - | let | |
1330 | - | let | |
1331 | - | let | |
1332 | - | let | |
1333 | - | let | |
1334 | - | if (( | |
1331 | + | let eg = fs(cY) | |
1332 | + | let hw = eg._1 | |
1333 | + | let dJ = eg._2 | |
1334 | + | let dU = eg._3 | |
1335 | + | let do = eg._4 | |
1336 | + | let dK = eg._5 | |
1337 | + | let eH = invoke(aT, "burn", [dU], [AttachedPayment(do, dU)]) | |
1338 | + | if ((eH == eH)) | |
1335 | 1339 | then { | |
1336 | - | let | |
1337 | - | let | |
1338 | - | let | |
1339 | - | let | |
1340 | - | if (( | |
1341 | - | then ( | |
1340 | + | let hx = fb(-(hw), -(dJ), 0) | |
1341 | + | let gr = hx._1 | |
1342 | + | let eS = hx._2 | |
1343 | + | let gs = ff(fa, eS) | |
1344 | + | if ((gs == gs)) | |
1345 | + | then (dK ++ gr) | |
1342 | 1346 | else throw("Strict value is not equal to itself.") | |
1343 | 1347 | } | |
1344 | 1348 | else throw("Strict value is not equal to itself.") | |
1348 | 1352 | ||
1349 | 1353 | ||
1350 | 1354 | ||
1351 | - | @Callable( | |
1352 | - | func getOneTknV2 ( | |
1353 | - | let | |
1354 | - | let | |
1355 | - | if ($isInstanceOf( | |
1356 | - | then | |
1357 | - | else throw(($getType( | |
1355 | + | @Callable(cY) | |
1356 | + | func getOneTknV2 (fU,fV) = { | |
1357 | + | let hm = { | |
1358 | + | let bd = invoke(aT, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1359 | + | if ($isInstanceOf(bd, "Boolean")) | |
1360 | + | then bd | |
1361 | + | else throw(($getType(bd) + " couldn't be cast to Boolean")) | |
1358 | 1362 | } | |
1359 | - | let | |
1363 | + | let hy = if (if (bg()) | |
1360 | 1364 | then true | |
1361 | - | else ( | |
1365 | + | else (bv == s)) | |
1362 | 1366 | then true | |
1363 | - | else | |
1364 | - | let | |
1367 | + | else hm | |
1368 | + | let gQ = [if (if (!(hy)) | |
1365 | 1369 | then true | |
1366 | - | else | |
1370 | + | else gw(cY)) | |
1367 | 1371 | then true | |
1368 | - | else | |
1372 | + | else aZ("get operation is blocked by admin"), if ((size(cY.payments) == 1)) | |
1369 | 1373 | then true | |
1370 | - | else | |
1371 | - | if (( | |
1374 | + | else aZ("exactly 1 payment are expected")] | |
1375 | + | if ((gQ == gQ)) | |
1372 | 1376 | then { | |
1373 | - | let | |
1374 | - | let | |
1375 | - | let | |
1376 | - | $Tuple2( | |
1377 | + | let hz = fT(fU, fV, cY.payments, cY.caller, cY.originCaller, cY.transactionId) | |
1378 | + | let dK = hz._1 | |
1379 | + | let ge = hz._2 | |
1380 | + | $Tuple2(dK, ge) | |
1377 | 1381 | } | |
1378 | 1382 | else throw("Strict value is not equal to itself.") | |
1379 | 1383 | } | |
1380 | 1384 | ||
1381 | 1385 | ||
1382 | 1386 | ||
1383 | - | @Callable( | |
1387 | + | @Callable(cY) | |
1384 | 1388 | func refreshDLp () = { | |
1385 | - | let | |
1386 | - | let | |
1389 | + | let hA = valueOrElse(getInteger(as), 0) | |
1390 | + | let hB = if (((height - hA) >= av)) | |
1387 | 1391 | then unit | |
1388 | - | else | |
1389 | - | if (( | |
1392 | + | else aZ(makeString([toString(av), " blocks have not passed since the previous call"], "")) | |
1393 | + | if ((hB == hB)) | |
1390 | 1394 | then { | |
1391 | - | let | |
1392 | - | let | |
1393 | - | let | |
1394 | - | let | |
1395 | - | let | |
1396 | - | then | |
1397 | - | else | |
1398 | - | $Tuple2( | |
1395 | + | let fm = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, ar), "0")), bb("invalid dLp")) | |
1396 | + | let hC = fb(0, 0, 0) | |
1397 | + | let hD = hC._1 | |
1398 | + | let eS = hC._2 | |
1399 | + | let fe = if ((fm != eS)) | |
1400 | + | then hD | |
1401 | + | else aZ("nothing to refresh") | |
1402 | + | $Tuple2(fe, toString(eS)) | |
1399 | 1403 | } | |
1400 | 1404 | else throw("Strict value is not equal to itself.") | |
1401 | 1405 | } | |
1402 | 1406 | ||
1403 | 1407 | ||
1404 | 1408 | ||
1405 | - | @Callable( | |
1406 | - | func getOneTknV2READONLY ( | |
1407 | - | let | |
1408 | - | let | |
1409 | - | let | |
1410 | - | let | |
1411 | - | let | |
1412 | - | let | |
1413 | - | let | |
1414 | - | let | |
1409 | + | @Callable(cY) | |
1410 | + | func getOneTknV2READONLY (fU,hE) = { | |
1411 | + | let ds = toBase58String(value(bx)) | |
1412 | + | let dt = toBase58String(value(by)) | |
1413 | + | let dr = toBase58String(value(bw)) | |
1414 | + | let cK = [toBigInt(bY(ds)), toBigInt(bY(dt))] | |
1415 | + | let eR = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(dr)), "invalid lp asset").quantity) | |
1416 | + | let cm = cJ(cK) | |
1417 | + | let cl = (cm - fraction(toBigInt(hE), cm, eR)) | |
1418 | + | let hF = if ((fU == ds)) | |
1415 | 1419 | then 0 | |
1416 | - | else if (( | |
1420 | + | else if ((fU == dt)) | |
1417 | 1421 | then 1 | |
1418 | 1422 | else throw("invalid out asset id") | |
1419 | - | let | |
1420 | - | let | |
1421 | - | let | |
1422 | - | let | |
1423 | - | let | |
1424 | - | let | |
1425 | - | $Tuple2(nil, $Tuple2( | |
1423 | + | let hG = eB(cK, hF, cl) | |
1424 | + | let gJ = (cK[hF] - hG) | |
1425 | + | let gK = max([0, toInt((gJ - f))]) | |
1426 | + | let hH = cG(gK, be) | |
1427 | + | let gd = hH._1 | |
1428 | + | let cI = hH._2 | |
1429 | + | $Tuple2(nil, $Tuple2(gd, cI)) | |
1426 | 1430 | } | |
1427 | 1431 | ||
1428 | 1432 | ||
1429 | 1433 | ||
1430 | - | @Callable( | |
1431 | - | func getOneTknV2WithBonusREADONLY ( | |
1432 | - | let | |
1433 | - | let | |
1434 | - | let | |
1435 | - | let | |
1436 | - | let | |
1437 | - | let | |
1438 | - | let | |
1439 | - | if ($isInstanceOf( | |
1440 | - | then | |
1441 | - | else throw(($getType( | |
1434 | + | @Callable(cY) | |
1435 | + | func getOneTknV2WithBonusREADONLY (fU,hE) = { | |
1436 | + | let ds = toBase58String(value(bx)) | |
1437 | + | let dt = toBase58String(value(by)) | |
1438 | + | let dr = toBase58String(value(bw)) | |
1439 | + | let dy = bY(ds) | |
1440 | + | let dA = bY(dt) | |
1441 | + | let hI = { | |
1442 | + | let bd = invoke(this, "getOneTknV2READONLY", [fU, hE], nil) | |
1443 | + | if ($isInstanceOf(bd, "(Int, Int)")) | |
1444 | + | then bd | |
1445 | + | else throw(($getType(bd) + " couldn't be cast to (Int, Int)")) | |
1442 | 1446 | } | |
1443 | - | let | |
1444 | - | let | |
1445 | - | let | |
1446 | - | let | |
1447 | - | let | |
1448 | - | let | |
1449 | - | let | |
1450 | - | then if (( | |
1447 | + | let gd = hI._1 | |
1448 | + | let cI = hI._2 | |
1449 | + | let eg = dm("", dr, hE, this) | |
1450 | + | let dI = eg._1 | |
1451 | + | let dJ = eg._2 | |
1452 | + | let hJ = (dI + dJ) | |
1453 | + | let fS = if ((hJ == 0)) | |
1454 | + | then if ((gd == 0)) | |
1451 | 1455 | then 0 | |
1452 | 1456 | else throw("bonus calculation error") | |
1453 | - | else fraction(( | |
1454 | - | $Tuple2(nil, $Tuple3( | |
1457 | + | else fraction((gd - hJ), a, hJ) | |
1458 | + | $Tuple2(nil, $Tuple3(gd, cI, fS)) | |
1455 | 1459 | } | |
1456 | 1460 | ||
1457 | 1461 | ||
1458 | 1462 | ||
1459 | - | @Callable( | |
1460 | - | func getNoLess ( | |
1461 | - | let | |
1462 | - | let | |
1463 | - | let | |
1464 | - | let | |
1465 | - | let | |
1466 | - | let | |
1467 | - | if (( | |
1468 | - | then throw(((("Failed: " + toString( | |
1469 | - | else if (( | |
1470 | - | then throw(((("Failed: " + toString( | |
1463 | + | @Callable(cY) | |
1464 | + | func getNoLess (hK,hL) = { | |
1465 | + | let eg = fs(cY) | |
1466 | + | let dI = eg._1 | |
1467 | + | let dJ = eg._2 | |
1468 | + | let dU = eg._3 | |
1469 | + | let do = eg._4 | |
1470 | + | let dK = eg._5 | |
1471 | + | if ((hK > dI)) | |
1472 | + | then throw(((("Failed: " + toString(dI)) + " < ") + toString(hK))) | |
1473 | + | else if ((hL > dJ)) | |
1474 | + | then throw(((("Failed: " + toString(dJ)) + " < ") + toString(hL))) | |
1471 | 1475 | else { | |
1472 | - | let | |
1473 | - | if (( | |
1476 | + | let fa = eT(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1477 | + | if ((fa == fa)) | |
1474 | 1478 | then { | |
1475 | - | let | |
1476 | - | if (( | |
1479 | + | let hM = invoke(aT, "burn", [dU], [AttachedPayment(do, dU)]) | |
1480 | + | if ((hM == hM)) | |
1477 | 1481 | then { | |
1478 | - | let | |
1479 | - | let | |
1480 | - | let | |
1481 | - | let | |
1482 | - | if (( | |
1483 | - | then ( | |
1482 | + | let hN = fb(-(dI), -(dJ), 0) | |
1483 | + | let gr = hN._1 | |
1484 | + | let eS = hN._2 | |
1485 | + | let gs = ff(fa, eS) | |
1486 | + | if ((gs == gs)) | |
1487 | + | then (dK ++ gr) | |
1484 | 1488 | else throw("Strict value is not equal to itself.") | |
1485 | 1489 | } | |
1486 | 1490 | else throw("Strict value is not equal to itself.") | |
1491 | 1495 | ||
1492 | 1496 | ||
1493 | 1497 | ||
1494 | - | @Callable( | |
1495 | - | func unstakeAndGet ( | |
1496 | - | let | |
1498 | + | @Callable(cY) | |
1499 | + | func unstakeAndGet (cH) = { | |
1500 | + | let hO = if ((size(cY.payments) != 0)) | |
1497 | 1501 | then throw("No pmnts expd") | |
1498 | 1502 | else true | |
1499 | - | if (( | |
1503 | + | if ((hO == hO)) | |
1500 | 1504 | then { | |
1501 | - | let | |
1502 | - | let | |
1503 | - | let | |
1504 | - | let | |
1505 | - | if (( | |
1505 | + | let hP = bD() | |
1506 | + | let hc = bw | |
1507 | + | let hQ = valueOrErrorMessage(addressFromString(hP[C]), "Wr st addr") | |
1508 | + | let fa = eT(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1509 | + | if ((fa == fa)) | |
1506 | 1510 | then { | |
1507 | - | let | |
1508 | - | if (( | |
1511 | + | let hR = invoke(hQ, "unstake", [toBase58String(hc), cH], nil) | |
1512 | + | if ((hR == hR)) | |
1509 | 1513 | then { | |
1510 | - | let | |
1511 | - | let | |
1512 | - | let | |
1513 | - | let | |
1514 | - | let | |
1515 | - | let | |
1514 | + | let eg = dm(toBase58String(cY.transactionId), toBase58String(hc), cH, cY.caller) | |
1515 | + | let dI = eg._1 | |
1516 | + | let dJ = eg._2 | |
1517 | + | let dw = parseIntValue(eg._9) | |
1518 | + | let dK = eg._10 | |
1519 | + | let hS = if (if (bg()) | |
1516 | 1520 | then true | |
1517 | - | else ( | |
1518 | - | then throw(("Blocked: " + toString( | |
1521 | + | else (dw == s)) | |
1522 | + | then throw(("Blocked: " + toString(dw))) | |
1519 | 1523 | else true | |
1520 | - | if (( | |
1524 | + | if ((hS == hS)) | |
1521 | 1525 | then { | |
1522 | - | let | |
1523 | - | if (( | |
1526 | + | let hT = invoke(aT, "burn", [cH], [AttachedPayment(hc, cH)]) | |
1527 | + | if ((hT == hT)) | |
1524 | 1528 | then { | |
1525 | - | let | |
1526 | - | let | |
1527 | - | let | |
1528 | - | let | |
1529 | - | if (( | |
1530 | - | then ( | |
1529 | + | let hU = fb(-(dI), -(dJ), 0) | |
1530 | + | let gr = hU._1 | |
1531 | + | let eS = hU._2 | |
1532 | + | let gs = ff(fa, eS) | |
1533 | + | if ((gs == gs)) | |
1534 | + | then (dK ++ gr) | |
1531 | 1535 | else throw("Strict value is not equal to itself.") | |
1532 | 1536 | } | |
1533 | 1537 | else throw("Strict value is not equal to itself.") | |
1543 | 1547 | ||
1544 | 1548 | ||
1545 | 1549 | ||
1546 | - | @Callable( | |
1547 | - | func unstakeAndGetNoLess ( | |
1548 | - | let | |
1550 | + | @Callable(cY) | |
1551 | + | func unstakeAndGetNoLess (hV,hW,hL) = { | |
1552 | + | let hy = if (bg()) | |
1549 | 1553 | then true | |
1550 | - | else ( | |
1551 | - | let | |
1554 | + | else (bv == s) | |
1555 | + | let gQ = [if (!(hy)) | |
1552 | 1556 | then true | |
1553 | - | else throw("get operation is blocked by admin"), if ((size( | |
1557 | + | else throw("get operation is blocked by admin"), if ((size(cY.payments) == 0)) | |
1554 | 1558 | then true | |
1555 | 1559 | else throw("no payments are expected")] | |
1556 | - | if (( | |
1560 | + | if ((gQ == gQ)) | |
1557 | 1561 | then { | |
1558 | - | let | |
1559 | - | if (( | |
1562 | + | let fa = eT(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1563 | + | if ((fa == fa)) | |
1560 | 1564 | then { | |
1561 | - | let | |
1562 | - | if (( | |
1565 | + | let hR = invoke(bF, "unstake", [toBase58String(bw), hV], nil) | |
1566 | + | if ((hR == hR)) | |
1563 | 1567 | then { | |
1564 | - | let | |
1565 | - | let | |
1566 | - | let | |
1567 | - | let | |
1568 | - | let | |
1568 | + | let hX = dm(toBase58String(cY.transactionId), toBase58String(bw), hV, cY.caller) | |
1569 | + | let dI = hX._1 | |
1570 | + | let dJ = hX._2 | |
1571 | + | let dK = hX._10 | |
1572 | + | let hY = [if ((dI >= hW)) | |
1569 | 1573 | then true | |
1570 | - | else throw(makeString(["amount asset amount to receive is less than ", toString( | |
1574 | + | else throw(makeString(["amount asset amount to receive is less than ", toString(hW)], "")), if ((dJ >= hL)) | |
1571 | 1575 | then true | |
1572 | - | else throw(makeString(["price asset amount to receive is less than ", toString( | |
1573 | - | if (( | |
1576 | + | else throw(makeString(["price asset amount to receive is less than ", toString(hL)], ""))] | |
1577 | + | if ((hY == hY)) | |
1574 | 1578 | then { | |
1575 | - | let | |
1576 | - | if (( | |
1579 | + | let hM = invoke(aT, "burn", [hV], [AttachedPayment(bw, hV)]) | |
1580 | + | if ((hM == hM)) | |
1577 | 1581 | then { | |
1578 | - | let | |
1579 | - | let | |
1580 | - | let | |
1581 | - | let | |
1582 | - | if (( | |
1583 | - | then ( | |
1582 | + | let hZ = fb(-(dI), -(dJ), 0) | |
1583 | + | let gr = hZ._1 | |
1584 | + | let eS = hZ._2 | |
1585 | + | let gs = ff(fa, eS) | |
1586 | + | if ((gs == gs)) | |
1587 | + | then (dK ++ gr) | |
1584 | 1588 | else throw("Strict value is not equal to itself.") | |
1585 | 1589 | } | |
1586 | 1590 | else throw("Strict value is not equal to itself.") | |
1596 | 1600 | ||
1597 | 1601 | ||
1598 | 1602 | ||
1599 | - | @Callable( | |
1600 | - | func unstakeAndGetOneTknV2 ( | |
1601 | - | let | |
1602 | - | let | |
1603 | - | if ($isInstanceOf( | |
1604 | - | then | |
1605 | - | else throw(($getType( | |
1603 | + | @Callable(cY) | |
1604 | + | func unstakeAndGetOneTknV2 (hV,fU,fV) = { | |
1605 | + | let hm = { | |
1606 | + | let bd = invoke(aT, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1607 | + | if ($isInstanceOf(bd, "Boolean")) | |
1608 | + | then bd | |
1609 | + | else throw(($getType(bd) + " couldn't be cast to Boolean")) | |
1606 | 1610 | } | |
1607 | - | let | |
1611 | + | let hy = if (if (bg()) | |
1608 | 1612 | then true | |
1609 | - | else ( | |
1613 | + | else (bv == s)) | |
1610 | 1614 | then true | |
1611 | - | else | |
1612 | - | let | |
1615 | + | else hm | |
1616 | + | let gQ = [if (if (!(hy)) | |
1613 | 1617 | then true | |
1614 | - | else | |
1618 | + | else gw(cY)) | |
1615 | 1619 | then true | |
1616 | - | else | |
1620 | + | else aZ("get operation is blocked by admin"), if ((size(cY.payments) == 0)) | |
1617 | 1621 | then true | |
1618 | - | else | |
1619 | - | if (( | |
1622 | + | else aZ("no payments are expected")] | |
1623 | + | if ((gQ == gQ)) | |
1620 | 1624 | then { | |
1621 | - | let | |
1622 | - | let | |
1623 | - | let | |
1624 | - | let | |
1625 | - | let | |
1626 | - | let | |
1627 | - | if (( | |
1625 | + | let hP = bD() | |
1626 | + | let hc = bw | |
1627 | + | let hQ = valueOrErrorMessage(addressFromString(hP[C]), "Wr st addr") | |
1628 | + | let dq = cY.caller | |
1629 | + | let ia = this | |
1630 | + | let hR = invoke(hQ, "unstakeINTERNAL", [hc, hV, dq.bytes, ia.bytes], nil) | |
1631 | + | if ((hR == hR)) | |
1628 | 1632 | then { | |
1629 | - | let | |
1630 | - | let | |
1631 | - | let | |
1632 | - | $Tuple2( | |
1633 | + | let ib = fT(fU, fV, [AttachedPayment(hc, hV)], cY.caller, cY.originCaller, cY.transactionId) | |
1634 | + | let dK = ib._1 | |
1635 | + | let ge = ib._2 | |
1636 | + | $Tuple2(dK, ge) | |
1633 | 1637 | } | |
1634 | 1638 | else throw("Strict value is not equal to itself.") | |
1635 | 1639 | } | |
1638 | 1642 | ||
1639 | 1643 | ||
1640 | 1644 | ||
1641 | - | @Callable( | |
1642 | - | func putOneTknV2WithBonusREADONLY ( | |
1643 | - | let | |
1644 | - | let | |
1645 | - | let | |
1646 | - | let | |
1647 | - | let | |
1648 | - | $Tuple2(nil, $Tuple3( | |
1645 | + | @Callable(cY) | |
1646 | + | func putOneTknV2WithBonusREADONLY (ic,id) = { | |
1647 | + | let ie = fy(ic, id, "", "", true) | |
1648 | + | let fN = ie._1 | |
1649 | + | let dK = ie._2 | |
1650 | + | let cI = ie._3 | |
1651 | + | let fS = ie._4 | |
1652 | + | $Tuple2(nil, $Tuple3(fN, cI, fS)) | |
1649 | 1653 | } | |
1650 | 1654 | ||
1651 | 1655 | ||
1652 | 1656 | ||
1653 | - | @Callable( | |
1654 | - | func putOneTknV2WithoutTakeFeeREADONLY ( | |
1655 | - | let | |
1656 | - | let | |
1657 | - | let | |
1658 | - | let | |
1659 | - | let | |
1660 | - | $Tuple2(nil, $Tuple3( | |
1657 | + | @Callable(cY) | |
1658 | + | func putOneTknV2WithoutTakeFeeREADONLY (ic,id) = { | |
1659 | + | let if = fy(ic, id, "", "", false) | |
1660 | + | let fN = if._1 | |
1661 | + | let dK = if._2 | |
1662 | + | let cI = if._3 | |
1663 | + | let fS = if._4 | |
1664 | + | $Tuple2(nil, $Tuple3(fN, cI, fS)) | |
1661 | 1665 | } | |
1662 | 1666 | ||
1663 | 1667 | ||
1664 | 1668 | ||
1665 | - | @Callable( | |
1666 | - | func activate ( | |
1669 | + | @Callable(cY) | |
1670 | + | func activate (ig,ih) = if ((toString(cY.caller) != toString(aT))) | |
1667 | 1671 | then throw("denied") | |
1668 | - | else $Tuple2([StringEntry(ak(), | |
1672 | + | else $Tuple2([StringEntry(aj(), ig), StringEntry(ak(), ih)], "success") | |
1669 | 1673 | ||
1670 | 1674 | ||
1671 | 1675 | ||
1672 | - | @Callable( | |
1673 | - | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, | |
1676 | + | @Callable(cY) | |
1677 | + | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, bj()) | |
1674 | 1678 | ||
1675 | 1679 | ||
1676 | 1680 | ||
1677 | - | @Callable( | |
1678 | - | func getAccBalanceWrapperREADONLY ( | |
1681 | + | @Callable(cY) | |
1682 | + | func getAccBalanceWrapperREADONLY (bZ) = $Tuple2(nil, bY(bZ)) | |
1679 | 1683 | ||
1680 | 1684 | ||
1681 | 1685 | ||
1682 | - | @Callable( | |
1683 | - | func calcPricesWrapperREADONLY ( | |
1684 | - | let | |
1685 | - | $Tuple2(nil, [toString( | |
1686 | + | @Callable(cY) | |
1687 | + | func calcPricesWrapperREADONLY (cs,ct,cx) = { | |
1688 | + | let ii = cw(cs, ct, cx) | |
1689 | + | $Tuple2(nil, [toString(ii[0]), toString(ii[1]), toString(ii[2])]) | |
1686 | 1690 | } | |
1687 | 1691 | ||
1688 | 1692 | ||
1689 | 1693 | ||
1690 | - | @Callable( | |
1691 | - | func fromX18WrapperREADONLY ( | |
1694 | + | @Callable(cY) | |
1695 | + | func fromX18WrapperREADONLY (M,ij) = $Tuple2(nil, L(parseBigIntValue(M), ij)) | |
1692 | 1696 | ||
1693 | 1697 | ||
1694 | 1698 | ||
1695 | - | @Callable( | |
1696 | - | func toX18WrapperREADONLY (J | |
1699 | + | @Callable(cY) | |
1700 | + | func toX18WrapperREADONLY (I,J) = $Tuple2(nil, toString(H(I, J))) | |
1697 | 1701 | ||
1698 | 1702 | ||
1699 | 1703 | ||
1700 | - | @Callable( | |
1701 | - | func calcPriceBigIntWrapperREADONLY ( | |
1704 | + | @Callable(cY) | |
1705 | + | func calcPriceBigIntWrapperREADONLY (cb,cc) = $Tuple2(nil, toString(ca(parseBigIntValue(cb), parseBigIntValue(cc)))) | |
1702 | 1706 | ||
1703 | 1707 | ||
1704 | 1708 | ||
1705 | - | @Callable( | |
1706 | - | func estimatePutOperationWrapperREADONLY ( | |
1709 | + | @Callable(cY) | |
1710 | + | func estimatePutOperationWrapperREADONLY (dn,ch,dM,dN,dO,dP,ik,dQ,dR) = $Tuple2(nil, dL(dn, ch, dM, dN, dO, dP, ik, dQ, dR, true, false, 0, "")) | |
1707 | 1711 | ||
1708 | 1712 | ||
1709 | 1713 | ||
1710 | - | @Callable( | |
1711 | - | func estimateGetOperationWrapperREADONLY ( | |
1712 | - | let | |
1713 | - | $Tuple2(nil, $Tuple10( | |
1714 | + | @Callable(cY) | |
1715 | + | func estimateGetOperationWrapperREADONLY (dn,il,dp,ik) = { | |
1716 | + | let eg = dm(dn, il, dp, addressFromStringValue(ik)) | |
1717 | + | $Tuple2(nil, $Tuple10(eg._1, eg._2, eg._3, eg._4, eg._5, eg._6, eg._7, toString(eg._8), eg._9, eg._10)) | |
1714 | 1718 | } | |
1715 | 1719 | ||
1716 | 1720 | ||
1717 | 1721 | ||
1718 | - | @Callable( | |
1722 | + | @Callable(cY) | |
1719 | 1723 | func changeAmp () = { | |
1720 | - | let | |
1721 | - | let | |
1722 | - | let | |
1723 | - | if ($isInstanceOf( | |
1724 | + | let im = invoke(aT, "getChangeAmpConfigREADONLY", [toString(this)], nil) | |
1725 | + | let in = { | |
1726 | + | let aP = im | |
1727 | + | if ($isInstanceOf(aP, "List[Any]")) | |
1724 | 1728 | then { | |
1725 | - | let | |
1729 | + | let io = aP | |
1726 | 1730 | $Tuple3({ | |
1727 | - | let | |
1728 | - | if ($isInstanceOf( | |
1729 | - | then | |
1730 | - | else throw(($getType( | |
1731 | + | let bd = io[0] | |
1732 | + | if ($isInstanceOf(bd, "Int")) | |
1733 | + | then bd | |
1734 | + | else throw(($getType(bd) + " couldn't be cast to Int")) | |
1731 | 1735 | }, { | |
1732 | - | let | |
1733 | - | if ($isInstanceOf( | |
1734 | - | then | |
1735 | - | else throw(($getType( | |
1736 | + | let bd = io[1] | |
1737 | + | if ($isInstanceOf(bd, "Int")) | |
1738 | + | then bd | |
1739 | + | else throw(($getType(bd) + " couldn't be cast to Int")) | |
1736 | 1740 | }, { | |
1737 | - | let | |
1738 | - | if ($isInstanceOf( | |
1739 | - | then | |
1740 | - | else throw(($getType( | |
1741 | + | let bd = io[2] | |
1742 | + | if ($isInstanceOf(bd, "Int")) | |
1743 | + | then bd | |
1744 | + | else throw(($getType(bd) + " couldn't be cast to Int")) | |
1741 | 1745 | }) | |
1742 | 1746 | } | |
1743 | - | else | |
1747 | + | else aZ("invalid entry type") | |
1744 | 1748 | } | |
1745 | - | let | |
1746 | - | let | |
1747 | - | let | |
1748 | - | let | |
1749 | - | let | |
1750 | - | let | |
1751 | - | then if (( | |
1752 | - | then | |
1753 | - | else | |
1754 | - | else if (( | |
1755 | - | then | |
1756 | - | else | |
1757 | - | let | |
1758 | - | let | |
1759 | - | let | |
1749 | + | let ip = in._1 | |
1750 | + | let iq = in._2 | |
1751 | + | let ir = in._3 | |
1752 | + | let is = parseIntValue(getStringValue(al())) | |
1753 | + | let it = (is + iq) | |
1754 | + | let iu = if ((0 > iq)) | |
1755 | + | then if ((ir > it)) | |
1756 | + | then ir | |
1757 | + | else it | |
1758 | + | else if ((it > ir)) | |
1759 | + | then ir | |
1760 | + | else it | |
1761 | + | let iv = valueOrElse(getInteger(ao()), 0) | |
1762 | + | let iw = (iv + ip) | |
1763 | + | let gQ = [if ((height > iw)) | |
1760 | 1764 | then true | |
1761 | - | else | |
1765 | + | else aZ("try again in few blocks"), if ((is != iu)) | |
1762 | 1766 | then true | |
1763 | - | else | |
1764 | - | if (( | |
1765 | - | then [IntegerEntry( | |
1767 | + | else aZ("already reached target")] | |
1768 | + | if ((gQ == gQ)) | |
1769 | + | then [IntegerEntry(ao(), height), StringEntry(al(), toString(iu)), StringEntry(am(height), toString(iu))] | |
1766 | 1770 | else throw("Strict value is not equal to itself.") | |
1767 | 1771 | } | |
1768 | 1772 | ||
1769 | 1773 | ||
1770 | - | @Verifier( | |
1771 | - | func | |
1772 | - | let | |
1773 | - | let | |
1774 | - | if ($isInstanceOf( | |
1774 | + | @Verifier(ix) | |
1775 | + | func iy () = { | |
1776 | + | let iz = { | |
1777 | + | let aP = gt() | |
1778 | + | if ($isInstanceOf(aP, "ByteVector")) | |
1775 | 1779 | then { | |
1776 | - | let | |
1777 | - | | |
1780 | + | let gx = aP | |
1781 | + | gx | |
1778 | 1782 | } | |
1779 | - | else if ($isInstanceOf( | |
1780 | - | then | |
1783 | + | else if ($isInstanceOf(aP, "Unit")) | |
1784 | + | then ix.senderPublicKey | |
1781 | 1785 | else throw("Match error") | |
1782 | 1786 | } | |
1783 | - | let | |
1784 | - | if ($isInstanceOf( | |
1787 | + | let aP = ix | |
1788 | + | if ($isInstanceOf(aP, "Order")) | |
1785 | 1789 | then { | |
1786 | - | let | |
1787 | - | let | |
1788 | - | let | |
1790 | + | let fi = aP | |
1791 | + | let iA = bh() | |
1792 | + | let iB = if (gE()) | |
1789 | 1793 | then $Tuple2(true, "") | |
1790 | - | else fe(ff) | |
1791 | - | let aK = iy._1 | |
1792 | - | let aL = iy._2 | |
1793 | - | let aM = sigVerify(ff.bodyBytes, ff.proofs[0], ff.senderPublicKey) | |
1794 | - | let aN = sigVerify(ff.bodyBytes, ff.proofs[1], ix) | |
1795 | - | if (if (if (aK) | |
1794 | + | else fh(fi) | |
1795 | + | let aJ = iB._1 | |
1796 | + | let aK = iB._2 | |
1797 | + | let aL = sigVerify(fi.bodyBytes, fi.proofs[0], fi.senderPublicKey) | |
1798 | + | let aM = sigVerify(fi.bodyBytes, fi.proofs[1], iA) | |
1799 | + | if (if (if (aJ) | |
1800 | + | then aL | |
1801 | + | else false) | |
1796 | 1802 | then aM | |
1797 | 1803 | else false) | |
1798 | - | then aN | |
1799 | - | else false) | |
1800 | 1804 | then true | |
1801 | - | else aJ | |
1805 | + | else aI(aJ, aK, aL, aM) | |
1802 | 1806 | } | |
1803 | - | else if ($isInstanceOf( | |
1807 | + | else if ($isInstanceOf(aP, "SetScriptTransaction")) | |
1804 | 1808 | then { | |
1805 | - | let | |
1806 | - | if (sigVerify( | |
1809 | + | let aU = aP | |
1810 | + | if (sigVerify(ix.bodyBytes, ix.proofs[0], iz)) | |
1807 | 1811 | then true | |
1808 | 1812 | else { | |
1809 | - | let | |
1810 | - | let | |
1811 | - | let | |
1812 | - | if (( | |
1813 | - | then ( | |
1813 | + | let iC = blake2b256(value(aU.script)) | |
1814 | + | let iD = fromBase64String(value(getString(aT, aE()))) | |
1815 | + | let iE = scriptHash(this) | |
1816 | + | if ((iD == iC)) | |
1817 | + | then (iE != iC) | |
1814 | 1818 | else false | |
1815 | 1819 | } | |
1816 | 1820 | } | |
1817 | - | else sigVerify( | |
1821 | + | else sigVerify(ix.bodyBytes, ix.proofs[0], iz) | |
1818 | 1822 | } | |
1819 | 1823 |
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 | 10 | let d = toBigInt(0) | |
11 | 11 | ||
12 | 12 | let e = toBigInt(0) | |
13 | 13 | ||
14 | 14 | let f = toBigInt(1) | |
15 | 15 | ||
16 | 16 | let g = toBigInt(2) | |
17 | 17 | ||
18 | 18 | let h = toBigInt(3) | |
19 | 19 | ||
20 | 20 | let i = toBigInt(4) | |
21 | 21 | ||
22 | 22 | let j = toBigInt((a - ((a * 1) / a))) | |
23 | 23 | ||
24 | 24 | let k = "WAVES" | |
25 | 25 | ||
26 | - | let l = | |
26 | + | let l = "100" | |
27 | 27 | ||
28 | - | let m = " | |
28 | + | let m = "1" | |
29 | 29 | ||
30 | - | let n = " | |
30 | + | let n = "__" | |
31 | 31 | ||
32 | - | let o = " | |
32 | + | let o = "" | |
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 = 1 | |
43 | 43 | ||
44 | - | let u = | |
44 | + | let u = 2 | |
45 | 45 | ||
46 | - | let v = | |
46 | + | let v = 3 | |
47 | 47 | ||
48 | - | let w = | |
48 | + | let w = 4 | |
49 | 49 | ||
50 | - | let x = | |
50 | + | let x = 5 | |
51 | 51 | ||
52 | - | let y = | |
52 | + | let y = 6 | |
53 | 53 | ||
54 | - | let z = | |
54 | + | let z = 7 | |
55 | 55 | ||
56 | - | let A = | |
56 | + | let A = 8 | |
57 | 57 | ||
58 | - | let B = | |
58 | + | let B = 9 | |
59 | 59 | ||
60 | - | let C = | |
60 | + | let C = 1 | |
61 | 61 | ||
62 | - | let D = | |
62 | + | let D = 6 | |
63 | 63 | ||
64 | - | let E = | |
64 | + | let E = 7 | |
65 | 65 | ||
66 | - | let F = | |
66 | + | let F = 10 | |
67 | 67 | ||
68 | - | let G = 10 | |
68 | + | let G = fraction(10, a, 10000) | |
69 | 69 | ||
70 | - | let H = fraction(10, a, 10000) | |
71 | - | ||
72 | - | func I (J,K) = fraction(toBigInt(J), c, toBigInt(K)) | |
70 | + | func H (I,J) = fraction(toBigInt(I), c, toBigInt(J)) | |
73 | 71 | ||
74 | 72 | ||
75 | - | func | |
73 | + | func K (I,J) = fraction(I, c, J) | |
76 | 74 | ||
77 | 75 | ||
78 | - | func | |
76 | + | func L (M,N) = toInt(fraction(M, toBigInt(N), c)) | |
79 | 77 | ||
80 | 78 | ||
81 | - | func | |
79 | + | func O (M,N,P) = toInt(fraction(M, toBigInt(N), c, P)) | |
82 | 80 | ||
83 | 81 | ||
84 | - | func | |
82 | + | func Q (I,J) = fraction(I, c, toBigInt(J)) | |
85 | 83 | ||
86 | 84 | ||
87 | - | func | |
85 | + | func R (M,N) = fraction(M, toBigInt(N), c) | |
88 | 86 | ||
89 | 87 | ||
90 | - | func | |
88 | + | func S (T,U,V) = fraction(T, U, V) | |
91 | 89 | ||
92 | 90 | ||
93 | - | func | |
94 | - | then -( | |
95 | - | else | |
91 | + | func W (M) = if ((d > M)) | |
92 | + | then -(M) | |
93 | + | else M | |
96 | 94 | ||
97 | 95 | ||
98 | - | func | |
99 | - | then -( | |
100 | - | else | |
96 | + | func X (M) = if ((d > M)) | |
97 | + | then -(M) | |
98 | + | else M | |
101 | 99 | ||
102 | 100 | ||
103 | - | func | |
101 | + | func Y () = "%s__factoryContract" | |
104 | 102 | ||
105 | 103 | ||
106 | - | func | |
104 | + | func Z () = "%s__managerPublicKey" | |
107 | 105 | ||
108 | 106 | ||
109 | - | func | |
107 | + | func aa () = "%s__managerVaultAddress" | |
110 | 108 | ||
111 | 109 | ||
112 | - | func | |
110 | + | func ab () = "%s%s__price__last" | |
113 | 111 | ||
114 | 112 | ||
115 | - | func | |
113 | + | func ac (ad,ae) = makeString(["%s%s%d%d__price__history", toString(ad), toString(ae)], n) | |
116 | 114 | ||
117 | 115 | ||
118 | - | func | |
116 | + | func af (ag,ah) = ((("%s%s%s__P__" + ag) + "__") + ah) | |
119 | 117 | ||
120 | 118 | ||
121 | - | func | |
119 | + | func ai (ag,ah) = ((("%s%s%s__G__" + ag) + "__") + ah) | |
122 | 120 | ||
123 | 121 | ||
124 | - | func | |
122 | + | func aj () = "%s__amountAsset" | |
125 | 123 | ||
126 | 124 | ||
127 | - | func | |
125 | + | func ak () = "%s__priceAsset" | |
128 | 126 | ||
129 | 127 | ||
130 | - | func | |
128 | + | func al () = "%s__amp" | |
131 | 129 | ||
132 | 130 | ||
133 | - | func | |
131 | + | func am (an) = ("%s%d__amp__" + toString(an)) | |
134 | 132 | ||
135 | 133 | ||
136 | - | func | |
134 | + | func ao () = "%s__changeAmpLastCall" | |
137 | 135 | ||
138 | 136 | ||
139 | - | let | |
137 | + | let ap = "%s__fee" | |
140 | 138 | ||
141 | - | let | |
139 | + | let aq = valueOrElse(getInteger(this, ap), G) | |
142 | 140 | ||
143 | - | let | |
141 | + | let ar = makeString(["%s", "dLp"], n) | |
144 | 142 | ||
145 | - | let | |
143 | + | let as = makeString(["%s", "dLpRefreshedHeight"], n) | |
146 | 144 | ||
147 | - | let | |
145 | + | let at = makeString(["%s", "refreshDLpDelay"], n) | |
148 | 146 | ||
149 | - | let | |
147 | + | let au = 30 | |
150 | 148 | ||
151 | - | let | |
149 | + | let av = valueOrElse(getInteger(this, at), au) | |
152 | 150 | ||
153 | - | func | |
151 | + | func aw () = "%s__factoryConfig" | |
154 | 152 | ||
155 | 153 | ||
156 | - | func | |
154 | + | func ax () = "%s%s__matcher__publicKey" | |
157 | 155 | ||
158 | 156 | ||
159 | - | func | |
157 | + | func ay (az,aA) = (((("%d%d%s__" + az) + "__") + aA) + "__config") | |
160 | 158 | ||
161 | 159 | ||
162 | - | func | |
160 | + | func aB (aC) = ("%s%s%s__mappings__baseAsset2internalId__" + aC) | |
163 | 161 | ||
164 | 162 | ||
165 | - | func | |
163 | + | func aD () = "%s__shutdown" | |
166 | 164 | ||
167 | 165 | ||
168 | - | func | |
166 | + | func aE () = "%s__allowedLpStableScriptHash" | |
169 | 167 | ||
170 | 168 | ||
171 | - | func | |
169 | + | func aF () = "%s__feeCollectorAddress" | |
172 | 170 | ||
173 | 171 | ||
174 | - | func | |
172 | + | func aG (aH) = ("%s%s__skipOrderValidation__" + aH) | |
175 | 173 | ||
176 | 174 | ||
177 | - | func | |
175 | + | func aI (aJ,aK,aL,aM) = throw((((((((("order validation failed: orderValid=" + toString(aJ)) + " (") + aK) + ")") + " senderValid=") + toString(aL)) + " matcherValid=") + toString(aM))) | |
178 | 176 | ||
179 | 177 | ||
180 | - | func | |
181 | - | let | |
182 | - | if ($isInstanceOf( | |
178 | + | func aN (aO) = { | |
179 | + | let aP = addressFromString(aO) | |
180 | + | if ($isInstanceOf(aP, "Address")) | |
183 | 181 | then { | |
184 | - | let | |
185 | - | | |
182 | + | let aQ = aP | |
183 | + | aQ | |
186 | 184 | } | |
187 | 185 | else this | |
188 | 186 | } | |
189 | 187 | ||
190 | 188 | ||
191 | - | func | |
192 | - | let | |
193 | - | let | |
194 | - | if ($isInstanceOf( | |
189 | + | func aR () = { | |
190 | + | let aS = { | |
191 | + | let aP = getString(Y()) | |
192 | + | if ($isInstanceOf(aP, "String")) | |
195 | 193 | then { | |
196 | - | let | |
197 | - | | |
194 | + | let aT = aP | |
195 | + | aN(aT) | |
198 | 196 | } | |
199 | 197 | else this | |
200 | 198 | } | |
201 | - | let | |
202 | - | if ($isInstanceOf( | |
199 | + | let aP = getString(aS, aa()) | |
200 | + | if ($isInstanceOf(aP, "String")) | |
203 | 201 | then { | |
204 | - | let | |
205 | - | | |
202 | + | let aU = aP | |
203 | + | aN(aU) | |
206 | 204 | } | |
207 | 205 | else this | |
208 | 206 | } | |
209 | 207 | ||
210 | 208 | ||
211 | - | func | |
209 | + | func aV (aW,aX) = valueOrErrorMessage(getString(aW, aX), makeString(["mandatory ", toString(aW), ".", aX, " not defined"], "")) | |
212 | 210 | ||
213 | 211 | ||
214 | - | func | |
212 | + | func aY (aW,aX) = valueOrErrorMessage(getInteger(aW, aX), makeString(["mandatory ", toString(aW), ".", aX, " not defined"], "")) | |
215 | 213 | ||
216 | 214 | ||
217 | - | func | |
215 | + | func aZ (ba) = throw(makeString(["lp_stable.ride:", ba], " ")) | |
218 | 216 | ||
219 | 217 | ||
220 | - | func | |
218 | + | func bb (ba) = makeString(["lp_stable.ride:", ba], " ") | |
221 | 219 | ||
222 | 220 | ||
223 | - | let | |
221 | + | let aT = addressFromStringValue(aV(this, Y())) | |
224 | 222 | ||
225 | - | let | |
226 | - | let | |
227 | - | if ($isInstanceOf( | |
228 | - | then | |
229 | - | else throw(($getType( | |
223 | + | let bc = { | |
224 | + | let bd = invoke(aT, "getInFeeREADONLY", [toString(this)], nil) | |
225 | + | if ($isInstanceOf(bd, "Int")) | |
226 | + | then bd | |
227 | + | else throw(($getType(bd) + " couldn't be cast to Int")) | |
230 | 228 | } | |
231 | 229 | ||
232 | - | let | |
233 | - | let | |
234 | - | if ($isInstanceOf( | |
235 | - | then | |
236 | - | else throw(($getType( | |
230 | + | let be = { | |
231 | + | let bd = invoke(aT, "getOutFeeREADONLY", [toString(this)], nil) | |
232 | + | if ($isInstanceOf(bd, "Int")) | |
233 | + | then bd | |
234 | + | else throw(($getType(bd) + " couldn't be cast to Int")) | |
237 | 235 | } | |
238 | 236 | ||
239 | - | let | |
237 | + | let bf = aV(this, al()) | |
240 | 238 | ||
241 | - | func | |
239 | + | func bg () = valueOrElse(getBoolean(aT, aD()), false) | |
242 | 240 | ||
243 | 241 | ||
244 | - | func | |
242 | + | func bh () = fromBase58String(aV(aT, ax())) | |
245 | 243 | ||
246 | 244 | ||
247 | - | let | |
245 | + | let bi = addressFromStringValue(aV(aT, aF())) | |
248 | 246 | ||
249 | - | func | |
250 | - | let | |
251 | - | let | |
252 | - | let | |
253 | - | let | |
254 | - | split( | |
247 | + | func bj () = { | |
248 | + | let bk = aV(this, aj()) | |
249 | + | let bl = aV(this, ak()) | |
250 | + | let bm = aY(aT, aB(bl)) | |
251 | + | let az = aY(aT, aB(bk)) | |
252 | + | split(aV(aT, ay(toString(az), toString(bm))), n) | |
255 | 253 | } | |
256 | 254 | ||
257 | 255 | ||
258 | - | func | |
256 | + | func bn (bo) = if ((bo == k)) | |
259 | 257 | then unit | |
260 | - | else fromBase58String( | |
258 | + | else fromBase58String(bo) | |
261 | 259 | ||
262 | 260 | ||
263 | - | func | |
261 | + | func bp (bo) = if ((bo == unit)) | |
264 | 262 | then k | |
265 | - | else toBase58String(value( | |
263 | + | else toBase58String(value(bo)) | |
266 | 264 | ||
267 | 265 | ||
268 | - | func | |
266 | + | func bq (br) = $Tuple9(addressFromStringValue(br[t]), parseIntValue(br[u]), fromBase58String(br[v]), bn(br[w]), bn(br[x]), parseIntValue(br[y]), parseIntValue(br[z]), fromBase58String(br[A]), fromBase58String(br[B])) | |
269 | 267 | ||
270 | 268 | ||
271 | - | let | |
269 | + | let bs = bq(bj()) | |
272 | 270 | ||
273 | - | let | |
271 | + | let bt = bs | |
274 | 272 | ||
275 | - | let | |
273 | + | let bu = bt._1 | |
276 | 274 | ||
277 | - | let | |
275 | + | let bv = bt._2 | |
278 | 276 | ||
279 | - | let | |
277 | + | let bw = bt._3 | |
280 | 278 | ||
281 | - | let | |
279 | + | let bx = bt._4 | |
282 | 280 | ||
283 | - | let | |
281 | + | let by = bt._5 | |
284 | 282 | ||
285 | - | let | |
283 | + | let bz = bt._6 | |
286 | 284 | ||
287 | - | let | |
285 | + | let bA = bt._7 | |
288 | 286 | ||
289 | - | func bC () = split(aW(aU, ax()), o) | |
287 | + | let bB = bt._8 | |
288 | + | ||
289 | + | let bC = bt._9 | |
290 | + | ||
291 | + | func bD () = split(aV(aT, aw()), n) | |
290 | 292 | ||
291 | 293 | ||
292 | - | let | |
294 | + | let bE = bD() | |
293 | 295 | ||
294 | - | let | |
296 | + | let bF = valueOrErrorMessage(addressFromString(bE[C]), "Invalid staking contract address") | |
295 | 297 | ||
296 | - | let | |
298 | + | let bG = valueOrErrorMessage(addressFromString(bE[E]), "Invalid slipage contract address") | |
297 | 299 | ||
298 | - | let | |
300 | + | let bH = valueOrErrorMessage(addressFromString(bE[F]), "Invalid gwx contract address") | |
299 | 301 | ||
300 | - | let | |
302 | + | let bI = valueOrErrorMessage(addressFromString(bE[D]), "Invalid gwx contract address") | |
301 | 303 | ||
302 | - | func | |
304 | + | func bJ (bK,bL,bM,bN,bO,bP,bQ,bR,bS,bT) = makeString(["%d%d%d%d%d%d%d%d%d%d", toString(bK), toString(bL), toString(bM), toString(bN), toString(bO), toString(bP), toString(bQ), toString(bR), toString(bS), toString(bT)], n) | |
303 | 305 | ||
304 | 306 | ||
305 | - | func | |
307 | + | func bU (bV,bW,bX,bN,bQ,bR) = makeString(["%d%d%d%d%d%d", toString(bV), toString(bW), toString(bX), toString(bN), toString(bQ), toString(bR)], n) | |
306 | 308 | ||
307 | 309 | ||
308 | - | func | |
310 | + | func bY (bZ) = if ((bZ == "WAVES")) | |
309 | 311 | then wavesBalance(this).available | |
310 | - | else assetBalance(this, fromBase58String( | |
312 | + | else assetBalance(this, fromBase58String(bZ)) | |
311 | 313 | ||
312 | 314 | ||
313 | - | func | |
315 | + | func ca (cb,cc) = fraction(cb, c, cc) | |
314 | 316 | ||
315 | 317 | ||
316 | - | func | |
318 | + | func cd (cb,cc,P) = fraction(cb, c, cc, P) | |
317 | 319 | ||
318 | 320 | ||
319 | - | func | |
320 | - | let | |
321 | - | let | |
322 | - | if (!( | |
323 | - | then throw(("Big slpg: " + toString( | |
324 | - | else $Tuple2( | |
321 | + | func ce (cf,cg,ch) = { | |
322 | + | let ci = fraction((cf - cg), b, cg) | |
323 | + | let cj = ((ch - W(ci)) > d) | |
324 | + | if (!(cj)) | |
325 | + | then throw(("Big slpg: " + toString(ci))) | |
326 | + | else $Tuple2(cj, min([cf, cg])) | |
325 | 327 | } | |
326 | 328 | ||
327 | 329 | ||
328 | - | func | |
329 | - | let | |
330 | - | let | |
331 | - | if (if ( | |
330 | + | func ck (cl,cm,cn) = { | |
331 | + | let ci = fraction(cm, b, cl) | |
332 | + | let co = (cn > ci) | |
333 | + | if (if (co) | |
332 | 334 | then true | |
333 | - | else ( | |
334 | - | then throw(((((((toString( | |
335 | - | else | |
335 | + | else (cm > cl)) | |
336 | + | then throw(((((((toString(cm) + " ") + toString(cl)) + " ") + toString(ci)) + " ") + toString(cn))) | |
337 | + | else co | |
336 | 338 | } | |
337 | 339 | ||
338 | 340 | ||
339 | - | func | |
340 | - | let | |
341 | - | let | |
342 | - | | |
341 | + | func cp (cq,cr,cs,ct) = { | |
342 | + | let cu = H(cs, cq) | |
343 | + | let cv = H(ct, cr) | |
344 | + | ca(cv, cu) | |
343 | 345 | } | |
344 | 346 | ||
345 | 347 | ||
346 | - | func | |
347 | - | let | |
348 | - | let | |
349 | - | let | |
350 | - | let | |
351 | - | let | |
352 | - | let | |
353 | - | let | |
354 | - | let | |
355 | - | [ | |
348 | + | func cw (cs,ct,cx) = { | |
349 | + | let cy = bz | |
350 | + | let cz = bA | |
351 | + | let cA = cp(cy, cz, cs, ct) | |
352 | + | let cc = H(cs, cy) | |
353 | + | let cb = H(ct, cz) | |
354 | + | let cB = H(cx, a) | |
355 | + | let cC = ca(cc, cB) | |
356 | + | let cD = ca(cb, cB) | |
357 | + | [cA, cC, cD] | |
356 | 358 | } | |
357 | 359 | ||
358 | 360 | ||
359 | - | func | |
360 | - | let | |
361 | - | [ | |
361 | + | func cE (cs,ct,cx) = { | |
362 | + | let cF = cw(cs, ct, cx) | |
363 | + | [L(cF[0], a), L(cF[1], a), L(cF[2], a)] | |
362 | 364 | } | |
363 | 365 | ||
364 | 366 | ||
365 | - | func | |
366 | - | let | |
367 | + | func cG (cH,aq) = { | |
368 | + | let cI = if ((aq == 0)) | |
367 | 369 | then 0 | |
368 | - | else fraction( | |
369 | - | $Tuple2(( | |
370 | + | else fraction(cH, aq, a) | |
371 | + | $Tuple2((cH - cI), cI) | |
370 | 372 | } | |
371 | 373 | ||
372 | 374 | ||
373 | - | func | |
374 | - | let | |
375 | - | let | |
376 | - | let | |
377 | - | if (( | |
375 | + | func cJ (cK) = { | |
376 | + | let cL = cK[0] | |
377 | + | let cM = cK[1] | |
378 | + | let aU = (cL + cM) | |
379 | + | if ((aU == e)) | |
378 | 380 | then e | |
379 | 381 | else { | |
380 | - | let | |
381 | - | let | |
382 | - | let | |
383 | - | let | |
384 | - | let | |
385 | - | let | |
386 | - | func | |
387 | - | let | |
388 | - | let | |
389 | - | let | |
390 | - | fraction(( | |
382 | + | let aQ = parseIntValue(bf) | |
383 | + | let cN = (aQ * 2) | |
384 | + | let cF = fraction(cL, cM, f) | |
385 | + | let cO = fraction(cF, i, f) | |
386 | + | let cP = fraction(toBigInt(cN), aU, f) | |
387 | + | let cQ = toBigInt((cN - 1)) | |
388 | + | func cR (cS) = { | |
389 | + | let cT = fraction(cS, cS, f) | |
390 | + | let cU = fraction(cT, cS, f) | |
391 | + | let cV = fraction(cU, f, cO) | |
392 | + | fraction((cP + fraction(cV, g, f)), cS, (fraction(cQ, cS, f) + fraction(h, cV, f))) | |
391 | 393 | } | |
392 | 394 | ||
393 | - | func | |
394 | - | then | |
395 | + | func cW (cX,cY) = if (cX._2) | |
396 | + | then cX | |
395 | 397 | else { | |
396 | - | let | |
397 | - | let | |
398 | - | let | |
399 | - | let | |
400 | - | then -( | |
401 | - | else | |
402 | - | if ((f >= | |
403 | - | then $Tuple2( | |
404 | - | else $Tuple2( | |
398 | + | let cS = cX._1 | |
399 | + | let cZ = cR(cS) | |
400 | + | let da = (cZ - value(cS)) | |
401 | + | let db = if ((e > da)) | |
402 | + | then -(da) | |
403 | + | else da | |
404 | + | if ((f >= db)) | |
405 | + | then $Tuple2(cZ, true) | |
406 | + | else $Tuple2(cZ, false) | |
405 | 407 | } | |
406 | 408 | ||
407 | - | let | |
408 | - | let | |
409 | - | let | |
410 | - | let | |
411 | - | let | |
412 | - | func | |
413 | - | then | |
414 | - | else | |
409 | + | let dc = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16] | |
410 | + | let dd = { | |
411 | + | let de = dc | |
412 | + | let df = size(de) | |
413 | + | let dg = $Tuple2(aU, false) | |
414 | + | func dh (di,dj) = if ((dj >= df)) | |
415 | + | then di | |
416 | + | else cW(di, de[dj]) | |
415 | 417 | ||
416 | - | func | |
417 | - | then | |
418 | + | func dk (di,dj) = if ((dj >= df)) | |
419 | + | then di | |
418 | 420 | else throw("List size exceeds 17") | |
419 | 421 | ||
420 | - | | |
422 | + | dk(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dg, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17) | |
421 | 423 | } | |
422 | - | let | |
423 | - | let | |
424 | - | if ( | |
425 | - | then | |
426 | - | else throw(("D calculation error, D = " + toString( | |
424 | + | let cS = dd._1 | |
425 | + | let dl = dd._2 | |
426 | + | if (dl) | |
427 | + | then cS | |
428 | + | else throw(("D calculation error, D = " + toString(cS))) | |
427 | 429 | } | |
428 | 430 | } | |
429 | 431 | ||
430 | 432 | ||
431 | - | func | |
432 | - | let | |
433 | - | let | |
434 | - | let | |
435 | - | let | |
436 | - | let | |
437 | - | let | |
438 | - | let | |
439 | - | if ((toBase58String( | |
433 | + | func dm (dn,do,dp,dq) = { | |
434 | + | let dr = bw | |
435 | + | let ds = toBase58String(value(bx)) | |
436 | + | let dt = toBase58String(value(by)) | |
437 | + | let du = bz | |
438 | + | let dv = bA | |
439 | + | let dw = toString(bv) | |
440 | + | let dx = valueOrErrorMessage(assetInfo(dr), "Wrong LP id").quantity | |
441 | + | if ((toBase58String(dr) != do)) | |
440 | 442 | then throw("Wrong pmt asset") | |
441 | 443 | else { | |
442 | - | let | |
443 | - | let | |
444 | - | let | |
445 | - | let | |
446 | - | let | |
447 | - | let | |
448 | - | let | |
449 | - | let | |
450 | - | let | |
451 | - | let | |
452 | - | let | |
453 | - | let | |
454 | - | let | |
444 | + | let dy = bY(ds) | |
445 | + | let dz = H(dy, du) | |
446 | + | let dA = bY(dt) | |
447 | + | let dB = H(dA, dv) | |
448 | + | let dC = ca(dB, dz) | |
449 | + | let dD = L(dC, a) | |
450 | + | let dE = H(dp, a) | |
451 | + | let dF = H(dx, a) | |
452 | + | let dG = fraction(dz, dE, dF) | |
453 | + | let dH = fraction(dB, dE, dF) | |
454 | + | let dI = O(dG, du, FLOOR) | |
455 | + | let dJ = O(dH, dv, FLOOR) | |
456 | + | let dK = if ((dn == "")) | |
455 | 457 | then nil | |
456 | - | else [ScriptTransfer( | |
458 | + | else [ScriptTransfer(dq, dI, if ((ds == "WAVES")) | |
457 | 459 | then unit | |
458 | - | else fromBase58String( | |
460 | + | else fromBase58String(ds)), ScriptTransfer(dq, dJ, if ((dt == "WAVES")) | |
459 | 461 | then unit | |
460 | - | else fromBase58String( | |
461 | - | $Tuple10( | |
462 | + | else fromBase58String(dt)), StringEntry(ai(toString(dq), dn), bU(dI, dJ, dp, dD, height, lastBlock.timestamp)), IntegerEntry(ab(), dD), IntegerEntry(ac(height, lastBlock.timestamp), dD)] | |
463 | + | $Tuple10(dI, dJ, ds, dt, dy, dA, dx, dC, dw, dK) | |
462 | 464 | } | |
463 | 465 | } | |
464 | 466 | ||
465 | 467 | ||
466 | - | func dK (dm,cg,dL,dM,dN,dO,dp,dP,dQ,dR,dS,dT,dU) = { | |
467 | - | let dq = bx | |
468 | - | let dV = toBase58String(value(by)) | |
469 | - | let dW = toBase58String(value(bz)) | |
470 | - | let dX = bA | |
468 | + | func dL (dn,ch,dM,dN,dO,dP,dq,dQ,dR,dS,dT,dU,dV) = { | |
469 | + | let dr = bw | |
470 | + | let dW = toBase58String(value(bx)) | |
471 | + | let dX = toBase58String(value(by)) | |
471 | 472 | let dY = bB | |
472 | - | let dv = toString(bw) | |
473 | - | let dZ = valueOrErrorMessage(assetInfo(dq), "Wr lp as").quantity | |
474 | - | let dx = if (dP) | |
475 | - | then bX(dV) | |
476 | - | else if (if (dR) | |
477 | - | then (dU == dV) | |
473 | + | let dZ = bC | |
474 | + | let ea = bz | |
475 | + | let eb = bA | |
476 | + | let dw = toString(bv) | |
477 | + | let ec = valueOrErrorMessage(assetInfo(dr), "Wr lp as").quantity | |
478 | + | let dy = if (dQ) | |
479 | + | then bY(dW) | |
480 | + | else if (if (dS) | |
481 | + | then (dV == dW) | |
478 | 482 | else false) | |
479 | - | then ( | |
480 | - | else if ( | |
481 | - | then | |
482 | - | else ( | |
483 | - | let | |
484 | - | then | |
485 | - | else if (if ( | |
486 | - | then ( | |
483 | + | then (bY(dW) - dU) | |
484 | + | else if (dS) | |
485 | + | then bY(dW) | |
486 | + | else (bY(dW) - dM) | |
487 | + | let dA = if (dQ) | |
488 | + | then bY(dX) | |
489 | + | else if (if (dS) | |
490 | + | then (dV == dX) | |
487 | 491 | else false) | |
488 | - | then ( | |
489 | - | else if ( | |
490 | - | then | |
491 | - | else ( | |
492 | - | let | |
493 | - | let | |
494 | - | let | |
495 | - | let | |
496 | - | let | |
497 | - | let | |
498 | - | let | |
492 | + | then (bY(dX) - dU) | |
493 | + | else if (dS) | |
494 | + | then bY(dX) | |
495 | + | else (bY(dX) - dO) | |
496 | + | let ed = H(dM, ea) | |
497 | + | let ee = H(dO, eb) | |
498 | + | let ef = ca(ee, ed) | |
499 | + | let dz = H(dy, ea) | |
500 | + | let dB = H(dA, eb) | |
501 | + | let cm = cJ([dz, dB]) | |
502 | + | let eg = if ((ec == 0)) | |
499 | 503 | then { | |
500 | - | let | |
501 | - | let | |
504 | + | let cl = cJ([(dz + ed), (dB + ee)]) | |
505 | + | let eh = if ((cl > cm)) | |
502 | 506 | then true | |
503 | 507 | else throw("D1 should be greater than D0") | |
504 | - | if (( | |
508 | + | if ((eh == eh)) | |
505 | 509 | then { | |
506 | - | let | |
507 | - | let | |
508 | - | let | |
509 | - | $Tuple5( | |
510 | + | let dC = d | |
511 | + | let ei = d | |
512 | + | let cB = cl | |
513 | + | $Tuple5(L(cB, a), L(ed, ea), L(ee, eb), ca((dB + ee), (dz + ed)), ei) | |
510 | 514 | } | |
511 | 515 | else throw("Strict value is not equal to itself.") | |
512 | 516 | } | |
513 | 517 | else { | |
514 | - | let | |
515 | - | let | |
516 | - | let | |
517 | - | if (if (if ( | |
518 | - | then ( | |
518 | + | let dC = ca(dB, dz) | |
519 | + | let ej = fraction(W((dC - ef)), c, dC) | |
520 | + | let ei = H(ch, a) | |
521 | + | if (if (if (dT) | |
522 | + | then (dC != d) | |
519 | 523 | else false) | |
520 | - | then ( | |
524 | + | then (ej > ei) | |
521 | 525 | else false) | |
522 | - | then throw(((("Price slippage " + toString( | |
526 | + | then throw(((("Price slippage " + toString(ej)) + " > ") + toString(ei))) | |
523 | 527 | else { | |
524 | - | let | |
525 | - | let | |
526 | - | let | |
527 | - | let | |
528 | - | then $Tuple2( | |
529 | - | else $Tuple2( | |
530 | - | let | |
531 | - | let | |
532 | - | let | |
533 | - | let | |
528 | + | let ek = H(ec, a) | |
529 | + | let el = fraction(ed, cd(dB, dz, CEILING), c, CEILING) | |
530 | + | let em = fraction(ee, c, cd(dB, dz, FLOOR), CEILING) | |
531 | + | let en = if ((el > ee)) | |
532 | + | then $Tuple2(em, ee) | |
533 | + | else $Tuple2(ed, el) | |
534 | + | let eo = en._1 | |
535 | + | let ep = en._2 | |
536 | + | let cl = cJ([(dz + eo), (dB + ep)]) | |
537 | + | let eh = if ((cl > cm)) | |
534 | 538 | then true | |
535 | 539 | else throw("D1 should be greater than D0") | |
536 | - | if (( | |
540 | + | if ((eh == eh)) | |
537 | 541 | then { | |
538 | - | let | |
539 | - | $Tuple5( | |
542 | + | let cB = fraction(ek, (cl - cm), cm) | |
543 | + | $Tuple5(O(cB, a, FLOOR), O(eo, ea, CEILING), O(ep, eb, CEILING), dC, ei) | |
540 | 544 | } | |
541 | 545 | else throw("Strict value is not equal to itself.") | |
542 | 546 | } | |
543 | 547 | } | |
544 | - | let | |
545 | - | let | |
546 | - | let | |
547 | - | let | |
548 | - | let | |
549 | - | if ((0 >= | |
548 | + | let eq = eg._1 | |
549 | + | let er = eg._2 | |
550 | + | let es = eg._3 | |
551 | + | let dD = L(eg._4, a) | |
552 | + | let et = L(eg._5, a) | |
553 | + | if ((0 >= eq)) | |
550 | 554 | then throw("LP <= 0") | |
551 | 555 | else { | |
552 | - | let | |
556 | + | let eu = if (!(dR)) | |
553 | 557 | then 0 | |
554 | - | else | |
555 | - | let | |
556 | - | let | |
557 | - | let | |
558 | - | then ( | |
558 | + | else eq | |
559 | + | let ev = (dM - er) | |
560 | + | let ew = (dO - es) | |
561 | + | let ex = if (if (dS) | |
562 | + | then (dV == dW) | |
559 | 563 | else false) | |
560 | - | then $Tuple2( | |
561 | - | else if (if ( | |
562 | - | then ( | |
564 | + | then $Tuple2(dU, 0) | |
565 | + | else if (if (dS) | |
566 | + | then (dV == dX) | |
563 | 567 | else false) | |
564 | - | then $Tuple2(0, | |
565 | - | else $Tuple2( | |
566 | - | let | |
567 | - | let | |
568 | - | let | |
569 | - | $Tuple13( | |
568 | + | then $Tuple2(0, dU) | |
569 | + | else $Tuple2(er, es) | |
570 | + | let ey = ex._1 | |
571 | + | let ez = ex._2 | |
572 | + | let eA = [IntegerEntry(ab(), dD), IntegerEntry(ac(height, lastBlock.timestamp), dD), StringEntry(af(dq, dn), bJ(ey, ez, eu, dD, ch, et, height, lastBlock.timestamp, ev, ew))] | |
573 | + | $Tuple13(eq, eu, dD, dy, dA, ec, dr, dw, eA, ev, ew, dN, dP) | |
570 | 574 | } | |
571 | 575 | } | |
572 | 576 | ||
573 | 577 | ||
574 | - | func | |
575 | - | let | |
576 | - | let | |
578 | + | func eB (cK,cY,eC) = { | |
579 | + | let eD = g | |
580 | + | let eE = cK[if ((cY == 0)) | |
577 | 581 | then 1 | |
578 | 582 | else 0] | |
579 | - | let | |
580 | - | let | |
581 | - | let | |
582 | - | let | |
583 | - | let | |
584 | - | let | |
585 | - | func | |
586 | - | let | |
587 | - | let | |
588 | - | let | |
589 | - | if (( | |
590 | - | then | |
583 | + | let eF = parseBigIntValue(l) | |
584 | + | let aQ = (parseBigIntValue(bf) * eF) | |
585 | + | let aU = eE | |
586 | + | let cN = (aQ * eD) | |
587 | + | let eG = (((((eC * eC) / (eE * eD)) * eC) * eF) / (cN * eD)) | |
588 | + | let eH = ((aU + ((eC * eF) / cN)) - eC) | |
589 | + | func cW (cX,eI) = { | |
590 | + | let eJ = cX | |
591 | + | let eK = eJ._1 | |
592 | + | let dl = eJ._2 | |
593 | + | if ((dl != unit)) | |
594 | + | then cX | |
591 | 595 | else { | |
592 | - | let | |
593 | - | let | |
594 | - | if ((f >= | |
595 | - | then $Tuple2( | |
596 | - | else $Tuple2( | |
596 | + | let eL = (((eK * eK) + eG) / ((g * eK) + eH)) | |
597 | + | let eM = X((eL - value(eK))) | |
598 | + | if ((f >= eM)) | |
599 | + | then $Tuple2(eL, eI) | |
600 | + | else $Tuple2(eL, unit) | |
597 | 601 | } | |
598 | 602 | } | |
599 | 603 | ||
600 | - | let | |
601 | - | let | |
602 | - | let | |
603 | - | let | |
604 | - | let | |
605 | - | func | |
606 | - | then | |
607 | - | else | |
604 | + | let dc = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] | |
605 | + | let eN = { | |
606 | + | let de = dc | |
607 | + | let df = size(de) | |
608 | + | let dg = $Tuple2(eC, unit) | |
609 | + | func dh (di,dj) = if ((dj >= df)) | |
610 | + | then di | |
611 | + | else cW(di, de[dj]) | |
608 | 612 | ||
609 | - | func | |
610 | - | then | |
613 | + | func dk (di,dj) = if ((dj >= df)) | |
614 | + | then di | |
611 | 615 | else throw("List size exceeds 15") | |
612 | 616 | ||
613 | - | | |
617 | + | dk(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dg, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
614 | 618 | } | |
615 | - | let | |
616 | - | let | |
617 | - | if (( | |
618 | - | then | |
619 | - | else throw(("Y calculation error, Y = " + toString( | |
619 | + | let eK = eN._1 | |
620 | + | let dl = eN._2 | |
621 | + | if ((dl != unit)) | |
622 | + | then eK | |
623 | + | else throw(("Y calculation error, Y = " + toString(eK))) | |
620 | 624 | } | |
621 | 625 | ||
622 | 626 | ||
623 | - | func | |
624 | - | let | |
625 | - | if (( | |
627 | + | func eO (eP,eQ,eR) = { | |
628 | + | let eS = fraction(cJ([K(eP, toBigInt(bz)), K(eQ, toBigInt(bA))]), c, eR) | |
629 | + | if ((eR == e)) | |
626 | 630 | then e | |
627 | - | else | |
631 | + | else eS | |
628 | 632 | } | |
629 | 633 | ||
630 | 634 | ||
631 | - | func | |
632 | - | let | |
633 | - | let | |
634 | - | let | |
635 | - | let | |
636 | - | | |
635 | + | func eT (eU,eV,eW) = { | |
636 | + | let eX = (toBigInt(bY(bp(bx))) - eU) | |
637 | + | let eY = (toBigInt(bY(bp(by))) - eV) | |
638 | + | let eZ = (toBigInt(value(assetInfo(bw)).quantity) - eW) | |
639 | + | let fa = eO(eX, eY, eZ) | |
640 | + | fa | |
637 | 641 | } | |
638 | 642 | ||
639 | 643 | ||
640 | - | func | |
641 | - | let | |
642 | - | let | |
643 | - | let | |
644 | - | let | |
645 | - | let | |
646 | - | $Tuple2( | |
644 | + | func fb (fc,fd,eW) = { | |
645 | + | let eX = (bY(bp(bx)) + fc) | |
646 | + | let eY = (bY(bp(by)) + fd) | |
647 | + | let eZ = (value(assetInfo(bw)).quantity + eW) | |
648 | + | let eS = eO(toBigInt(eX), toBigInt(eY), toBigInt(eZ)) | |
649 | + | let fe = [IntegerEntry(as, height), StringEntry(ar, toString(eS))] | |
650 | + | $Tuple2(fe, eS) | |
647 | 651 | } | |
648 | 652 | ||
649 | 653 | ||
650 | - | func | |
654 | + | func ff (fg,eS) = if ((eS >= fg)) | |
651 | 655 | then true | |
652 | - | else | |
656 | + | else aZ("updated DLp lower than current DLp") | |
653 | 657 | ||
654 | 658 | ||
655 | - | func | |
656 | - | let | |
657 | - | let | |
658 | - | let | |
659 | - | let | |
660 | - | let | |
661 | - | then $Tuple2( | |
662 | - | else $Tuple2(-( | |
663 | - | let | |
664 | - | let | |
665 | - | if (if (if ( | |
659 | + | func fh (fi) = { | |
660 | + | let eX = bY(bp(bx)) | |
661 | + | let eY = bY(bp(by)) | |
662 | + | let fj = fi.amount | |
663 | + | let fk = fraction(fi.amount, fi.price, a, FLOOR) | |
664 | + | let fl = if ((fi.orderType == Buy)) | |
665 | + | then $Tuple2(fj, -(fk)) | |
666 | + | else $Tuple2(-(fj), fk) | |
667 | + | let fc = fl._1 | |
668 | + | let fd = fl._2 | |
669 | + | if (if (if (bg()) | |
666 | 670 | then true | |
667 | - | else ( | |
671 | + | else (bv == r)) | |
668 | 672 | then true | |
669 | - | else ( | |
673 | + | else (bv == s)) | |
670 | 674 | then throw("Admin blocked") | |
671 | - | else if (if (( | |
675 | + | else if (if ((fi.assetPair.amountAsset != bx)) | |
672 | 676 | then true | |
673 | - | else ( | |
677 | + | else (fi.assetPair.priceAsset != by)) | |
674 | 678 | then throw("Wr assets") | |
675 | 679 | else { | |
676 | - | let | |
677 | - | let | |
678 | - | let | |
679 | - | let | |
680 | - | let | |
681 | - | let | |
682 | - | $Tuple2( | |
680 | + | let fm = parseBigIntValue(valueOrElse(getString(this, ar), "0")) | |
681 | + | let fn = fb(fc, fd, 0) | |
682 | + | let fo = fn._1 | |
683 | + | let fp = fn._2 | |
684 | + | let fq = (fp >= fm) | |
685 | + | let fr = makeString(["dLp=", toString(fm), " dLpNew=", toString(fp), " amountAssetBalance=", toString(eX), " priceAssetBalance=", toString(eY), " amountAssetBalanceDelta=", toString(fc), " priceAssetBalanceDelta=", toString(fd), " height=", toString(height)], "") | |
686 | + | $Tuple2(fq, fr) | |
683 | 687 | } | |
684 | 688 | } | |
685 | 689 | ||
686 | 690 | ||
687 | - | func | |
691 | + | func fs (cY) = if ((size(cY.payments) != 1)) | |
688 | 692 | then throw("1 pmnt exp") | |
689 | 693 | else { | |
690 | - | let | |
691 | - | let | |
692 | - | let | |
693 | - | let | |
694 | - | let | |
695 | - | let | |
696 | - | let | |
697 | - | let | |
698 | - | if (if ( | |
694 | + | let ft = value(cY.payments[0]) | |
695 | + | let do = value(ft.assetId) | |
696 | + | let dU = ft.amount | |
697 | + | let eg = dm(toBase58String(cY.transactionId), toBase58String(do), dU, cY.caller) | |
698 | + | let dI = eg._1 | |
699 | + | let dJ = eg._2 | |
700 | + | let dw = parseIntValue(eg._9) | |
701 | + | let dK = eg._10 | |
702 | + | if (if (bg()) | |
699 | 703 | then true | |
700 | - | else ( | |
701 | - | then throw(("Admin blocked: " + toString( | |
702 | - | else $Tuple5( | |
704 | + | else (dw == s)) | |
705 | + | then throw(("Admin blocked: " + toString(dw))) | |
706 | + | else $Tuple5(dI, dJ, dU, do, dK) | |
703 | 707 | } | |
704 | 708 | ||
705 | 709 | ||
706 | - | func | |
707 | - | let | |
708 | - | let | |
709 | - | if (if (if ( | |
710 | + | func fu (fv,ah,fw,fx,ch,dR,dS,dT,dU,dV) = { | |
711 | + | let eg = dL(ah, ch, value(fw).amount, value(fw).assetId, value(fx).amount, value(fx).assetId, fv, (ah == ""), dR, dS, dT, dU, dV) | |
712 | + | let dw = parseIntValue(eg._8) | |
713 | + | if (if (if (bg()) | |
710 | 714 | then true | |
711 | - | else ( | |
715 | + | else (dw == q)) | |
712 | 716 | then true | |
713 | - | else ( | |
714 | - | then throw(("Blocked:" + toString( | |
715 | - | else | |
717 | + | else (dw == s)) | |
718 | + | then throw(("Blocked:" + toString(dw))) | |
719 | + | else eg | |
716 | 720 | } | |
717 | 721 | ||
718 | 722 | ||
719 | - | func | |
720 | - | let | |
721 | - | let | |
722 | - | let | |
723 | - | let | |
724 | - | let | |
725 | - | let | |
726 | - | let | |
723 | + | func fy (fz,do,dq,ah,fA) = { | |
724 | + | let ds = toBase58String(value(bx)) | |
725 | + | let dt = toBase58String(value(by)) | |
726 | + | let dr = bw | |
727 | + | let ea = bz | |
728 | + | let eb = bA | |
729 | + | let eZ = toBigInt(valueOrErrorMessage(assetInfo(dr), "invalid lp asset").quantity) | |
730 | + | let fB = if ((eZ > e)) | |
727 | 731 | then true | |
728 | 732 | else throw("initial deposit requires all coins") | |
729 | - | if (( | |
733 | + | if ((fB == fB)) | |
730 | 734 | then { | |
731 | - | let | |
732 | - | let | |
733 | - | let | |
734 | - | then $Tuple2( | |
735 | - | else if (( | |
736 | - | then if (( | |
735 | + | let dy = bY(ds) | |
736 | + | let dA = bY(dt) | |
737 | + | let fC = if ((ah == "")) | |
738 | + | then $Tuple2(dy, dA) | |
739 | + | else if ((do == ds)) | |
740 | + | then if ((fz > dy)) | |
737 | 741 | then throw("invalid payment amount") | |
738 | - | else $Tuple2(( | |
739 | - | else if (( | |
740 | - | then if (( | |
742 | + | else $Tuple2((dy - fz), dA) | |
743 | + | else if ((do == dt)) | |
744 | + | then if ((fz > dA)) | |
741 | 745 | then throw("invalid payment amount") | |
742 | - | else $Tuple2( | |
746 | + | else $Tuple2(dy, (dA - fz)) | |
743 | 747 | else throw("wrong pmtAssetId") | |
744 | - | let fA = fz._1 | |
745 | - | let fB = fz._2 | |
746 | - | let fC = if ((dn == dr)) | |
747 | - | then $Tuple2(fw, 0) | |
748 | - | else if ((dn == ds)) | |
749 | - | then $Tuple2(0, fw) | |
750 | - | else throw("invalid payment") | |
751 | 748 | let fD = fC._1 | |
752 | 749 | let fE = fC._2 | |
753 | - | let fF = if (fx) | |
754 | - | then $Tuple3(cF(fD, bd)._1, cF(fE, bd)._1, cF(fw, bd)._2) | |
755 | - | else $Tuple3(fD, fE, 0) | |
750 | + | let fF = if ((do == ds)) | |
751 | + | then $Tuple2(fz, 0) | |
752 | + | else if ((do == dt)) | |
753 | + | then $Tuple2(0, fz) | |
754 | + | else throw("invalid payment") | |
756 | 755 | let fG = fF._1 | |
757 | 756 | let fH = fF._2 | |
758 | - | let cH = fF._3 | |
759 | - | let fI = (fA + fG) | |
760 | - | let fJ = (fB + fH) | |
761 | - | let cl = cI([I(fA, bA), I(fB, bB)]) | |
762 | - | let ck = cI([I(fI, bA), I(fJ, bB)]) | |
763 | - | let ee = if ((ck > cl)) | |
757 | + | let fI = if (fA) | |
758 | + | then $Tuple3(cG(fG, bc)._1, cG(fH, bc)._1, cG(fz, bc)._2) | |
759 | + | else $Tuple3(fG, fH, 0) | |
760 | + | let fJ = fI._1 | |
761 | + | let fK = fI._2 | |
762 | + | let cI = fI._3 | |
763 | + | let fL = (fD + fJ) | |
764 | + | let fM = (fE + fK) | |
765 | + | let cm = cJ([H(fD, bz), H(fE, bA)]) | |
766 | + | let cl = cJ([H(fL, bz), H(fM, bA)]) | |
767 | + | let eh = if ((cl > cm)) | |
764 | 768 | then true | |
765 | 769 | else throw() | |
766 | - | if (( | |
770 | + | if ((eh == eh)) | |
767 | 771 | then { | |
768 | - | let | |
769 | - | let | |
770 | - | let | |
771 | - | let | |
772 | - | let | |
773 | - | let | |
774 | - | let | |
775 | - | let | |
776 | - | $Tuple4(toInt( | |
772 | + | let fN = fraction(eZ, (cl - cm), cm, FLOOR) | |
773 | + | let dD = L(ca(H(fM, eb), H(fL, ea)), a) | |
774 | + | let eA = [IntegerEntry(ab(), dD), IntegerEntry(ac(height, lastBlock.timestamp), dD), StringEntry(af(dq, ah), bJ(fG, fH, toInt(fN), dD, 0, 0, height, lastBlock.timestamp, 0, 0))] | |
775 | + | let fO = fraction(fE, a, fD) | |
776 | + | let fP = fraction(fz, a, (fO + a)) | |
777 | + | let fQ = (fz - fP) | |
778 | + | let fR = fraction(eZ, toBigInt(fQ), toBigInt(fE)) | |
779 | + | let fS = toInt(fraction((fN - fR), b, fR)) | |
780 | + | $Tuple4(toInt(fN), eA, cI, fS) | |
777 | 781 | } | |
778 | 782 | else throw("Strict value is not equal to itself.") | |
779 | 783 | } | |
780 | 784 | else throw("Strict value is not equal to itself.") | |
781 | 785 | } | |
782 | 786 | ||
783 | 787 | ||
784 | - | func | |
785 | - | let | |
786 | - | let | |
787 | - | let | |
788 | - | let | |
789 | - | let | |
790 | - | let | |
791 | - | let | |
792 | - | then | |
793 | - | else | |
794 | - | let | |
795 | - | let | |
796 | - | let | |
797 | - | let | |
798 | - | if (( | |
788 | + | func fT (fU,fV,fW,fv,fX,fY) = { | |
789 | + | let dr = toBase58String(value(bw)) | |
790 | + | let ds = toBase58String(value(bx)) | |
791 | + | let dt = toBase58String(value(by)) | |
792 | + | let fZ = bz | |
793 | + | let ga = bA | |
794 | + | let gb = bv | |
795 | + | let dq = if ((fv == bI)) | |
796 | + | then fX | |
797 | + | else fv | |
798 | + | let ft = value(fW[0]) | |
799 | + | let do = value(ft.assetId) | |
800 | + | let dU = ft.amount | |
801 | + | let fa = eT(e, e, e) | |
802 | + | if ((fa == fa)) | |
799 | 803 | then { | |
800 | - | let | |
801 | - | if (( | |
804 | + | let dn = toBase58String(fY) | |
805 | + | if ((dr != toBase58String(do))) | |
802 | 806 | then throw("Wrong LP") | |
803 | 807 | else { | |
804 | - | let | |
805 | - | let | |
806 | - | let | |
807 | - | let | |
808 | - | if ($isInstanceOf( | |
809 | - | then | |
810 | - | else throw(($getType( | |
808 | + | let dy = bY(ds) | |
809 | + | let dA = bY(dt) | |
810 | + | let gc = { | |
811 | + | let bd = invoke(this, "getOneTknV2READONLY", [fU, dU], nil) | |
812 | + | if ($isInstanceOf(bd, "(Int, Int)")) | |
813 | + | then bd | |
814 | + | else throw(($getType(bd) + " couldn't be cast to (Int, Int)")) | |
811 | 815 | } | |
812 | - | if (( | |
816 | + | if ((gc == gc)) | |
813 | 817 | then { | |
814 | - | let | |
815 | - | let | |
816 | - | let | |
817 | - | then ( | |
818 | + | let cI = gc._2 | |
819 | + | let gd = gc._1 | |
820 | + | let ge = if (if ((fV > 0)) | |
821 | + | then (fV > gd) | |
818 | 822 | else false) | |
819 | - | then | |
820 | - | else | |
821 | - | let | |
822 | - | then $Tuple4( | |
823 | - | else if (( | |
824 | - | then $Tuple4(0, | |
823 | + | then aZ(makeString(["amount to receive is less than ", toString(fV)], "")) | |
824 | + | else gd | |
825 | + | let gf = if ((fU == ds)) | |
826 | + | then $Tuple4(ge, 0, ((dy - ge) - cI), dA) | |
827 | + | else if ((fU == dt)) | |
828 | + | then $Tuple4(0, ge, dy, ((dA - ge) - cI)) | |
825 | 829 | else throw("invalid out asset id") | |
826 | - | let | |
827 | - | let | |
828 | - | let | |
829 | - | let | |
830 | - | let | |
831 | - | let | |
832 | - | let | |
830 | + | let gg = gf._1 | |
831 | + | let gh = gf._2 | |
832 | + | let fL = gf._3 | |
833 | + | let fM = gf._4 | |
834 | + | let gi = ca(H(fM, ga), H(fL, fZ)) | |
835 | + | let gj = L(gi, a) | |
836 | + | let gk = if ((fU == "WAVES")) | |
833 | 837 | then unit | |
834 | - | else fromBase58String( | |
835 | - | let | |
836 | - | then [ScriptTransfer( | |
838 | + | else fromBase58String(fU) | |
839 | + | let gl = if ((cI > 0)) | |
840 | + | then [ScriptTransfer(bi, cI, gk)] | |
837 | 841 | else nil | |
838 | - | let | |
839 | - | if (( | |
842 | + | let dK = ([ScriptTransfer(dq, ge, gk), StringEntry(ai(toString(dq), dn), bU(gg, gh, dU, gj, height, lastBlock.timestamp)), IntegerEntry(ab(), gj), IntegerEntry(ac(height, lastBlock.timestamp), gj)] ++ gl) | |
843 | + | if ((dK == dK)) | |
840 | 844 | then { | |
841 | - | let | |
842 | - | if (( | |
845 | + | let gm = invoke(aT, "burn", [dU], [AttachedPayment(do, dU)]) | |
846 | + | if ((gm == gm)) | |
843 | 847 | then { | |
844 | - | let | |
845 | - | let | |
848 | + | let gn = { | |
849 | + | let go = if ((this == bi)) | |
846 | 850 | then 0 | |
847 | - | else | |
848 | - | let | |
851 | + | else cI | |
852 | + | let gp = if ((bn(fU) == bx)) | |
849 | 853 | then true | |
850 | 854 | else false | |
851 | - | if ( | |
852 | - | then $Tuple2(-(( | |
853 | - | else $Tuple2(0, -(( | |
855 | + | if (gp) | |
856 | + | then $Tuple2(-((gd + go)), 0) | |
857 | + | else $Tuple2(0, -((gd + go))) | |
854 | 858 | } | |
855 | - | let | |
856 | - | let | |
857 | - | let | |
858 | - | let | |
859 | - | let | |
860 | - | let | |
861 | - | if (( | |
862 | - | then $Tuple2(( | |
859 | + | let fc = gn._1 | |
860 | + | let fd = gn._2 | |
861 | + | let gq = fb(fc, fd, 0) | |
862 | + | let gr = gq._1 | |
863 | + | let eS = gq._2 | |
864 | + | let gs = ff(fa, eS) | |
865 | + | if ((gs == gs)) | |
866 | + | then $Tuple2((dK ++ gr), ge) | |
863 | 867 | else throw("Strict value is not equal to itself.") | |
864 | 868 | } | |
865 | 869 | else throw("Strict value is not equal to itself.") | |
866 | 870 | } | |
867 | 871 | else throw("Strict value is not equal to itself.") | |
868 | 872 | } | |
869 | 873 | else throw("Strict value is not equal to itself.") | |
870 | 874 | } | |
871 | 875 | } | |
872 | 876 | else throw("Strict value is not equal to itself.") | |
873 | 877 | } | |
874 | 878 | ||
875 | 879 | ||
876 | - | func | |
877 | - | let | |
878 | - | let | |
879 | - | if ($isInstanceOf( | |
880 | + | func gt () = { | |
881 | + | let gu = aR() | |
882 | + | let aP = getString(gu, Z()) | |
883 | + | if ($isInstanceOf(aP, "String")) | |
880 | 884 | then { | |
881 | - | let | |
882 | - | fromBase58String( | |
885 | + | let aU = aP | |
886 | + | fromBase58String(aU) | |
883 | 887 | } | |
884 | - | else if ($isInstanceOf( | |
888 | + | else if ($isInstanceOf(aP, "Unit")) | |
885 | 889 | then unit | |
886 | 890 | else throw("Match error") | |
887 | 891 | } | |
888 | 892 | ||
889 | 893 | ||
890 | - | let | |
894 | + | let gv = throw("Permission denied") | |
891 | 895 | ||
892 | - | func | |
893 | - | let | |
894 | - | if ($isInstanceOf( | |
896 | + | func gw (cY) = { | |
897 | + | let aP = gt() | |
898 | + | if ($isInstanceOf(aP, "ByteVector")) | |
895 | 899 | then { | |
896 | - | let | |
897 | - | ( | |
900 | + | let gx = aP | |
901 | + | (cY.callerPublicKey == gx) | |
898 | 902 | } | |
899 | - | else if ($isInstanceOf( | |
900 | - | then ( | |
903 | + | else if ($isInstanceOf(aP, "Unit")) | |
904 | + | then (cY.caller == this) | |
901 | 905 | else throw("Match error") | |
902 | 906 | } | |
903 | 907 | ||
904 | 908 | ||
905 | - | func | |
906 | - | let | |
907 | - | if ($isInstanceOf( | |
909 | + | func gy (cY) = { | |
910 | + | let aP = gt() | |
911 | + | if ($isInstanceOf(aP, "ByteVector")) | |
908 | 912 | then { | |
909 | - | let | |
910 | - | if (( | |
913 | + | let gx = aP | |
914 | + | if ((cY.callerPublicKey == gx)) | |
911 | 915 | then true | |
912 | - | else | |
916 | + | else gv | |
913 | 917 | } | |
914 | - | else if ($isInstanceOf( | |
915 | - | then if (( | |
918 | + | else if ($isInstanceOf(aP, "Unit")) | |
919 | + | then if ((cY.caller == this)) | |
916 | 920 | then true | |
917 | - | else | |
921 | + | else gv | |
918 | 922 | else throw("Match error") | |
919 | 923 | } | |
920 | 924 | ||
921 | 925 | ||
922 | - | func | |
923 | - | let | |
924 | - | let | |
925 | - | let | |
926 | - | let | |
927 | - | let | |
928 | - | let | |
929 | - | let | |
930 | - | then [(toBigInt( | |
931 | - | else [(toBigInt( | |
932 | - | let | |
933 | - | let | |
934 | - | let | |
935 | - | let | |
936 | - | let | |
937 | - | func | |
938 | - | let | |
939 | - | let | |
940 | - | let | |
941 | - | if (( | |
942 | - | then | |
926 | + | func gz (gA,eC,gB) = { | |
927 | + | let br = bj() | |
928 | + | let ds = br[w] | |
929 | + | let dt = br[x] | |
930 | + | let eD = g | |
931 | + | let eF = parseBigIntValue(l) | |
932 | + | let aQ = (parseBigIntValue(bf) * eF) | |
933 | + | let cK = if ((gA == false)) | |
934 | + | then [(toBigInt(bY(ds)) + gB), toBigInt(bY(dt))] | |
935 | + | else [(toBigInt(bY(dt)) + gB), toBigInt(bY(ds))] | |
936 | + | let eE = cK[0] | |
937 | + | let aU = eE | |
938 | + | let cN = (aQ * eD) | |
939 | + | let eG = (((((eC * eC) / (eE * eD)) * eC) * eF) / (cN * eD)) | |
940 | + | let eH = ((aU + ((eC * eF) / cN)) - eC) | |
941 | + | func cW (cX,eI) = { | |
942 | + | let gC = cX | |
943 | + | let eK = gC._1 | |
944 | + | let dl = gC._2 | |
945 | + | if ((dl != unit)) | |
946 | + | then cX | |
943 | 947 | else { | |
944 | - | let | |
945 | - | let | |
946 | - | if ((f >= | |
947 | - | then $Tuple2( | |
948 | - | else $Tuple2( | |
948 | + | let eL = (((eK * eK) + eG) / ((g * eK) + eH)) | |
949 | + | let eM = X((eL - value(eK))) | |
950 | + | if ((f >= eM)) | |
951 | + | then $Tuple2(eL, eI) | |
952 | + | else $Tuple2(eL, unit) | |
949 | 953 | } | |
950 | 954 | } | |
951 | 955 | ||
952 | - | let | |
953 | - | let | |
954 | - | let | |
955 | - | let | |
956 | - | let | |
957 | - | func | |
958 | - | then | |
959 | - | else | |
956 | + | let dc = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] | |
957 | + | let gD = { | |
958 | + | let de = dc | |
959 | + | let df = size(de) | |
960 | + | let dg = $Tuple2(eC, unit) | |
961 | + | func dh (di,dj) = if ((dj >= df)) | |
962 | + | then di | |
963 | + | else cW(di, de[dj]) | |
960 | 964 | ||
961 | - | func | |
962 | - | then | |
965 | + | func dk (di,dj) = if ((dj >= df)) | |
966 | + | then di | |
963 | 967 | else throw("List size exceeds 15") | |
964 | 968 | ||
965 | - | | |
969 | + | dk(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dh(dg, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
966 | 970 | } | |
967 | - | let | |
968 | - | let | |
969 | - | if (( | |
970 | - | then | |
971 | - | else throw(("Y calculation error, Y = " + toString( | |
971 | + | let eK = gD._1 | |
972 | + | let dl = gD._2 | |
973 | + | if ((dl != unit)) | |
974 | + | then eK | |
975 | + | else throw(("Y calculation error, Y = " + toString(eK))) | |
972 | 976 | } | |
973 | 977 | ||
974 | 978 | ||
975 | - | func | |
979 | + | func gE () = valueOrElse(getBoolean(aT, aG(toString(this))), false) | |
976 | 980 | ||
977 | 981 | ||
978 | - | @Callable( | |
979 | - | func calculateAmountOutForSwapREADONLY ( | |
980 | - | let | |
982 | + | @Callable(cY) | |
983 | + | func calculateAmountOutForSwapREADONLY (gF,gA,gG) = { | |
984 | + | let gH = if ((gA == false)) | |
981 | 985 | then { | |
982 | - | let | |
983 | - | let | |
984 | - | $Tuple2( | |
986 | + | let gI = aV(this, ak()) | |
987 | + | let gB = (toBigInt(bY(aV(this, aj()))) + toBigInt(gF)) | |
988 | + | $Tuple2(gI, gB) | |
985 | 989 | } | |
986 | 990 | else { | |
987 | - | let | |
988 | - | let | |
989 | - | $Tuple2( | |
991 | + | let gI = aV(this, aj()) | |
992 | + | let gB = (toBigInt(bY(aV(this, ak()))) + toBigInt(gF)) | |
993 | + | $Tuple2(gI, gB) | |
990 | 994 | } | |
991 | - | let | |
992 | - | let | |
993 | - | let | |
994 | - | let | |
995 | - | let | |
996 | - | let | |
997 | - | let | |
998 | - | let | |
999 | - | let | |
1000 | - | let | |
1001 | - | let | |
1002 | - | then [((toBigInt( | |
1003 | - | else [(toBigInt( | |
1004 | - | let | |
1005 | - | let | |
995 | + | let gI = gH._1 | |
996 | + | let gB = gH._2 | |
997 | + | let br = bj() | |
998 | + | let ds = br[w] | |
999 | + | let dt = br[x] | |
1000 | + | let cK = [toBigInt(bY(ds)), toBigInt(bY(dt))] | |
1001 | + | let eC = cJ(cK) | |
1002 | + | let eK = gz(gA, eC, toBigInt(gF)) | |
1003 | + | let gJ = ((toBigInt(bY(gI)) - eK) - toBigInt(1)) | |
1004 | + | let gK = max([0, toInt(gJ)]) | |
1005 | + | let gL = if ((gA == false)) | |
1006 | + | then [((toBigInt(bY(ds)) + toBigInt(gF)) + toBigInt(gG)), (toBigInt(bY(dt)) - gJ)] | |
1007 | + | else [(toBigInt(bY(ds)) - gJ), ((toBigInt(bY(dt)) + toBigInt(gF)) + toBigInt(gG))] | |
1008 | + | let gM = cJ(gL) | |
1009 | + | let eh = if ((gM >= eC)) | |
1006 | 1010 | then true | |
1007 | - | else throw(makeString(["new D is fewer error", toString( | |
1008 | - | if (( | |
1009 | - | then $Tuple2(nil, | |
1011 | + | else throw(makeString(["new D is fewer error", toString(eC), toString(gM)], "__")) | |
1012 | + | if ((eh == eh)) | |
1013 | + | then $Tuple2(nil, gK) | |
1010 | 1014 | else throw("Strict value is not equal to itself.") | |
1011 | 1015 | } | |
1012 | 1016 | ||
1013 | 1017 | ||
1014 | 1018 | ||
1015 | - | @Callable( | |
1016 | - | func calculateAmountOutForSwapAndSendTokens ( | |
1017 | - | let | |
1018 | - | let | |
1019 | - | if ($isInstanceOf( | |
1020 | - | then | |
1021 | - | else throw(($getType( | |
1019 | + | @Callable(cY) | |
1020 | + | func calculateAmountOutForSwapAndSendTokens (gF,gA,gN,gO,gG) = { | |
1021 | + | let gP = { | |
1022 | + | let bd = invoke(aT, "getSwapContractREADONLY", nil, nil) | |
1023 | + | if ($isInstanceOf(bd, "String")) | |
1024 | + | then bd | |
1025 | + | else throw(($getType(bd) + " couldn't be cast to String")) | |
1022 | 1026 | } | |
1023 | - | let | |
1027 | + | let gQ = [if ((value(cY.payments[0]).amount >= gF)) | |
1024 | 1028 | then true | |
1025 | - | else | |
1029 | + | else aZ("Wrong amount"), if ((cY.caller == addressFromStringValue(gP))) | |
1026 | 1030 | then true | |
1027 | - | else | |
1028 | - | if (( | |
1031 | + | else aZ("Permission denied")] | |
1032 | + | if ((gQ == gQ)) | |
1029 | 1033 | then { | |
1030 | - | let | |
1031 | - | let | |
1032 | - | let | |
1034 | + | let ft = value(cY.payments[0]) | |
1035 | + | let gR = bp(ft.assetId) | |
1036 | + | let gS = if ((gA == false)) | |
1033 | 1037 | then { | |
1034 | - | let | |
1035 | - | let | |
1036 | - | $Tuple2( | |
1038 | + | let gI = aV(this, ak()) | |
1039 | + | let gB = (bY(gR) - value(cY.payments[0]).amount) | |
1040 | + | $Tuple2(gI, gB) | |
1037 | 1041 | } | |
1038 | 1042 | else { | |
1039 | - | let | |
1040 | - | let | |
1041 | - | $Tuple2( | |
1043 | + | let gI = aV(this, aj()) | |
1044 | + | let gB = (bY(gR) - value(cY.payments[0]).amount) | |
1045 | + | $Tuple2(gI, gB) | |
1042 | 1046 | } | |
1043 | - | let | |
1044 | - | let | |
1045 | - | let | |
1046 | - | let | |
1047 | - | let | |
1048 | - | let | |
1049 | - | then [(toBigInt( | |
1050 | - | else [toBigInt( | |
1051 | - | let | |
1052 | - | let | |
1053 | - | let | |
1054 | - | let | |
1055 | - | let | |
1047 | + | let gI = gS._1 | |
1048 | + | let gB = gS._2 | |
1049 | + | let br = bj() | |
1050 | + | let ds = br[w] | |
1051 | + | let dt = br[x] | |
1052 | + | let cK = if ((gA == false)) | |
1053 | + | then [(toBigInt(bY(ds)) - toBigInt(value(cY.payments[0]).amount)), toBigInt(bY(dt))] | |
1054 | + | else [toBigInt(bY(ds)), (toBigInt(bY(dt)) - toBigInt(value(cY.payments[0]).amount))] | |
1055 | + | let eC = cJ(cK) | |
1056 | + | let eK = gz(gA, eC, toBigInt(0)) | |
1057 | + | let gJ = ((toBigInt(bY(gI)) - eK) - toBigInt(1)) | |
1058 | + | let gK = max([0, toInt(gJ)]) | |
1059 | + | let gT = if ((gK >= gN)) | |
1056 | 1060 | then true | |
1057 | 1061 | else throw("Exchange result is fewer coins than expected") | |
1058 | - | if (( | |
1062 | + | if ((gT == gT)) | |
1059 | 1063 | then { | |
1060 | - | let | |
1061 | - | then [(toBigInt( | |
1062 | - | else [(toBigInt( | |
1063 | - | let | |
1064 | - | let | |
1064 | + | let gL = if ((gA == false)) | |
1065 | + | then [(toBigInt(bY(ds)) + toBigInt(gG)), (toBigInt(bY(dt)) - gJ)] | |
1066 | + | else [(toBigInt(bY(ds)) - gJ), (toBigInt(bY(dt)) + toBigInt(gG))] | |
1067 | + | let gM = cJ(gL) | |
1068 | + | let eh = if ((gM >= eC)) | |
1065 | 1069 | then true | |
1066 | 1070 | else throw("new D is fewer error") | |
1067 | - | if (( | |
1068 | - | then $Tuple2([ScriptTransfer(addressFromStringValue( | |
1071 | + | if ((eh == eh)) | |
1072 | + | then $Tuple2([ScriptTransfer(addressFromStringValue(gO), gK, bn(gI))], gK) | |
1069 | 1073 | else throw("Strict value is not equal to itself.") | |
1070 | 1074 | } | |
1071 | 1075 | else throw("Strict value is not equal to itself.") | |
1072 | 1076 | } | |
1073 | 1077 | else throw("Strict value is not equal to itself.") | |
1074 | 1078 | } | |
1075 | 1079 | ||
1076 | 1080 | ||
1077 | 1081 | ||
1078 | - | @Callable( | |
1079 | - | func constructor ( | |
1080 | - | let | |
1081 | - | if (( | |
1082 | - | then [StringEntry( | |
1082 | + | @Callable(cY) | |
1083 | + | func constructor (Y) = { | |
1084 | + | let eG = gy(cY) | |
1085 | + | if ((eG == eG)) | |
1086 | + | then [StringEntry(Y(), Y)] | |
1083 | 1087 | else throw("Strict value is not equal to itself.") | |
1084 | 1088 | } | |
1085 | 1089 | ||
1086 | 1090 | ||
1087 | 1091 | ||
1088 | - | @Callable( | |
1089 | - | func put ( | |
1090 | - | let | |
1091 | - | let | |
1092 | - | let | |
1093 | - | if ((0 > | |
1092 | + | @Callable(cY) | |
1093 | + | func put (gU,gV) = { | |
1094 | + | let gW = bD() | |
1095 | + | let gX = valueOrErrorMessage(addressFromString(gW[C]), "Wr st addr") | |
1096 | + | let gY = valueOrErrorMessage(addressFromString(gW[E]), "Wr sl addr") | |
1097 | + | if ((0 > gU)) | |
1094 | 1098 | then throw("Wrong slippage") | |
1095 | - | else if ((size( | |
1099 | + | else if ((size(cY.payments) != 2)) | |
1096 | 1100 | then throw("2 pmnts expd") | |
1097 | 1101 | else { | |
1098 | - | let | |
1099 | - | let | |
1100 | - | let | |
1101 | - | if (( | |
1102 | + | let gZ = toBigInt(value(cY.payments[0]).amount) | |
1103 | + | let ha = toBigInt(value(cY.payments[1]).amount) | |
1104 | + | let eX = (toBigInt(bY(bp(bx))) - gZ) | |
1105 | + | if ((eX == eX)) | |
1102 | 1106 | then { | |
1103 | - | let | |
1104 | - | if (( | |
1107 | + | let eY = (toBigInt(bY(bp(by))) - ha) | |
1108 | + | if ((eY == eY)) | |
1105 | 1109 | then { | |
1106 | - | let | |
1107 | - | if (( | |
1110 | + | let eZ = toBigInt(value(assetInfo(bw)).quantity) | |
1111 | + | if ((eZ == eZ)) | |
1108 | 1112 | then { | |
1109 | - | let | |
1110 | - | if (( | |
1113 | + | let fa = eT(gZ, ha, toBigInt(0)) | |
1114 | + | if ((fa == fa)) | |
1111 | 1115 | then { | |
1112 | - | let | |
1113 | - | let | |
1114 | - | let | |
1115 | - | let | |
1116 | - | let | |
1117 | - | let | |
1118 | - | let | |
1119 | - | let | |
1120 | - | let | |
1121 | - | if (( | |
1116 | + | let hb = fu(toString(cY.caller), toBase58String(cY.transactionId), AttachedPayment(value(cY.payments[0]).assetId, value(cY.payments[0]).amount), cY.payments[1], gU, true, false, true, 0, "") | |
1117 | + | let eu = hb._2 | |
1118 | + | let hc = hb._7 | |
1119 | + | let dK = hb._9 | |
1120 | + | let ev = hb._10 | |
1121 | + | let ew = hb._11 | |
1122 | + | let ds = hb._12 | |
1123 | + | let dt = hb._13 | |
1124 | + | let eg = invoke(aT, "emit", [eu], nil) | |
1125 | + | if ((eg == eg)) | |
1122 | 1126 | then { | |
1123 | - | let | |
1124 | - | let | |
1125 | - | if ($isInstanceOf( | |
1127 | + | let hd = { | |
1128 | + | let aP = eg | |
1129 | + | if ($isInstanceOf(aP, "Address")) | |
1126 | 1130 | then { | |
1127 | - | let | |
1128 | - | invoke( | |
1131 | + | let he = aP | |
1132 | + | invoke(he, "emit", [eu], nil) | |
1129 | 1133 | } | |
1130 | 1134 | else unit | |
1131 | 1135 | } | |
1132 | - | if (( | |
1136 | + | if ((hd == hd)) | |
1133 | 1137 | then { | |
1134 | - | let | |
1135 | - | then invoke( | |
1138 | + | let hf = if ((ev > 0)) | |
1139 | + | then invoke(gY, "put", nil, [AttachedPayment(ds, ev)]) | |
1136 | 1140 | else nil | |
1137 | - | if (( | |
1141 | + | if ((hf == hf)) | |
1138 | 1142 | then { | |
1139 | - | let | |
1140 | - | then invoke( | |
1143 | + | let hg = if ((ew > 0)) | |
1144 | + | then invoke(gY, "put", nil, [AttachedPayment(dt, ew)]) | |
1141 | 1145 | else nil | |
1142 | - | if (( | |
1146 | + | if ((hg == hg)) | |
1143 | 1147 | then { | |
1144 | - | let | |
1148 | + | let hh = if (gV) | |
1145 | 1149 | then { | |
1146 | - | let | |
1147 | - | if (( | |
1150 | + | let hi = invoke(gX, "stake", nil, [AttachedPayment(hc, eu)]) | |
1151 | + | if ((hi == hi)) | |
1148 | 1152 | then nil | |
1149 | 1153 | else throw("Strict value is not equal to itself.") | |
1150 | 1154 | } | |
1151 | - | else [ScriptTransfer( | |
1152 | - | let | |
1153 | - | let | |
1154 | - | let | |
1155 | - | let | |
1155 | + | else [ScriptTransfer(cY.caller, eu, hc)] | |
1156 | + | let hj = fb(0, 0, 0) | |
1157 | + | let gr = hj._1 | |
1158 | + | let eS = hj._2 | |
1159 | + | let hk = if ((eS >= fa)) | |
1156 | 1160 | then true | |
1157 | - | else | |
1158 | - | if (( | |
1161 | + | else aZ(makeString(["updated DLp lower than current DLp", toString(eX), toString(eY), toString(eZ), toString(fa), toString(eS), toString(ev), toString(ew)], " ")) | |
1162 | + | if ((hk == hk)) | |
1159 | 1163 | then { | |
1160 | - | let | |
1161 | - | if (( | |
1162 | - | then (( | |
1164 | + | let hl = value(assetInfo(bw)).quantity | |
1165 | + | if ((hl == hl)) | |
1166 | + | then ((dK ++ hh) ++ gr) | |
1163 | 1167 | else throw("Strict value is not equal to itself.") | |
1164 | 1168 | } | |
1165 | 1169 | else throw("Strict value is not equal to itself.") | |
1166 | 1170 | } | |
1167 | 1171 | else throw("Strict value is not equal to itself.") | |
1168 | 1172 | } | |
1169 | 1173 | else throw("Strict value is not equal to itself.") | |
1170 | 1174 | } | |
1171 | 1175 | else throw("Strict value is not equal to itself.") | |
1172 | 1176 | } | |
1173 | 1177 | else throw("Strict value is not equal to itself.") | |
1174 | 1178 | } | |
1175 | 1179 | else throw("Strict value is not equal to itself.") | |
1176 | 1180 | } | |
1177 | 1181 | else throw("Strict value is not equal to itself.") | |
1178 | 1182 | } | |
1179 | 1183 | else throw("Strict value is not equal to itself.") | |
1180 | 1184 | } | |
1181 | 1185 | else throw("Strict value is not equal to itself.") | |
1182 | 1186 | } | |
1183 | 1187 | } | |
1184 | 1188 | ||
1185 | 1189 | ||
1186 | 1190 | ||
1187 | - | @Callable( | |
1188 | - | func putOneTknV2 ( | |
1189 | - | let | |
1190 | - | let | |
1191 | - | if ($isInstanceOf( | |
1192 | - | then | |
1193 | - | else throw(($getType( | |
1191 | + | @Callable(cY) | |
1192 | + | func putOneTknV2 (fV,gV) = { | |
1193 | + | let hm = { | |
1194 | + | let bd = invoke(aT, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1195 | + | if ($isInstanceOf(bd, "Boolean")) | |
1196 | + | then bd | |
1197 | + | else throw(($getType(bd) + " couldn't be cast to Boolean")) | |
1194 | 1198 | } | |
1195 | - | let | |
1199 | + | let hn = if (if (if (bg()) | |
1196 | 1200 | then true | |
1197 | - | else ( | |
1201 | + | else (bv == q)) | |
1198 | 1202 | then true | |
1199 | - | else ( | |
1203 | + | else (bv == s)) | |
1200 | 1204 | then true | |
1201 | - | else | |
1202 | - | let | |
1205 | + | else hm | |
1206 | + | let gQ = [if (if (!(hn)) | |
1203 | 1207 | then true | |
1204 | - | else | |
1208 | + | else gw(cY)) | |
1205 | 1209 | then true | |
1206 | - | else | |
1210 | + | else aZ("put operation is blocked by admin"), if ((size(cY.payments) == 1)) | |
1207 | 1211 | then true | |
1208 | - | else | |
1209 | - | if (( | |
1212 | + | else aZ("exactly 1 payment are expected")] | |
1213 | + | if ((gQ == gQ)) | |
1210 | 1214 | then { | |
1211 | - | let | |
1212 | - | let | |
1213 | - | let | |
1214 | - | let | |
1215 | - | let | |
1216 | - | let | |
1217 | - | then | |
1218 | - | else | |
1219 | - | let | |
1220 | - | let | |
1221 | - | let | |
1222 | - | let | |
1223 | - | then | |
1224 | - | else | |
1225 | - | if (( | |
1215 | + | let ds = toBase58String(value(bx)) | |
1216 | + | let dt = toBase58String(value(by)) | |
1217 | + | let dr = bw | |
1218 | + | let fZ = bz | |
1219 | + | let ga = bA | |
1220 | + | let dq = if ((cY.caller == this)) | |
1221 | + | then cY.originCaller | |
1222 | + | else cY.caller | |
1223 | + | let ft = value(cY.payments[0]) | |
1224 | + | let do = toBase58String(value(ft.assetId)) | |
1225 | + | let dU = ft.amount | |
1226 | + | let fa = if ((ft.assetId == bx)) | |
1227 | + | then eT(toBigInt(dU), toBigInt(0), toBigInt(0)) | |
1228 | + | else eT(toBigInt(0), toBigInt(dU), toBigInt(0)) | |
1229 | + | if ((fa == fa)) | |
1226 | 1230 | then { | |
1227 | - | let | |
1228 | - | if (( | |
1231 | + | let ho = fy(dU, do, toString(dq), toBase58String(cY.transactionId), true) | |
1232 | + | if ((ho == ho)) | |
1229 | 1233 | then { | |
1230 | - | let | |
1231 | - | let | |
1232 | - | let | |
1233 | - | let | |
1234 | - | then ( | |
1234 | + | let cI = ho._3 | |
1235 | + | let dK = ho._2 | |
1236 | + | let hp = ho._1 | |
1237 | + | let eu = if (if ((fV > 0)) | |
1238 | + | then (fV > hp) | |
1235 | 1239 | else false) | |
1236 | - | then | |
1237 | - | else | |
1238 | - | let | |
1239 | - | if (( | |
1240 | + | then aZ(makeString(["amount to receive is less than ", toString(fV)], "")) | |
1241 | + | else hp | |
1242 | + | let hb = invoke(aT, "emit", [eu], nil) | |
1243 | + | if ((hb == hb)) | |
1240 | 1244 | then { | |
1241 | - | let | |
1242 | - | let | |
1243 | - | if ($isInstanceOf( | |
1245 | + | let hd = { | |
1246 | + | let aP = hb | |
1247 | + | if ($isInstanceOf(aP, "Address")) | |
1244 | 1248 | then { | |
1245 | - | let | |
1246 | - | invoke( | |
1249 | + | let he = aP | |
1250 | + | invoke(he, "emit", [eu], nil) | |
1247 | 1251 | } | |
1248 | 1252 | else unit | |
1249 | 1253 | } | |
1250 | - | if (( | |
1254 | + | if ((hd == hd)) | |
1251 | 1255 | then { | |
1252 | - | let | |
1256 | + | let hh = if (gV) | |
1253 | 1257 | then { | |
1254 | - | let | |
1255 | - | if (( | |
1258 | + | let hi = invoke(bF, "stakeFor", [toString(cY.caller)], [AttachedPayment(dr, eu)]) | |
1259 | + | if ((hi == hi)) | |
1256 | 1260 | then nil | |
1257 | 1261 | else throw("Strict value is not equal to itself.") | |
1258 | 1262 | } | |
1259 | - | else [ScriptTransfer( | |
1260 | - | let | |
1261 | - | then [ScriptTransfer( | |
1263 | + | else [ScriptTransfer(cY.caller, eu, dr)] | |
1264 | + | let gl = if ((cI > 0)) | |
1265 | + | then [ScriptTransfer(bi, cI, fromBase58String(do))] | |
1262 | 1266 | else nil | |
1263 | - | let | |
1267 | + | let hq = if ((this == bi)) | |
1264 | 1268 | then $Tuple2(0, 0) | |
1265 | 1269 | else { | |
1266 | - | let | |
1270 | + | let hr = if ((ft.assetId == bx)) | |
1267 | 1271 | then true | |
1268 | 1272 | else false | |
1269 | - | if ( | |
1270 | - | then $Tuple2(-( | |
1271 | - | else $Tuple2(0, -( | |
1273 | + | if (hr) | |
1274 | + | then $Tuple2(-(cI), 0) | |
1275 | + | else $Tuple2(0, -(cI)) | |
1272 | 1276 | } | |
1273 | - | let | |
1274 | - | let | |
1275 | - | let | |
1276 | - | let | |
1277 | - | let | |
1278 | - | let | |
1279 | - | if (( | |
1280 | - | then $Tuple2(((( | |
1277 | + | let fc = hq._1 | |
1278 | + | let fd = hq._2 | |
1279 | + | let hs = fb(fc, fd, 0) | |
1280 | + | let gr = hs._1 | |
1281 | + | let eS = hs._2 | |
1282 | + | let gs = ff(fa, eS) | |
1283 | + | if ((gs == gs)) | |
1284 | + | then $Tuple2((((dK ++ hh) ++ gl) ++ gr), eu) | |
1281 | 1285 | else throw("Strict value is not equal to itself.") | |
1282 | 1286 | } | |
1283 | 1287 | else throw("Strict value is not equal to itself.") | |
1284 | 1288 | } | |
1285 | 1289 | else throw("Strict value is not equal to itself.") | |
1286 | 1290 | } | |
1287 | 1291 | else throw("Strict value is not equal to itself.") | |
1288 | 1292 | } | |
1289 | 1293 | else throw("Strict value is not equal to itself.") | |
1290 | 1294 | } | |
1291 | 1295 | else throw("Strict value is not equal to itself.") | |
1292 | 1296 | } | |
1293 | 1297 | ||
1294 | 1298 | ||
1295 | 1299 | ||
1296 | - | @Callable( | |
1297 | - | func putForFree ( | |
1300 | + | @Callable(cY) | |
1301 | + | func putForFree (ht) = if ((0 > ht)) | |
1298 | 1302 | then throw("Wrong slpg") | |
1299 | - | else if ((size( | |
1303 | + | else if ((size(cY.payments) != 2)) | |
1300 | 1304 | then throw("2 pmnts expd") | |
1301 | 1305 | else { | |
1302 | - | let | |
1303 | - | let | |
1304 | - | let | |
1305 | - | let | |
1306 | - | let | |
1307 | - | if (( | |
1306 | + | let hu = fu(toString(cY.caller), toBase58String(cY.transactionId), AttachedPayment(value(cY.payments[0]).assetId, value(cY.payments[0]).amount), cY.payments[1], ht, false, false, true, 0, "") | |
1307 | + | let dK = hu._9 | |
1308 | + | let gZ = toBigInt(value(cY.payments[0]).amount) | |
1309 | + | let ha = toBigInt(value(cY.payments[1]).amount) | |
1310 | + | let fa = eT(gZ, ha, toBigInt(0)) | |
1311 | + | if ((fa == fa)) | |
1308 | 1312 | then { | |
1309 | - | let | |
1310 | - | let | |
1311 | - | let | |
1312 | - | let | |
1313 | - | if (( | |
1314 | - | then ( | |
1313 | + | let hv = fb(0, 0, 0) | |
1314 | + | let gr = hv._1 | |
1315 | + | let eS = hv._2 | |
1316 | + | let gs = ff(fa, eS) | |
1317 | + | if ((gs == gs)) | |
1318 | + | then (dK ++ gr) | |
1315 | 1319 | else throw("Strict value is not equal to itself.") | |
1316 | 1320 | } | |
1317 | 1321 | else throw("Strict value is not equal to itself.") | |
1318 | 1322 | } | |
1319 | 1323 | ||
1320 | 1324 | ||
1321 | 1325 | ||
1322 | - | @Callable( | |
1326 | + | @Callable(cY) | |
1323 | 1327 | func get () = { | |
1324 | - | let | |
1325 | - | if (( | |
1328 | + | let fa = eT(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1329 | + | if ((fa == fa)) | |
1326 | 1330 | then { | |
1327 | - | let | |
1328 | - | let | |
1329 | - | let | |
1330 | - | let | |
1331 | - | let | |
1332 | - | let | |
1333 | - | let | |
1334 | - | if (( | |
1331 | + | let eg = fs(cY) | |
1332 | + | let hw = eg._1 | |
1333 | + | let dJ = eg._2 | |
1334 | + | let dU = eg._3 | |
1335 | + | let do = eg._4 | |
1336 | + | let dK = eg._5 | |
1337 | + | let eH = invoke(aT, "burn", [dU], [AttachedPayment(do, dU)]) | |
1338 | + | if ((eH == eH)) | |
1335 | 1339 | then { | |
1336 | - | let | |
1337 | - | let | |
1338 | - | let | |
1339 | - | let | |
1340 | - | if (( | |
1341 | - | then ( | |
1340 | + | let hx = fb(-(hw), -(dJ), 0) | |
1341 | + | let gr = hx._1 | |
1342 | + | let eS = hx._2 | |
1343 | + | let gs = ff(fa, eS) | |
1344 | + | if ((gs == gs)) | |
1345 | + | then (dK ++ gr) | |
1342 | 1346 | else throw("Strict value is not equal to itself.") | |
1343 | 1347 | } | |
1344 | 1348 | else throw("Strict value is not equal to itself.") | |
1345 | 1349 | } | |
1346 | 1350 | else throw("Strict value is not equal to itself.") | |
1347 | 1351 | } | |
1348 | 1352 | ||
1349 | 1353 | ||
1350 | 1354 | ||
1351 | - | @Callable( | |
1352 | - | func getOneTknV2 ( | |
1353 | - | let | |
1354 | - | let | |
1355 | - | if ($isInstanceOf( | |
1356 | - | then | |
1357 | - | else throw(($getType( | |
1355 | + | @Callable(cY) | |
1356 | + | func getOneTknV2 (fU,fV) = { | |
1357 | + | let hm = { | |
1358 | + | let bd = invoke(aT, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1359 | + | if ($isInstanceOf(bd, "Boolean")) | |
1360 | + | then bd | |
1361 | + | else throw(($getType(bd) + " couldn't be cast to Boolean")) | |
1358 | 1362 | } | |
1359 | - | let | |
1363 | + | let hy = if (if (bg()) | |
1360 | 1364 | then true | |
1361 | - | else ( | |
1365 | + | else (bv == s)) | |
1362 | 1366 | then true | |
1363 | - | else | |
1364 | - | let | |
1367 | + | else hm | |
1368 | + | let gQ = [if (if (!(hy)) | |
1365 | 1369 | then true | |
1366 | - | else | |
1370 | + | else gw(cY)) | |
1367 | 1371 | then true | |
1368 | - | else | |
1372 | + | else aZ("get operation is blocked by admin"), if ((size(cY.payments) == 1)) | |
1369 | 1373 | then true | |
1370 | - | else | |
1371 | - | if (( | |
1374 | + | else aZ("exactly 1 payment are expected")] | |
1375 | + | if ((gQ == gQ)) | |
1372 | 1376 | then { | |
1373 | - | let | |
1374 | - | let | |
1375 | - | let | |
1376 | - | $Tuple2( | |
1377 | + | let hz = fT(fU, fV, cY.payments, cY.caller, cY.originCaller, cY.transactionId) | |
1378 | + | let dK = hz._1 | |
1379 | + | let ge = hz._2 | |
1380 | + | $Tuple2(dK, ge) | |
1377 | 1381 | } | |
1378 | 1382 | else throw("Strict value is not equal to itself.") | |
1379 | 1383 | } | |
1380 | 1384 | ||
1381 | 1385 | ||
1382 | 1386 | ||
1383 | - | @Callable( | |
1387 | + | @Callable(cY) | |
1384 | 1388 | func refreshDLp () = { | |
1385 | - | let | |
1386 | - | let | |
1389 | + | let hA = valueOrElse(getInteger(as), 0) | |
1390 | + | let hB = if (((height - hA) >= av)) | |
1387 | 1391 | then unit | |
1388 | - | else | |
1389 | - | if (( | |
1392 | + | else aZ(makeString([toString(av), " blocks have not passed since the previous call"], "")) | |
1393 | + | if ((hB == hB)) | |
1390 | 1394 | then { | |
1391 | - | let | |
1392 | - | let | |
1393 | - | let | |
1394 | - | let | |
1395 | - | let | |
1396 | - | then | |
1397 | - | else | |
1398 | - | $Tuple2( | |
1395 | + | let fm = valueOrErrorMessage(parseBigInt(valueOrElse(getString(this, ar), "0")), bb("invalid dLp")) | |
1396 | + | let hC = fb(0, 0, 0) | |
1397 | + | let hD = hC._1 | |
1398 | + | let eS = hC._2 | |
1399 | + | let fe = if ((fm != eS)) | |
1400 | + | then hD | |
1401 | + | else aZ("nothing to refresh") | |
1402 | + | $Tuple2(fe, toString(eS)) | |
1399 | 1403 | } | |
1400 | 1404 | else throw("Strict value is not equal to itself.") | |
1401 | 1405 | } | |
1402 | 1406 | ||
1403 | 1407 | ||
1404 | 1408 | ||
1405 | - | @Callable( | |
1406 | - | func getOneTknV2READONLY ( | |
1407 | - | let | |
1408 | - | let | |
1409 | - | let | |
1410 | - | let | |
1411 | - | let | |
1412 | - | let | |
1413 | - | let | |
1414 | - | let | |
1409 | + | @Callable(cY) | |
1410 | + | func getOneTknV2READONLY (fU,hE) = { | |
1411 | + | let ds = toBase58String(value(bx)) | |
1412 | + | let dt = toBase58String(value(by)) | |
1413 | + | let dr = toBase58String(value(bw)) | |
1414 | + | let cK = [toBigInt(bY(ds)), toBigInt(bY(dt))] | |
1415 | + | let eR = toBigInt(valueOrErrorMessage(assetInfo(fromBase58String(dr)), "invalid lp asset").quantity) | |
1416 | + | let cm = cJ(cK) | |
1417 | + | let cl = (cm - fraction(toBigInt(hE), cm, eR)) | |
1418 | + | let hF = if ((fU == ds)) | |
1415 | 1419 | then 0 | |
1416 | - | else if (( | |
1420 | + | else if ((fU == dt)) | |
1417 | 1421 | then 1 | |
1418 | 1422 | else throw("invalid out asset id") | |
1419 | - | let | |
1420 | - | let | |
1421 | - | let | |
1422 | - | let | |
1423 | - | let | |
1424 | - | let | |
1425 | - | $Tuple2(nil, $Tuple2( | |
1423 | + | let hG = eB(cK, hF, cl) | |
1424 | + | let gJ = (cK[hF] - hG) | |
1425 | + | let gK = max([0, toInt((gJ - f))]) | |
1426 | + | let hH = cG(gK, be) | |
1427 | + | let gd = hH._1 | |
1428 | + | let cI = hH._2 | |
1429 | + | $Tuple2(nil, $Tuple2(gd, cI)) | |
1426 | 1430 | } | |
1427 | 1431 | ||
1428 | 1432 | ||
1429 | 1433 | ||
1430 | - | @Callable( | |
1431 | - | func getOneTknV2WithBonusREADONLY ( | |
1432 | - | let | |
1433 | - | let | |
1434 | - | let | |
1435 | - | let | |
1436 | - | let | |
1437 | - | let | |
1438 | - | let | |
1439 | - | if ($isInstanceOf( | |
1440 | - | then | |
1441 | - | else throw(($getType( | |
1434 | + | @Callable(cY) | |
1435 | + | func getOneTknV2WithBonusREADONLY (fU,hE) = { | |
1436 | + | let ds = toBase58String(value(bx)) | |
1437 | + | let dt = toBase58String(value(by)) | |
1438 | + | let dr = toBase58String(value(bw)) | |
1439 | + | let dy = bY(ds) | |
1440 | + | let dA = bY(dt) | |
1441 | + | let hI = { | |
1442 | + | let bd = invoke(this, "getOneTknV2READONLY", [fU, hE], nil) | |
1443 | + | if ($isInstanceOf(bd, "(Int, Int)")) | |
1444 | + | then bd | |
1445 | + | else throw(($getType(bd) + " couldn't be cast to (Int, Int)")) | |
1442 | 1446 | } | |
1443 | - | let | |
1444 | - | let | |
1445 | - | let | |
1446 | - | let | |
1447 | - | let | |
1448 | - | let | |
1449 | - | let | |
1450 | - | then if (( | |
1447 | + | let gd = hI._1 | |
1448 | + | let cI = hI._2 | |
1449 | + | let eg = dm("", dr, hE, this) | |
1450 | + | let dI = eg._1 | |
1451 | + | let dJ = eg._2 | |
1452 | + | let hJ = (dI + dJ) | |
1453 | + | let fS = if ((hJ == 0)) | |
1454 | + | then if ((gd == 0)) | |
1451 | 1455 | then 0 | |
1452 | 1456 | else throw("bonus calculation error") | |
1453 | - | else fraction(( | |
1454 | - | $Tuple2(nil, $Tuple3( | |
1457 | + | else fraction((gd - hJ), a, hJ) | |
1458 | + | $Tuple2(nil, $Tuple3(gd, cI, fS)) | |
1455 | 1459 | } | |
1456 | 1460 | ||
1457 | 1461 | ||
1458 | 1462 | ||
1459 | - | @Callable( | |
1460 | - | func getNoLess ( | |
1461 | - | let | |
1462 | - | let | |
1463 | - | let | |
1464 | - | let | |
1465 | - | let | |
1466 | - | let | |
1467 | - | if (( | |
1468 | - | then throw(((("Failed: " + toString( | |
1469 | - | else if (( | |
1470 | - | then throw(((("Failed: " + toString( | |
1463 | + | @Callable(cY) | |
1464 | + | func getNoLess (hK,hL) = { | |
1465 | + | let eg = fs(cY) | |
1466 | + | let dI = eg._1 | |
1467 | + | let dJ = eg._2 | |
1468 | + | let dU = eg._3 | |
1469 | + | let do = eg._4 | |
1470 | + | let dK = eg._5 | |
1471 | + | if ((hK > dI)) | |
1472 | + | then throw(((("Failed: " + toString(dI)) + " < ") + toString(hK))) | |
1473 | + | else if ((hL > dJ)) | |
1474 | + | then throw(((("Failed: " + toString(dJ)) + " < ") + toString(hL))) | |
1471 | 1475 | else { | |
1472 | - | let | |
1473 | - | if (( | |
1476 | + | let fa = eT(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1477 | + | if ((fa == fa)) | |
1474 | 1478 | then { | |
1475 | - | let | |
1476 | - | if (( | |
1479 | + | let hM = invoke(aT, "burn", [dU], [AttachedPayment(do, dU)]) | |
1480 | + | if ((hM == hM)) | |
1477 | 1481 | then { | |
1478 | - | let | |
1479 | - | let | |
1480 | - | let | |
1481 | - | let | |
1482 | - | if (( | |
1483 | - | then ( | |
1482 | + | let hN = fb(-(dI), -(dJ), 0) | |
1483 | + | let gr = hN._1 | |
1484 | + | let eS = hN._2 | |
1485 | + | let gs = ff(fa, eS) | |
1486 | + | if ((gs == gs)) | |
1487 | + | then (dK ++ gr) | |
1484 | 1488 | else throw("Strict value is not equal to itself.") | |
1485 | 1489 | } | |
1486 | 1490 | else throw("Strict value is not equal to itself.") | |
1487 | 1491 | } | |
1488 | 1492 | else throw("Strict value is not equal to itself.") | |
1489 | 1493 | } | |
1490 | 1494 | } | |
1491 | 1495 | ||
1492 | 1496 | ||
1493 | 1497 | ||
1494 | - | @Callable( | |
1495 | - | func unstakeAndGet ( | |
1496 | - | let | |
1498 | + | @Callable(cY) | |
1499 | + | func unstakeAndGet (cH) = { | |
1500 | + | let hO = if ((size(cY.payments) != 0)) | |
1497 | 1501 | then throw("No pmnts expd") | |
1498 | 1502 | else true | |
1499 | - | if (( | |
1503 | + | if ((hO == hO)) | |
1500 | 1504 | then { | |
1501 | - | let | |
1502 | - | let | |
1503 | - | let | |
1504 | - | let | |
1505 | - | if (( | |
1505 | + | let hP = bD() | |
1506 | + | let hc = bw | |
1507 | + | let hQ = valueOrErrorMessage(addressFromString(hP[C]), "Wr st addr") | |
1508 | + | let fa = eT(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1509 | + | if ((fa == fa)) | |
1506 | 1510 | then { | |
1507 | - | let | |
1508 | - | if (( | |
1511 | + | let hR = invoke(hQ, "unstake", [toBase58String(hc), cH], nil) | |
1512 | + | if ((hR == hR)) | |
1509 | 1513 | then { | |
1510 | - | let | |
1511 | - | let | |
1512 | - | let | |
1513 | - | let | |
1514 | - | let | |
1515 | - | let | |
1514 | + | let eg = dm(toBase58String(cY.transactionId), toBase58String(hc), cH, cY.caller) | |
1515 | + | let dI = eg._1 | |
1516 | + | let dJ = eg._2 | |
1517 | + | let dw = parseIntValue(eg._9) | |
1518 | + | let dK = eg._10 | |
1519 | + | let hS = if (if (bg()) | |
1516 | 1520 | then true | |
1517 | - | else ( | |
1518 | - | then throw(("Blocked: " + toString( | |
1521 | + | else (dw == s)) | |
1522 | + | then throw(("Blocked: " + toString(dw))) | |
1519 | 1523 | else true | |
1520 | - | if (( | |
1524 | + | if ((hS == hS)) | |
1521 | 1525 | then { | |
1522 | - | let | |
1523 | - | if (( | |
1526 | + | let hT = invoke(aT, "burn", [cH], [AttachedPayment(hc, cH)]) | |
1527 | + | if ((hT == hT)) | |
1524 | 1528 | then { | |
1525 | - | let | |
1526 | - | let | |
1527 | - | let | |
1528 | - | let | |
1529 | - | if (( | |
1530 | - | then ( | |
1529 | + | let hU = fb(-(dI), -(dJ), 0) | |
1530 | + | let gr = hU._1 | |
1531 | + | let eS = hU._2 | |
1532 | + | let gs = ff(fa, eS) | |
1533 | + | if ((gs == gs)) | |
1534 | + | then (dK ++ gr) | |
1531 | 1535 | else throw("Strict value is not equal to itself.") | |
1532 | 1536 | } | |
1533 | 1537 | else throw("Strict value is not equal to itself.") | |
1534 | 1538 | } | |
1535 | 1539 | else throw("Strict value is not equal to itself.") | |
1536 | 1540 | } | |
1537 | 1541 | else throw("Strict value is not equal to itself.") | |
1538 | 1542 | } | |
1539 | 1543 | else throw("Strict value is not equal to itself.") | |
1540 | 1544 | } | |
1541 | 1545 | else throw("Strict value is not equal to itself.") | |
1542 | 1546 | } | |
1543 | 1547 | ||
1544 | 1548 | ||
1545 | 1549 | ||
1546 | - | @Callable( | |
1547 | - | func unstakeAndGetNoLess ( | |
1548 | - | let | |
1550 | + | @Callable(cY) | |
1551 | + | func unstakeAndGetNoLess (hV,hW,hL) = { | |
1552 | + | let hy = if (bg()) | |
1549 | 1553 | then true | |
1550 | - | else ( | |
1551 | - | let | |
1554 | + | else (bv == s) | |
1555 | + | let gQ = [if (!(hy)) | |
1552 | 1556 | then true | |
1553 | - | else throw("get operation is blocked by admin"), if ((size( | |
1557 | + | else throw("get operation is blocked by admin"), if ((size(cY.payments) == 0)) | |
1554 | 1558 | then true | |
1555 | 1559 | else throw("no payments are expected")] | |
1556 | - | if (( | |
1560 | + | if ((gQ == gQ)) | |
1557 | 1561 | then { | |
1558 | - | let | |
1559 | - | if (( | |
1562 | + | let fa = eT(toBigInt(0), toBigInt(0), toBigInt(0)) | |
1563 | + | if ((fa == fa)) | |
1560 | 1564 | then { | |
1561 | - | let | |
1562 | - | if (( | |
1565 | + | let hR = invoke(bF, "unstake", [toBase58String(bw), hV], nil) | |
1566 | + | if ((hR == hR)) | |
1563 | 1567 | then { | |
1564 | - | let | |
1565 | - | let | |
1566 | - | let | |
1567 | - | let | |
1568 | - | let | |
1568 | + | let hX = dm(toBase58String(cY.transactionId), toBase58String(bw), hV, cY.caller) | |
1569 | + | let dI = hX._1 | |
1570 | + | let dJ = hX._2 | |
1571 | + | let dK = hX._10 | |
1572 | + | let hY = [if ((dI >= hW)) | |
1569 | 1573 | then true | |
1570 | - | else throw(makeString(["amount asset amount to receive is less than ", toString( | |
1574 | + | else throw(makeString(["amount asset amount to receive is less than ", toString(hW)], "")), if ((dJ >= hL)) | |
1571 | 1575 | then true | |
1572 | - | else throw(makeString(["price asset amount to receive is less than ", toString( | |
1573 | - | if (( | |
1576 | + | else throw(makeString(["price asset amount to receive is less than ", toString(hL)], ""))] | |
1577 | + | if ((hY == hY)) | |
1574 | 1578 | then { | |
1575 | - | let | |
1576 | - | if (( | |
1579 | + | let hM = invoke(aT, "burn", [hV], [AttachedPayment(bw, hV)]) | |
1580 | + | if ((hM == hM)) | |
1577 | 1581 | then { | |
1578 | - | let | |
1579 | - | let | |
1580 | - | let | |
1581 | - | let | |
1582 | - | if (( | |
1583 | - | then ( | |
1582 | + | let hZ = fb(-(dI), -(dJ), 0) | |
1583 | + | let gr = hZ._1 | |
1584 | + | let eS = hZ._2 | |
1585 | + | let gs = ff(fa, eS) | |
1586 | + | if ((gs == gs)) | |
1587 | + | then (dK ++ gr) | |
1584 | 1588 | else throw("Strict value is not equal to itself.") | |
1585 | 1589 | } | |
1586 | 1590 | else throw("Strict value is not equal to itself.") | |
1587 | 1591 | } | |
1588 | 1592 | else throw("Strict value is not equal to itself.") | |
1589 | 1593 | } | |
1590 | 1594 | else throw("Strict value is not equal to itself.") | |
1591 | 1595 | } | |
1592 | 1596 | else throw("Strict value is not equal to itself.") | |
1593 | 1597 | } | |
1594 | 1598 | else throw("Strict value is not equal to itself.") | |
1595 | 1599 | } | |
1596 | 1600 | ||
1597 | 1601 | ||
1598 | 1602 | ||
1599 | - | @Callable( | |
1600 | - | func unstakeAndGetOneTknV2 ( | |
1601 | - | let | |
1602 | - | let | |
1603 | - | if ($isInstanceOf( | |
1604 | - | then | |
1605 | - | else throw(($getType( | |
1603 | + | @Callable(cY) | |
1604 | + | func unstakeAndGetOneTknV2 (hV,fU,fV) = { | |
1605 | + | let hm = { | |
1606 | + | let bd = invoke(aT, "isPoolOneTokenOperationsDisabledREADONLY", [toString(this)], nil) | |
1607 | + | if ($isInstanceOf(bd, "Boolean")) | |
1608 | + | then bd | |
1609 | + | else throw(($getType(bd) + " couldn't be cast to Boolean")) | |
1606 | 1610 | } | |
1607 | - | let | |
1611 | + | let hy = if (if (bg()) | |
1608 | 1612 | then true | |
1609 | - | else ( | |
1613 | + | else (bv == s)) | |
1610 | 1614 | then true | |
1611 | - | else | |
1612 | - | let | |
1615 | + | else hm | |
1616 | + | let gQ = [if (if (!(hy)) | |
1613 | 1617 | then true | |
1614 | - | else | |
1618 | + | else gw(cY)) | |
1615 | 1619 | then true | |
1616 | - | else | |
1620 | + | else aZ("get operation is blocked by admin"), if ((size(cY.payments) == 0)) | |
1617 | 1621 | then true | |
1618 | - | else | |
1619 | - | if (( | |
1622 | + | else aZ("no payments are expected")] | |
1623 | + | if ((gQ == gQ)) | |
1620 | 1624 | then { | |
1621 | - | let | |
1622 | - | let | |
1623 | - | let | |
1624 | - | let | |
1625 | - | let | |
1626 | - | let | |
1627 | - | if (( | |
1625 | + | let hP = bD() | |
1626 | + | let hc = bw | |
1627 | + | let hQ = valueOrErrorMessage(addressFromString(hP[C]), "Wr st addr") | |
1628 | + | let dq = cY.caller | |
1629 | + | let ia = this | |
1630 | + | let hR = invoke(hQ, "unstakeINTERNAL", [hc, hV, dq.bytes, ia.bytes], nil) | |
1631 | + | if ((hR == hR)) | |
1628 | 1632 | then { | |
1629 | - | let | |
1630 | - | let | |
1631 | - | let | |
1632 | - | $Tuple2( | |
1633 | + | let ib = fT(fU, fV, [AttachedPayment(hc, hV)], cY.caller, cY.originCaller, cY.transactionId) | |
1634 | + | let dK = ib._1 | |
1635 | + | let ge = ib._2 | |
1636 | + | $Tuple2(dK, ge) | |
1633 | 1637 | } | |
1634 | 1638 | else throw("Strict value is not equal to itself.") | |
1635 | 1639 | } | |
1636 | 1640 | else throw("Strict value is not equal to itself.") | |
1637 | 1641 | } | |
1638 | 1642 | ||
1639 | 1643 | ||
1640 | 1644 | ||
1641 | - | @Callable( | |
1642 | - | func putOneTknV2WithBonusREADONLY ( | |
1643 | - | let | |
1644 | - | let | |
1645 | - | let | |
1646 | - | let | |
1647 | - | let | |
1648 | - | $Tuple2(nil, $Tuple3( | |
1645 | + | @Callable(cY) | |
1646 | + | func putOneTknV2WithBonusREADONLY (ic,id) = { | |
1647 | + | let ie = fy(ic, id, "", "", true) | |
1648 | + | let fN = ie._1 | |
1649 | + | let dK = ie._2 | |
1650 | + | let cI = ie._3 | |
1651 | + | let fS = ie._4 | |
1652 | + | $Tuple2(nil, $Tuple3(fN, cI, fS)) | |
1649 | 1653 | } | |
1650 | 1654 | ||
1651 | 1655 | ||
1652 | 1656 | ||
1653 | - | @Callable( | |
1654 | - | func putOneTknV2WithoutTakeFeeREADONLY ( | |
1655 | - | let | |
1656 | - | let | |
1657 | - | let | |
1658 | - | let | |
1659 | - | let | |
1660 | - | $Tuple2(nil, $Tuple3( | |
1657 | + | @Callable(cY) | |
1658 | + | func putOneTknV2WithoutTakeFeeREADONLY (ic,id) = { | |
1659 | + | let if = fy(ic, id, "", "", false) | |
1660 | + | let fN = if._1 | |
1661 | + | let dK = if._2 | |
1662 | + | let cI = if._3 | |
1663 | + | let fS = if._4 | |
1664 | + | $Tuple2(nil, $Tuple3(fN, cI, fS)) | |
1661 | 1665 | } | |
1662 | 1666 | ||
1663 | 1667 | ||
1664 | 1668 | ||
1665 | - | @Callable( | |
1666 | - | func activate ( | |
1669 | + | @Callable(cY) | |
1670 | + | func activate (ig,ih) = if ((toString(cY.caller) != toString(aT))) | |
1667 | 1671 | then throw("denied") | |
1668 | - | else $Tuple2([StringEntry(ak(), | |
1672 | + | else $Tuple2([StringEntry(aj(), ig), StringEntry(ak(), ih)], "success") | |
1669 | 1673 | ||
1670 | 1674 | ||
1671 | 1675 | ||
1672 | - | @Callable( | |
1673 | - | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, | |
1676 | + | @Callable(cY) | |
1677 | + | func getPoolConfigWrapperREADONLY () = $Tuple2(nil, bj()) | |
1674 | 1678 | ||
1675 | 1679 | ||
1676 | 1680 | ||
1677 | - | @Callable( | |
1678 | - | func getAccBalanceWrapperREADONLY ( | |
1681 | + | @Callable(cY) | |
1682 | + | func getAccBalanceWrapperREADONLY (bZ) = $Tuple2(nil, bY(bZ)) | |
1679 | 1683 | ||
1680 | 1684 | ||
1681 | 1685 | ||
1682 | - | @Callable( | |
1683 | - | func calcPricesWrapperREADONLY ( | |
1684 | - | let | |
1685 | - | $Tuple2(nil, [toString( | |
1686 | + | @Callable(cY) | |
1687 | + | func calcPricesWrapperREADONLY (cs,ct,cx) = { | |
1688 | + | let ii = cw(cs, ct, cx) | |
1689 | + | $Tuple2(nil, [toString(ii[0]), toString(ii[1]), toString(ii[2])]) | |
1686 | 1690 | } | |
1687 | 1691 | ||
1688 | 1692 | ||
1689 | 1693 | ||
1690 | - | @Callable( | |
1691 | - | func fromX18WrapperREADONLY ( | |
1694 | + | @Callable(cY) | |
1695 | + | func fromX18WrapperREADONLY (M,ij) = $Tuple2(nil, L(parseBigIntValue(M), ij)) | |
1692 | 1696 | ||
1693 | 1697 | ||
1694 | 1698 | ||
1695 | - | @Callable( | |
1696 | - | func toX18WrapperREADONLY (J | |
1699 | + | @Callable(cY) | |
1700 | + | func toX18WrapperREADONLY (I,J) = $Tuple2(nil, toString(H(I, J))) | |
1697 | 1701 | ||
1698 | 1702 | ||
1699 | 1703 | ||
1700 | - | @Callable( | |
1701 | - | func calcPriceBigIntWrapperREADONLY ( | |
1704 | + | @Callable(cY) | |
1705 | + | func calcPriceBigIntWrapperREADONLY (cb,cc) = $Tuple2(nil, toString(ca(parseBigIntValue(cb), parseBigIntValue(cc)))) | |
1702 | 1706 | ||
1703 | 1707 | ||
1704 | 1708 | ||
1705 | - | @Callable( | |
1706 | - | func estimatePutOperationWrapperREADONLY ( | |
1709 | + | @Callable(cY) | |
1710 | + | func estimatePutOperationWrapperREADONLY (dn,ch,dM,dN,dO,dP,ik,dQ,dR) = $Tuple2(nil, dL(dn, ch, dM, dN, dO, dP, ik, dQ, dR, true, false, 0, "")) | |
1707 | 1711 | ||
1708 | 1712 | ||
1709 | 1713 | ||
1710 | - | @Callable( | |
1711 | - | func estimateGetOperationWrapperREADONLY ( | |
1712 | - | let | |
1713 | - | $Tuple2(nil, $Tuple10( | |
1714 | + | @Callable(cY) | |
1715 | + | func estimateGetOperationWrapperREADONLY (dn,il,dp,ik) = { | |
1716 | + | let eg = dm(dn, il, dp, addressFromStringValue(ik)) | |
1717 | + | $Tuple2(nil, $Tuple10(eg._1, eg._2, eg._3, eg._4, eg._5, eg._6, eg._7, toString(eg._8), eg._9, eg._10)) | |
1714 | 1718 | } | |
1715 | 1719 | ||
1716 | 1720 | ||
1717 | 1721 | ||
1718 | - | @Callable( | |
1722 | + | @Callable(cY) | |
1719 | 1723 | func changeAmp () = { | |
1720 | - | let | |
1721 | - | let | |
1722 | - | let | |
1723 | - | if ($isInstanceOf( | |
1724 | + | let im = invoke(aT, "getChangeAmpConfigREADONLY", [toString(this)], nil) | |
1725 | + | let in = { | |
1726 | + | let aP = im | |
1727 | + | if ($isInstanceOf(aP, "List[Any]")) | |
1724 | 1728 | then { | |
1725 | - | let | |
1729 | + | let io = aP | |
1726 | 1730 | $Tuple3({ | |
1727 | - | let | |
1728 | - | if ($isInstanceOf( | |
1729 | - | then | |
1730 | - | else throw(($getType( | |
1731 | + | let bd = io[0] | |
1732 | + | if ($isInstanceOf(bd, "Int")) | |
1733 | + | then bd | |
1734 | + | else throw(($getType(bd) + " couldn't be cast to Int")) | |
1731 | 1735 | }, { | |
1732 | - | let | |
1733 | - | if ($isInstanceOf( | |
1734 | - | then | |
1735 | - | else throw(($getType( | |
1736 | + | let bd = io[1] | |
1737 | + | if ($isInstanceOf(bd, "Int")) | |
1738 | + | then bd | |
1739 | + | else throw(($getType(bd) + " couldn't be cast to Int")) | |
1736 | 1740 | }, { | |
1737 | - | let | |
1738 | - | if ($isInstanceOf( | |
1739 | - | then | |
1740 | - | else throw(($getType( | |
1741 | + | let bd = io[2] | |
1742 | + | if ($isInstanceOf(bd, "Int")) | |
1743 | + | then bd | |
1744 | + | else throw(($getType(bd) + " couldn't be cast to Int")) | |
1741 | 1745 | }) | |
1742 | 1746 | } | |
1743 | - | else | |
1747 | + | else aZ("invalid entry type") | |
1744 | 1748 | } | |
1745 | - | let | |
1746 | - | let | |
1747 | - | let | |
1748 | - | let | |
1749 | - | let | |
1750 | - | let | |
1751 | - | then if (( | |
1752 | - | then | |
1753 | - | else | |
1754 | - | else if (( | |
1755 | - | then | |
1756 | - | else | |
1757 | - | let | |
1758 | - | let | |
1759 | - | let | |
1749 | + | let ip = in._1 | |
1750 | + | let iq = in._2 | |
1751 | + | let ir = in._3 | |
1752 | + | let is = parseIntValue(getStringValue(al())) | |
1753 | + | let it = (is + iq) | |
1754 | + | let iu = if ((0 > iq)) | |
1755 | + | then if ((ir > it)) | |
1756 | + | then ir | |
1757 | + | else it | |
1758 | + | else if ((it > ir)) | |
1759 | + | then ir | |
1760 | + | else it | |
1761 | + | let iv = valueOrElse(getInteger(ao()), 0) | |
1762 | + | let iw = (iv + ip) | |
1763 | + | let gQ = [if ((height > iw)) | |
1760 | 1764 | then true | |
1761 | - | else | |
1765 | + | else aZ("try again in few blocks"), if ((is != iu)) | |
1762 | 1766 | then true | |
1763 | - | else | |
1764 | - | if (( | |
1765 | - | then [IntegerEntry( | |
1767 | + | else aZ("already reached target")] | |
1768 | + | if ((gQ == gQ)) | |
1769 | + | then [IntegerEntry(ao(), height), StringEntry(al(), toString(iu)), StringEntry(am(height), toString(iu))] | |
1766 | 1770 | else throw("Strict value is not equal to itself.") | |
1767 | 1771 | } | |
1768 | 1772 | ||
1769 | 1773 | ||
1770 | - | @Verifier( | |
1771 | - | func | |
1772 | - | let | |
1773 | - | let | |
1774 | - | if ($isInstanceOf( | |
1774 | + | @Verifier(ix) | |
1775 | + | func iy () = { | |
1776 | + | let iz = { | |
1777 | + | let aP = gt() | |
1778 | + | if ($isInstanceOf(aP, "ByteVector")) | |
1775 | 1779 | then { | |
1776 | - | let | |
1777 | - | | |
1780 | + | let gx = aP | |
1781 | + | gx | |
1778 | 1782 | } | |
1779 | - | else if ($isInstanceOf( | |
1780 | - | then | |
1783 | + | else if ($isInstanceOf(aP, "Unit")) | |
1784 | + | then ix.senderPublicKey | |
1781 | 1785 | else throw("Match error") | |
1782 | 1786 | } | |
1783 | - | let | |
1784 | - | if ($isInstanceOf( | |
1787 | + | let aP = ix | |
1788 | + | if ($isInstanceOf(aP, "Order")) | |
1785 | 1789 | then { | |
1786 | - | let | |
1787 | - | let | |
1788 | - | let | |
1790 | + | let fi = aP | |
1791 | + | let iA = bh() | |
1792 | + | let iB = if (gE()) | |
1789 | 1793 | then $Tuple2(true, "") | |
1790 | - | else fe(ff) | |
1791 | - | let aK = iy._1 | |
1792 | - | let aL = iy._2 | |
1793 | - | let aM = sigVerify(ff.bodyBytes, ff.proofs[0], ff.senderPublicKey) | |
1794 | - | let aN = sigVerify(ff.bodyBytes, ff.proofs[1], ix) | |
1795 | - | if (if (if (aK) | |
1794 | + | else fh(fi) | |
1795 | + | let aJ = iB._1 | |
1796 | + | let aK = iB._2 | |
1797 | + | let aL = sigVerify(fi.bodyBytes, fi.proofs[0], fi.senderPublicKey) | |
1798 | + | let aM = sigVerify(fi.bodyBytes, fi.proofs[1], iA) | |
1799 | + | if (if (if (aJ) | |
1800 | + | then aL | |
1801 | + | else false) | |
1796 | 1802 | then aM | |
1797 | 1803 | else false) | |
1798 | - | then aN | |
1799 | - | else false) | |
1800 | 1804 | then true | |
1801 | - | else aJ | |
1805 | + | else aI(aJ, aK, aL, aM) | |
1802 | 1806 | } | |
1803 | - | else if ($isInstanceOf( | |
1807 | + | else if ($isInstanceOf(aP, "SetScriptTransaction")) | |
1804 | 1808 | then { | |
1805 | - | let | |
1806 | - | if (sigVerify( | |
1809 | + | let aU = aP | |
1810 | + | if (sigVerify(ix.bodyBytes, ix.proofs[0], iz)) | |
1807 | 1811 | then true | |
1808 | 1812 | else { | |
1809 | - | let | |
1810 | - | let | |
1811 | - | let | |
1812 | - | if (( | |
1813 | - | then ( | |
1813 | + | let iC = blake2b256(value(aU.script)) | |
1814 | + | let iD = fromBase64String(value(getString(aT, aE()))) | |
1815 | + | let iE = scriptHash(this) | |
1816 | + | if ((iD == iC)) | |
1817 | + | then (iE != iC) | |
1814 | 1818 | else false | |
1815 | 1819 | } | |
1816 | 1820 | } | |
1817 | - | else sigVerify( | |
1821 | + | else sigVerify(ix.bodyBytes, ix.proofs[0], iz) | |
1818 | 1822 | } | |
1819 | 1823 |
github/deemru/w8io/169f3d6 767.82 ms ◑