mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
jsonrpc http watch
This commit is contained in:
parent
9cbed56278
commit
fbe6e656ec
@ -59,6 +59,19 @@ p["block"] = block;
|
||||
|
||||
}
|
||||
|
||||
bool check(const int& id) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p["id"] = id;
|
||||
|
||||
Json::Value result = this->client->CallMethod("check",p);
|
||||
if (result.isBool())
|
||||
return result.asBool();
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
|
||||
}
|
||||
|
||||
std::string codeAt(const std::string& address, const int& block) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
@ -174,6 +187,19 @@ p["s"] = s;
|
||||
|
||||
}
|
||||
|
||||
bool killWatch(const int& id) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p["id"] = id;
|
||||
|
||||
Json::Value result = this->client->CallMethod("killWatch",p);
|
||||
if (result.isBool())
|
||||
return result.asBool();
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
|
||||
}
|
||||
|
||||
bool listening() throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
@ -408,14 +434,14 @@ p["params"] = params;
|
||||
|
||||
}
|
||||
|
||||
std::string watch(const std::string& params) throw (jsonrpc::JsonRpcException)
|
||||
int watch(const std::string& params) throw (jsonrpc::JsonRpcException)
|
||||
{
|
||||
Json::Value p;
|
||||
p["params"] = params;
|
||||
|
||||
Json::Value result = this->client->CallMethod("watch",p);
|
||||
if (result.isString())
|
||||
return result.asString();
|
||||
if (result.isInt())
|
||||
return result.asInt();
|
||||
else
|
||||
throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user