foundry icon indicating copy to clipboard operation
foundry copied to clipboard

Better error reporting when interacting with undeployed contracts

Open PaulRBerg opened this issue 2 years ago • 3 comments

Component

Forge

Describe the feature you would like

I have bumped into many EvmError errors that were caused by an attempt to interact with a contract which was either undeployed already or was deployed to a local network and by the time I was making the call, the contract did no longer exist because I had used a fork cheatcode.

I think that this is such a common scenario that it would be extremely helpful (and prevent many angry reports in the Foundry Support group) for Foundry to handle this sort of error more gracefully and display a clearer error, e.g.:

You have attempted to make a call to address 0xCAFE..., but not contract is present there

PaulRBerg avatar Jan 20 '23 14:01 PaulRBerg