If you are looking to add a new account type, please follow the following structure.
- Create a new folder in
srcwith the name of your account type in
kebab-case(we are following kebab casing for files throughout the project).
- Create a new file in the folder you just created called
account.tsand add a method that calls
toSmartContractAccountto return an instance of your account.
- If needed, create a sub-folder in your account folder called
abisand add your abis as
export const MyContractAbi = [
] as const; // the as const is important so we can get correct typing from viem
- If you want, you can create a client creation method that returns a
SmartAccountClientinstance with your account attached to it
- Add some tests for your account and client (if created) by creating a subfolder in your
__tests__and make sure your files end with the
- Export the classes and types you have defined in
- Open a PR and we will review it as soon as possible!