Hardhat Packager banner
PaulRBerg PaulRBerg

Hardhat Packager

Development community

Description

Hardhat plugin for preparing the contract artifacts and the TypeChain bindings for registry deployment

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

Hardhat Packager [![GitHub Actions][gha-badge]][gha] [![Coverage Status][coveralls-badge]][coveralls] [![Styled with Prettier][prettier-badge]][prettier] [![License: MIT][license-badge]][license]

Hardhat plugin for preparing the contract artifacts and the TypeChain bindings for registry deployment.

Description

This plugin builds on top the [TypeChain plugin](https://github.com/ethereum-ts/TypeChain/tree/master/packages/hardhat) to prepare the contract artifacts and TypeChain bindings for being deployed to a package registry (e.g. [npmjs.org](https://npmjs.org)). More specifically, it deletes all artifacts and bindings that are not in an allowlist of contracts, minifying the directory structure in the process.

Installation

First, install the plugin and its peer dependencies. If you are using Ethers or Waffle, run:

yarn add --dev hardhat-packager typechain @typechain/hardhat @typechain/ethers-v5

Or if you are using Truffle, run:

yarn add --dev hardhat-packager typechain @typechain/hardhat @typechain/truffle-v5

Second, import the plugin in your `hardhat.config.js`:

require("@typechain/hardhat");
require("hardhat-packager");

Or, if you are using TypeScript, in your `hardhat.config.ts`:

import "@typechain/hardhat";
import "hardhat-packager";

Required plugins