ethers-error-parser icon indicating copy to clipboard operation
ethers-error-parser copied to clipboard

feat: support contract not deployed

Open challet opened this issue 2 years ago β€’ 3 comments

Is your pull request closing an issue?

No

Please explain the main changes of your pull request

ether.js Contract.deployed function can throw an error about the contract not being deployed.

This adds a new error type CONTRACT_NOT_DEPLOYED for this case with the address having been requested as a context.

Checklist

  • [x] Have you added any new returned codes to the README file ?

challet avatar Jan 02 '23 22:01 challet

Codecov Report

Merging #43 (94c0d52) into main (d4e452b) will not change coverage. The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main       #43   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            7         7           
  Lines          666       693   +27     
  Branches        79        84    +5     
=========================================
+ Hits           666       693   +27     
Impacted Files Coverage Ξ”
lib/__tests__/getParsedEthersError.test.ts 100.00% <100.00%> (ΓΈ)
lib/constants.ts 100.00% <100.00%> (ΓΈ)
lib/utils/getTopLevelKnownError.ts 100.00% <100.00%> (ΓΈ)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

codecov-commenter avatar Jan 02 '23 22:01 codecov-commenter

Hey @challet ! Thanks for the PR πŸ™πŸ»

I'm a bit busy these day, but I will look at it as soon as possible πŸ‘πŸ»

enzoferey avatar Jan 04 '23 10:01 enzoferey

Hi @enzoferey, you're welcome. When you have time, I would be glad to have your opinion on it : the error format I'm testing comes from a Ganache backend and I'm not totally confident it would work everywhere.

challet avatar Jan 04 '23 13:01 challet