TypeChain icon indicating copy to clipboard operation
TypeChain copied to clipboard

fix: name clashes

Open jfschwarz opened this issue 2 years ago • 7 comments

closes #886

The ethers v6 reservedKeywords set was quite outdated. It had ethers v5 contract property names that no longer exist for v6 contracts (e.g.: provider) and was missing some v6 contract property names (e.g.: target). Rather than attempting to manually keep the reservedKeywords list up-to-date, I'd propose to directly read the list of built-in properties from the BaseContract class.

The then property is a peculiar case. It's not a property of BaseContract, but still won't be passed through by ethers as it is kept in a special passProperties list (see: ethers v6 BaseContract Proxy).

jfschwarz avatar Dec 08 '23 10:12 jfschwarz

🦋 Changeset detected

Latest commit: eaff379485a655d7f343f3b513448966562ab5a5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@typechain/ethers-v5 Patch
@typechain/ethers-v6 Patch
test-e2e Patch
@typechain/hardhat Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

changeset-bot[bot] avatar Dec 08 '23 10:12 changeset-bot[bot]

@jfschwarz thanks for this PR! Can you have a look at failing CI (typecheck task)?

krzkaczor avatar Dec 31 '23 13:12 krzkaczor

Thank you, @krzkaczor! The failing CI typecheck tasks actually only reveal that ethers-v5 suffered under the same issue, so I went ahead and applied the fix also to that package.

Unfortunately, the dev tooling in that package appears a bit broken for me. I'm getting plenty of lint errors in target-ethers-v5 that don't seem to make make sense, not sure what's going on... I would appreciate if you could run the CI pipeline again to see if my latest changes check out.

jfschwarz avatar Jan 09 '24 20:01 jfschwarz

Hey @krzkaczor, I finally got my local project tooling set up correctly and have now fixed the bug causing the tests to fail.

We have a few projects that need upgrading from Ethers 5 to 6, but we are currently blocked by the issue addressed in this PR. We understand that the project has been deprecated. However, we would greatly appreciate it if you could take a moment to review and release this fix, saving us from the need to fork TypeChain. 🙏 Let me know if I can support you in any way.

jfschwarz avatar Jul 10 '24 10:07 jfschwarz