ethers-error-parser
ethers-error-parser copied to clipboard
feat: support contract not deployed
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 ?
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
Hey @challet ! Thanks for the PR ππ»
I'm a bit busy these day, but I will look at it as soon as possible ππ»
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.