Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@ethernauta/cli

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ethernauta/cli

[![bundlejs](https://deno.bundlejs.com/badge?q=@ethernauta/cli&treeshake=[*])](https://deno.bundlejs.com/?q=@ethernauta/cli&treeshake=[*])

latest
Source
npmnpm
Version
0.0.46
Version published
Maintainers
1
Created
Source

bundlejs

Philosophy

This module ships a CLI for working with ABIs in an Ethernauta codebase. Two subcommands:

  • ethernauta abi — generate ready-to-use TypeScript methods from an ABI JSON or a Foundry artifact
  • ethernauta registry — walk a directory of ABI JSONs and emit a 4-byte selector → method-metadata map (used by the wallet to surface human-readable function names)

Modules

API

ethernauta abi

Regenerate contract method TypeScript files from an ABI JSON or a Foundry artifact.

npx ethernauta abi --in abis/IERC20.abi.json --out app/methods

Each function in the ABI emits one file under <out>/methods/. View / pure functions emit Callable<T>; state-changing functions emit Signable<Bytes>. A barrel file at <out>/methods/index.ts re-exports everything.

A typical setup wires this into a package.json script so generated methods stay in sync with the contract:

{
  "scripts": {
    "regen:methods": "ethernauta abi --in contracts/out/MyContract.sol/MyContract.json --out app/generated/my-contract"
  }
}

Flags:

FlagDescription
--inPath to a raw ABI JSON array or a Foundry artifact with an abi field
--outOutput directory; the generator writes <out>/methods/*.ts + a barrel file

ethernauta registry

Walk a directory for *.abi.json files and emit a single REGISTRY mapping 4-byte selectors to method metadata.

npx ethernauta registry --in src --out src/registry/registry.generated.ts

The registry is used by the wallet to verify and display function names for transactions whose call data carries an unknown selector.

Flags:

FlagDescription
--inDirectory walked recursively for *.abi.json files
--outOutput file path for the generated REGISTRY TypeScript module

FAQs

Package last updated on 28 May 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts