diff --git a/eth/main.cpp b/eth/main.cpp index abb78c20d..387ae3be7 100644 --- a/eth/main.cpp +++ b/eth/main.cpp @@ -1765,7 +1765,7 @@ int main(int argc, char** argv) if (useConsole) { #if ETH_JSCONSOLE - JSConsole console(web3, vector({sigKey})); + JSConsole console(web3, make_shared([&](){return web3.ethereum();}, getAccountPassword, keyManager)); while (!g_exit) { console.repl(); diff --git a/libjsconsole/JSConsole.cpp b/libjsconsole/JSConsole.cpp index 791df2de4..d1f7c0264 100644 --- a/libjsconsole/JSConsole.cpp +++ b/libjsconsole/JSConsole.cpp @@ -25,7 +25,6 @@ #include #include "JSConsole.h" #include "JSV8Connector.h" -#include "libjsconsole/JSConsoleResources.hpp" // TODO! make readline optional! #include @@ -35,12 +34,12 @@ using namespace std; using namespace dev; using namespace dev::eth; -JSConsole::JSConsole(WebThreeDirect& _web3, std::vector const& _accounts): +JSConsole::JSConsole(WebThreeDirect& _web3, shared_ptr const& _accounts): m_engine(), m_printer(m_engine) { m_jsonrpcConnector.reset(new JSV8Connector(m_engine)); - m_jsonrpcServer.reset(new WebThreeStubServer(*m_jsonrpcConnector.get(), _web3, _accounts)); + m_jsonrpcServer.reset(new WebThreeStubServer(*m_jsonrpcConnector.get(), _web3, _accounts, vector())); } JSConsole::~JSConsole() {} diff --git a/libjsconsole/JSConsole.h b/libjsconsole/JSConsole.h index 3b65691f6..b7aded4f3 100644 --- a/libjsconsole/JSConsole.h +++ b/libjsconsole/JSConsole.h @@ -33,10 +33,12 @@ namespace dev namespace eth { +class AccountHolder; + class JSConsole { public: - JSConsole(WebThreeDirect& _web3, std::vector const& _accounts); + JSConsole(WebThreeDirect& _web3, std::shared_ptr const& _accounts); ~JSConsole(); void repl() const;