|
|
@ -23,14 +23,13 @@ class AbstractWebThreeStubServer : public jsonrpc::AbstractServer<AbstractWebThr |
|
|
|
this->bindAndAddMethod(jsonrpc::Procedure("eth_accounts", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_ARRAY, NULL), &AbstractWebThreeStubServer::eth_accountsI); |
|
|
|
this->bindAndAddMethod(jsonrpc::Procedure("eth_blockNumber", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_STRING, NULL), &AbstractWebThreeStubServer::eth_blockNumberI); |
|
|
|
this->bindAndAddMethod(jsonrpc::Procedure("eth_getBalance", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_STRING, "param1",jsonrpc::JSON_STRING,"param2",jsonrpc::JSON_STRING, NULL), &AbstractWebThreeStubServer::eth_getBalanceI); |
|
|
|
this->bindAndAddMethod(jsonrpc::Procedure("eth_getStorage", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_OBJECT, "param1",jsonrpc::JSON_STRING,"param2",jsonrpc::JSON_STRING, NULL), &AbstractWebThreeStubServer::eth_getStorageI); |
|
|
|
this->bindAndAddMethod(jsonrpc::Procedure("eth_getStorageAt", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_STRING, "param1",jsonrpc::JSON_STRING,"param2",jsonrpc::JSON_STRING,"param3",jsonrpc::JSON_STRING, NULL), &AbstractWebThreeStubServer::eth_getStorageAtI); |
|
|
|
this->bindAndAddMethod(jsonrpc::Procedure("eth_getTransactionCount", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_STRING, "param1",jsonrpc::JSON_STRING,"param2",jsonrpc::JSON_STRING, NULL), &AbstractWebThreeStubServer::eth_getTransactionCountI); |
|
|
|
this->bindAndAddMethod(jsonrpc::Procedure("eth_getBlockTransactionCountByHash", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_STRING, "param1",jsonrpc::JSON_STRING, NULL), &AbstractWebThreeStubServer::eth_getBlockTransactionCountByHashI); |
|
|
|
this->bindAndAddMethod(jsonrpc::Procedure("eth_getBlockTransactionCountByNumber", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_STRING, "param1",jsonrpc::JSON_STRING, NULL), &AbstractWebThreeStubServer::eth_getBlockTransactionCountByNumberI); |
|
|
|
this->bindAndAddMethod(jsonrpc::Procedure("eth_getUncleCountByBlockHash", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_STRING, "param1",jsonrpc::JSON_STRING, NULL), &AbstractWebThreeStubServer::eth_getUncleCountByBlockHashI); |
|
|
|
this->bindAndAddMethod(jsonrpc::Procedure("eth_getUncleCountByBlockNumber", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_STRING, "param1",jsonrpc::JSON_STRING, NULL), &AbstractWebThreeStubServer::eth_getUncleCountByBlockNumberI); |
|
|
|
this->bindAndAddMethod(jsonrpc::Procedure("eth_getData", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_STRING, "param1",jsonrpc::JSON_STRING,"param2",jsonrpc::JSON_STRING, NULL), &AbstractWebThreeStubServer::eth_getDataI); |
|
|
|
this->bindAndAddMethod(jsonrpc::Procedure("eth_getCode", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_STRING, "param1",jsonrpc::JSON_STRING,"param2",jsonrpc::JSON_STRING, NULL), &AbstractWebThreeStubServer::eth_getCodeI); |
|
|
|
this->bindAndAddMethod(jsonrpc::Procedure("eth_sendTransaction", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_STRING, "param1",jsonrpc::JSON_OBJECT, NULL), &AbstractWebThreeStubServer::eth_sendTransactionI); |
|
|
|
this->bindAndAddMethod(jsonrpc::Procedure("eth_call", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_STRING, "param1",jsonrpc::JSON_OBJECT,"param2",jsonrpc::JSON_STRING, NULL), &AbstractWebThreeStubServer::eth_callI); |
|
|
|
this->bindAndAddMethod(jsonrpc::Procedure("eth_flush", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_BOOLEAN, NULL), &AbstractWebThreeStubServer::eth_flushI); |
|
|
@ -122,10 +121,6 @@ class AbstractWebThreeStubServer : public jsonrpc::AbstractServer<AbstractWebThr |
|
|
|
{ |
|
|
|
response = this->eth_getBalance(request[0u].asString(), request[1u].asString()); |
|
|
|
} |
|
|
|
inline virtual void eth_getStorageI(const Json::Value &request, Json::Value &response) |
|
|
|
{ |
|
|
|
response = this->eth_getStorage(request[0u].asString(), request[1u].asString()); |
|
|
|
} |
|
|
|
inline virtual void eth_getStorageAtI(const Json::Value &request, Json::Value &response) |
|
|
|
{ |
|
|
|
response = this->eth_getStorageAt(request[0u].asString(), request[1u].asString(), request[2u].asString()); |
|
|
@ -150,9 +145,9 @@ class AbstractWebThreeStubServer : public jsonrpc::AbstractServer<AbstractWebThr |
|
|
|
{ |
|
|
|
response = this->eth_getUncleCountByBlockNumber(request[0u].asString()); |
|
|
|
} |
|
|
|
inline virtual void eth_getDataI(const Json::Value &request, Json::Value &response) |
|
|
|
inline virtual void eth_getCodeI(const Json::Value &request, Json::Value &response) |
|
|
|
{ |
|
|
|
response = this->eth_getData(request[0u].asString(), request[1u].asString()); |
|
|
|
response = this->eth_getCode(request[0u].asString(), request[1u].asString()); |
|
|
|
} |
|
|
|
inline virtual void eth_sendTransactionI(const Json::Value &request, Json::Value &response) |
|
|
|
{ |
|
|
@ -313,14 +308,13 @@ class AbstractWebThreeStubServer : public jsonrpc::AbstractServer<AbstractWebThr |
|
|
|
virtual Json::Value eth_accounts() = 0; |
|
|
|
virtual std::string eth_blockNumber() = 0; |
|
|
|
virtual std::string eth_getBalance(const std::string& param1, const std::string& param2) = 0; |
|
|
|
virtual Json::Value eth_getStorage(const std::string& param1, const std::string& param2) = 0; |
|
|
|
virtual std::string eth_getStorageAt(const std::string& param1, const std::string& param2, const std::string& param3) = 0; |
|
|
|
virtual std::string eth_getTransactionCount(const std::string& param1, const std::string& param2) = 0; |
|
|
|
virtual std::string eth_getBlockTransactionCountByHash(const std::string& param1) = 0; |
|
|
|
virtual std::string eth_getBlockTransactionCountByNumber(const std::string& param1) = 0; |
|
|
|
virtual std::string eth_getUncleCountByBlockHash(const std::string& param1) = 0; |
|
|
|
virtual std::string eth_getUncleCountByBlockNumber(const std::string& param1) = 0; |
|
|
|
virtual std::string eth_getData(const std::string& param1, const std::string& param2) = 0; |
|
|
|
virtual std::string eth_getCode(const std::string& param1, const std::string& param2) = 0; |
|
|
|
virtual std::string eth_sendTransaction(const Json::Value& param1) = 0; |
|
|
|
virtual std::string eth_call(const Json::Value& param1, const std::string& param2) = 0; |
|
|
|
virtual bool eth_flush() = 0; |
|
|
|