Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generated types are broken if contract function names clash with ethers built-ins #886

Open
jfschwarz opened this issue Dec 8, 2023 · 0 comments · May be fixed by #887
Open

Generated types are broken if contract function names clash with ethers built-ins #886

jfschwarz opened this issue Dec 8, 2023 · 0 comments · May be fixed by #887

Comments

@jfschwarz
Copy link

Example: This contract has a target property. The ethers v6 type generated by TypeChain looks like this:

/*
 * Interface 'Module' incorrectly extends interface 'BaseContract'.
 *  Types of property 'target' are incompatible.
 *   Type 'TypedContractMethod<[], [string], "view">' is not assignable to type 'string | Addressable'.ts(2430)                  
 */
export interface Module extends BaseContract {
  //             ~~~~~~ 
  // ...
  target: TypedContractMethod<[], [string], "view">;
  // ...
 }

Expected behavior: TypeChain should probably skip over functions that clash with ethers built-ins.

@jfschwarz jfschwarz linked a pull request Dec 8, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant