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