question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ethers 5.0.9 breaking change

See original GitHub issue

Something changed in ethers@5.0.9 that broke the code generated by @typechain/ethers-v5 The error message below was edit to remove references to my code, replacing the contract name with <ContractName> and method signature with <methodSignature>.

Interface '<ContractName>Interface' incorrectly extends interface 'Interface'.
  Types of property 'functions' are incompatible.
    Type '{ "<methodSignature>": FunctionFragment; }' is not assignable to type '{ [name: string]: FunctionFragment; }'.
      Property '"<methodSignature>"' is incompatible with index signature.
        Type 'import("./node_modules/@ethersproject/abi/lib/fragments").FunctionFragment' is not assignable to type 'import("./node_modules/ethers/node_modules/@ethersproject/abi/lib/fragments").FunctionFragment'.
          Types of property 'gas' are incompatible.
            Type 'import("./node_modules/@ethersproject/bignumber/lib/bignumber").BigNumber | undefined' is not assignable to type 'import("./node_modules/ethers/node_modules/@ethersproject/bignumber/lib/bignumber").BigNumber | undefined'.
              Property 'toJSON' is missing in type 'import("./node_modules/@ethersproject/bignumber/lib/bignumber").BigNumber' but required in type 'import("./node_modules/ethers/node_modules/@ethersproject/bignumber/lib/bignumber").BigNumber'.ts(2430)
bignumber.d.ts(33, 5): 'toJSON' is declared here.

It is probably related to this change: https://github.com/ethers-io/ethers.js/commit/8facc1a5305b1f699aa3afc5a0a692abe7927652

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
ricmoocommented, Sep 12, 2020

The later version of ethers has had all versions locked, so depending on ^5.0.13 should solve this problem.

Sorry for the inconvenience.

2reactions
ricmoocommented, Oct 5, 2020

Oh! Sorry, I lost track of this issue and was trying to find it.

The new build system for ethers now locks the umbrella package versions for all dependencies. So if you depend on the ethers package directly, this should never happen again. 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Releases · ethers-io/ethers.js - GitHub
Removed Ankr for Ropsten default provider; the merge seems to have broke it. (3790671) · Fix NonceManager for increment 0 and provided nonce....
Read more >
Documentation - Ethers.js
Returns the result of executing the transaction, using call. A call does not require any ether, but cannot change any state. This is...
Read more >
Ethers NPM | npm.io
Compatibility-breaking changes will not be accepted; they may be considered for the next major version; Security is important; adding dependencies require ...
Read more >
ethers - npm
Umbrella package for most common Ethers libraries. ... Start using ethers in your project by running `npm i ethers`. ... 5.0.9.
Read more >
ethers (ethers.eth) (@ethersproject) / Twitter
@ethersproject. account is primarily for important advisories, notices and announcements such as security concerns or changes affecting backward ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found