diff options
author | Gav Wood <i@gavwood.com> | 2015-03-12 21:38:51 +0800 |
---|---|---|
committer | Gav Wood <i@gavwood.com> | 2015-03-12 21:38:51 +0800 |
commit | 10ce2226108f27e16b58d3da54450b02405f2d8c (patch) | |
tree | 69b3811ba03e8a636c7a835539e1820ac45e12a7 /webthreestubclient.h | |
parent | 8371e8934e0b55400db0dce5e28c3e3ae5a676f7 (diff) | |
download | dexon-solidity-10ce2226108f27e16b58d3da54450b02405f2d8c.tar dexon-solidity-10ce2226108f27e16b58d3da54450b02405f2d8c.tar.gz dexon-solidity-10ce2226108f27e16b58d3da54450b02405f2d8c.tar.bz2 dexon-solidity-10ce2226108f27e16b58d3da54450b02405f2d8c.tar.lz dexon-solidity-10ce2226108f27e16b58d3da54450b02405f2d8c.tar.xz dexon-solidity-10ce2226108f27e16b58d3da54450b02405f2d8c.tar.zst dexon-solidity-10ce2226108f27e16b58d3da54450b02405f2d8c.zip |
net_version
web3_clientVersion
Diffstat (limited to 'webthreestubclient.h')
-rw-r--r-- | webthreestubclient.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/webthreestubclient.h b/webthreestubclient.h index baa0798a..687ebc49 100644 --- a/webthreestubclient.h +++ b/webthreestubclient.h @@ -22,6 +22,26 @@ class WebThreeStubClient : public jsonrpc::Client else throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); } + std::string web3_clientVersion() throw (jsonrpc::JsonRpcException) + { + Json::Value p; + p = Json::nullValue; + Json::Value result = this->CallMethod("web3_clientVersion",p); + if (result.isString()) + return result.asString(); + else + throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); + } + std::string net_version() throw (jsonrpc::JsonRpcException) + { + Json::Value p; + p = Json::nullValue; + Json::Value result = this->CallMethod("net_version",p); + if (result.isString()) + return result.asString(); + else + throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); + } std::string net_peerCount() throw (jsonrpc::JsonRpcException) { Json::Value p; |