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 🙏

© 2025 – Pkg Stats / Ryan Hefner

ethereum-interface-generator

v1.2.1

Published

Generate a customizable interface for interacting with Ethereum smart contracts.

Readme

Ethereum Smart Contracts Interface Generator

NPM command that generates an interface from ABIs to interact with the Ethereum smart contracts.

IMPORTANT: this package is still under development!

The generated interface is easily customizable: the GUI is built with bootstrap and vanilla javascript (and of course Web3.js 🙂).

With this NPM command you can export the interface or run the interface automatically on the server.


Installation

npm i ethereum-interface-generator -g

Commands

Serve

The serve command creates the interface for interacting with the smart contract and it starts the server to the default URL http://localhost:5432.

Usage:

eth-ui-gen serve

Options:

  • -c (or --contracts): folder that contains the compiled ABI of the smart contracts. Default: current folder (.);
  • -p (or --port): port of the local server. Default: 5432

Note: if you run eth-ui-gen serve without specifying -c then make sure you run the command in the same folder where the ABIs are stored (on Truffle the folder is build/contracts).

The command below builds the interface using the ABIs found in the folder /../dapp/build/contracts/ and then it starts the local server on the port 7765.

eth-ui-gen serve -c /../dapp/build/contracts/ -p 7765

Export

eth-ui-gen export

Options:

  • -c (or --contracts): folder that contains the compiled ABI of the smart contracts. Default: current folder (.);
  • -t (or --target): destination folder where to export the files. Default: current folder (.).
  • -m (or --minify): minify the Javascript. Default: false.

Note: if you run eth-ui-gen export without specifying -c then make sure you run the command in the same folder where the ABIs are stored (on Truffle the folder is build/contracts).

The command below builds the UI using the smart contract ABIs found in the folder /../dapp/build/contracts/ and it exports the files to the folder /home/dan/Desktop/smart-contracts-ui/.

eth-ui-gen export -c /../dapp/build/contracts/ -t /home/dan/Desktop/smart-contracts-ui/

Smart Contract JSON Format

The JSON files of the compiled and deployed smart contracts (that you give to the command) must contain the following values:

  • contractName: the name of the contract.
  • abi: ABI of the compiled smart contract.
  • networks: list of networks where the contract has been deployed.

Below an example of how the JSON file should look like:

{
    "contractName": "MyAwesomeContract",
    "abi": [
        {
        "inputs": [
            {
                "internalType": "string",
                "name": "name",
                "type": "string"
            }
        ],
        "name": "storeName",
        "outputs": [],
        "stateMutability": "payable",
        "type": "function",
        "payable": true
        },

        ...

    ],
    "networks": {
        "4747": {
            "events": {},
            "links": {},
            "address": "0xba607E0A4eED20239C4f2237688e660da8262e3E",
            "transactionHash": "0x9bc44b20869b2ed0bf62788da9fe65fe847a5cf37225bc5e442c4d4319e10f29"
        }
    }

More information

Please find more info at https://www.danielefavi.com/blog/ethereum-smart-contracts-gui-generator/


The GUI explained