https://github.com/dl-solarity/hardhat-habits
The tool to work with Ethereum ABI
https://github.com/dl-solarity/hardhat-habits
abi hardhat hardhat-plugin solarity
Last synced: 2 months ago
JSON representation
The tool to work with Ethereum ABI
- Host: GitHub
- URL: https://github.com/dl-solarity/hardhat-habits
- Owner: dl-solarity
- License: mit
- Created: 2024-01-06T15:03:34.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-03-12T12:41:35.000Z (about 1 year ago)
- Last Synced: 2025-02-02T17:46:40.582Z (3 months ago)
- Topics: abi, hardhat, hardhat-plugin, solarity
- Language: TypeScript
- Homepage: https://npmjs.com/package/@solarity/hardhat-habits
- Size: 245 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://www.npmjs.com/package/@solarity/hardhat-habits) [](https://hardhat.org)
# 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
```bash
npm install --save-dev @solarity/hardhat-habits
```## Usage
To use the module, follow these steps:
1. **Import the Module**:
```typescript
import { getInterfaceID } from "@solarity/hardhat-habits";
```2. **Call the Function**:
```typescript
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.