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/yZdtSATGRaLbaMxIAAAADAAAAAWkBAAAABVJlc2V0AAAAAAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACCQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMCAAAABF9MaXEAAAAAAAAAAAAJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzAgAAAAxfTGFzdFVuc3Rha2UAAAAAAAAAAAAJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzAgAAAAtfdHJ4VW5zdGFrZQAAAAAAAAAAAAUAAAADbmlsAAAAAWkBAAAADERlcG9zaXRGdW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LAAAAAIJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwIAAAAMX0xhc3RVbnN0YWtlBQAAAAZoZWlnaHQJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAAA5XaXRoZHJhd0Ftb3VudAUAAAAEQlVzZAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAAAlkQXBwRnJlZXMJAABoAAAAAgUAAAAHRmVlUGFpZAAAAAAABfXhAAUAAAAEQlVzZAUAAAADbmlsBQAAAARCVXNkAAAAADtwxt4=", "height": 2080616, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HuRAekSiZELC2GEi336z26vBWq2WpKzUdHiJ6PWdH5E9 Next: HEydgu8g3uuoTYpJnxr3TebpwHgoeA5n8det4tLVPmDu Diff:
Old | New | Differences | |
---|---|---|---|
77 | 77 | else if (if ((p == 2)) | |
78 | 78 | then (height > (p + m)) | |
79 | 79 | 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")) | |
81 | 81 | else { | |
82 | 82 | let r = if ((p == 3)) | |
83 | 83 | then 0 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = base58'nrDXX1zHfGht7xExqNxDu7voCy9wzmc9vJxwcc2jLga' | |
5 | 5 | ||
6 | 6 | let b = base58'3N59qn7Ndw24WrGFkNFk7PGTBCzdMETyKqj' | |
7 | 7 | ||
8 | 8 | @Callable(c) | |
9 | 9 | func Reset () = [IntegerEntry((toBase58String(c.caller.bytes) + "_Liq"), 0), IntegerEntry((toBase58String(c.caller.bytes) + "_LastUnstake"), 0), IntegerEntry((toBase58String(c.caller.bytes) + "_trxUnstake"), 0)] | |
10 | 10 | ||
11 | 11 | ||
12 | 12 | ||
13 | 13 | @Callable(c) | |
14 | 14 | func DepositFunds () = { | |
15 | 15 | let d = (toBase58String(c.caller.bytes) + "_Liq") | |
16 | 16 | let e = { | |
17 | 17 | let f = getInteger(this, d) | |
18 | 18 | if ($isInstanceOf(f, "Int")) | |
19 | 19 | then { | |
20 | 20 | let g = f | |
21 | 21 | g | |
22 | 22 | } | |
23 | 23 | else 0 | |
24 | 24 | } | |
25 | 25 | let h = if ((size(c.payments) == 1)) | |
26 | 26 | then c.payments[0] | |
27 | 27 | else throw("Attached payment is required") | |
28 | 28 | if (if ((0 >= h.amount)) | |
29 | 29 | then true | |
30 | 30 | else (h.assetId != a)) | |
31 | 31 | then throw("Can only deposit BUsd tokens, and amount should be positive") | |
32 | 32 | else { | |
33 | 33 | let i = (e + h.amount) | |
34 | 34 | [IntegerEntry((toBase58String(c.caller.bytes) + "_Liq"), i)] | |
35 | 35 | } | |
36 | 36 | } | |
37 | 37 | ||
38 | 38 | ||
39 | 39 | ||
40 | 40 | @Callable(c) | |
41 | 41 | func WithdrawLiq () = { | |
42 | 42 | let d = (toBase58String(c.caller.bytes) + "_Liq") | |
43 | 43 | let j = (toBase58String(c.caller.bytes) + "_LastUnstake") | |
44 | 44 | let k = (toBase58String(c.caller.bytes) + "_trxUnstake") | |
45 | 45 | let l = Address(b) | |
46 | 46 | let m = 10 | |
47 | 47 | let n = 1 | |
48 | 48 | let o = { | |
49 | 49 | let f = getInteger(this, d) | |
50 | 50 | if ($isInstanceOf(f, "Int")) | |
51 | 51 | then { | |
52 | 52 | let g = f | |
53 | 53 | g | |
54 | 54 | } | |
55 | 55 | else 0 | |
56 | 56 | } | |
57 | 57 | let p = { | |
58 | 58 | let f = getInteger(this, k) | |
59 | 59 | if ($isInstanceOf(f, "Int")) | |
60 | 60 | then { | |
61 | 61 | let g = f | |
62 | 62 | g | |
63 | 63 | } | |
64 | 64 | else 0 | |
65 | 65 | } | |
66 | 66 | let q = { | |
67 | 67 | let f = getInteger(this, j) | |
68 | 68 | if ($isInstanceOf(f, "Int")) | |
69 | 69 | then { | |
70 | 70 | let g = f | |
71 | 71 | g | |
72 | 72 | } | |
73 | 73 | else 0 | |
74 | 74 | } | |
75 | 75 | if ((o == 0)) | |
76 | 76 | then throw(("You do not have enough funds to withdraw, your available funds are: " + toString((o / 100000000)))) | |
77 | 77 | else if (if ((p == 2)) | |
78 | 78 | then (height > (p + m)) | |
79 | 79 | 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")) | |
81 | 81 | else { | |
82 | 82 | let r = if ((p == 3)) | |
83 | 83 | then 0 | |
84 | 84 | else (p + 1) | |
85 | 85 | let s = if ((p == 3)) | |
86 | 86 | then 0 | |
87 | 87 | else ((o - (n * 100000000)) - (((r * 25) * (o - (n * 100000000))) / 100)) | |
88 | 88 | let t = ((25 * o) / 100) | |
89 | 89 | $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) | |
90 | 90 | } | |
91 | 91 | } | |
92 | 92 | ||
93 | 93 |
github/deemru/w8io/169f3d6 42.35 ms ◑