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

@hughes-ch/block-explorer

v1.0.4

Published

A command line block explorer

Downloads

2

Readme

CLI Block Explorer

A CLI block explorer that can quickly display stats about a group of blocks.

It has two easy-to-use command-line switches so users are quickly able to access the data they need:

explore --start <block_num> --end <block_num>
explore --last <N blocks>

In both cases, users get an easy-to-digest report that looks similar to:

3 transactions found for total of 2 ETH transferred.

There were 3 senders:
	0x54C4c5d163BBEfaDE776cf35cfE1D3e9053d2D42: 1 ETH 
	0xdB105B338199e647cB2747AaEa7CCE9De47cB816: 1 ETH 
	0x368599f57c3aBE7B496c339E3C27E6D1582d8e55: 0 ETH 

... and 3 receivers:
	0x368599f57c3aBE7B496c339E3C27E6D1582d8e55: 1 ETH 
	0x109B80383f6d8077581b95384Af264eCBd52965b: 1 ETH 
	0xeC8FDCeE16c09bE98F9CAfa2AC8D88933bDd8730: 0 ETH (contract)

Installation

Installation can be done with yarn or npm:

>> npm i @hughes-ch/block-explorer
>> yarn add @hughes-ch/block-explorer

If not installed globally, running the script can be done like so:

>> npm exec explore --last 10
>> yarn run explore --last 10

Development

This project uses the yarn package manager. To install a local copy, first pull from this repo and then run in your local directory:

yarn install

Running unit tests can be done with:

yarn test

During unit testing, a local ganache-cli instance will be spun up for the duration of the unit test.

To run the full command line tool with the local changes, type:

explorer/cli.js <args>

By default, this will attempt to connect to an Infura Ethereum node. There are several environment variables that need to be set before this works correctly. They can be set in a .env file at the root of this repo and are automatically loaded by dotenv on start. See example.env for more details.

Before pushing, make sure to run yarn lint to ensure code style matches.