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