Fabcoin Core  0.16.2
P2P Digital Currency
DebugFace.h
Go to the documentation of this file.
1 
5 #ifndef JSONRPC_CPP_STUB_DEV_RPC_DEBUGFACE_H_
6 #define JSONRPC_CPP_STUB_DEV_RPC_DEBUGFACE_H_
7 
8 #include "ModularServer.h"
9 
10 namespace dev {
11  namespace rpc {
12  class DebugFace : public ServerInterface<DebugFace>
13  {
14  public:
16  {
17  this->bindAndAddMethod(jsonrpc::Procedure("debug_traceTransaction", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_OBJECT, "param1",jsonrpc::JSON_STRING,"param2",jsonrpc::JSON_OBJECT, NULL), &dev::rpc::DebugFace::debug_traceTransactionI);
18  this->bindAndAddMethod(jsonrpc::Procedure("debug_storageRangeAt", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_OBJECT, "param1",jsonrpc::JSON_STRING,"param2",jsonrpc::JSON_INTEGER,"param3",jsonrpc::JSON_STRING,"param4",jsonrpc::JSON_STRING,"param5",jsonrpc::JSON_INTEGER, NULL), &dev::rpc::DebugFace::debug_storageRangeAtI);
19  this->bindAndAddMethod(jsonrpc::Procedure("debug_preimage", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_OBJECT, "param1",jsonrpc::JSON_STRING, NULL), &dev::rpc::DebugFace::debug_preimageI);
20  this->bindAndAddMethod(jsonrpc::Procedure("debug_traceBlockByNumber", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_OBJECT, "param1",jsonrpc::JSON_INTEGER,"param2",jsonrpc::JSON_OBJECT, NULL), &dev::rpc::DebugFace::debug_traceBlockByNumberI);
21  this->bindAndAddMethod(jsonrpc::Procedure("debug_traceBlockByHash", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_OBJECT, "param1",jsonrpc::JSON_STRING,"param2",jsonrpc::JSON_OBJECT, NULL), &dev::rpc::DebugFace::debug_traceBlockByHashI);
22  this->bindAndAddMethod(jsonrpc::Procedure("debug_traceCall", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_OBJECT, "param1",jsonrpc::JSON_OBJECT,"param2",jsonrpc::JSON_STRING,"param3",jsonrpc::JSON_OBJECT, NULL), &dev::rpc::DebugFace::debug_traceCallI);
23  }
24 
25  inline virtual void debug_traceTransactionI(const Json::Value &request, Json::Value &response)
26  {
27  response = this->debug_traceTransaction(request[0u].asString(), request[1u]);
28  }
29  inline virtual void debug_storageRangeAtI(const Json::Value &request, Json::Value &response)
30  {
31  response = this->debug_storageRangeAt(request[0u].asString(), request[1u].asInt(), request[2u].asString(), request[3u].asString(), request[4u].asInt());
32  }
33  inline virtual void debug_preimageI(const Json::Value &request, Json::Value &response)
34  {
35  response = this->debug_preimage(request[0u].asString());
36  }
37  inline virtual void debug_traceBlockByNumberI(const Json::Value &request, Json::Value &response)
38  {
39  response = this->debug_traceBlockByNumber(request[0u].asInt(), request[1u]);
40  }
41  inline virtual void debug_traceBlockByHashI(const Json::Value &request, Json::Value &response)
42  {
43  response = this->debug_traceBlockByHash(request[0u].asString(), request[1u]);
44  }
45  inline virtual void debug_traceCallI(const Json::Value &request, Json::Value &response)
46  {
47  response = this->debug_traceCall(request[0u], request[1u].asString(), request[2u]);
48  }
49  virtual Json::Value debug_traceTransaction(const std::string& param1, const Json::Value& param2) = 0;
50  virtual Json::Value debug_storageRangeAt(const std::string& param1, int param2, const std::string& param3, const std::string& param4, int param5) = 0;
51  virtual std::string debug_preimage(const std::string& param1) = 0;
52  virtual Json::Value debug_traceBlockByNumber(int param1, const Json::Value& param2) = 0;
53  virtual Json::Value debug_traceBlockByHash(const std::string& param1, const Json::Value& param2) = 0;
54  virtual Json::Value debug_traceCall(const Json::Value& param1, const std::string& param2, const Json::Value& param3) = 0;
55  };
56 
57  }
58 }
59 #endif //JSONRPC_CPP_STUB_DEV_RPC_DEBUGFACE_H_
virtual std::string debug_preimage(const std::string &param1)=0
virtual void debug_traceCallI(const Json::Value &request, Json::Value &response)
Definition: DebugFace.h:45
Adapted from code found on http://stackoverflow.com/questions/180947/base64-decode-snippet-in-c Origi...
Definition: Arith256.cpp:15
virtual Json::Value debug_storageRangeAt(const std::string &param1, int param2, const std::string &param3, const std::string &param4, int param5)=0
virtual void debug_preimageI(const Json::Value &request, Json::Value &response)
Definition: DebugFace.h:33
virtual Json::Value debug_traceCall(const Json::Value &param1, const std::string &param2, const Json::Value &param3)=0
virtual void debug_storageRangeAtI(const Json::Value &request, Json::Value &response)
Definition: DebugFace.h:29
virtual void debug_traceBlockByNumberI(const Json::Value &request, Json::Value &response)
Definition: DebugFace.h:37
void bindAndAddMethod(jsonrpc::Procedure const &_proc, MethodPointer _pointer)
Definition: ModularServer.h:59
virtual Json::Value debug_traceBlockByNumber(int param1, const Json::Value &param2)=0
virtual Json::Value debug_traceBlockByHash(const std::string &param1, const Json::Value &param2)=0
virtual void debug_traceTransactionI(const Json::Value &request, Json::Value &response)
Definition: DebugFace.h:25
Config::Value_type Value
virtual Json::Value debug_traceTransaction(const std::string &param1, const Json::Value &param2)=0
virtual void debug_traceBlockByHashI(const Json::Value &request, Json::Value &response)
Definition: DebugFace.h:41
std::string asString(bytes const &_b)
Converts byte array to a string containing the same (binary) data.
Definition: CommonData.h:79