-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
850314a
commit 61a2b23
Showing
1 changed file
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Typescript ABIs | ||
|
||
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. | ||
|
||
## Adding a new Typescript ABI | ||
|
||
Typescript ABIs are generated using `@wagmi/cli` and `foundry` build files: | ||
|
||
- `@wagmi/cli` configuration can be found in file `wagmi.config.ts` | ||
- `foundry` build files are available in this repo once built at folder `foundry-out` | ||
|
||
To add a new Typescript ABI: | ||
|
||
- Ensure the JSON ABI is available in folder `foundry-out` | ||
- Update the configuration in `wagmi.config.ts` to add the ABI to the `contracts` array | ||
- Run command `yarn wagmi generate` from the root of the folder | ||
- Ensure the new Typescript ABI is available in `abi/generated.ts` | ||
- Update `abi/index.ts` to rename and export Typescript ABI | ||
|
||
The next published version will contain the new Typescript ABI. |