tx · Br5rNpxJi5HLr9XCvRSdfsX7gufCxASrCqpdVK6jaxdC

3N7nJwbFGppbebBtXy6bWVcQCGu7m3kXFaw:  -0.01000000 Waves

2022.06.03 22:58 [2080616] smart account 3N7nJwbFGppbebBtXy6bWVcQCGu7m3kXFaw > SELF 0.00000000 Waves

{ "type": 13, "id": "Br5rNpxJi5HLr9XCvRSdfsX7gufCxASrCqpdVK6jaxdC", "fee": 1000000, "feeAssetId": null, "timestamp": 1654286317178, "version": 2, "chainId": 84, "sender": "3N7nJwbFGppbebBtXy6bWVcQCGu7m3kXFaw", "senderPublicKey": "GTKqLSK6nuFkRdebB5SmTwTU2DnTeLMvhymCFfT2CxX2", "proofs": [ "4GYHPyqEEx71uVLPo8i47Ld3rBET3BUbtZnDz86ars6AvGp1B8iS4jr5nNkh798asS2xJXrF13NVQm3u6CGDBcUF" ], "script": "base64:AAIFAAAAAAAAAAgIAhIAEgASAAAAAAIAAAAABEJVc2QBAAAAIAu+yPsU61UT6w/UBobJ3Bln9DA/EA0rHMeXciw6ixXjAAAAAAhkQXBwRmVlcwEAAAAaAVSnJAa+rdQxXJacpl/yZdtSATGRaLbaMxIAAAADAAAAAWkBAAAABVJlc2V0AAAAAAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACCQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMCAAAABF9MaXEAAAAAAAAAAAAJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzAgAAAAxfTGFzdFVuc3Rha2UAAAAAAAAAAAAJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzAgAAAAtfdHJ4VW5zdGFrZQAAAAAAAAAAAAUAAAADbmlsAAAAAWkBAAAADERlcG9zaXRGd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ABLAAAAAIJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwIAAAAMX0xhc3RVbnN0YWtlBQAAAAZoZWlnaHQJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAAA5XaXRoZHJhd0Ftb3VudAUAAAAEQlVzZAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAAAlkQXBwRnJlZXMJAABoAAAAAgUAAAAHRmVlUGFpZAAAAAAABfXhAAUAAAAEQlVzZAUAAAADbmlsBQAAAARCVXNkAAAAADtwxt4=", "height": 2080616, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HuRAekSiZELC2GEi336z26vBWq2WpKzUdHiJ6PWdH5E9 Next: HEydgu8g3uuoTYpJnxr3TebpwHgoeA5n8det4tLVPmDu Diff:
OldNewDifferences
7777 else if (if ((p == 2))
7878 then (height > (p + m))
7979 else false)
80- then throw(("Second withdraw cannot be done before " + " min"))
80+ then throw((("Second withdraw cannot be done before " + toString((height > (p + m)))) + " min"))
8181 else {
8282 let r = if ((p == 3))
8383 then 0
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = base58'nrDXX1zHfGht7xExqNxDu7voCy9wzmc9vJxwcc2jLga'
55
66 let b = base58'3N59qn7Ndw24WrGFkNFk7PGTBCzdMETyKqj'
77
88 @Callable(c)
99 func Reset () = [IntegerEntry((toBase58String(c.caller.bytes) + "_Liq"), 0), IntegerEntry((toBase58String(c.caller.bytes) + "_LastUnstake"), 0), IntegerEntry((toBase58String(c.caller.bytes) + "_trxUnstake"), 0)]
1010
1111
1212
1313 @Callable(c)
1414 func DepositFunds () = {
1515 let d = (toBase58String(c.caller.bytes) + "_Liq")
1616 let e = {
1717 let f = getInteger(this, d)
1818 if ($isInstanceOf(f, "Int"))
1919 then {
2020 let g = f
2121 g
2222 }
2323 else 0
2424 }
2525 let h = if ((size(c.payments) == 1))
2626 then c.payments[0]
2727 else throw("Attached payment is required")
2828 if (if ((0 >= h.amount))
2929 then true
3030 else (h.assetId != a))
3131 then throw("Can only deposit BUsd tokens, and amount should be positive")
3232 else {
3333 let i = (e + h.amount)
3434 [IntegerEntry((toBase58String(c.caller.bytes) + "_Liq"), i)]
3535 }
3636 }
3737
3838
3939
4040 @Callable(c)
4141 func WithdrawLiq () = {
4242 let d = (toBase58String(c.caller.bytes) + "_Liq")
4343 let j = (toBase58String(c.caller.bytes) + "_LastUnstake")
4444 let k = (toBase58String(c.caller.bytes) + "_trxUnstake")
4545 let l = Address(b)
4646 let m = 10
4747 let n = 1
4848 let o = {
4949 let f = getInteger(this, d)
5050 if ($isInstanceOf(f, "Int"))
5151 then {
5252 let g = f
5353 g
5454 }
5555 else 0
5656 }
5757 let p = {
5858 let f = getInteger(this, k)
5959 if ($isInstanceOf(f, "Int"))
6060 then {
6161 let g = f
6262 g
6363 }
6464 else 0
6565 }
6666 let q = {
6767 let f = getInteger(this, j)
6868 if ($isInstanceOf(f, "Int"))
6969 then {
7070 let g = f
7171 g
7272 }
7373 else 0
7474 }
7575 if ((o == 0))
7676 then throw(("You do not have enough funds to withdraw, your available funds are: " + toString((o / 100000000))))
7777 else if (if ((p == 2))
7878 then (height > (p + m))
7979 else false)
80- then throw(("Second withdraw cannot be done before " + " min"))
80+ then throw((("Second withdraw cannot be done before " + toString((height > (p + m)))) + " min"))
8181 else {
8282 let r = if ((p == 3))
8383 then 0
8484 else (p + 1)
8585 let s = if ((p == 3))
8686 then 0
8787 else ((o - (n * 100000000)) - (((r * 25) * (o - (n * 100000000))) / 100))
8888 let t = ((25 * o) / 100)
8989 $Tuple2([IntegerEntry((toBase58String(c.caller.bytes) + "_trxUnstake"), r), IntegerEntry((toBase58String(c.caller.bytes) + "_Liq"), s), IntegerEntry((toBase58String(c.caller.bytes) + "_LastUnstake"), height), ScriptTransfer(c.caller, t, a), ScriptTransfer(l, (n * 100000000), a)], a)
9090 }
9191 }
9292
9393

github/deemru/w8io/169f3d6 
42.35 ms