Skip to content

dl-solarity/hardhat-habits

Repository files navigation

npm hardhat

Hardhat Habits (hABIts)

The hardhat plugin with common ABI utilities.

What

This plugin simplifies interation with ABI and enables the following use cases:

  • Interface ID Calculation: Calculates the Interface ID for a specified smart contract using hardhat environment and solidity-ast package.

Installation

npm install --save-dev @solarity/hardhat-habits

Usage

To use the module, follow these steps:

  1. Import the Module:
import { getInterfaceID } from "@solarity/hardhat-habits";
  1. Call the Function:
const interfaceID = await getInterfaceID("YourContractName");

Replace "YourContractName" with the name of your contract.

Note

If the contract name is ambiguous, the fully qualified name of the contract will have to be specified.

Tasks

This plugin does not add tasks to the Hardhat Runtime Environment.

Environment extensions

This plugin does not extend the Hardhat Runtime Environment.