mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
net_version
web3_clientVersion
This commit is contained in:
parent
8371e8934e
commit
10ce222610
@ -22,6 +22,26 @@ class WebThreeStubClient : public jsonrpc::Client
|
|||||||
else
|
else
|
||||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
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)
|
std::string net_peerCount() throw (jsonrpc::JsonRpcException)
|
||||||
{
|
{
|
||||||
Json::Value p;
|
Json::Value p;
|
||||||
|
Loading…
Reference in New Issue
Block a user