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