This plugin integrates TypeChain into Hardhat, automatically generating TypeScript bindings for your smart contracts.
To install this plugin, run the following command:
npm install --save-dev @nomicfoundation/hardhat-typechain@next
and add the following statements to your hardhat.config.ts
file:
// ...
import typechainPlugin from "@nomicfoundation/hardhat-typechain";
// ...
export default {
// ...
plugins: [
// ...
typechainPlugin,
],
// ...
};
You can configure it in the hardhat.config.ts
file under the typechain
property.
No extra steps are required to use this plugin. It will be run automatically by Hardhat when building your contracts.