forked from bcosorg/bcos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDebug.h
46 lines (35 loc) · 1.48 KB
/
Debug.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#pragma once
#include <libethereum/Executive.h>
#include "DebugFace.h"
namespace dev
{
namespace eth
{
class Client;
}
namespace rpc
{
class SessionManager;
class Debug: public DebugFace
{
public:
explicit Debug(eth::Client const& _eth);
virtual RPCModules implementedModules() const override
{
return RPCModules{RPCModule{"debug", "1.0"}};
}
virtual Json::Value debug_traceTransaction(std::string const& _txHash, Json::Value const& _json) override;
virtual Json::Value debug_traceCall(Json::Value const& _call, std::string const& _blockNumber, Json::Value const& _options) override;
virtual Json::Value debug_traceBlockByNumber(int _blockNumber, Json::Value const& _json) override;
virtual Json::Value debug_traceBlockByHash(std::string const& _blockHash, Json::Value const& _json) override;
virtual Json::Value debug_storageRangeAt(std::string const& _blockHashOrNumber, int _txIndex, std::string const& _address, std::string const& _begin, int _maxResults) override;
virtual std::string debug_preimage(std::string const& _hashedKey) override;
virtual Json::Value debug_traceBlock(std::string const& _blockRlp, Json::Value const& _json);
private:
eth::Client const& m_eth;
h256 blockHash(std::string const& _blockHashOrNumber) const;
Json::Value traceTransaction(dev::eth::Executive& _e, dev::eth::Transaction const& _t, Json::Value const& _json);
Json::Value traceBlock(dev::eth::Block const& _block, Json::Value const& _json);
};
}
}