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