The contracts repo exports Typescript ABIs for customers to generate their own contract clients using modern libraries such as abitype, viem and wagmi, for interacting with deployed preset contracts.
Typescript ABIs are generated using @wagmi/cli and foundry build files:
@wagmi/cliconfiguration can be found in filewagmi.config.tsfoundrybuild files are available in this repo once built at folderfoundry-out
To add a new Typescript ABI:
- Ensure the JSON ABI is available in folder
foundry-out - Update the configuration in
wagmi.config.tsto add the ABI to thecontractsarray - Run command
yarn wagmi generatefrom the root of the folder - Ensure the new Typescript ABI is available in
abi/generated.ts - Update
abi/index.tsto rename and export Typescript ABI
The next published version will contain the new Typescript ABI.