@@ -14,6 +14,7 @@ class AbstractEthStubServer : public jsonrpc::AbstractServer<AbstractEthStubServ
1414 jsonrpc::AbstractServer<AbstractEthStubServer>(conn)
1515 {
1616 this ->bindAndAddMethod (new jsonrpc::Procedure (" balanceAt" , jsonrpc::PARAMS_BY_NAME, jsonrpc::JSON_STRING, " a" ,jsonrpc::JSON_STRING, NULL ), &AbstractEthStubServer::balanceAtI);
17+ this ->bindAndAddMethod (new jsonrpc::Procedure (" block" , jsonrpc::PARAMS_BY_NAME, jsonrpc::JSON_OBJECT, " a" ,jsonrpc::JSON_STRING, NULL ), &AbstractEthStubServer::blockI);
1718 this ->bindAndAddMethod (new jsonrpc::Procedure (" check" , jsonrpc::PARAMS_BY_NAME, jsonrpc::JSON_ARRAY, " a" ,jsonrpc::JSON_ARRAY, NULL ), &AbstractEthStubServer::checkI);
1819 this ->bindAndAddMethod (new jsonrpc::Procedure (" coinbase" , jsonrpc::PARAMS_BY_NAME, jsonrpc::JSON_STRING, NULL ), &AbstractEthStubServer::coinbaseI);
1920 this ->bindAndAddMethod (new jsonrpc::Procedure (" create" , jsonrpc::PARAMS_BY_NAME, jsonrpc::JSON_OBJECT, " bCode" ,jsonrpc::JSON_STRING," sec" ,jsonrpc::JSON_STRING," xEndowment" ,jsonrpc::JSON_STRING," xGas" ,jsonrpc::JSON_STRING," xGasPrice" ,jsonrpc::JSON_STRING, NULL ), &AbstractEthStubServer::createI);
@@ -23,7 +24,9 @@ class AbstractEthStubServer : public jsonrpc::AbstractServer<AbstractEthStubServ
2324 this ->bindAndAddMethod (new jsonrpc::Procedure (" isMining" , jsonrpc::PARAMS_BY_NAME, jsonrpc::JSON_BOOLEAN, NULL ), &AbstractEthStubServer::isMiningI);
2425 this ->bindAndAddMethod (new jsonrpc::Procedure (" key" , jsonrpc::PARAMS_BY_NAME, jsonrpc::JSON_STRING, NULL ), &AbstractEthStubServer::keyI);
2526 this ->bindAndAddMethod (new jsonrpc::Procedure (" keys" , jsonrpc::PARAMS_BY_NAME, jsonrpc::JSON_ARRAY, NULL ), &AbstractEthStubServer::keysI);
27+ this ->bindAndAddMethod (new jsonrpc::Procedure (" lastBlock" , jsonrpc::PARAMS_BY_NAME, jsonrpc::JSON_OBJECT, NULL ), &AbstractEthStubServer::lastBlockI);
2628 this ->bindAndAddMethod (new jsonrpc::Procedure (" peerCount" , jsonrpc::PARAMS_BY_NAME, jsonrpc::JSON_INTEGER, NULL ), &AbstractEthStubServer::peerCountI);
29+ this ->bindAndAddMethod (new jsonrpc::Procedure (" procedures" , jsonrpc::PARAMS_BY_NAME, jsonrpc::JSON_ARRAY, NULL ), &AbstractEthStubServer::proceduresI);
2730 this ->bindAndAddMethod (new jsonrpc::Procedure (" secretToAddress" , jsonrpc::PARAMS_BY_NAME, jsonrpc::JSON_STRING, " a" ,jsonrpc::JSON_STRING, NULL ), &AbstractEthStubServer::secretToAddressI);
2831 this ->bindAndAddMethod (new jsonrpc::Procedure (" storageAt" , jsonrpc::PARAMS_BY_NAME, jsonrpc::JSON_STRING, " a" ,jsonrpc::JSON_STRING," x" ,jsonrpc::JSON_STRING, NULL ), &AbstractEthStubServer::storageAtI);
2932 this ->bindAndAddMethod (new jsonrpc::Procedure (" transact" , jsonrpc::PARAMS_BY_NAME, jsonrpc::JSON_OBJECT, " aDest" ,jsonrpc::JSON_STRING," bData" ,jsonrpc::JSON_STRING," sec" ,jsonrpc::JSON_STRING," xGas" ,jsonrpc::JSON_STRING," xGasPrice" ,jsonrpc::JSON_STRING," xValue" ,jsonrpc::JSON_STRING, NULL ), &AbstractEthStubServer::transactI);
@@ -36,6 +39,11 @@ class AbstractEthStubServer : public jsonrpc::AbstractServer<AbstractEthStubServ
3639 response = this ->balanceAt (request[" a" ].asString ());
3740 }
3841
42+ inline virtual void blockI (const Json::Value& request, Json::Value& response)
43+ {
44+ response = this ->block (request[" a" ].asString ());
45+ }
46+
3947 inline virtual void checkI (const Json::Value& request, Json::Value& response)
4048 {
4149 response = this ->check (request[" a" ]);
@@ -81,11 +89,21 @@ class AbstractEthStubServer : public jsonrpc::AbstractServer<AbstractEthStubServ
8189 response = this ->keys ();
8290 }
8391
92+ inline virtual void lastBlockI (const Json::Value& request, Json::Value& response)
93+ {
94+ response = this ->lastBlock ();
95+ }
96+
8497 inline virtual void peerCountI (const Json::Value& request, Json::Value& response)
8598 {
8699 response = this ->peerCount ();
87100 }
88101
102+ inline virtual void proceduresI (const Json::Value& request, Json::Value& response)
103+ {
104+ response = this ->procedures ();
105+ }
106+
89107 inline virtual void secretToAddressI (const Json::Value& request, Json::Value& response)
90108 {
91109 response = this ->secretToAddress (request[" a" ].asString ());
@@ -108,6 +126,7 @@ class AbstractEthStubServer : public jsonrpc::AbstractServer<AbstractEthStubServ
108126
109127
110128 virtual std::string balanceAt (const std::string& a) = 0;
129+ virtual Json::Value block (const std::string& a) = 0;
111130 virtual Json::Value check (const Json::Value& a) = 0;
112131 virtual std::string coinbase () = 0;
113132 virtual Json::Value create (const std::string& bCode, const std::string& sec, const std::string& xEndowment, const std::string& xGas, const std::string& xGasPrice) = 0;
@@ -117,7 +136,9 @@ class AbstractEthStubServer : public jsonrpc::AbstractServer<AbstractEthStubServ
117136 virtual bool isMining () = 0;
118137 virtual std::string key () = 0;
119138 virtual Json::Value keys () = 0;
139+ virtual Json::Value lastBlock () = 0;
120140 virtual int peerCount () = 0;
141+ virtual Json::Value procedures () = 0;
121142 virtual std::string secretToAddress (const std::string& a) = 0;
122143 virtual std::string storageAt (const std::string& a, const std::string& x) = 0;
123144 virtual Json::Value transact (const std::string& aDest, const std::string& bData, const std::string& sec, const std::string& xGas, const std::string& xGasPrice, const std::string& xValue) = 0;
0 commit comments