npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ethereum-console

v1.0.4

Published

Commandline console for Ethereum nodes

Downloads

31

Readme

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