OpenViSTAI · Agents · Blockchain · Crypto
Menu
Developer Tools

Hardhat Abi Exporter

Hardhat Abi Exporter is a Hardhat plugin that exports Ethereum smart-contract ABIs during compilation or through its `abi export` task. Developers configure the destination, contract selection and output format in the Hardhat configuration.

Independent OpenViST project profile, based on linked sources.

Hardhat Abi Exporter — OpenViST project profile in Developer Tools.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it in a Hardhat project when contract ABIs need to be generated during compilation or through a dedicated task, with configurable selection and formatting.

Who it is for

  • Ethereum smart-contract developers using Hardhat.
  • Teams that need ABI files available to downstream application tooling.

Documented uses

  • Generate ABI files as part of a Hardhat compilation workflow.
  • Choose which contracts and ABI elements are included in exported output.
  • Produce ABI output in a selected format and directory.
Before you choose

Requirements & limits

The repository identifies the project as open source under the MIT license.

  • Automatic export is off by default; enable runOnCompile to include it in compilation.
  • The plugin supports minimal, full, JSON and TypeScript output formats.
  • The clear option is destructive and defaults to false.
  • Flat output may cause name collisions, and the rename option cannot be used with flat output.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Install and configure ABI exporting in Hardhat

Add the plugin to a Hardhat project and set the options that control ABI output.

Before you start

  • A Hardhat project
  • npm or pnpm

Steps

  1. Install the development dependency with the command below or pnpm add -D @solidstate/hardhat-abi-exporter.

    Documented command
    npm install --save-dev @solidstate/hardhat-abi-exporter
  2. Import hardhatAbiExporter from @solidstate/hardhat-abi-exporter in the Hardhat configuration and include it in the plugins array.

  3. Add an abiExporter configuration, setting options such as path, runOnCompile, contract matchers and format as needed.

Expected outcome

The Hardhat configuration includes the plugin and specifies how ABI exports should be handled.

Guide limitations

  • Automatic export during compilation is disabled by default and requires runOnCompile: true.
  • The clear option deletes old ABI files and defaults to false.
  • Flattening can cause name collisions; renaming is incompatible with flat output.
Source-based practical guide

Export ABIs with a Hardhat task

Use the plugin's documented task to create ABI output.

Before you start

  • The plugin installed and loaded in a Hardhat project

Steps

  1. Run the command below or pnpm hardhat abi export.

    Documented command
    npx hardhat abi export
  2. To skip the compile step that runs before exporting by default, add --no-compile to the task command.

Expected outcome

The task exports ABI files in the configured output directory; the directory is created if it does not exist.

Guide limitations

  • The task runs compilation first unless --no-compile is used.
  • The configured clear option can delete old ABI files.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
9 October 2026
Original website title
solidstate-network/hardhat-abi-exporter · Official homepage title · retained in its source language