tx · 3Qh4YrUJUCnyPAQKRcffoCLWzHqQuXWKKi7U7bPR4fJt 3MrD29Em3UVB6KUouximkPkYJPUAtL8jqpn: -0.01000000 Waves 2021.04.15 00:32 [1482664] smart account 3MrD29Em3UVB6KUouximkPkYJPUAtL8jqpn > SELF 0.00000000 Waves
{ "type": 13, "id": "3Qh4YrUJUCnyPAQKRcffoCLWzHqQuXWKKi7U7bPR4fJt", "fee": 1000000, "feeAssetId": null, "timestamp": 1618436000011, "version": 2, "chainId": 84, "sender": "3MrD29Em3UVB6KUouximkPkYJPUAtL8jqpn", "senderPublicKey": "56eNaKVmDQUA4CeqQiK9bWnhNsm9iFLFtrdtGNCQfkTu", "proofs": [ "SqXwCbuc1RY8MLX7Ev4F2JLetD95LQ9S1MphvwxfaPzLybEDyuZMJ75SuJrPPggTS4D5LiN1m83cDPJR9viPaQD" ], "script": "base64:AAIDAAAAAAAAAAkIARIAEgMKAQEAAAABAAAAAAlueWFuVG9rZW4BAAAAINgeyDqxoZnAcinTWYzwct5yBD/FJHpCDlhQbg3+OF41AAAAAgAAAAFpAQAAAAdkZXBvc2l0AAAAAAQAAAADcG10CQEAAAAHZXh0cmFjdAAAAAEIBQAAAAFpAAAAB3BheW1lbnQDCQEAAAACIT0AAAACCAUAAAADcG10AAAAB2Fzc2V0SWQFAAAACW55YW5Ub2tlbgkAAAIAAAABAgAAABxOWUFOLTEzIHRva2VucyBvbmx5IHN1cHBvcnRzBAAAAApjdXJyZW50S2V5CQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMEAAAADWN1cnJlbnRBbW91bnQEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAAKY3VycmVudEtleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAABAAAAAluZXdBbW91bnQJAABkAAAAAgUAAAANY3VycmVudEFtb3VudAgFAAAAA3BtdAAAAAZ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482664, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: GQ8BF9HRgumTUQposQo6vjVxNYUTokgvaneefvNRY3A1 Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 3 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let a = base58'FYeHd8VsE6SWQBzMFYDPbV7xjFdBMJt5gnCZCSiYyoHE' | |
5 | + | ||
6 | + | @Callable(b) | |
7 | + | func deposit () = { | |
8 | + | let c = extract(b.payment) | |
9 | + | if ((c.assetId != a)) | |
10 | + | then throw("NYAN-13 tokens only supports") | |
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 | + | WriteSet([DataEntry(d, h)]) | |
24 | + | } | |
25 | + | } | |
26 | + | ||
27 | + | ||
28 | + | ||
29 | + | @Callable(b) | |
30 | + | func withdraw (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 negative amount") | |
44 | + | else if ((0 > h)) | |
45 | + | then throw("not enoung balance") | |
46 | + | else ScriptResult(WriteSet([DataEntry(d, h)]), TransferSet([ScriptTransfer(b.caller, i, a)])) | |
47 | + | } | |
48 | + | ||
49 | + | ||
50 | + | @Verifier(j) | |
51 | + | func k () = sigVerify(j.bodyBytes, j.proofs[0], j.senderPublicKey) | |
52 | + |
github/deemru/w8io/169f3d6 15.50 ms ◑