New Modular Contract TypeScript API
We just released v5.52.0 of the thirdweb TypeScript SDK which unlocks the ability to deploy, configure and interact with our new Modular Contracts.
You can now easily build your personalized contract by picking the modules suited for your use case.
Here's how to deploy a ERC721 contract with the Claimable and BatchMetadata module, which together create a Drop functionality.
These modules can be swapped at any time, and new ones can also be added post deployment. Here's how to install a new module programmatically:
We have core contracts for ERC20, ERC721 and ERC1155 standards. Those follow the standard ERCs and can be interacted with like usual with the standard extensions.
The interesting part is to interact with an attached module. This is done by using the defined module name spaced API:
This makes it easy to discover the available API for each module.
You will also soon be able to generate the namespaced TypeScript API for your own modules via the thirdweb CLI.
To learn more about modular contracts and how to create modules, head over to the documentation.