diff options
author | Marek Kotewicz <marek.kotewicz@gmail.com> | 2014-11-18 23:37:24 +0800 |
---|---|---|
committer | Marek Kotewicz <marek.kotewicz@gmail.com> | 2014-11-18 23:37:24 +0800 |
commit | 0eb527859fac01620f5d977726497ee8e9fd67e1 (patch) | |
tree | 0a1a94ed88ba5f8b260623f631aefc83a9eb7382 /webthreestubclient.h | |
parent | cf58cd775425647a112edec9551a1cd56d176924 (diff) | |
parent | 9544173e3b930dffe6b44e168c2b5664a5702a0c (diff) | |
download | dexon-solidity-0eb527859fac01620f5d977726497ee8e9fd67e1.tar.gz dexon-solidity-0eb527859fac01620f5d977726497ee8e9fd67e1.tar.zst dexon-solidity-0eb527859fac01620f5d977726497ee8e9fd67e1.zip |
Merge branch 'develop' into mk_jsonrpc_upgrade
Conflicts:
libweb3jsonrpc/abstractwebthreestubserver.h
libweb3jsonrpc/spec.json
test/webthreestubclient.h
Diffstat (limited to 'webthreestubclient.h')
-rw-r--r-- | webthreestubclient.h | 48 |
1 files changed, 44 insertions, 4 deletions
diff --git a/webthreestubclient.h b/webthreestubclient.h index aead5ffa..9b36c364 100644 --- a/webthreestubclient.h +++ b/webthreestubclient.h @@ -153,6 +153,16 @@ 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; @@ -257,6 +267,16 @@ class WebThreeStubClient : public jsonrpc::Client else throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); } + Json::Value eth_compilers() throw (jsonrpc::JsonRpcException) + { + Json::Value p; + p = Json::nullValue; + Json::Value result = this->CallMethod("eth_compilers",p); + if (result.isArray()) + return result; + else + throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); + } std::string eth_lll(const std::string& param1) throw (jsonrpc::JsonRpcException) { Json::Value p; @@ -267,11 +287,21 @@ class WebThreeStubClient : public jsonrpc::Client else throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); } - std::string eth_compile(const std::string& param1) throw (jsonrpc::JsonRpcException) + std::string eth_solidity(const std::string& param1) throw (jsonrpc::JsonRpcException) { Json::Value p; p.append(param1); - Json::Value result = this->CallMethod("eth_compile",p); + Json::Value result = this->CallMethod("eth_solidity",p); + if (result.isString()) + return result.asString(); + else + throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); + } + std::string eth_serpent(const std::string& param1) throw (jsonrpc::JsonRpcException) + { + Json::Value p; + p.append(param1); + Json::Value result = this->CallMethod("eth_serpent",p); if (result.isString()) return result.asString(); else @@ -317,11 +347,21 @@ class WebThreeStubClient : public jsonrpc::Client else throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); } - Json::Value eth_getMessages(const int& param1) throw (jsonrpc::JsonRpcException) + Json::Value eth_filterLogs(const int& param1) throw (jsonrpc::JsonRpcException) + { + Json::Value p; + p.append(param1); + Json::Value result = this->CallMethod("eth_filterLogs",p); + if (result.isArray()) + return result; + else + throw jsonrpc::JsonRpcException(jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString()); + } + Json::Value eth_logs(const Json::Value& param1) throw (jsonrpc::JsonRpcException) { Json::Value p; p.append(param1); - Json::Value result = this->CallMethod("eth_getMessages",p); + Json::Value result = this->CallMethod("eth_logs",p); if (result.isArray()) return result; else |