mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
JSON-RPC transactionCount && uncleCount, fixed #1027
This commit is contained in:
parent
44103be9b0
commit
cf3c22e06f
@ -183,6 +183,46 @@ class WebThreeStubClient : public jsonrpc::Client
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
double eth_transactionCountByHash(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();
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
double eth_transactionCountByNumber(int param1) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
Json::Value result = this->CallMethod("eth_transactionCountByNumber",p);
|
||||
if (result.isDouble())
|
||||
return result.asDouble();
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
double eth_uncleCountByHash(const std::string& param1) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
Json::Value result = this->CallMethod("eth_uncleCountByHash",p);
|
||||
if (result.isDouble())
|
||||
return result.asDouble();
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
double eth_uncleCountByNumber(int param1) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
Json::Value result = this->CallMethod("eth_uncleCountByNumber",p);
|
||||
if (result.isDouble())
|
||||
return result.asDouble();
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
std::string eth_codeAt(const std::string& param1) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
|
Loading…
Reference in New Issue
Block a user