diff options
author | Marek Kotewicz <marek.kotewicz@gmail.com> | 2015-03-05 08:34:02 +0800 |
---|---|---|
committer | Marek Kotewicz <marek.kotewicz@gmail.com> | 2015-03-05 08:34:02 +0800 |
commit | d3e65ba8a44c75f9fd180309ba6c07dd03a2a9d5 (patch) | |
tree | e6d1256f14a70874d9ab9ffa7754beca0afc8a0c /webthreestubclient.h | |
parent | 13d14289d8339b60b00086a5f6f57e2c7f69167a (diff) | |
download | dexon-solidity-d3e65ba8a44c75f9fd180309ba6c07dd03a2a9d5.tar dexon-solidity-d3e65ba8a44c75f9fd180309ba6c07dd03a2a9d5.tar.gz dexon-solidity-d3e65ba8a44c75f9fd180309ba6c07dd03a2a9d5.tar.bz2 dexon-solidity-d3e65ba8a44c75f9fd180309ba6c07dd03a2a9d5.tar.lz dexon-solidity-d3e65ba8a44c75f9fd180309ba6c07dd03a2a9d5.tar.xz dexon-solidity-d3e65ba8a44c75f9fd180309ba6c07dd03a2a9d5.tar.zst dexon-solidity-d3e65ba8a44c75f9fd180309ba6c07dd03a2a9d5.zip |
jsonrpc api changes in progress3
Diffstat (limited to 'webthreestubclient.h')
-rw-r--r-- | webthreestubclient.h | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/webthreestubclient.h b/webthreestubclient.h index 4c92f52d..824beee7 100644 --- a/webthreestubclient.h +++ b/webthreestubclient.h @@ -114,44 +114,46 @@ class WebThreeStubClient : public jsonrpc::Client else throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); } - std::string eth_stateAt(const std::string& param1, const std::string& param2) throw (jsonrpc::JsonRpcException) + std::string eth_getStorageAt(const std::string& param1, const std::string& param2, const std::string& param3) throw (jsonrpc::JsonRpcException) { Json::Value p; p.append(param1); p.append(param2); - Json::Value result = this->CallMethod("eth_stateAt",p); + p.append(param3); + Json::Value result = this->CallMethod("eth_getStorageAt",p); if (result.isString()) return result.asString(); else throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); } - double eth_countAt(const std::string& param1) throw (jsonrpc::JsonRpcException) + std::string eth_getTransactionCount(const std::string& param1, const std::string& param2) throw (jsonrpc::JsonRpcException) { Json::Value p; p.append(param1); - Json::Value result = this->CallMethod("eth_countAt",p); - if (result.isDouble()) - return result.asDouble(); + p.append(param2); + Json::Value result = this->CallMethod("eth_getTransactionCount",p); + if (result.isString()) + return result.asString(); else throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); } - double eth_transactionCountByHash(const std::string& param1) throw (jsonrpc::JsonRpcException) + std::string eth_getBlockTransactionCountByHash(const std::string& param1) throw (jsonrpc::JsonRpcException) { Json::Value p; p.append(param1); - Json::Value result = this->CallMethod("eth_transactionCountByHash",p); - if (result.isDouble()) - return result.asDouble(); + Json::Value result = this->CallMethod("eth_getBlockTransactionCountByHash",p); + if (result.isString()) + return result.asString(); else throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); } - double eth_transactionCountByNumber(int param1) throw (jsonrpc::JsonRpcException) + std::string eth_getBlockTransactionCountByNumber(const std::string& param1) throw (jsonrpc::JsonRpcException) { Json::Value p; p.append(param1); - Json::Value result = this->CallMethod("eth_transactionCountByNumber",p); - if (result.isDouble()) - return result.asDouble(); + Json::Value result = this->CallMethod("eth_getBlockTransactionCountByNumber",p); + if (result.isString()) + return result.asString(); else throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); } |