dethcrypto / dethcrypto/TypeChain

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

Open
#886 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
2.8k
Forks
376
PR merge metrics
No merged PRs in 30d

Description

**Example**: [This contract ](https://github.com/gnosis/zodiac/blob/master/contracts/core/Module.sol#L14) has a `target` property. The ethers v6 type generated by TypeChain looks like this:

```ts
/*
* 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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.