Marek Kotewicz
10 years ago
14 changed files with 158 additions and 32 deletions
@ -0,0 +1,31 @@ |
|||||
|
cmake_policy(SET CMP0015 NEW) |
||||
|
set(CMAKE_AUTOMOC OFF) |
||||
|
|
||||
|
aux_source_directory(. SRC_LIST) |
||||
|
|
||||
|
include_directories(BEFORE ..) |
||||
|
include_directories(${JSON_RPC_CPP_INCLUDE_DIRS}) |
||||
|
include_directories(${CURL_INCLUDE_DIRS}) |
||||
|
include_directories(${V8_INCLUDE_DIRS}) |
||||
|
|
||||
|
set(EXECUTABLE ethconsole) |
||||
|
|
||||
|
file(GLOB HEADERS "*.h") |
||||
|
|
||||
|
add_executable(${EXECUTABLE} ${SRC_LIST} ${HEADERS}) |
||||
|
|
||||
|
target_link_libraries(${EXECUTABLE} ${Boost_REGEX_LIBRARIES}) |
||||
|
target_link_libraries(${EXECUTABLE} ${READLINE_LIBRARIES}) |
||||
|
target_link_libraries(${EXECUTABLE} ${CURL_LIBRARIES}) |
||||
|
|
||||
|
if (DEFINED WIN32 AND NOT DEFINED CMAKE_COMPILER_IS_MINGW) |
||||
|
eth_copy_dlls(${EXECUTABLE} CURL_DLLS) |
||||
|
endif() |
||||
|
target_link_libraries(${EXECUTABLE} jsconsole) |
||||
|
|
||||
|
if (APPLE) |
||||
|
install(TARGETS ${EXECUTABLE} DESTINATION bin) |
||||
|
else() |
||||
|
eth_install_executable(${EXECUTABLE}) |
||||
|
endif() |
||||
|
|
@ -0,0 +1,23 @@ |
|||||
|
|
||||
|
#include <libjsconsole/JSRemoteConsole.h> |
||||
|
|
||||
|
using namespace std; |
||||
|
using namespace dev; |
||||
|
using namespace dev::eth; |
||||
|
|
||||
|
int main(int argc, char** argv) |
||||
|
{ |
||||
|
if (argc != 2) |
||||
|
{ |
||||
|
cout << "You must provide remote url\n"; |
||||
|
cout << "eg:\n"; |
||||
|
cout << "./ethconsole http://localhost:8545\n"; |
||||
|
return 1; |
||||
|
} |
||||
|
|
||||
|
JSRemoteConsole console(argv[1]); |
||||
|
while (true) |
||||
|
console.repl(); |
||||
|
|
||||
|
return 0; |
||||
|
} |
@ -1,10 +1,23 @@ |
|||||
//
|
/*
|
||||
// Created by Marek Kotewicz on 15/06/15.
|
This file is part of cpp-ethereum. |
||||
//
|
|
||||
|
|
||||
#include "JSRemoteConsole.h" |
cpp-ethereum is free software: you can redistribute it and/or modify |
||||
|
it under the terms of the GNU General Public License as published by |
||||
|
the Free Software Foundation, either version 3 of the License, or |
||||
|
(at your option) any later version. |
||||
|
|
||||
|
cpp-ethereum is distributed in the hope that it will be useful, |
||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
GNU General Public License for more details. |
||||
|
|
||||
using namespace std; |
You should have received a copy of the GNU General Public License |
||||
using namespace dev; |
along with cpp-ethereum. If not, see <http://www.gnu.org/licenses/>.
|
||||
using namespace dev::eth; |
*/ |
||||
|
/** @file JSRemoteConsole.cpp
|
||||
|
* @author Marek Kotewicz <marek@ethdev.com> |
||||
|
* @date 2015 |
||||
|
* Ethereum client. |
||||
|
*/ |
||||
|
|
||||
|
#include "JSRemoteConsole.h" |
||||
|
Loading…
Reference in new issue