tx · 2Nf3iCgG9ABAJCYB6DfZVcUTgkXfHGfM3BuT8GonDx8a 3N3kKNoJohjVQYNLTrYTGTesr3nq3PZNh37: -0.02400000 Waves 2024.06.03 16:58 [3134594] smart account 3N3kKNoJohjVQYNLTrYTGTesr3nq3PZNh37 > SELF 0.00000000 Waves
{ "type": 13, "id": "2Nf3iCgG9ABAJCYB6DfZVcUTgkXfHGfM3BuT8GonDx8a", "fee": 2400000, "feeAssetId": null, "timestamp": 1717423201584, "version": 2, "chainId": 84, "sender": "3N3kKNoJohjVQYNLTrYTGTesr3nq3PZNh37", "senderPublicKey": "vmMXxwQAMUAoisvL193ptPiTtaWQqL5YNu2zs1ouTbY", "proofs": [ "2UGrAnm2Z9U5yaam2KPVJVJqRscvjCoSFCBhCDz9kW3BseMT6r7BWMKB4h7PEtdKKueY8KBAep5hAanDvjreXif4" ], "script": "base64:BwI9CAISAwoBCBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGFgACXNlcGFyYXRvcgICX18AB2NoYWluSWQJAMkBAgkAygECCAUEdGhpcwVieXRlcwABAAEACGNoYWluSWRXAQFXABBjb250cmFjdEZpbGVuYW1lAhdmdXR1cmVzX2NhbGN1bGF0b3IucmlkZQAFbXVsdDgAgMLXLwAMbXVsdDE4QmlnSW50CQC2AgEAgICQu7rWrfANAA13YXZlc0RlY2ltYWxzAAgADHVzZHREZWNpbWFscwAGAAt3YXZlc1N0cmluZwIFV0FWRVMADXF1ZXVlSXRlbVNpemUAIAAEYmlnMAkAtgIBAAAACWtNdWx0aXNpZwIMJXNfX211bHRpc2lnAQdrU3RhdHVzAgRkYXBwBHR4SWQJALkJAgkAzAgCAgolc19fc3RhdHVzCQDMCAIFBGRhcHAJAMwIAgUEdHhJZAUDbmlsBQlzZXBhcmF0b3IACWtTaHV0ZG93bgIMJXNfX3NodXRkb3duAAtrUHVibGljS2V5cwIOJXNfX3B1YmxpY0tleXMAEWtNYXRjaGVyUHVibGlj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cFBnN0YXR1cwcJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXk2zLnq", "height": 3134594, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3gheT5Mo9ByFriByEeXCzrD3Z8nQsPWFkoMM6fbbbydC Next: FSXVFXuy72n2upcR5xhsLwmz2rWuNHZwNqY83WBRsLLa Diff:
Old | New | Differences | |
---|---|---|---|
174 | 174 | func ar (an) = makeString(["%s%s", "leverage", toString(an)], a) | |
175 | 175 | ||
176 | 176 | ||
177 | - | func as (at) = makeString(["%s%s", " | |
177 | + | func as (at) = makeString(["%s%s", "requestLeverage", toBase58String(at)], a) | |
178 | 178 | ||
179 | 179 | ||
180 | - | func au (av) = makeString(["%s%s", " | |
180 | + | func au (av) = makeString(["%s%s", "syntheticAssetId", H(av)], a) | |
181 | 181 | ||
182 | 182 | ||
183 | - | let aw = 0 | |
184 | - | ||
185 | - | let ax = 1 | |
186 | - | ||
187 | - | func ay (az) = makeString(["%s%s", toBase58String(az), "status"], a) | |
183 | + | func aw (ax) = makeString(["%s%s", "baseAssetId", H(ax)], a) | |
188 | 184 | ||
189 | 185 | ||
190 | - | func aA (an) = makeString(["%s%s", toString(an), "creatorPublicKey"], a) | |
186 | + | let ay = 0 | |
187 | + | ||
188 | + | let az = 1 | |
189 | + | ||
190 | + | func aA (at) = makeString(["%s%s", toBase58String(at), "status"], a) | |
191 | 191 | ||
192 | 192 | ||
193 | - | func aB ( | |
193 | + | func aB (an) = makeString(["%s%s", toString(an), "creatorPublicKey"], a) | |
194 | 194 | ||
195 | 195 | ||
196 | - | func aC ( | |
196 | + | func aC (at) = makeString(["%s%s", toBase58String(at), "ownerPublicKey"], a) | |
197 | 197 | ||
198 | 198 | ||
199 | - | func aD ( | |
199 | + | func aD (at) = makeString(["%s%s", toBase58String(at), "amountAssetId"], a) | |
200 | 200 | ||
201 | 201 | ||
202 | - | func aE ( | |
202 | + | func aE (at) = makeString(["%s%s", toBase58String(at), "priceAssetId"], a) | |
203 | 203 | ||
204 | 204 | ||
205 | - | func aF ( | |
205 | + | func aF (at) = makeString(["%s%s", toBase58String(at), "requestIdToAccountPublicKey"], a) | |
206 | 206 | ||
207 | 207 | ||
208 | - | func aG () = makeString(["%s", " | |
208 | + | func aG (an) = makeString(["%s%s", toString(an), "accountAddressToRequestId"], a) | |
209 | 209 | ||
210 | 210 | ||
211 | - | func aH () = | |
211 | + | func aH () = makeString(["%s", "requestsQueue"], a) | |
212 | 212 | ||
213 | 213 | ||
214 | - | func aI () = | |
214 | + | func aI () = valueOrElse(getBinary(R, aH()), base58'') | |
215 | 215 | ||
216 | 216 | ||
217 | - | func aJ () = | |
217 | + | func aJ () = makeString(["%s", "accountsQueue"], a) | |
218 | 218 | ||
219 | 219 | ||
220 | - | func aK ( | |
220 | + | func aK () = valueOrElse(getBinary(R, aJ()), base58'') | |
221 | 221 | ||
222 | 222 | ||
223 | - | func | |
223 | + | func aL (aM) = makeString(["%s%s", "requests", toString(aM)], a) | |
224 | 224 | ||
225 | 225 | ||
226 | - | func aN ( | |
226 | + | func aN (aM) = valueOrElse(getBinary(R, aL(aM)), base58'') | |
227 | 227 | ||
228 | 228 | ||
229 | - | func | |
229 | + | func aO (aP,aQ) = makeString(["%s%s%s", H(aP), H(aQ), "pairAllowed"], a) | |
230 | 230 | ||
231 | 231 | ||
232 | - | func aR ( | |
232 | + | func aR (aP,aQ) = valueOrElse(getBoolean(R, aO(aP, aQ)), false) | |
233 | 233 | ||
234 | 234 | ||
235 | - | func aS (J) = { | |
236 | - | let aT = fromBase58String(valueOrErrorMessage(getString(R, r), A("invalid matcher public key"))) | |
237 | - | let aU = addressFromPublicKey(aT) | |
238 | - | let aV = valueOrErrorMessage(getInteger(aU, aR(J)), A(("invalid price, assetId = " + H(J)))) | |
239 | - | aV | |
235 | + | func aS (J) = makeString(["%s", H(J)], a) | |
236 | + | ||
237 | + | ||
238 | + | func aT (J) = { | |
239 | + | let aU = fromBase58String(valueOrErrorMessage(getString(R, r), A("invalid matcher public key"))) | |
240 | + | let aV = addressFromPublicKey(aU) | |
241 | + | let aW = valueOrErrorMessage(getInteger(aV, aS(J)), A(("invalid price, assetId = " + H(J)))) | |
242 | + | aW | |
240 | 243 | } | |
241 | 244 | ||
242 | 245 | ||
243 | - | func | |
246 | + | func aX (aY,aZ,ba) = (fraction(aY, ba, f) + aZ) | |
244 | 247 | ||
245 | 248 | ||
246 | - | func | |
249 | + | func bb (bc,bd,ba) = (fraction(bc, ba, f) + bd) | |
247 | 250 | ||
248 | 251 | ||
249 | - | func | |
252 | + | func be (bf,bg) = (bf - bg) | |
250 | 253 | ||
251 | 254 | ||
252 | - | func | |
255 | + | func bh (bi,bj,bg) = (fraction(bi, bj, f) - bg) | |
253 | 256 | ||
254 | 257 | ||
255 | - | func | |
256 | - | then ( | |
258 | + | func bk (bl,bm) = if ((bl > k)) | |
259 | + | then (bl - bm) | |
257 | 260 | else k | |
258 | 261 | ||
259 | 262 | ||
260 | - | func | |
261 | - | then ( | |
263 | + | func bn (bl,bm) = if ((bl > k)) | |
264 | + | then (bm - bl) | |
262 | 265 | else k | |
263 | 266 | ||
264 | 267 | ||
265 | - | func | |
266 | - | then max([k, fraction( | |
268 | + | func bo (bp,bq) = if ((bq > k)) | |
269 | + | then max([k, fraction(bp, f, bq)]) | |
267 | 270 | else k | |
268 | 271 | ||
269 | 272 | ||
270 | - | func | |
271 | - | then max([k, fraction( | |
273 | + | func br (bp,bq) = if ((bq > k)) | |
274 | + | then max([k, fraction(bq, f, bp)]) | |
272 | 275 | else k | |
273 | 276 | ||
274 | 277 | ||
275 | - | func | |
278 | + | func bs (bt,bu,ba,bv) = fraction((fraction(bt, ba, f) + bu), bv, f) | |
276 | 279 | ||
277 | 280 | ||
278 | - | func | |
281 | + | func bw (bx,bv,by) = fraction(bx, by, bv) | |
279 | 282 | ||
280 | 283 | ||
281 | - | func | |
282 | - | let | |
283 | - | then ((( | |
284 | + | func bz (bi,bA,bt,bu,bB,bC) = { | |
285 | + | let bD = if ((bt > k)) | |
286 | + | then (((bi - bA) / bt) + bB) | |
284 | 287 | else k | |
285 | - | let | |
286 | - | then ( | |
288 | + | let bE = if ((bu > k)) | |
289 | + | then (bC - ((bi - bA) / (bt / bC))) | |
287 | 290 | else k | |
288 | - | (bC + bD) | |
289 | - | } | |
290 | - | ||
291 | - | ||
292 | - | func bE (an) = { | |
293 | - | let az = fromBase58String(valueOrErrorMessage(getString(R, aF(an)), A("invalid account address: request id is undefined"))) | |
294 | - | az | |
291 | + | (bD + bE) | |
295 | 292 | } | |
296 | 293 | ||
297 | 294 | ||
298 | 295 | func bF (an) = { | |
299 | - | let az = bE(an) | |
300 | - | let aO = F(valueOrErrorMessage(getString(R, aC(az)), A("invalid amount asset id"))) | |
301 | - | let aP = F(valueOrErrorMessage(getString(R, aD(az)), A("invalid amount price id"))) | |
302 | - | $Tuple2(aO, aP) | |
296 | + | let at = fromBase58String(valueOrErrorMessage(getString(R, aG(an)), A("invalid account address: request id is undefined"))) | |
297 | + | at | |
303 | 298 | } | |
304 | 299 | ||
305 | 300 | ||
306 | 301 | func bG (an) = { | |
307 | - | let az = bE(an) | |
308 | - | let bH = valueOrErrorMessage(getBinary(R, aB(az)), A("invalid amount asset id")) | |
309 | - | bH | |
302 | + | let at = bF(an) | |
303 | + | let aP = F(valueOrErrorMessage(getString(R, aD(at)), A("invalid amount asset id"))) | |
304 | + | let aQ = F(valueOrErrorMessage(getString(R, aE(at)), A("invalid amount price id"))) | |
305 | + | $Tuple2(aP, aQ) | |
310 | 306 | } | |
311 | 307 | ||
312 | 308 | ||
313 | - | @Callable(bI) | |
314 | - | func init (bJ) = { | |
315 | - | let bK = Z(bI.caller) | |
316 | - | if ((bK == bK)) | |
317 | - | then $Tuple2([StringEntry(P, bJ)], unit) | |
309 | + | func bH (an) = { | |
310 | + | let at = bF(an) | |
311 | + | let bI = valueOrErrorMessage(getBinary(R, aC(at)), A("invalid amount asset id")) | |
312 | + | bI | |
313 | + | } | |
314 | + | ||
315 | + | ||
316 | + | @Callable(bJ) | |
317 | + | func init (bK) = { | |
318 | + | let bL = Z(bJ.caller) | |
319 | + | if ((bL == bL)) | |
320 | + | then $Tuple2([StringEntry(P, bK)], unit) | |
318 | 321 | else throw("Strict value is not equal to itself.") | |
319 | 322 | } | |
320 | 323 | ||
321 | 324 | ||
322 | 325 | ||
323 | - | @Callable( | |
324 | - | func requestAccount (ac, | |
325 | - | let | |
326 | + | @Callable(bJ) | |
327 | + | func requestAccount (ac,bM) = { | |
328 | + | let bN = [if (!(W)) | |
326 | 329 | then true | |
327 | - | else C("not allowed"), aa( | |
328 | - | if (( | |
330 | + | else C("not allowed"), aa(bJ.caller)] | |
331 | + | if ((bN == bN)) | |
329 | 332 | then { | |
330 | - | let | |
331 | - | let | |
332 | - | let | |
333 | - | let | |
334 | - | let | |
333 | + | let bO = bM[0] | |
334 | + | let bP = bM[1] | |
335 | + | let bj = valueOrErrorMessage(parseInt(bM[2]), A("invalid leverage")) | |
336 | + | let bQ = addressFromPublicKey(ac) | |
337 | + | let at = sha256(((bQ.bytes + fromBase58String(bO)) + fromBase58String(bP))) | |
335 | 338 | let aP = F(bO) | |
336 | - | let bQ = (size(aK(bP)) / j) | |
337 | - | let bR = [if ((size(bI.payments) == 1)) | |
339 | + | let aQ = F(bP) | |
340 | + | let bR = (size(aL(bQ)) / j) | |
341 | + | let bS = [if ((size(bJ.payments) == 1)) | |
338 | 342 | then true | |
339 | - | else C("1 payment is required"), if (( | |
343 | + | else C("1 payment is required"), if ((bJ.payments[0].assetId == unit)) | |
340 | 344 | then true | |
341 | - | else C("invalid asset"), if (( | |
345 | + | else C("invalid asset"), if ((bJ.payments[0].amount == ai())) | |
342 | 346 | then true | |
343 | - | else C("invalid amount"), if ( | |
347 | + | else C("invalid amount"), if (aR(aP, aQ)) | |
344 | 348 | then true | |
345 | - | else C("pair is not allowed"), if ((getInteger(R, | |
349 | + | else C("pair is not allowed"), if ((getInteger(R, aA(at)) == unit)) | |
346 | 350 | then true | |
347 | - | else C("account is already exists"), if ((al() > | |
351 | + | else C("account is already exists"), if ((al() > bR)) | |
348 | 352 | then true | |
349 | 353 | else C(("accounts limit is " + toString(al())))] | |
350 | - | if (( | |
354 | + | if ((bS == bS)) | |
351 | 355 | then { | |
352 | - | let | |
353 | - | then $Tuple2([ScriptTransfer(R, ai(), unit)], [invoke(R, "integerEntry", [ | |
356 | + | let bT = if ((size(aK()) == 0)) | |
357 | + | then $Tuple2([ScriptTransfer(R, ai(), unit)], [invoke(R, "integerEntry", [aA(at), ay], nil), invoke(R, "binaryEntry", [aH(), (aI() + at)], nil), invoke(R, "integerEntry", [as(at), bj], nil)]) | |
354 | 358 | else { | |
355 | - | let | |
356 | - | let an = addressFromPublicKey( | |
357 | - | let | |
358 | - | $Tuple2([ScriptTransfer( | |
359 | + | let bU = take(aK(), j) | |
360 | + | let an = addressFromPublicKey(bU) | |
361 | + | let bV = addressFromPublicKey(valueOrErrorMessage(getBinary(R, aB(an)), A("invalid creator public key"))) | |
362 | + | $Tuple2([ScriptTransfer(bV, ai(), unit)], [invoke(R, "binaryEntry", [aJ(), drop(aK(), j)], nil), invoke(R, "integerEntry", [aA(at), az], nil), invoke(R, "binaryEntry", [aF(at), bU], nil), invoke(R, "stringEntry", [aG(an), toBase58String(at)], nil), invoke(R, "integerEntry", [ar(an), bj], nil)]) | |
359 | 363 | } | |
360 | - | let | |
361 | - | let | |
362 | - | $Tuple2( | |
364 | + | let bW = bT._1 | |
365 | + | let bX = bT._2 | |
366 | + | $Tuple2(bW, (bX ++ [invoke(R, "binaryEntry", [aC(at), ac], nil), invoke(R, "binaryEntry", [aL(bQ), (aN(bQ) + at)], nil), invoke(R, "stringEntry", [aD(at), bO], nil), invoke(R, "stringEntry", [aE(at), bP], nil)])) | |
363 | 367 | } | |
364 | 368 | else throw("Strict value is not equal to itself.") | |
365 | 369 | } | |
368 | 372 | ||
369 | 373 | ||
370 | 374 | ||
371 | - | @Callable( | |
372 | - | func addAccount (ac, | |
373 | - | let | |
375 | + | @Callable(bJ) | |
376 | + | func addAccount (ac,bM) = { | |
377 | + | let bN = [if (!(W)) | |
374 | 378 | then true | |
375 | - | else C("not allowed"), aa( | |
376 | - | if (( | |
379 | + | else C("not allowed"), aa(bJ.caller)] | |
380 | + | if ((bN == bN)) | |
377 | 381 | then { | |
378 | - | let | |
379 | - | let | |
382 | + | let bY = fromBase58String(bM[0]) | |
383 | + | let bU = ac | |
380 | 384 | let an = addressFromPublicKey(ac) | |
381 | - | let | |
382 | - | let | |
385 | + | let bV = addressFromPublicKey(bY) | |
386 | + | let bS = [if ((getBinary(R, aB(an)) == unit)) | |
383 | 387 | then true | |
384 | 388 | else C("account is already exists"), if ({ | |
385 | 389 | let L = scriptHash(an) | |
386 | 390 | if ($isInstanceOf(L, "ByteVector")) | |
387 | 391 | then { | |
388 | - | let | |
389 | - | ( | |
392 | + | let bZ = L | |
393 | + | (bZ == blake2b256_32Kb(ag())) | |
390 | 394 | } | |
391 | 395 | else false | |
392 | 396 | }) | |
393 | 397 | then true | |
394 | 398 | else C("invalid script")] | |
395 | - | if (( | |
399 | + | if ((bS == bS)) | |
396 | 400 | then { | |
397 | - | let | |
398 | - | then $Tuple2(nil, [invoke(R, "binaryEntry", [ | |
401 | + | let ca = if ((size(aI()) == 0)) | |
402 | + | then $Tuple2(nil, [invoke(R, "binaryEntry", [aJ(), (aK() + bU)], nil)]) | |
399 | 403 | else { | |
400 | - | let az = take(aH(), j) | |
401 | - | $Tuple2(nil, [invoke(R, "integerEntry", [ay(az), ax], nil), invoke(R, "binaryEntry", [aE(az), bT], nil), invoke(R, "binaryEntry", [aG(), drop(aH(), j)], nil), invoke(R, "stringEntry", [aF(an), toBase58String(az)], nil), invoke(R, "transferWaves", [bU.bytes, ai()], nil)]) | |
404 | + | let at = take(aI(), j) | |
405 | + | let bj = valueOrErrorMessage(getInteger(R, as(at)), A("request's leverage is undefined")) | |
406 | + | $Tuple2(nil, [invoke(R, "integerEntry", [aA(at), az], nil), invoke(R, "binaryEntry", [aF(at), bU], nil), invoke(R, "binaryEntry", [aH(), drop(aI(), j)], nil), invoke(R, "stringEntry", [aG(an), toBase58String(at)], nil), invoke(R, "transferWaves", [bV.bytes, ai()], nil), invoke(R, "integerEntry", [ar(an), bj], nil)]) | |
402 | 407 | } | |
403 | - | let | |
404 | - | let | |
405 | - | $Tuple2( | |
408 | + | let bW = ca._1 | |
409 | + | let bX = ca._2 | |
410 | + | $Tuple2(bW, (bX ++ [invoke(R, "binaryEntry", [aB(an), bY], nil)])) | |
406 | 411 | } | |
407 | 412 | else throw("Strict value is not equal to itself.") | |
408 | 413 | } | |
411 | 416 | ||
412 | 417 | ||
413 | 418 | ||
414 | - | @Callable( | |
415 | - | func deposit (ac, | |
416 | - | let | |
417 | - | let an = valueOrErrorMessage(addressFromString( | |
418 | - | let | |
419 | + | @Callable(bJ) | |
420 | + | func deposit (ac,bM) = { | |
421 | + | let cb = bJ.payments[0] | |
422 | + | let an = valueOrErrorMessage(addressFromString(bM[0]), A("invalid account address")) | |
423 | + | let bN = [if (!(W)) | |
419 | 424 | then true | |
420 | - | else C("not allowed"), aa( | |
425 | + | else C("not allowed"), aa(bJ.caller), if ((size(bJ.payments) == 1)) | |
421 | 426 | then true | |
422 | - | else C("1 payment is required"), if (( | |
427 | + | else C("1 payment is required"), if ((cb.assetId == U)) | |
423 | 428 | then true | |
424 | - | else C("invalid asset"), if ((getInteger(R, | |
429 | + | else C("invalid asset"), if ((getInteger(R, aA(bF(an))) == az)) | |
425 | 430 | then true | |
426 | 431 | else C("account is not ready")] | |
427 | - | if (( | |
432 | + | if ((bN == bN)) | |
428 | 433 | then { | |
429 | - | let | |
430 | - | let | |
431 | - | $Tuple2( | |
434 | + | let bW = [ScriptTransfer(an, cb.amount, cb.assetId)] | |
435 | + | let bX = [invoke(R, "integerEntry", [am(an), (valueOrElse(ao(an), 0) + cb.amount)], nil)] | |
436 | + | $Tuple2(bW, bX) | |
432 | 437 | } | |
433 | 438 | else throw("Strict value is not equal to itself.") | |
434 | 439 | } | |
435 | 440 | ||
436 | 441 | ||
437 | 442 | ||
438 | - | @Callable( | |
439 | - | func withdraw (ac, | |
440 | - | let | |
443 | + | @Callable(bJ) | |
444 | + | func withdraw (ac,bM) = { | |
445 | + | let bN = [if (!(W)) | |
441 | 446 | then true | |
442 | - | else C("not allowed"), aa( | |
443 | - | if (( | |
447 | + | else C("not allowed"), aa(bJ.caller)] | |
448 | + | if ((bN == bN)) | |
444 | 449 | then { | |
445 | - | let | |
446 | - | let an = valueOrErrorMessage(addressFromString( | |
447 | - | let | |
448 | - | let J = F( | |
449 | - | let | |
450 | - | $Tuple2(nil, | |
450 | + | let bQ = addressFromPublicKey(ac) | |
451 | + | let an = valueOrErrorMessage(addressFromString(bM[0]), A("invalid account address")) | |
452 | + | let cc = valueOrErrorMessage(parseInt(bM[1]), A("invalid amount")) | |
453 | + | let J = F(bM[2]) | |
454 | + | let cd = [invoke(an, "transferAsset", [bQ.bytes, cc, J], nil)] | |
455 | + | $Tuple2(nil, cd) | |
451 | 456 | } | |
452 | 457 | else throw("Strict value is not equal to itself.") | |
453 | 458 | } | |
454 | 459 | ||
455 | 460 | ||
456 | 461 | ||
457 | - | @Callable( | |
458 | - | func borrow (ac, | |
459 | - | let an = valueOrErrorMessage(addressFromString( | |
460 | - | let | |
461 | - | let | |
462 | - | let | |
463 | - | let | |
464 | - | let | |
462 | + | @Callable(bJ) | |
463 | + | func borrow (ac,bM) = { | |
464 | + | let an = valueOrErrorMessage(addressFromString(bM[0]), A("invalid account address")) | |
465 | + | let ce = F(bM[1]) | |
466 | + | let cf = D(valueOrErrorMessage(parseInt(bM[2]), A("invalid requested amount")), "requested amount") | |
467 | + | let cg = bH(an) | |
468 | + | let bQ = addressFromPublicKey(ac) | |
469 | + | let bN = [if (!(W)) | |
465 | 470 | then true | |
466 | - | else C("not allowed"), aa( | |
471 | + | else C("not allowed"), aa(bJ.caller), if ((ac == cg)) | |
467 | 472 | then true | |
468 | 473 | else C("can be called by account owner only")] | |
469 | - | if (( | |
474 | + | if ((bN == bN)) | |
470 | 475 | then { | |
471 | - | let aO = bF(an)._1 | |
472 | - | let cg = s(valueOrElse(ao(an), 0), O(U)) | |
473 | - | let aZ = s(aS(aO), O(U)) | |
474 | - | let aX = s(valueOrElse(getInteger(R, ap(an, aO)), 0), O(aO)) | |
475 | - | let aY = s(valueOrElse(getInteger(R, ap(an, U)), 0), O(U)) | |
476 | - | let bf = aW(aX, aY, aZ) | |
477 | - | let ch = 3 | |
478 | - | let bi = s(valueOrElse(getInteger(R, ar(an)), ch), 1) | |
479 | - | let ci = bg(cg, bi, bf) | |
480 | - | let cj = if ((cd == aO)) | |
481 | - | then v(fraction(ci, f, aZ), O(aO)) | |
482 | - | else if ((cd == U)) | |
476 | + | let aP = bG(an)._1 | |
477 | + | let ch = s(valueOrElse(ao(an), 0), O(U)) | |
478 | + | let ba = s(aT(aP), O(U)) | |
479 | + | let aY = s(valueOrElse(getInteger(R, ap(an, aP)), 0), O(aP)) | |
480 | + | let aZ = s(valueOrElse(getInteger(R, ap(an, U)), 0), O(U)) | |
481 | + | let bg = aX(aY, aZ, ba) | |
482 | + | let bj = s(valueOrErrorMessage(getInteger(R, ar(an)), A("leverage should be defined")), 1) | |
483 | + | let ci = bh(ch, bj, bg) | |
484 | + | let cj = if ((ce == aP)) | |
485 | + | then v(fraction(ci, f, ba), O(aP)) | |
486 | + | else if ((ce == U)) | |
483 | 487 | then v(ci, O(U)) | |
484 | 488 | else C("invalid requested asset id") | |
485 | - | let | |
486 | - | let ck = if ((cj >= | |
487 | - | then | |
489 | + | let ax = F(valueOrErrorMessage(getString(R, au(ce)), A("synthetic asset for requested asset is undefined"))) | |
490 | + | let ck = if ((cj >= cf)) | |
491 | + | then cf | |
488 | 492 | else C(("credit available = " + toString(cj))) | |
489 | - | let | |
490 | - | $Tuple2(nil, [ | |
493 | + | let bX = [invoke(R, "integerEntry", [ap(an, ce), (valueOrElse(aq(an, ce), 0) + ck)], nil), invoke(R, "transferAsset", [bQ.bytes, ck, ax], nil)] | |
494 | + | $Tuple2(nil, [bX, cj]) | |
491 | 495 | } | |
492 | 496 | else throw("Strict value is not equal to itself.") | |
493 | 497 | } | |
494 | 498 | ||
495 | 499 | ||
496 | 500 | ||
497 | - | @Callable( | |
498 | - | func repay (ac, | |
499 | - | let | |
501 | + | @Callable(bJ) | |
502 | + | func repay (ac,bM) = { | |
503 | + | let bN = [if (!(W)) | |
500 | 504 | then true | |
501 | - | else C("not allowed"), aa( | |
502 | - | if (( | |
505 | + | else C("not allowed"), aa(bJ.caller)] | |
506 | + | if ((bN == bN)) | |
503 | 507 | then $Tuple2(nil, unit) | |
504 | 508 | else throw("Strict value is not equal to itself.") | |
505 | 509 | } | |
506 | 510 | ||
507 | 511 | ||
508 | 512 | ||
509 | - | @Callable( | |
510 | - | func setPairAllowance (ac, | |
511 | - | let | |
513 | + | @Callable(bJ) | |
514 | + | func setPairAllowance (ac,bM) = { | |
515 | + | let bN = [if (!(W)) | |
512 | 516 | then true | |
513 | - | else C("not allowed"), aa( | |
514 | - | if (( | |
517 | + | else C("not allowed"), aa(bJ.caller), ab(ac)] | |
518 | + | if ((bN == bN)) | |
515 | 519 | then { | |
516 | - | let bN = bL[0] | |
517 | - | let bO = bL[1] | |
518 | - | let cl = bL[2] | |
519 | - | let aO = F(bN) | |
520 | + | let bO = bM[0] | |
521 | + | let bP = bM[1] | |
522 | + | let cl = bM[2] | |
520 | 523 | let aP = F(bO) | |
524 | + | let aQ = F(bP) | |
521 | 525 | let cm = (cl == "true") | |
522 | - | let | |
523 | - | $Tuple2(nil, | |
526 | + | let cd = [invoke(R, "booleanEntry", [aO(aP, aQ), cm], nil)] | |
527 | + | $Tuple2(nil, cd) | |
524 | 528 | } | |
525 | 529 | else throw("Strict value is not equal to itself.") | |
526 | 530 | } | |
527 | 531 | ||
528 | 532 | ||
529 | 533 | ||
530 | - | @Callable( | |
531 | - | func addSyntheticAsset (ac, | |
532 | - | let | |
533 | - | let | |
534 | - | let | |
534 | + | @Callable(bJ) | |
535 | + | func addSyntheticAsset (ac,bM) = { | |
536 | + | let av = F(bM[0]) | |
537 | + | let ax = F(bM[1]) | |
538 | + | let bN = [if (!(W)) | |
535 | 539 | then true | |
536 | - | else C("not allowed"), aa( | |
540 | + | else C("not allowed"), aa(bJ.caller), ab(ac), if ((getString(R, au(av)) == unit)) | |
537 | 541 | then true | |
538 | - | else C("invalid base asset"), if ((getString(R, | |
542 | + | else C("invalid base asset"), if ((getString(R, aw(ax)) == unit)) | |
539 | 543 | then true | |
540 | 544 | else C("invalid synthetic asset")] | |
541 | - | if (( | |
545 | + | if ((bN == bN)) | |
542 | 546 | then { | |
543 | - | let | |
544 | - | $Tuple2(nil, | |
547 | + | let cd = [invoke(R, "stringEntry", [au(av), H(ax)], nil), invoke(R, "stringEntry", [aw(ax), H(av)], nil)] | |
548 | + | $Tuple2(nil, cd) | |
545 | 549 | } | |
546 | 550 | else throw("Strict value is not equal to itself.") | |
547 | 551 | } | |
548 | 552 | ||
549 | 553 | ||
550 | 554 | ||
551 | - | @Callable( | |
552 | - | func doShutdown (ac, | |
553 | - | let | |
554 | - | if (( | |
555 | + | @Callable(bJ) | |
556 | + | func doShutdown (ac,bM) = { | |
557 | + | let bS = [aa(bJ.caller), ab(ac)] | |
558 | + | if ((bS == bS)) | |
555 | 559 | then { | |
556 | - | let | |
557 | - | $Tuple2(nil, | |
560 | + | let cd = [invoke(R, "booleanEntry", [p, true], nil)] | |
561 | + | $Tuple2(nil, cd) | |
558 | 562 | } | |
559 | 563 | else throw("Strict value is not equal to itself.") | |
560 | 564 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 7 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "__" | |
5 | 5 | ||
6 | 6 | let b = take(drop(this.bytes, 1), 1) | |
7 | 7 | ||
8 | 8 | let c = base58'2W' | |
9 | 9 | ||
10 | 10 | let d = "futures_calculator.ride" | |
11 | 11 | ||
12 | 12 | let e = 100000000 | |
13 | 13 | ||
14 | 14 | let f = toBigInt(1000000000000000000) | |
15 | 15 | ||
16 | 16 | let g = 8 | |
17 | 17 | ||
18 | 18 | let h = 6 | |
19 | 19 | ||
20 | 20 | let i = "WAVES" | |
21 | 21 | ||
22 | 22 | let j = 32 | |
23 | 23 | ||
24 | 24 | let k = toBigInt(0) | |
25 | 25 | ||
26 | 26 | let l = "%s__multisig" | |
27 | 27 | ||
28 | 28 | func m (n,o) = makeString(["%s__status", n, o], a) | |
29 | 29 | ||
30 | 30 | ||
31 | 31 | let p = "%s__shutdown" | |
32 | 32 | ||
33 | 33 | let q = "%s__publicKeys" | |
34 | 34 | ||
35 | 35 | let r = "%s__matcherPublicKey" | |
36 | 36 | ||
37 | 37 | func s (t,u) = fraction(toBigInt(t), f, toBigInt(u)) | |
38 | 38 | ||
39 | 39 | ||
40 | 40 | func v (w,x) = toInt(fraction(w, toBigInt(x), f)) | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | func y (z) = isDefined(addressFromString(z)) | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | func A (B) = ((d + ": ") + B) | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | func C (B) = throw(A(B)) | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func D (E,B) = if ((E >= 0)) | |
53 | 53 | then E | |
54 | 54 | else C((B + " value should be positive")) | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func F (G) = if ((G == i)) | |
58 | 58 | then unit | |
59 | 59 | else fromBase58String(G) | |
60 | 60 | ||
61 | 61 | ||
62 | 62 | func H (G) = if ((G == unit)) | |
63 | 63 | then i | |
64 | 64 | else toBase58String(value(G)) | |
65 | 65 | ||
66 | 66 | ||
67 | 67 | func I (J) = valueOrErrorMessage(assetInfo(J), A("invalid asset info")) | |
68 | 68 | ||
69 | 69 | ||
70 | 70 | func K (J) = { | |
71 | 71 | let L = J | |
72 | 72 | if ($isInstanceOf(L, "Unit")) | |
73 | 73 | then g | |
74 | 74 | else if ($isInstanceOf(L, "ByteVector")) | |
75 | 75 | then { | |
76 | 76 | let J = L | |
77 | 77 | I(J).decimals | |
78 | 78 | } | |
79 | 79 | else throw("Match error") | |
80 | 80 | } | |
81 | 81 | ||
82 | 82 | ||
83 | 83 | func M (N) = pow(10, 0, N, 0, 0, DOWN) | |
84 | 84 | ||
85 | 85 | ||
86 | 86 | func O (J) = M(K(J)) | |
87 | 87 | ||
88 | 88 | ||
89 | 89 | let P = "%s__factoryAddress" | |
90 | 90 | ||
91 | 91 | let Q = { | |
92 | 92 | let L = getString(this, P) | |
93 | 93 | if ($isInstanceOf(L, "String")) | |
94 | 94 | then { | |
95 | 95 | let B = L | |
96 | 96 | addressFromString(B) | |
97 | 97 | } | |
98 | 98 | else if ($isInstanceOf(L, "Unit")) | |
99 | 99 | then unit | |
100 | 100 | else throw("Match error") | |
101 | 101 | } | |
102 | 102 | ||
103 | 103 | let R = valueOrErrorMessage(Q, A("invalid factory address")) | |
104 | 104 | ||
105 | 105 | let S = "%s__usdtAssetId" | |
106 | 106 | ||
107 | 107 | let T = { | |
108 | 108 | let L = getString(R, S) | |
109 | 109 | if ($isInstanceOf(L, "String")) | |
110 | 110 | then { | |
111 | 111 | let B = L | |
112 | 112 | F(B) | |
113 | 113 | } | |
114 | 114 | else if ($isInstanceOf(L, "Unit")) | |
115 | 115 | then unit | |
116 | 116 | else throw("Match error") | |
117 | 117 | } | |
118 | 118 | ||
119 | 119 | let U = valueOrErrorMessage(T, A("invalid usdt asset id")) | |
120 | 120 | ||
121 | 121 | let V = "%s__calculatorAddress" | |
122 | 122 | ||
123 | 123 | let W = valueOrElse(getBoolean(R, p), false) | |
124 | 124 | ||
125 | 125 | func X (Y,z) = if ((Y == z)) | |
126 | 126 | then true | |
127 | 127 | else C("permission denied") | |
128 | 128 | ||
129 | 129 | ||
130 | 130 | func Z (Y) = X(Y, this) | |
131 | 131 | ||
132 | 132 | ||
133 | 133 | func aa (Y) = X(Y, R) | |
134 | 134 | ||
135 | 135 | ||
136 | 136 | func ab (ac) = { | |
137 | 137 | let ad = addressFromStringValue(getStringValue(R, l)) | |
138 | 138 | let ae = split(getStringValue(ad, q), a) | |
139 | 139 | if (containsElement(ae, toBase58String(ac))) | |
140 | 140 | then true | |
141 | 141 | else C("not allowed") | |
142 | 142 | } | |
143 | 143 | ||
144 | 144 | ||
145 | 145 | let af = "%s__accountScript" | |
146 | 146 | ||
147 | 147 | func ag () = valueOrErrorMessage(getBinary(R, af), A("account script is not set")) | |
148 | 148 | ||
149 | 149 | ||
150 | 150 | let ah = "%s__rewardAmount" | |
151 | 151 | ||
152 | 152 | func ai () = valueOrErrorMessage(getInteger(R, ah), A("reward amount is not set")) | |
153 | 153 | ||
154 | 154 | ||
155 | 155 | let aj = "%s__accountsLimit" | |
156 | 156 | ||
157 | 157 | let ak = 20 | |
158 | 158 | ||
159 | 159 | func al () = valueOrElse(getInteger(R, aj), ak) | |
160 | 160 | ||
161 | 161 | ||
162 | 162 | func am (an) = makeString(["%s%s", "deposited", toString(an)], a) | |
163 | 163 | ||
164 | 164 | ||
165 | 165 | func ao (an) = getInteger(R, am(an)) | |
166 | 166 | ||
167 | 167 | ||
168 | 168 | func ap (an,J) = makeString(["%s%s%s", "credit", toString(an), H(J)], a) | |
169 | 169 | ||
170 | 170 | ||
171 | 171 | func aq (an,J) = getInteger(R, ap(an, J)) | |
172 | 172 | ||
173 | 173 | ||
174 | 174 | func ar (an) = makeString(["%s%s", "leverage", toString(an)], a) | |
175 | 175 | ||
176 | 176 | ||
177 | - | func as (at) = makeString(["%s%s", " | |
177 | + | func as (at) = makeString(["%s%s", "requestLeverage", toBase58String(at)], a) | |
178 | 178 | ||
179 | 179 | ||
180 | - | func au (av) = makeString(["%s%s", " | |
180 | + | func au (av) = makeString(["%s%s", "syntheticAssetId", H(av)], a) | |
181 | 181 | ||
182 | 182 | ||
183 | - | let aw = 0 | |
184 | - | ||
185 | - | let ax = 1 | |
186 | - | ||
187 | - | func ay (az) = makeString(["%s%s", toBase58String(az), "status"], a) | |
183 | + | func aw (ax) = makeString(["%s%s", "baseAssetId", H(ax)], a) | |
188 | 184 | ||
189 | 185 | ||
190 | - | func aA (an) = makeString(["%s%s", toString(an), "creatorPublicKey"], a) | |
186 | + | let ay = 0 | |
187 | + | ||
188 | + | let az = 1 | |
189 | + | ||
190 | + | func aA (at) = makeString(["%s%s", toBase58String(at), "status"], a) | |
191 | 191 | ||
192 | 192 | ||
193 | - | func aB ( | |
193 | + | func aB (an) = makeString(["%s%s", toString(an), "creatorPublicKey"], a) | |
194 | 194 | ||
195 | 195 | ||
196 | - | func aC ( | |
196 | + | func aC (at) = makeString(["%s%s", toBase58String(at), "ownerPublicKey"], a) | |
197 | 197 | ||
198 | 198 | ||
199 | - | func aD ( | |
199 | + | func aD (at) = makeString(["%s%s", toBase58String(at), "amountAssetId"], a) | |
200 | 200 | ||
201 | 201 | ||
202 | - | func aE ( | |
202 | + | func aE (at) = makeString(["%s%s", toBase58String(at), "priceAssetId"], a) | |
203 | 203 | ||
204 | 204 | ||
205 | - | func aF ( | |
205 | + | func aF (at) = makeString(["%s%s", toBase58String(at), "requestIdToAccountPublicKey"], a) | |
206 | 206 | ||
207 | 207 | ||
208 | - | func aG () = makeString(["%s", " | |
208 | + | func aG (an) = makeString(["%s%s", toString(an), "accountAddressToRequestId"], a) | |
209 | 209 | ||
210 | 210 | ||
211 | - | func aH () = | |
211 | + | func aH () = makeString(["%s", "requestsQueue"], a) | |
212 | 212 | ||
213 | 213 | ||
214 | - | func aI () = | |
214 | + | func aI () = valueOrElse(getBinary(R, aH()), base58'') | |
215 | 215 | ||
216 | 216 | ||
217 | - | func aJ () = | |
217 | + | func aJ () = makeString(["%s", "accountsQueue"], a) | |
218 | 218 | ||
219 | 219 | ||
220 | - | func aK ( | |
220 | + | func aK () = valueOrElse(getBinary(R, aJ()), base58'') | |
221 | 221 | ||
222 | 222 | ||
223 | - | func | |
223 | + | func aL (aM) = makeString(["%s%s", "requests", toString(aM)], a) | |
224 | 224 | ||
225 | 225 | ||
226 | - | func aN ( | |
226 | + | func aN (aM) = valueOrElse(getBinary(R, aL(aM)), base58'') | |
227 | 227 | ||
228 | 228 | ||
229 | - | func | |
229 | + | func aO (aP,aQ) = makeString(["%s%s%s", H(aP), H(aQ), "pairAllowed"], a) | |
230 | 230 | ||
231 | 231 | ||
232 | - | func aR ( | |
232 | + | func aR (aP,aQ) = valueOrElse(getBoolean(R, aO(aP, aQ)), false) | |
233 | 233 | ||
234 | 234 | ||
235 | - | func aS (J) = { | |
236 | - | let aT = fromBase58String(valueOrErrorMessage(getString(R, r), A("invalid matcher public key"))) | |
237 | - | let aU = addressFromPublicKey(aT) | |
238 | - | let aV = valueOrErrorMessage(getInteger(aU, aR(J)), A(("invalid price, assetId = " + H(J)))) | |
239 | - | aV | |
235 | + | func aS (J) = makeString(["%s", H(J)], a) | |
236 | + | ||
237 | + | ||
238 | + | func aT (J) = { | |
239 | + | let aU = fromBase58String(valueOrErrorMessage(getString(R, r), A("invalid matcher public key"))) | |
240 | + | let aV = addressFromPublicKey(aU) | |
241 | + | let aW = valueOrErrorMessage(getInteger(aV, aS(J)), A(("invalid price, assetId = " + H(J)))) | |
242 | + | aW | |
240 | 243 | } | |
241 | 244 | ||
242 | 245 | ||
243 | - | func | |
246 | + | func aX (aY,aZ,ba) = (fraction(aY, ba, f) + aZ) | |
244 | 247 | ||
245 | 248 | ||
246 | - | func | |
249 | + | func bb (bc,bd,ba) = (fraction(bc, ba, f) + bd) | |
247 | 250 | ||
248 | 251 | ||
249 | - | func | |
252 | + | func be (bf,bg) = (bf - bg) | |
250 | 253 | ||
251 | 254 | ||
252 | - | func | |
255 | + | func bh (bi,bj,bg) = (fraction(bi, bj, f) - bg) | |
253 | 256 | ||
254 | 257 | ||
255 | - | func | |
256 | - | then ( | |
258 | + | func bk (bl,bm) = if ((bl > k)) | |
259 | + | then (bl - bm) | |
257 | 260 | else k | |
258 | 261 | ||
259 | 262 | ||
260 | - | func | |
261 | - | then ( | |
263 | + | func bn (bl,bm) = if ((bl > k)) | |
264 | + | then (bm - bl) | |
262 | 265 | else k | |
263 | 266 | ||
264 | 267 | ||
265 | - | func | |
266 | - | then max([k, fraction( | |
268 | + | func bo (bp,bq) = if ((bq > k)) | |
269 | + | then max([k, fraction(bp, f, bq)]) | |
267 | 270 | else k | |
268 | 271 | ||
269 | 272 | ||
270 | - | func | |
271 | - | then max([k, fraction( | |
273 | + | func br (bp,bq) = if ((bq > k)) | |
274 | + | then max([k, fraction(bq, f, bp)]) | |
272 | 275 | else k | |
273 | 276 | ||
274 | 277 | ||
275 | - | func | |
278 | + | func bs (bt,bu,ba,bv) = fraction((fraction(bt, ba, f) + bu), bv, f) | |
276 | 279 | ||
277 | 280 | ||
278 | - | func | |
281 | + | func bw (bx,bv,by) = fraction(bx, by, bv) | |
279 | 282 | ||
280 | 283 | ||
281 | - | func | |
282 | - | let | |
283 | - | then ((( | |
284 | + | func bz (bi,bA,bt,bu,bB,bC) = { | |
285 | + | let bD = if ((bt > k)) | |
286 | + | then (((bi - bA) / bt) + bB) | |
284 | 287 | else k | |
285 | - | let | |
286 | - | then ( | |
288 | + | let bE = if ((bu > k)) | |
289 | + | then (bC - ((bi - bA) / (bt / bC))) | |
287 | 290 | else k | |
288 | - | (bC + bD) | |
289 | - | } | |
290 | - | ||
291 | - | ||
292 | - | func bE (an) = { | |
293 | - | let az = fromBase58String(valueOrErrorMessage(getString(R, aF(an)), A("invalid account address: request id is undefined"))) | |
294 | - | az | |
291 | + | (bD + bE) | |
295 | 292 | } | |
296 | 293 | ||
297 | 294 | ||
298 | 295 | func bF (an) = { | |
299 | - | let az = bE(an) | |
300 | - | let aO = F(valueOrErrorMessage(getString(R, aC(az)), A("invalid amount asset id"))) | |
301 | - | let aP = F(valueOrErrorMessage(getString(R, aD(az)), A("invalid amount price id"))) | |
302 | - | $Tuple2(aO, aP) | |
296 | + | let at = fromBase58String(valueOrErrorMessage(getString(R, aG(an)), A("invalid account address: request id is undefined"))) | |
297 | + | at | |
303 | 298 | } | |
304 | 299 | ||
305 | 300 | ||
306 | 301 | func bG (an) = { | |
307 | - | let az = bE(an) | |
308 | - | let bH = valueOrErrorMessage(getBinary(R, aB(az)), A("invalid amount asset id")) | |
309 | - | bH | |
302 | + | let at = bF(an) | |
303 | + | let aP = F(valueOrErrorMessage(getString(R, aD(at)), A("invalid amount asset id"))) | |
304 | + | let aQ = F(valueOrErrorMessage(getString(R, aE(at)), A("invalid amount price id"))) | |
305 | + | $Tuple2(aP, aQ) | |
310 | 306 | } | |
311 | 307 | ||
312 | 308 | ||
313 | - | @Callable(bI) | |
314 | - | func init (bJ) = { | |
315 | - | let bK = Z(bI.caller) | |
316 | - | if ((bK == bK)) | |
317 | - | then $Tuple2([StringEntry(P, bJ)], unit) | |
309 | + | func bH (an) = { | |
310 | + | let at = bF(an) | |
311 | + | let bI = valueOrErrorMessage(getBinary(R, aC(at)), A("invalid amount asset id")) | |
312 | + | bI | |
313 | + | } | |
314 | + | ||
315 | + | ||
316 | + | @Callable(bJ) | |
317 | + | func init (bK) = { | |
318 | + | let bL = Z(bJ.caller) | |
319 | + | if ((bL == bL)) | |
320 | + | then $Tuple2([StringEntry(P, bK)], unit) | |
318 | 321 | else throw("Strict value is not equal to itself.") | |
319 | 322 | } | |
320 | 323 | ||
321 | 324 | ||
322 | 325 | ||
323 | - | @Callable( | |
324 | - | func requestAccount (ac, | |
325 | - | let | |
326 | + | @Callable(bJ) | |
327 | + | func requestAccount (ac,bM) = { | |
328 | + | let bN = [if (!(W)) | |
326 | 329 | then true | |
327 | - | else C("not allowed"), aa( | |
328 | - | if (( | |
330 | + | else C("not allowed"), aa(bJ.caller)] | |
331 | + | if ((bN == bN)) | |
329 | 332 | then { | |
330 | - | let | |
331 | - | let | |
332 | - | let | |
333 | - | let | |
334 | - | let | |
333 | + | let bO = bM[0] | |
334 | + | let bP = bM[1] | |
335 | + | let bj = valueOrErrorMessage(parseInt(bM[2]), A("invalid leverage")) | |
336 | + | let bQ = addressFromPublicKey(ac) | |
337 | + | let at = sha256(((bQ.bytes + fromBase58String(bO)) + fromBase58String(bP))) | |
335 | 338 | let aP = F(bO) | |
336 | - | let bQ = (size(aK(bP)) / j) | |
337 | - | let bR = [if ((size(bI.payments) == 1)) | |
339 | + | let aQ = F(bP) | |
340 | + | let bR = (size(aL(bQ)) / j) | |
341 | + | let bS = [if ((size(bJ.payments) == 1)) | |
338 | 342 | then true | |
339 | - | else C("1 payment is required"), if (( | |
343 | + | else C("1 payment is required"), if ((bJ.payments[0].assetId == unit)) | |
340 | 344 | then true | |
341 | - | else C("invalid asset"), if (( | |
345 | + | else C("invalid asset"), if ((bJ.payments[0].amount == ai())) | |
342 | 346 | then true | |
343 | - | else C("invalid amount"), if ( | |
347 | + | else C("invalid amount"), if (aR(aP, aQ)) | |
344 | 348 | then true | |
345 | - | else C("pair is not allowed"), if ((getInteger(R, | |
349 | + | else C("pair is not allowed"), if ((getInteger(R, aA(at)) == unit)) | |
346 | 350 | then true | |
347 | - | else C("account is already exists"), if ((al() > | |
351 | + | else C("account is already exists"), if ((al() > bR)) | |
348 | 352 | then true | |
349 | 353 | else C(("accounts limit is " + toString(al())))] | |
350 | - | if (( | |
354 | + | if ((bS == bS)) | |
351 | 355 | then { | |
352 | - | let | |
353 | - | then $Tuple2([ScriptTransfer(R, ai(), unit)], [invoke(R, "integerEntry", [ | |
356 | + | let bT = if ((size(aK()) == 0)) | |
357 | + | then $Tuple2([ScriptTransfer(R, ai(), unit)], [invoke(R, "integerEntry", [aA(at), ay], nil), invoke(R, "binaryEntry", [aH(), (aI() + at)], nil), invoke(R, "integerEntry", [as(at), bj], nil)]) | |
354 | 358 | else { | |
355 | - | let | |
356 | - | let an = addressFromPublicKey( | |
357 | - | let | |
358 | - | $Tuple2([ScriptTransfer( | |
359 | + | let bU = take(aK(), j) | |
360 | + | let an = addressFromPublicKey(bU) | |
361 | + | let bV = addressFromPublicKey(valueOrErrorMessage(getBinary(R, aB(an)), A("invalid creator public key"))) | |
362 | + | $Tuple2([ScriptTransfer(bV, ai(), unit)], [invoke(R, "binaryEntry", [aJ(), drop(aK(), j)], nil), invoke(R, "integerEntry", [aA(at), az], nil), invoke(R, "binaryEntry", [aF(at), bU], nil), invoke(R, "stringEntry", [aG(an), toBase58String(at)], nil), invoke(R, "integerEntry", [ar(an), bj], nil)]) | |
359 | 363 | } | |
360 | - | let | |
361 | - | let | |
362 | - | $Tuple2( | |
364 | + | let bW = bT._1 | |
365 | + | let bX = bT._2 | |
366 | + | $Tuple2(bW, (bX ++ [invoke(R, "binaryEntry", [aC(at), ac], nil), invoke(R, "binaryEntry", [aL(bQ), (aN(bQ) + at)], nil), invoke(R, "stringEntry", [aD(at), bO], nil), invoke(R, "stringEntry", [aE(at), bP], nil)])) | |
363 | 367 | } | |
364 | 368 | else throw("Strict value is not equal to itself.") | |
365 | 369 | } | |
366 | 370 | else throw("Strict value is not equal to itself.") | |
367 | 371 | } | |
368 | 372 | ||
369 | 373 | ||
370 | 374 | ||
371 | - | @Callable( | |
372 | - | func addAccount (ac, | |
373 | - | let | |
375 | + | @Callable(bJ) | |
376 | + | func addAccount (ac,bM) = { | |
377 | + | let bN = [if (!(W)) | |
374 | 378 | then true | |
375 | - | else C("not allowed"), aa( | |
376 | - | if (( | |
379 | + | else C("not allowed"), aa(bJ.caller)] | |
380 | + | if ((bN == bN)) | |
377 | 381 | then { | |
378 | - | let | |
379 | - | let | |
382 | + | let bY = fromBase58String(bM[0]) | |
383 | + | let bU = ac | |
380 | 384 | let an = addressFromPublicKey(ac) | |
381 | - | let | |
382 | - | let | |
385 | + | let bV = addressFromPublicKey(bY) | |
386 | + | let bS = [if ((getBinary(R, aB(an)) == unit)) | |
383 | 387 | then true | |
384 | 388 | else C("account is already exists"), if ({ | |
385 | 389 | let L = scriptHash(an) | |
386 | 390 | if ($isInstanceOf(L, "ByteVector")) | |
387 | 391 | then { | |
388 | - | let | |
389 | - | ( | |
392 | + | let bZ = L | |
393 | + | (bZ == blake2b256_32Kb(ag())) | |
390 | 394 | } | |
391 | 395 | else false | |
392 | 396 | }) | |
393 | 397 | then true | |
394 | 398 | else C("invalid script")] | |
395 | - | if (( | |
399 | + | if ((bS == bS)) | |
396 | 400 | then { | |
397 | - | let | |
398 | - | then $Tuple2(nil, [invoke(R, "binaryEntry", [ | |
401 | + | let ca = if ((size(aI()) == 0)) | |
402 | + | then $Tuple2(nil, [invoke(R, "binaryEntry", [aJ(), (aK() + bU)], nil)]) | |
399 | 403 | else { | |
400 | - | let az = take(aH(), j) | |
401 | - | $Tuple2(nil, [invoke(R, "integerEntry", [ay(az), ax], nil), invoke(R, "binaryEntry", [aE(az), bT], nil), invoke(R, "binaryEntry", [aG(), drop(aH(), j)], nil), invoke(R, "stringEntry", [aF(an), toBase58String(az)], nil), invoke(R, "transferWaves", [bU.bytes, ai()], nil)]) | |
404 | + | let at = take(aI(), j) | |
405 | + | let bj = valueOrErrorMessage(getInteger(R, as(at)), A("request's leverage is undefined")) | |
406 | + | $Tuple2(nil, [invoke(R, "integerEntry", [aA(at), az], nil), invoke(R, "binaryEntry", [aF(at), bU], nil), invoke(R, "binaryEntry", [aH(), drop(aI(), j)], nil), invoke(R, "stringEntry", [aG(an), toBase58String(at)], nil), invoke(R, "transferWaves", [bV.bytes, ai()], nil), invoke(R, "integerEntry", [ar(an), bj], nil)]) | |
402 | 407 | } | |
403 | - | let | |
404 | - | let | |
405 | - | $Tuple2( | |
408 | + | let bW = ca._1 | |
409 | + | let bX = ca._2 | |
410 | + | $Tuple2(bW, (bX ++ [invoke(R, "binaryEntry", [aB(an), bY], nil)])) | |
406 | 411 | } | |
407 | 412 | else throw("Strict value is not equal to itself.") | |
408 | 413 | } | |
409 | 414 | else throw("Strict value is not equal to itself.") | |
410 | 415 | } | |
411 | 416 | ||
412 | 417 | ||
413 | 418 | ||
414 | - | @Callable( | |
415 | - | func deposit (ac, | |
416 | - | let | |
417 | - | let an = valueOrErrorMessage(addressFromString( | |
418 | - | let | |
419 | + | @Callable(bJ) | |
420 | + | func deposit (ac,bM) = { | |
421 | + | let cb = bJ.payments[0] | |
422 | + | let an = valueOrErrorMessage(addressFromString(bM[0]), A("invalid account address")) | |
423 | + | let bN = [if (!(W)) | |
419 | 424 | then true | |
420 | - | else C("not allowed"), aa( | |
425 | + | else C("not allowed"), aa(bJ.caller), if ((size(bJ.payments) == 1)) | |
421 | 426 | then true | |
422 | - | else C("1 payment is required"), if (( | |
427 | + | else C("1 payment is required"), if ((cb.assetId == U)) | |
423 | 428 | then true | |
424 | - | else C("invalid asset"), if ((getInteger(R, | |
429 | + | else C("invalid asset"), if ((getInteger(R, aA(bF(an))) == az)) | |
425 | 430 | then true | |
426 | 431 | else C("account is not ready")] | |
427 | - | if (( | |
432 | + | if ((bN == bN)) | |
428 | 433 | then { | |
429 | - | let | |
430 | - | let | |
431 | - | $Tuple2( | |
434 | + | let bW = [ScriptTransfer(an, cb.amount, cb.assetId)] | |
435 | + | let bX = [invoke(R, "integerEntry", [am(an), (valueOrElse(ao(an), 0) + cb.amount)], nil)] | |
436 | + | $Tuple2(bW, bX) | |
432 | 437 | } | |
433 | 438 | else throw("Strict value is not equal to itself.") | |
434 | 439 | } | |
435 | 440 | ||
436 | 441 | ||
437 | 442 | ||
438 | - | @Callable( | |
439 | - | func withdraw (ac, | |
440 | - | let | |
443 | + | @Callable(bJ) | |
444 | + | func withdraw (ac,bM) = { | |
445 | + | let bN = [if (!(W)) | |
441 | 446 | then true | |
442 | - | else C("not allowed"), aa( | |
443 | - | if (( | |
447 | + | else C("not allowed"), aa(bJ.caller)] | |
448 | + | if ((bN == bN)) | |
444 | 449 | then { | |
445 | - | let | |
446 | - | let an = valueOrErrorMessage(addressFromString( | |
447 | - | let | |
448 | - | let J = F( | |
449 | - | let | |
450 | - | $Tuple2(nil, | |
450 | + | let bQ = addressFromPublicKey(ac) | |
451 | + | let an = valueOrErrorMessage(addressFromString(bM[0]), A("invalid account address")) | |
452 | + | let cc = valueOrErrorMessage(parseInt(bM[1]), A("invalid amount")) | |
453 | + | let J = F(bM[2]) | |
454 | + | let cd = [invoke(an, "transferAsset", [bQ.bytes, cc, J], nil)] | |
455 | + | $Tuple2(nil, cd) | |
451 | 456 | } | |
452 | 457 | else throw("Strict value is not equal to itself.") | |
453 | 458 | } | |
454 | 459 | ||
455 | 460 | ||
456 | 461 | ||
457 | - | @Callable( | |
458 | - | func borrow (ac, | |
459 | - | let an = valueOrErrorMessage(addressFromString( | |
460 | - | let | |
461 | - | let | |
462 | - | let | |
463 | - | let | |
464 | - | let | |
462 | + | @Callable(bJ) | |
463 | + | func borrow (ac,bM) = { | |
464 | + | let an = valueOrErrorMessage(addressFromString(bM[0]), A("invalid account address")) | |
465 | + | let ce = F(bM[1]) | |
466 | + | let cf = D(valueOrErrorMessage(parseInt(bM[2]), A("invalid requested amount")), "requested amount") | |
467 | + | let cg = bH(an) | |
468 | + | let bQ = addressFromPublicKey(ac) | |
469 | + | let bN = [if (!(W)) | |
465 | 470 | then true | |
466 | - | else C("not allowed"), aa( | |
471 | + | else C("not allowed"), aa(bJ.caller), if ((ac == cg)) | |
467 | 472 | then true | |
468 | 473 | else C("can be called by account owner only")] | |
469 | - | if (( | |
474 | + | if ((bN == bN)) | |
470 | 475 | then { | |
471 | - | let aO = bF(an)._1 | |
472 | - | let cg = s(valueOrElse(ao(an), 0), O(U)) | |
473 | - | let aZ = s(aS(aO), O(U)) | |
474 | - | let aX = s(valueOrElse(getInteger(R, ap(an, aO)), 0), O(aO)) | |
475 | - | let aY = s(valueOrElse(getInteger(R, ap(an, U)), 0), O(U)) | |
476 | - | let bf = aW(aX, aY, aZ) | |
477 | - | let ch = 3 | |
478 | - | let bi = s(valueOrElse(getInteger(R, ar(an)), ch), 1) | |
479 | - | let ci = bg(cg, bi, bf) | |
480 | - | let cj = if ((cd == aO)) | |
481 | - | then v(fraction(ci, f, aZ), O(aO)) | |
482 | - | else if ((cd == U)) | |
476 | + | let aP = bG(an)._1 | |
477 | + | let ch = s(valueOrElse(ao(an), 0), O(U)) | |
478 | + | let ba = s(aT(aP), O(U)) | |
479 | + | let aY = s(valueOrElse(getInteger(R, ap(an, aP)), 0), O(aP)) | |
480 | + | let aZ = s(valueOrElse(getInteger(R, ap(an, U)), 0), O(U)) | |
481 | + | let bg = aX(aY, aZ, ba) | |
482 | + | let bj = s(valueOrErrorMessage(getInteger(R, ar(an)), A("leverage should be defined")), 1) | |
483 | + | let ci = bh(ch, bj, bg) | |
484 | + | let cj = if ((ce == aP)) | |
485 | + | then v(fraction(ci, f, ba), O(aP)) | |
486 | + | else if ((ce == U)) | |
483 | 487 | then v(ci, O(U)) | |
484 | 488 | else C("invalid requested asset id") | |
485 | - | let | |
486 | - | let ck = if ((cj >= | |
487 | - | then | |
489 | + | let ax = F(valueOrErrorMessage(getString(R, au(ce)), A("synthetic asset for requested asset is undefined"))) | |
490 | + | let ck = if ((cj >= cf)) | |
491 | + | then cf | |
488 | 492 | else C(("credit available = " + toString(cj))) | |
489 | - | let | |
490 | - | $Tuple2(nil, [ | |
493 | + | let bX = [invoke(R, "integerEntry", [ap(an, ce), (valueOrElse(aq(an, ce), 0) + ck)], nil), invoke(R, "transferAsset", [bQ.bytes, ck, ax], nil)] | |
494 | + | $Tuple2(nil, [bX, cj]) | |
491 | 495 | } | |
492 | 496 | else throw("Strict value is not equal to itself.") | |
493 | 497 | } | |
494 | 498 | ||
495 | 499 | ||
496 | 500 | ||
497 | - | @Callable( | |
498 | - | func repay (ac, | |
499 | - | let | |
501 | + | @Callable(bJ) | |
502 | + | func repay (ac,bM) = { | |
503 | + | let bN = [if (!(W)) | |
500 | 504 | then true | |
501 | - | else C("not allowed"), aa( | |
502 | - | if (( | |
505 | + | else C("not allowed"), aa(bJ.caller)] | |
506 | + | if ((bN == bN)) | |
503 | 507 | then $Tuple2(nil, unit) | |
504 | 508 | else throw("Strict value is not equal to itself.") | |
505 | 509 | } | |
506 | 510 | ||
507 | 511 | ||
508 | 512 | ||
509 | - | @Callable( | |
510 | - | func setPairAllowance (ac, | |
511 | - | let | |
513 | + | @Callable(bJ) | |
514 | + | func setPairAllowance (ac,bM) = { | |
515 | + | let bN = [if (!(W)) | |
512 | 516 | then true | |
513 | - | else C("not allowed"), aa( | |
514 | - | if (( | |
517 | + | else C("not allowed"), aa(bJ.caller), ab(ac)] | |
518 | + | if ((bN == bN)) | |
515 | 519 | then { | |
516 | - | let bN = bL[0] | |
517 | - | let bO = bL[1] | |
518 | - | let cl = bL[2] | |
519 | - | let aO = F(bN) | |
520 | + | let bO = bM[0] | |
521 | + | let bP = bM[1] | |
522 | + | let cl = bM[2] | |
520 | 523 | let aP = F(bO) | |
524 | + | let aQ = F(bP) | |
521 | 525 | let cm = (cl == "true") | |
522 | - | let | |
523 | - | $Tuple2(nil, | |
526 | + | let cd = [invoke(R, "booleanEntry", [aO(aP, aQ), cm], nil)] | |
527 | + | $Tuple2(nil, cd) | |
524 | 528 | } | |
525 | 529 | else throw("Strict value is not equal to itself.") | |
526 | 530 | } | |
527 | 531 | ||
528 | 532 | ||
529 | 533 | ||
530 | - | @Callable( | |
531 | - | func addSyntheticAsset (ac, | |
532 | - | let | |
533 | - | let | |
534 | - | let | |
534 | + | @Callable(bJ) | |
535 | + | func addSyntheticAsset (ac,bM) = { | |
536 | + | let av = F(bM[0]) | |
537 | + | let ax = F(bM[1]) | |
538 | + | let bN = [if (!(W)) | |
535 | 539 | then true | |
536 | - | else C("not allowed"), aa( | |
540 | + | else C("not allowed"), aa(bJ.caller), ab(ac), if ((getString(R, au(av)) == unit)) | |
537 | 541 | then true | |
538 | - | else C("invalid base asset"), if ((getString(R, | |
542 | + | else C("invalid base asset"), if ((getString(R, aw(ax)) == unit)) | |
539 | 543 | then true | |
540 | 544 | else C("invalid synthetic asset")] | |
541 | - | if (( | |
545 | + | if ((bN == bN)) | |
542 | 546 | then { | |
543 | - | let | |
544 | - | $Tuple2(nil, | |
547 | + | let cd = [invoke(R, "stringEntry", [au(av), H(ax)], nil), invoke(R, "stringEntry", [aw(ax), H(av)], nil)] | |
548 | + | $Tuple2(nil, cd) | |
545 | 549 | } | |
546 | 550 | else throw("Strict value is not equal to itself.") | |
547 | 551 | } | |
548 | 552 | ||
549 | 553 | ||
550 | 554 | ||
551 | - | @Callable( | |
552 | - | func doShutdown (ac, | |
553 | - | let | |
554 | - | if (( | |
555 | + | @Callable(bJ) | |
556 | + | func doShutdown (ac,bM) = { | |
557 | + | let bS = [aa(bJ.caller), ab(ac)] | |
558 | + | if ((bS == bS)) | |
555 | 559 | then { | |
556 | - | let | |
557 | - | $Tuple2(nil, | |
560 | + | let cd = [invoke(R, "booleanEntry", [p, true], nil)] | |
561 | + | $Tuple2(nil, cd) | |
558 | 562 | } | |
559 | 563 | else throw("Strict value is not equal to itself.") | |
560 | 564 | } | |
561 | 565 | ||
562 | 566 | ||
563 | 567 | @Verifier(cn) | |
564 | 568 | func co () = if (if (isDefined(Q)) | |
565 | 569 | then isDefined(getString(R, l)) | |
566 | 570 | else false) | |
567 | 571 | then { | |
568 | 572 | let L = getString(R, l) | |
569 | 573 | if ($isInstanceOf(L, "String")) | |
570 | 574 | then { | |
571 | 575 | let ad = L | |
572 | 576 | let cp = m(toString(this), toBase58String(cn.id)) | |
573 | 577 | let cq = valueOrElse(getBoolean(addressFromStringValue(ad), cp), false) | |
574 | 578 | cq | |
575 | 579 | } | |
576 | 580 | else false | |
577 | 581 | } | |
578 | 582 | else sigVerify(cn.bodyBytes, cn.proofs[0], cn.senderPublicKey) | |
579 | 583 |
github/deemru/w8io/169f3d6 137.25 ms ◑