GithubHelp home page GithubHelp logo

isabella232 / ethereum-console Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ethereum/ethereum-console

0.0 0.0 0.0 51 KB

Commandline console for Ethereum nodes

License: MIT License

JavaScript 100.00%

ethereum-console's Introduction

ethereum-console

Commandline console for Ethereum nodes.

ethconsole connects to a running Ethereum node via IPC/WS/HTTP and provides an interactive javascript console containing the web3 (1.x) object with admin extensions.

Note that the admin/debug additions are not yet official and may change over time.

Run $ ethconsole --help for help.

Installation / Usage

$ npm install -g ethereum-console
...

$ ethconsole
ETHEREUM CONSOLE
Connecting to node at /Users/xyz/Library/Ethereum/geth.ipc
... Connection successful!

Use the "web3" object to interact.
You can find the documentation here: http://web3js.readthedocs.io/en/1.0/

ΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞ
Network: MAIN
Current block: 5285047 [0x8a22bd], March 19th 2018, 20:46:37
ΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞΞ

> web3.admin.nodeInfo()
...

CPP Ethereum Test Interface

ethconsole provides access to the cpp-ethereum test interface, which can be used to test smart contracts that depend on timing and blocks being mined.

# Install the development version of cpp-ethereum on Ubuntu:
# sudo add-apt-repository -y ppa:ethereum/ethereum-qt
# sudo add-apt-repository -y ppa:ethereum/ethereum
# sudo add-apt-repository -y ppa:ethereum/ethereum-dev
# sudo apt-get -y update
# sudo apt-get -y install eth
#
# Start eth in test-mode using data directory /tmp/test 
$ eth --test -d /tmp/test &
# Wait for it to start up...
# Run the example:
$ ethconsole /tmp/test/geth.ipc cppTestExample.js

These testing interfaces exist in cpp-ethereum:

web3.test.setChainParams({}, cb(err, bool))
    set chain parameters using the json chain description
    you can use the function chainParams() from the cppTestExample.js to create such a description
web3.test.mineBlocks(x, cb(err, bool))
    start mining and stop again after exactly x blocks
web3.test.modifyTimestamp(x, cb(err, bool))
    set the timestamp of the current block to x
web3.test.rewindToBlock(x, cb(err, bool))
    rewind the blockchain to block number x
web3.test.addBlock(x, cb(err, bool)
    inject an RLP-encoded block

ethereum-console's People

Contributors

chriseth avatar frozeman avatar perak avatar winsvega avatar yann300 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.