|
|
@ -33,6 +33,7 @@ class AbstractWebThreeStubServer : public jsonrpc::AbstractServer<AbstractWebThr |
|
|
|
this->bindAndAddMethod(new jsonrpc::Procedure("number", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_INTEGER, NULL), &AbstractWebThreeStubServer::numberI); |
|
|
|
this->bindAndAddMethod(new jsonrpc::Procedure("peerCount", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_INTEGER, NULL), &AbstractWebThreeStubServer::peerCountI); |
|
|
|
this->bindAndAddMethod(new jsonrpc::Procedure("setCoinbase", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_BOOLEAN, "param1",jsonrpc::JSON_STRING, NULL), &AbstractWebThreeStubServer::setCoinbaseI); |
|
|
|
this->bindAndAddMethod(new jsonrpc::Procedure("setDefaultBlock", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_BOOLEAN, "param1",jsonrpc::JSON_INTEGER, NULL), &AbstractWebThreeStubServer::setDefaultBlockI); |
|
|
|
this->bindAndAddMethod(new jsonrpc::Procedure("setListening", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_BOOLEAN, "param1",jsonrpc::JSON_BOOLEAN, NULL), &AbstractWebThreeStubServer::setListeningI); |
|
|
|
this->bindAndAddMethod(new jsonrpc::Procedure("setMining", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_BOOLEAN, "param1",jsonrpc::JSON_BOOLEAN, NULL), &AbstractWebThreeStubServer::setMiningI); |
|
|
|
this->bindAndAddMethod(new jsonrpc::Procedure("stateAt", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_STRING, "param1",jsonrpc::JSON_STRING,"param2",jsonrpc::JSON_STRING, NULL), &AbstractWebThreeStubServer::stateAtI); |
|
|
@ -145,6 +146,11 @@ class AbstractWebThreeStubServer : public jsonrpc::AbstractServer<AbstractWebThr |
|
|
|
response = this->setCoinbase(request[0u].asString()); |
|
|
|
} |
|
|
|
|
|
|
|
inline virtual void setDefaultBlockI(const Json::Value& request, Json::Value& response) |
|
|
|
{ |
|
|
|
response = this->setDefaultBlock(request[0u].asInt()); |
|
|
|
} |
|
|
|
|
|
|
|
inline virtual void setListeningI(const Json::Value& request, Json::Value& response) |
|
|
|
{ |
|
|
|
response = this->setListening(request[0u].asBool()); |
|
|
@ -211,6 +217,7 @@ class AbstractWebThreeStubServer : public jsonrpc::AbstractServer<AbstractWebThr |
|
|
|
virtual int number() = 0; |
|
|
|
virtual int peerCount() = 0; |
|
|
|
virtual bool setCoinbase(const std::string& param1) = 0; |
|
|
|
virtual bool setDefaultBlock(const int& param1) = 0; |
|
|
|
virtual bool setListening(const bool& param1) = 0; |
|
|
|
virtual bool setMining(const bool& param1) = 0; |
|
|
|
virtual std::string stateAt(const std::string& param1, const std::string& param2) = 0; |
|
|
|