Fabcoin Core  0.16.2
P2P Digital Currency
AdminEthFace.h
Go to the documentation of this file.
1 
5 #ifndef JSONRPC_CPP_STUB_DEV_RPC_ADMINETHFACE_H_
6 #define JSONRPC_CPP_STUB_DEV_RPC_ADMINETHFACE_H_
7 
8 #include "ModularServer.h"
9 
10 namespace dev {
11  namespace rpc {
12  class AdminEthFace : public ServerInterface<AdminEthFace>
13  {
14  public:
16  {
17  this->bindAndAddMethod(jsonrpc::Procedure("admin_eth_blockQueueStatus", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_OBJECT, "param1",jsonrpc::JSON_STRING, NULL), &dev::rpc::AdminEthFace::admin_eth_blockQueueStatusI);
18  this->bindAndAddMethod(jsonrpc::Procedure("admin_eth_setAskPrice", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_BOOLEAN, "param1",jsonrpc::JSON_STRING,"param2",jsonrpc::JSON_STRING, NULL), &dev::rpc::AdminEthFace::admin_eth_setAskPriceI);
19  this->bindAndAddMethod(jsonrpc::Procedure("admin_eth_setBidPrice", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_BOOLEAN, "param1",jsonrpc::JSON_STRING,"param2",jsonrpc::JSON_STRING, NULL), &dev::rpc::AdminEthFace::admin_eth_setBidPriceI);
20  this->bindAndAddMethod(jsonrpc::Procedure("admin_eth_setMining", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_BOOLEAN, "param1",jsonrpc::JSON_BOOLEAN,"param2",jsonrpc::JSON_STRING, NULL), &dev::rpc::AdminEthFace::admin_eth_setMiningI);
21  this->bindAndAddMethod(jsonrpc::Procedure("admin_eth_findBlock", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_OBJECT, "param1",jsonrpc::JSON_STRING,"param2",jsonrpc::JSON_STRING, NULL), &dev::rpc::AdminEthFace::admin_eth_findBlockI);
22  this->bindAndAddMethod(jsonrpc::Procedure("admin_eth_blockQueueFirstUnknown", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_STRING, "param1",jsonrpc::JSON_STRING, NULL), &dev::rpc::AdminEthFace::admin_eth_blockQueueFirstUnknownI);
23  this->bindAndAddMethod(jsonrpc::Procedure("admin_eth_blockQueueRetryUnknown", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_BOOLEAN, "param1",jsonrpc::JSON_STRING, NULL), &dev::rpc::AdminEthFace::admin_eth_blockQueueRetryUnknownI);
24  this->bindAndAddMethod(jsonrpc::Procedure("admin_eth_allAccounts", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_ARRAY, "param1",jsonrpc::JSON_STRING, NULL), &dev::rpc::AdminEthFace::admin_eth_allAccountsI);
25  this->bindAndAddMethod(jsonrpc::Procedure("admin_eth_newAccount", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_OBJECT, "param1",jsonrpc::JSON_OBJECT,"param2",jsonrpc::JSON_STRING, NULL), &dev::rpc::AdminEthFace::admin_eth_newAccountI);
26  this->bindAndAddMethod(jsonrpc::Procedure("admin_eth_setMiningBenefactor", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_BOOLEAN, "param1",jsonrpc::JSON_STRING,"param2",jsonrpc::JSON_STRING, NULL), &dev::rpc::AdminEthFace::admin_eth_setMiningBenefactorI);
27  this->bindAndAddMethod(jsonrpc::Procedure("admin_eth_inspect", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_OBJECT, "param1",jsonrpc::JSON_STRING,"param2",jsonrpc::JSON_STRING, NULL), &dev::rpc::AdminEthFace::admin_eth_inspectI);
28  this->bindAndAddMethod(jsonrpc::Procedure("admin_eth_reprocess", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_OBJECT, "param1",jsonrpc::JSON_STRING,"param2",jsonrpc::JSON_STRING, NULL), &dev::rpc::AdminEthFace::admin_eth_reprocessI);
29  this->bindAndAddMethod(jsonrpc::Procedure("admin_eth_vmTrace", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_OBJECT, "param1",jsonrpc::JSON_STRING,"param2",jsonrpc::JSON_INTEGER,"param3",jsonrpc::JSON_STRING, NULL), &dev::rpc::AdminEthFace::admin_eth_vmTraceI);
30  this->bindAndAddMethod(jsonrpc::Procedure("admin_eth_getReceiptByHashAndIndex", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_OBJECT, "param1",jsonrpc::JSON_STRING,"param2",jsonrpc::JSON_INTEGER,"param3",jsonrpc::JSON_STRING, NULL), &dev::rpc::AdminEthFace::admin_eth_getReceiptByHashAndIndexI);
31  this->bindAndAddMethod(jsonrpc::Procedure("miner_start", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_BOOLEAN, "param1",jsonrpc::JSON_INTEGER, NULL), &dev::rpc::AdminEthFace::miner_startI);
32  this->bindAndAddMethod(jsonrpc::Procedure("miner_stop", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_BOOLEAN, NULL), &dev::rpc::AdminEthFace::miner_stopI);
33  this->bindAndAddMethod(jsonrpc::Procedure("miner_setEtherbase", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_BOOLEAN, "param1",jsonrpc::JSON_STRING, NULL), &dev::rpc::AdminEthFace::miner_setEtherbaseI);
34  this->bindAndAddMethod(jsonrpc::Procedure("miner_setExtra", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_BOOLEAN, "param1",jsonrpc::JSON_STRING, NULL), &dev::rpc::AdminEthFace::miner_setExtraI);
35  this->bindAndAddMethod(jsonrpc::Procedure("miner_setGasPrice", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_BOOLEAN, "param1",jsonrpc::JSON_STRING, NULL), &dev::rpc::AdminEthFace::miner_setGasPriceI);
36  this->bindAndAddMethod(jsonrpc::Procedure("miner_hashrate", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_STRING, NULL), &dev::rpc::AdminEthFace::miner_hashrateI);
37  }
38 
39  inline virtual void admin_eth_blockQueueStatusI(const Json::Value &request, Json::Value &response)
40  {
41  response = this->admin_eth_blockQueueStatus(request[0u].asString());
42  }
43  inline virtual void admin_eth_setAskPriceI(const Json::Value &request, Json::Value &response)
44  {
45  response = this->admin_eth_setAskPrice(request[0u].asString(), request[1u].asString());
46  }
47  inline virtual void admin_eth_setBidPriceI(const Json::Value &request, Json::Value &response)
48  {
49  response = this->admin_eth_setBidPrice(request[0u].asString(), request[1u].asString());
50  }
51  inline virtual void admin_eth_setMiningI(const Json::Value &request, Json::Value &response)
52  {
53  response = this->admin_eth_setMining(request[0u].asBool(), request[1u].asString());
54  }
55  inline virtual void admin_eth_findBlockI(const Json::Value &request, Json::Value &response)
56  {
57  response = this->admin_eth_findBlock(request[0u].asString(), request[1u].asString());
58  }
59  inline virtual void admin_eth_blockQueueFirstUnknownI(const Json::Value &request, Json::Value &response)
60  {
61  response = this->admin_eth_blockQueueFirstUnknown(request[0u].asString());
62  }
63  inline virtual void admin_eth_blockQueueRetryUnknownI(const Json::Value &request, Json::Value &response)
64  {
65  response = this->admin_eth_blockQueueRetryUnknown(request[0u].asString());
66  }
67  inline virtual void admin_eth_allAccountsI(const Json::Value &request, Json::Value &response)
68  {
69  response = this->admin_eth_allAccounts(request[0u].asString());
70  }
71  inline virtual void admin_eth_newAccountI(const Json::Value &request, Json::Value &response)
72  {
73  response = this->admin_eth_newAccount(request[0u], request[1u].asString());
74  }
75  inline virtual void admin_eth_setMiningBenefactorI(const Json::Value &request, Json::Value &response)
76  {
77  response = this->admin_eth_setMiningBenefactor(request[0u].asString(), request[1u].asString());
78  }
79  inline virtual void admin_eth_inspectI(const Json::Value &request, Json::Value &response)
80  {
81  response = this->admin_eth_inspect(request[0u].asString(), request[1u].asString());
82  }
83  inline virtual void admin_eth_reprocessI(const Json::Value &request, Json::Value &response)
84  {
85  response = this->admin_eth_reprocess(request[0u].asString(), request[1u].asString());
86  }
87  inline virtual void admin_eth_vmTraceI(const Json::Value &request, Json::Value &response)
88  {
89  response = this->admin_eth_vmTrace(request[0u].asString(), request[1u].asInt(), request[2u].asString());
90  }
91  inline virtual void admin_eth_getReceiptByHashAndIndexI(const Json::Value &request, Json::Value &response)
92  {
93  response = this->admin_eth_getReceiptByHashAndIndex(request[0u].asString(), request[1u].asInt(), request[2u].asString());
94  }
95  inline virtual void miner_startI(const Json::Value &request, Json::Value &response)
96  {
97  response = this->miner_start(request[0u].asInt());
98  }
99  inline virtual void miner_stopI(const Json::Value &request, Json::Value &response)
100  {
101  (void)request;
102  response = this->miner_stop();
103  }
104  inline virtual void miner_setEtherbaseI(const Json::Value &request, Json::Value &response)
105  {
106  response = this->miner_setEtherbase(request[0u].asString());
107  }
108  inline virtual void miner_setExtraI(const Json::Value &request, Json::Value &response)
109  {
110  response = this->miner_setExtra(request[0u].asString());
111  }
112  inline virtual void miner_setGasPriceI(const Json::Value &request, Json::Value &response)
113  {
114  response = this->miner_setGasPrice(request[0u].asString());
115  }
116  inline virtual void miner_hashrateI(const Json::Value &request, Json::Value &response)
117  {
118  (void)request;
119  response = this->miner_hashrate();
120  }
121  virtual Json::Value admin_eth_blockQueueStatus(const std::string& param1) = 0;
122  virtual bool admin_eth_setAskPrice(const std::string& param1, const std::string& param2) = 0;
123  virtual bool admin_eth_setBidPrice(const std::string& param1, const std::string& param2) = 0;
124  virtual bool admin_eth_setMining(bool param1, const std::string& param2) = 0;
125  virtual Json::Value admin_eth_findBlock(const std::string& param1, const std::string& param2) = 0;
126  virtual std::string admin_eth_blockQueueFirstUnknown(const std::string& param1) = 0;
127  virtual bool admin_eth_blockQueueRetryUnknown(const std::string& param1) = 0;
128  virtual Json::Value admin_eth_allAccounts(const std::string& param1) = 0;
129  virtual Json::Value admin_eth_newAccount(const Json::Value& param1, const std::string& param2) = 0;
130  virtual bool admin_eth_setMiningBenefactor(const std::string& param1, const std::string& param2) = 0;
131  virtual Json::Value admin_eth_inspect(const std::string& param1, const std::string& param2) = 0;
132  virtual Json::Value admin_eth_reprocess(const std::string& param1, const std::string& param2) = 0;
133  virtual Json::Value admin_eth_vmTrace(const std::string& param1, int param2, const std::string& param3) = 0;
134  virtual Json::Value admin_eth_getReceiptByHashAndIndex(const std::string& param1, int param2, const std::string& param3) = 0;
135  virtual bool miner_start(int param1) = 0;
136  virtual bool miner_stop() = 0;
137  virtual bool miner_setEtherbase(const std::string& param1) = 0;
138  virtual bool miner_setExtra(const std::string& param1) = 0;
139  virtual bool miner_setGasPrice(const std::string& param1) = 0;
140  virtual std::string miner_hashrate() = 0;
141  };
142 
143  }
144 }
145 #endif //JSONRPC_CPP_STUB_DEV_RPC_ADMINETHFACE_H_
virtual void admin_eth_setMiningI(const Json::Value &request, Json::Value &response)
Definition: AdminEthFace.h:51
virtual Json::Value admin_eth_blockQueueStatus(const std::string &param1)=0
Adapted from code found on http://stackoverflow.com/questions/180947/base64-decode-snippet-in-c Origi...
Definition: Arith256.cpp:15
virtual void admin_eth_getReceiptByHashAndIndexI(const Json::Value &request, Json::Value &response)
Definition: AdminEthFace.h:91
virtual Json::Value admin_eth_reprocess(const std::string &param1, const std::string &param2)=0
virtual std::string admin_eth_blockQueueFirstUnknown(const std::string &param1)=0
virtual void admin_eth_setBidPriceI(const Json::Value &request, Json::Value &response)
Definition: AdminEthFace.h:47
virtual bool admin_eth_setMining(bool param1, const std::string &param2)=0
virtual bool miner_setGasPrice(const std::string &param1)=0
virtual void admin_eth_blockQueueRetryUnknownI(const Json::Value &request, Json::Value &response)
Definition: AdminEthFace.h:63
virtual bool admin_eth_setMiningBenefactor(const std::string &param1, const std::string &param2)=0
virtual void admin_eth_allAccountsI(const Json::Value &request, Json::Value &response)
Definition: AdminEthFace.h:67
virtual void miner_startI(const Json::Value &request, Json::Value &response)
Definition: AdminEthFace.h:95
void bindAndAddMethod(jsonrpc::Procedure const &_proc, MethodPointer _pointer)
Definition: ModularServer.h:59
virtual Json::Value admin_eth_getReceiptByHashAndIndex(const std::string &param1, int param2, const std::string &param3)=0
virtual void admin_eth_setMiningBenefactorI(const Json::Value &request, Json::Value &response)
Definition: AdminEthFace.h:75
virtual void miner_setExtraI(const Json::Value &request, Json::Value &response)
Definition: AdminEthFace.h:108
virtual void miner_stopI(const Json::Value &request, Json::Value &response)
Definition: AdminEthFace.h:99
virtual bool miner_stop()=0
virtual Json::Value admin_eth_vmTrace(const std::string &param1, int param2, const std::string &param3)=0
virtual void admin_eth_inspectI(const Json::Value &request, Json::Value &response)
Definition: AdminEthFace.h:79
Config::Value_type Value
virtual void admin_eth_blockQueueFirstUnknownI(const Json::Value &request, Json::Value &response)
Definition: AdminEthFace.h:59
virtual Json::Value admin_eth_findBlock(const std::string &param1, const std::string &param2)=0
virtual void admin_eth_blockQueueStatusI(const Json::Value &request, Json::Value &response)
Definition: AdminEthFace.h:39
virtual void miner_hashrateI(const Json::Value &request, Json::Value &response)
Definition: AdminEthFace.h:116
virtual void admin_eth_vmTraceI(const Json::Value &request, Json::Value &response)
Definition: AdminEthFace.h:87
virtual bool miner_setEtherbase(const std::string &param1)=0
virtual Json::Value admin_eth_allAccounts(const std::string &param1)=0
virtual std::string miner_hashrate()=0
virtual void miner_setGasPriceI(const Json::Value &request, Json::Value &response)
Definition: AdminEthFace.h:112
virtual Json::Value admin_eth_inspect(const std::string &param1, const std::string &param2)=0
virtual void miner_setEtherbaseI(const Json::Value &request, Json::Value &response)
Definition: AdminEthFace.h:104
virtual bool miner_start(int param1)=0
virtual Json::Value admin_eth_newAccount(const Json::Value &param1, const std::string &param2)=0
virtual bool admin_eth_setAskPrice(const std::string &param1, const std::string &param2)=0
virtual bool admin_eth_blockQueueRetryUnknown(const std::string &param1)=0
virtual void admin_eth_reprocessI(const Json::Value &request, Json::Value &response)
Definition: AdminEthFace.h:83
virtual void admin_eth_newAccountI(const Json::Value &request, Json::Value &response)
Definition: AdminEthFace.h:71
virtual bool miner_setExtra(const std::string &param1)=0
virtual bool admin_eth_setBidPrice(const std::string &param1, const std::string &param2)=0
virtual void admin_eth_findBlockI(const Json::Value &request, Json::Value &response)
Definition: AdminEthFace.h:55
virtual void admin_eth_setAskPriceI(const Json::Value &request, Json::Value &response)
Definition: AdminEthFace.h:43
std::string asString(bytes const &_b)
Converts byte array to a string containing the same (binary) data.
Definition: CommonData.h:79