EnsoFinance / temper

Temper your expectations - Ethereum Transaction Simulator
MIT License
343 stars 43 forks source link

Transparent EVM errors #25

Open Denzel-Haverkamp opened 9 months ago

Denzel-Haverkamp commented 9 months ago

Currently, when an EVM error occurs that is not being parsed yet, the response received is {"code":500,"message":"EVM_ERROR"} (see https://github.com/EnsoFinance/temper/blob/main/src/errors.rs#L81). In this case, the only way to check which error occurred is to check the Temper CLI logs. It would be nice to have the option to receive the raw EVM error instead of, or in addition to, the parsed error. A possible way to do this without making it the default behaviour would be to add an optional parameter like "transparent_error": true to the /api/v1/simulate, /api/v1/simulate-bundle and /api/v1/simulate-stateful endpoints.

In addition to getting specific errors for types that are not parsed yet, this would also help users find errors in their transactions more easily, since the raw EVM errors may contain more details.