diff options
author | Marek Kotewicz <marek.kotewicz@gmail.com> | 2014-10-16 09:46:47 +0800 |
---|---|---|
committer | Marek Kotewicz <marek.kotewicz@gmail.com> | 2014-10-16 09:46:47 +0800 |
commit | 9cbed5627829413ef86346f418991259784d966f (patch) | |
tree | f5e180208b602d964d7714a868d18d5e6a3b6845 /ethstubclient.h | |
parent | 46149f7249c141723f5c63ce425ab4af887fa7a8 (diff) | |
download | dexon-solidity-9cbed5627829413ef86346f418991259784d966f.tar dexon-solidity-9cbed5627829413ef86346f418991259784d966f.tar.gz dexon-solidity-9cbed5627829413ef86346f418991259784d966f.tar.bz2 dexon-solidity-9cbed5627829413ef86346f418991259784d966f.tar.lz dexon-solidity-9cbed5627829413ef86346f418991259784d966f.tar.xz dexon-solidity-9cbed5627829413ef86346f418991259784d966f.tar.zst dexon-solidity-9cbed5627829413ef86346f418991259784d966f.zip |
common changes to unify apis
Diffstat (limited to 'ethstubclient.h')
-rw-r--r-- | ethstubclient.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/ethstubclient.h b/ethstubclient.h index e2f1fb90..a9c46a0b 100644 --- a/ethstubclient.h +++ b/ethstubclient.h @@ -33,10 +33,10 @@ p["block"] = block; } - Json::Value block(const std::string& numberOrHash) throw (jsonrpc::JsonRpcException) + Json::Value block(const Json::Value& params) throw (jsonrpc::JsonRpcException) { Json::Value p; - p["numberOrHash"] = numberOrHash; + p["params"] = params; Json::Value result = this->client->CallMethod("block",p); if (result.isObject()) @@ -199,10 +199,10 @@ p["s"] = s; } - Json::Value messages(const Json::Value& json) throw (jsonrpc::JsonRpcException) + Json::Value messages(const Json::Value& params) throw (jsonrpc::JsonRpcException) { Json::Value p; - p["json"] = json; + p["params"] = params; Json::Value result = this->client->CallMethod("messages",p); if (result.isArray()) @@ -380,11 +380,11 @@ p["storage"] = storage; } - Json::Value transaction(const int& i, const std::string& numberOrHash) throw (jsonrpc::JsonRpcException) + Json::Value transaction(const int& i, const Json::Value& params) throw (jsonrpc::JsonRpcException) { Json::Value p; p["i"] = i; -p["numberOrHash"] = numberOrHash; +p["params"] = params; Json::Value result = this->client->CallMethod("transaction",p); if (result.isObject()) @@ -394,11 +394,11 @@ p["numberOrHash"] = numberOrHash; } - Json::Value uncle(const int& i, const std::string& numberOrHash) throw (jsonrpc::JsonRpcException) + Json::Value uncle(const int& i, const Json::Value& params) throw (jsonrpc::JsonRpcException) { Json::Value p; p["i"] = i; -p["numberOrHash"] = numberOrHash; +p["params"] = params; Json::Value result = this->client->CallMethod("uncle",p); if (result.isObject()) @@ -408,10 +408,10 @@ p["numberOrHash"] = numberOrHash; } - std::string watch(const std::string& json) throw (jsonrpc::JsonRpcException) + std::string watch(const std::string& params) throw (jsonrpc::JsonRpcException) { Json::Value p; - p["json"] = json; + p["params"] = params; Json::Value result = this->client->CallMethod("watch",p); if (result.isString()) |