tx · 7g9zk8EgE11znA85kuAvSCARcyqp3usvFBU4aBRuwDko 3N3giqcqo68bVfkcJt2q7zaaWE7iAJAcKcb: -0.01000010 Waves 2021.07.08 12:28 [1604445] smart account 3N3giqcqo68bVfkcJt2q7zaaWE7iAJAcKcb > SELF 0.00000000 Waves
{ "type": 13, "id": "7g9zk8EgE11znA85kuAvSCARcyqp3usvFBU4aBRuwDko", "fee": 1000010, "feeAssetId": null, "timestamp": 1625736523312, "version": 2, "chainId": 84, "sender": "3N3giqcqo68bVfkcJt2q7zaaWE7iAJAcKcb", "senderPublicKey": "DjiSdNEMrwCK2ABBPRVSzf8xNRsUAy1if8qvaRtPrWkJ", "proofs": [ "3JwE2zaPcVSeH5cRhEzTHhqEsTovzAJEY8oDjXK3JoDVfhecJcfeahZijFLc77RnkzCZ2FxSo3v9wtsgYPrkerJx" ], "script": "base64:AAIFAAAAAAAAAIcIAhIAEgMKAQEaCgoCYTESBHdFVVIaBwoCYTISAWkaCQoCYTMSA3BtdBoQCgJhNBIKY3VycmVudEtleRoTCgJhNRINY3VycmVudEFtb3VudBoNCgJhNhIHJG1hdGNoMBoHCgJhNxIBYRoPCgJhOBIJbmV3QW1vdW50GgwKAmE5EgZhbW91bnQAAAABAAAAAAJhMQEAAAAAAAAAAgAAAAJhMgEAAAAHZGVwb3NpdAAAAAAEAAAAAmEzCQABkQAAAAIIBQAAAAJhMgAAAAhwYXltZW50cwAAAAAAAAAAAAMJAQAAAAIhPQAAAAIIBQAAAAJhMwAAAAdhc3NldElkBQAAAAJhMQkAAAIAAAABAgAAABp3RVVSIC0gJ3RlbiBzYW0gY28gd3nFvGVqJwQAAAACYTQJAAJYAAAAAQgIBQAAAAJhMgAAAAZjYWxsZXIAAAAFYnl0ZXMEAAAAAmE1BAAAAAJhNgkABBoAAAACBQAAAAR0aGlzBQAAAAJhNAMJAAABAAAAAgUAAAACYTYCAAAAA0ludAQAAAACYTcFAAAAAmE2BQAAAAJhNwAAAAAAAAAAAAQAAAACYTgJAABkAAAAAgUAAAACYTUIBQAAAAJhMwAAAAZhbW91bnQJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIFAAAAAmE0BQAAAAJhOAUAAAADbmlsAAAAAmEyAQAAAAd3aXRkcmF3AAAAAQAAAAJhOQQAAAACYTQJAAJYAAAAAQgIBQAAAAJhMgAAAAZjYWxsZXIAAAAFYnl0ZXMEAAAAAmE1BAAAAAJhNgkABBoAAAACBQAAAAR0aGlzBQAAAAJhNAMJAAABAAAAAgUAAAACYTYCAAAAA0ludAQAAAACYTcFAAAAAmE2BQAAAAJhNwAAAAAAAAAAAAQAAAACYTgJAABlAAAAAgUAAAACYTUFAAAAAmE5AwkAAGYAAAACAAAAAAAAAAAABQAAAAJhOQkAAAIAAAABAgAAAB9jYW4ndCB3aXRoZHJhdyBuZWdhdGl2ZXMgYW1vdW50AwkAAGYAAAACAAAAAAAAAAAABQAAAAJhOAkAAAIAAAABAgAAABJOb3QgZW5vdWdoIGJhbGFuY2UJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIFAAAAAmE0BQAAAAJhOAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAACYTIAAAAGY2FsbGVyBQAAAAJhOQUAAAACYTEFAAAAA25pbAAAAAB62jm0", "height": 1604445, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: 4UX9GT7eJdxnddVYeSW7w4YpQrQdees4GKWicyjFcXwM Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 5 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let a = base58'' | |
5 | + | ||
6 | + | @Callable(b) | |
7 | + | func deposit () = { | |
8 | + | let c = b.payments[0] | |
9 | + | if ((c.assetId != a)) | |
10 | + | then throw("wEUR - 'ten sam co wyżej'") | |
11 | + | else { | |
12 | + | let d = toBase58String(b.caller.bytes) | |
13 | + | let e = { | |
14 | + | let f = getInteger(this, d) | |
15 | + | if ($isInstanceOf(f, "Int")) | |
16 | + | then { | |
17 | + | let g = f | |
18 | + | g | |
19 | + | } | |
20 | + | else 0 | |
21 | + | } | |
22 | + | let h = (e + c.amount) | |
23 | + | [IntegerEntry(d, h)] | |
24 | + | } | |
25 | + | } | |
26 | + | ||
27 | + | ||
28 | + | ||
29 | + | @Callable(b) | |
30 | + | func witdraw (i) = { | |
31 | + | let d = toBase58String(b.caller.bytes) | |
32 | + | let e = { | |
33 | + | let f = getInteger(this, d) | |
34 | + | if ($isInstanceOf(f, "Int")) | |
35 | + | then { | |
36 | + | let g = f | |
37 | + | g | |
38 | + | } | |
39 | + | else 0 | |
40 | + | } | |
41 | + | let h = (e - i) | |
42 | + | if ((0 > i)) | |
43 | + | then throw("can't withdraw negatives amount") | |
44 | + | else if ((0 > h)) | |
45 | + | then throw("Not enough balance") | |
46 | + | else [IntegerEntry(d, h), ScriptTransfer(b.caller, i, a)] | |
47 | + | } | |
48 | + | ||
49 | + |
github/deemru/w8io/169f3d6 14.79 ms ◑