Skip to main content

Generate

Preload contract ABIs and generate types for your smart contract to strongly type the thirdweb SDK.

npx thirdweb generate

Usage

This command fetches the ABIs for all the smart contracts a given wallet address has deployed, and stores them locally in the projects node_modules/@thirdweb-dev/generated-abis directory.

By storing the ABIs locally, both the SDK and CLI can use them as a cache to improve the performance of your application; since the ABIs no longer need to be fetched when using functions such as getContract.

npx thirdweb generate [options]

Options

-p--path <string>
  Path to project

-d--deployer <string>
  Address of the contract deployer