tx · 8pz19ydTFtqwsveD5SQcL8TbR4B3fb4fbSiQDcQtdDVs 3N7nJwbFGppbebBtXy6bWVcQCGu7m3kXFaw: -0.01000000 Waves 2022.06.03 22:44 [2080600] smart account 3N7nJwbFGppbebBtXy6bWVcQCGu7m3kXFaw > SELF 0.00000000 Waves
{ "type": 13, "id": "8pz19ydTFtqwsveD5SQcL8TbR4B3fb4fbSiQDcQtdDVs", "fee": 1000000, "feeAssetId": null, "timestamp": 1654285547625, "version": 2, "chainId": 84, "sender": "3N7nJwbFGppbebBtXy6bWVcQCGu7m3kXFaw", "senderPublicKey": "GTKqLSK6nuFkRdebB5SmTwTU2DnTeLMvhymCFfT2CxX2", "proofs": [ "5B4HzbcURL8wM4KnFmUqq2NxP7PvzvvjZYh7tj4fSM3wurK7E8qcoc4sBmYr6E48wUw3jWHzUsPg1D84kfpFVxte" ], "script": "base64:AAIFAAAAAAAAAAgIAhIAEgASAAAAAAIAAAAABEJVc2QBAAAAIAu+yPsU61UT6w/UBobJ3Bln9DA/EA0rHMeXciw6ixXjAAAAAAhkQXBwRmVlcwEAAAAaAVSnJAa+rdQxXJacpl/yZdtSATGRaLbaMxIAAAADAAAAAWkBAAAABVJlc2V0AAAAAAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACCQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMCAAAABF9MaXEAAAAAAAAAAAAJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzAgAAAAxfTGFzdFVuc3Rha2UAAAAAAAAAAAAJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzAgAAAAtfdHJ4VW5zdGFrZQAAAAAAAAAAAAUAAAADbmlsAAAAAWkBAAAADERlcG9zaX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2h0CQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAAOV2l0aGRyYXdBbW91bnQFAAAABEJVc2QJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwUAAAAJZEFwcEZyZWVzCQAAaAAAAAIFAAAAB0ZlZVBhaWQAAAAAAAX14QAFAAAABEJVc2QFAAAAA25pbAUAAAAEQlVzZAAAAAAsHFrf", "height": 2080600, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4a7B2T7fQN8BZWk85GStF69CrSyKjnasdxVYZeQsAUob Next: HuRAekSiZELC2GEi336z26vBWq2WpKzUdHiJ6PWdH5E9 Diff:
Old | New | Differences | |
---|---|---|---|
4 | 4 | let a = base58'nrDXX1zHfGht7xExqNxDu7voCy9wzmc9vJxwcc2jLga' | |
5 | 5 | ||
6 | 6 | let b = base58'3N59qn7Ndw24WrGFkNFk7PGTBCzdMETyKqj' | |
7 | + | ||
8 | + | @Callable(c) | |
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 | + | ||
11 | + | ||
7 | 12 | ||
8 | 13 | @Callable(c) | |
9 | 14 | func DepositFunds () = { |
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 | + | ||
8 | + | @Callable(c) | |
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 | + | ||
11 | + | ||
7 | 12 | ||
8 | 13 | @Callable(c) | |
9 | 14 | func DepositFunds () = { | |
10 | 15 | let d = (toBase58String(c.caller.bytes) + "_Liq") | |
11 | 16 | let e = { | |
12 | 17 | let f = getInteger(this, d) | |
13 | 18 | if ($isInstanceOf(f, "Int")) | |
14 | 19 | then { | |
15 | 20 | let g = f | |
16 | 21 | g | |
17 | 22 | } | |
18 | 23 | else 0 | |
19 | 24 | } | |
20 | 25 | let h = if ((size(c.payments) == 1)) | |
21 | 26 | then c.payments[0] | |
22 | 27 | else throw("Attached payment is required") | |
23 | 28 | if (if ((0 >= h.amount)) | |
24 | 29 | then true | |
25 | 30 | else (h.assetId != a)) | |
26 | 31 | then throw("Can only deposit BUsd tokens, and amount should be positive") | |
27 | 32 | else { | |
28 | 33 | let i = (e + h.amount) | |
29 | 34 | [IntegerEntry((toBase58String(c.caller.bytes) + "_Liq"), i)] | |
30 | 35 | } | |
31 | 36 | } | |
32 | 37 | ||
33 | 38 | ||
34 | 39 | ||
35 | 40 | @Callable(c) | |
36 | 41 | func WithdrawLiq () = { | |
37 | 42 | let d = (toBase58String(c.caller.bytes) + "_Liq") | |
38 | 43 | let j = (toBase58String(c.caller.bytes) + "_LastUnstake") | |
39 | 44 | let k = (toBase58String(c.caller.bytes) + "_trxUnstake") | |
40 | 45 | let l = Address(b) | |
41 | 46 | let m = 10 | |
42 | 47 | let n = 1 | |
43 | 48 | let o = { | |
44 | 49 | let f = getInteger(this, d) | |
45 | 50 | if ($isInstanceOf(f, "Int")) | |
46 | 51 | then { | |
47 | 52 | let g = f | |
48 | 53 | g | |
49 | 54 | } | |
50 | 55 | else 0 | |
51 | 56 | } | |
52 | 57 | let p = { | |
53 | 58 | let f = getInteger(this, k) | |
54 | 59 | if ($isInstanceOf(f, "Int")) | |
55 | 60 | then { | |
56 | 61 | let g = f | |
57 | 62 | g | |
58 | 63 | } | |
59 | 64 | else 0 | |
60 | 65 | } | |
61 | 66 | let q = { | |
62 | 67 | let f = getInteger(this, j) | |
63 | 68 | if ($isInstanceOf(f, "Int")) | |
64 | 69 | then { | |
65 | 70 | let g = f | |
66 | 71 | g | |
67 | 72 | } | |
68 | 73 | else 0 | |
69 | 74 | } | |
70 | 75 | if ((o == 0)) | |
71 | 76 | then throw(("You do not have enough funds to withdraw, your available funds are: " + toString((o / 100000000)))) | |
72 | 77 | else if (if ((p == 2)) | |
73 | 78 | then (height > (p + m)) | |
74 | 79 | else false) | |
75 | 80 | then throw(("Second withdraw cannot be done before " + " min")) | |
76 | 81 | else { | |
77 | 82 | let r = if ((p == 3)) | |
78 | 83 | then 0 | |
79 | 84 | else (p + 1) | |
80 | 85 | let s = if ((p == 3)) | |
81 | 86 | then 0 | |
82 | 87 | else ((o - (n * 100000000)) - (((r * 25) * (o - (n * 100000000))) / 100)) | |
83 | 88 | let t = ((25 * o) / 100) | |
84 | 89 | $Tuple2([IntegerEntry((toBase58String(c.caller.bytes) + "_trxUnstake"), r), IntegerEntry((toBase58String(c.caller.bytes) + "_Liq"), s), IntegerEntry((toBase58String(c.caller.bytes) + "_trxUnstake"), height), ScriptTransfer(c.caller, t, a), ScriptTransfer(l, (n * 100000000), a)], a) | |
85 | 90 | } | |
86 | 91 | } | |
87 | 92 | ||
88 | 93 |
github/deemru/w8io/169f3d6 27.27 ms ◑