Consensys / sol-dbg

Solidity source debugger built around EthereumJS
Apache License 2.0
23 stars 3 forks source link

ArtifactManager should not carsh entirely if some contracts don't have MD hash #12

Open cd1m0 opened 1 year ago

cd1m0 commented 1 year ago

Currently we rely on the contract metadata hash embedded in the bytecode to map contract code back to compiler artifacts. However in certain cases the metadata may be missing. Currently if one artifact doesn't have MD, then the ArtifactManager crashes here:

https://github.com/ConsenSys/sol-dbg/blob/main/src/debug/artifact_manager.ts#L157

It would be nice for the ArtifactManager to not crash there, as the debugger can work with some artifacts missing.