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