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