mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
jsonrpc api changes in progress2
This commit is contained in:
parent
5d20782dea
commit
13d14289d8
@ -92,16 +92,28 @@ class WebThreeStubClient : public jsonrpc::Client
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
std::string eth_balanceAt(const std::string& param1) throw (jsonrpc::JsonRpcException)
|
||||
std::string eth_getBalance(const std::string& param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
Json::Value result = this->CallMethod("eth_balanceAt",p);
|
||||
p.append(param2);
|
||||
Json::Value result = this->CallMethod("eth_getBalance",p);
|
||||
if (result.isString())
|
||||
return result.asString();
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
Json::Value eth_getStorage(const std::string& param1, const std::string& param2) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
p.append(param2);
|
||||
Json::Value result = this->CallMethod("eth_getStorage",p);
|
||||
if (result.isObject())
|
||||
return result;
|
||||
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)
|
||||
{
|
||||
Json::Value p;
|
||||
@ -113,16 +125,6 @@ class WebThreeStubClient : public jsonrpc::Client
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
Json::Value eth_storageAt(const std::string& param1) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p.append(param1);
|
||||
Json::Value result = this->CallMethod("eth_storageAt",p);
|
||||
if (result.isObject())
|
||||
return result;
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
}
|
||||
double eth_countAt(const std::string& param1) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
|
Loading…
Reference in New Issue
Block a user