tx · 9GXmGKeAVHoaPLvQ3aggYUJ8XyKWgcBE8TabPsRTvvza 3N7nJwbFGppbebBtXy6bWVcQCGu7m3kXFaw: -0.01000000 Waves 2022.06.05 09:52 [2082724] smart account 3N7nJwbFGppbebBtXy6bWVcQCGu7m3kXFaw > SELF 0.00000000 Waves
{ "type": 13, "id": "9GXmGKeAVHoaPLvQ3aggYUJ8XyKWgcBE8TabPsRTvvza", "fee": 1000000, "feeAssetId": null, "timestamp": 1654411931078, "version": 2, "chainId": 84, "sender": "3N7nJwbFGppbebBtXy6bWVcQCGu7m3kXFaw", "senderPublicKey": "GTKqLSK6nuFkRdebB5SmTwTU2DnTeLMvhymCFfT2CxX2", "proofs": [ "4GiaJZ93vXH8ztHeJgzwqB4g25vMTN2TEEJPcSSKFUv7d3zbpsHiV9ZNSPg8ZtLAsS59o1bGtASRE8QBC8BcymBf" ], "script": "base64:AAIFAAAAAAAAAAgIAhIAEgASAAAAAAIAAAAABEJVc2QBAAAAIAu+yPsU61UT6w/UBobJ3Bln9DA/EA0rHMeXciw6ixXjAAAAAAhkQXBwRmVlcwEAAAAaAVSnJAa+rdQxXJacpl/yZdtSATGRaLbaMxIAAAADAAAAAWkBAAAABVJlc2V0AAAAAAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACCQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMCAAAABF9MaXEAAAAAAAAAAAAJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzAgAAAAxfTGFzdFVuc3Rha2UAAAAAAAAAAAAJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzAgAAAAtfdHJ4VW5zdGFrZQAAAAAAAAAAAAUAAAADbmlsAAAAAWkBAAAADERlc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ZyZWVzCQAAaAAAAAIFAAAAB0ZlZVBhaWQAAAAAAAX14QAFAAAABEJVc2QFAAAAA25pbAUAAAAEQlVzZAAAAAC7KhrI", "height": 2082724, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BVW23vCXtEKVhQiNT7mAVE5iEMqFdvu5uguUFuenT7Bx Next: 6my9d7vpBW6koM9xWB84ouevW9wEkPTNY1xgpcPZQDR4 Diff:
Old | New | Differences | |
---|---|---|---|
89 | 89 | else { | |
90 | 90 | let s = if ((q == 0)) | |
91 | 91 | then 2 | |
92 | - | else | |
92 | + | else 100 | |
93 | 93 | if (((r + s) > height)) | |
94 | 94 | then throw((("Second withdraw cannot be done before " + toString(((height - r) - s))) + " min")) | |
95 | 95 | else { |
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 = (toBase58String(c.caller.bytes) + "_LastUnstake") | |
17 | 17 | let f = { | |
18 | 18 | let g = getInteger(this, d) | |
19 | 19 | if ($isInstanceOf(g, "Int")) | |
20 | 20 | then { | |
21 | 21 | let h = g | |
22 | 22 | h | |
23 | 23 | } | |
24 | 24 | else 0 | |
25 | 25 | } | |
26 | 26 | let i = if ((size(c.payments) == 1)) | |
27 | 27 | then c.payments[0] | |
28 | 28 | else throw("Attached payment is required") | |
29 | 29 | if ((f != 0)) | |
30 | 30 | then throw("You already have funds supplied, cannot supply more than once") | |
31 | 31 | else if (if (((50 * 100000000) > i.amount)) | |
32 | 32 | then true | |
33 | 33 | else (i.assetId != a)) | |
34 | 34 | then throw("Can only deposit BUsd tokens, and amount should be at least 50 BUsd") | |
35 | 35 | else { | |
36 | 36 | let j = (f + i.amount) | |
37 | 37 | [IntegerEntry((toBase58String(c.caller.bytes) + "_Liq"), j), IntegerEntry((toBase58String(c.caller.bytes) + "_Deposit"), j), IntegerEntry((toBase58String(c.caller.bytes) + "_LastUnstake"), height)] | |
38 | 38 | } | |
39 | 39 | } | |
40 | 40 | ||
41 | 41 | ||
42 | 42 | ||
43 | 43 | @Callable(c) | |
44 | 44 | func WithdrawLiq () = { | |
45 | 45 | let d = (toBase58String(c.caller.bytes) + "_Liq") | |
46 | 46 | let e = (toBase58String(c.caller.bytes) + "_LastUnstake") | |
47 | 47 | let k = (toBase58String(c.caller.bytes) + "_trxUnstake") | |
48 | 48 | let l = (toBase58String(c.caller.bytes) + "_Deposit") | |
49 | 49 | let m = Address(b) | |
50 | 50 | let n = 1 | |
51 | 51 | let o = { | |
52 | 52 | let g = getInteger(this, l) | |
53 | 53 | if ($isInstanceOf(g, "Int")) | |
54 | 54 | then { | |
55 | 55 | let h = g | |
56 | 56 | h | |
57 | 57 | } | |
58 | 58 | else 0 | |
59 | 59 | } | |
60 | 60 | let p = { | |
61 | 61 | let g = getInteger(this, d) | |
62 | 62 | if ($isInstanceOf(g, "Int")) | |
63 | 63 | then { | |
64 | 64 | let h = g | |
65 | 65 | h | |
66 | 66 | } | |
67 | 67 | else 0 | |
68 | 68 | } | |
69 | 69 | let q = { | |
70 | 70 | let g = getInteger(this, k) | |
71 | 71 | if ($isInstanceOf(g, "Int")) | |
72 | 72 | then { | |
73 | 73 | let h = g | |
74 | 74 | h | |
75 | 75 | } | |
76 | 76 | else 0 | |
77 | 77 | } | |
78 | 78 | let r = { | |
79 | 79 | let g = getInteger(this, e) | |
80 | 80 | if ($isInstanceOf(g, "Int")) | |
81 | 81 | then { | |
82 | 82 | let h = g | |
83 | 83 | h | |
84 | 84 | } | |
85 | 85 | else 0 | |
86 | 86 | } | |
87 | 87 | if ((p == 0)) | |
88 | 88 | then throw(("You do not have enough funds to withdraw, your available funds are: " + toString((p / 100000000)))) | |
89 | 89 | else { | |
90 | 90 | let s = if ((q == 0)) | |
91 | 91 | then 2 | |
92 | - | else | |
92 | + | else 100 | |
93 | 93 | if (((r + s) > height)) | |
94 | 94 | then throw((("Second withdraw cannot be done before " + toString(((height - r) - s))) + " min")) | |
95 | 95 | else { | |
96 | 96 | let t = if ((q == 3)) | |
97 | 97 | then 0 | |
98 | 98 | else (q + 1) | |
99 | 99 | let u = ((o / 4) - (n * 100000000)) | |
100 | 100 | let v = if ((q == 3)) | |
101 | 101 | then 0 | |
102 | 102 | else (o - (t * u)) | |
103 | 103 | $Tuple2([IntegerEntry((toBase58String(c.caller.bytes) + "_trxUnstake"), t), IntegerEntry((toBase58String(c.caller.bytes) + "_Liq"), v), IntegerEntry((toBase58String(c.caller.bytes) + "_LastUnstake"), height), ScriptTransfer(c.caller, u, a), ScriptTransfer(m, (n * 100000000), a)], a) | |
104 | 104 | } | |
105 | 105 | } | |
106 | 106 | } | |
107 | 107 | ||
108 | 108 |
github/deemru/w8io/169f3d6 32.50 ms ◑