This PR introduces several enhancements to the debugger API:
Error Decoder Services: We've added error decoder services to enable the debugger API to return a decoded error response based on the provided error message.
Comprehensive Error Coverage: The update includes all possible errors from the EntryPoint v0.6.0 contract, ensuring extensive error handling capabilities.
Decoding Logic for EntryPoint Errors: The PR features added decoding logic for one of the EntryPoint (EP) errors. This establishes a pattern that can be followed to decode additional errors in future updates.
Parallel Error Resolver Execution: Similar to the Smart Account (SA) decoder service, the error decoder functions by running a list of registered error resolvers in parallel. The decoders returned from these resolvers are then utilized to interpret the error messages effectively.
Enhanced Response Format
With these updates, the API response now includes a section for decoded errors. An example of how these decoded errors appear in the response is provided below:
{
"jsonrpc": "2.0",
"id": 2,
"result": {
"originalError": {
"code": -325432,
"message": "AA21: User didn't pay prefund"
},
"decodedErrors": [
{
"message": "Smart Account is supposed to pay for this userOp but it does not have enough native balance to pay for the gas. Max 0.082724540135468525 Matic is required to pay for the gas.",
"errorSource": "SMART_ACCOUNT"
}
],
// ... other fields ...
}
}
PR Description
This PR introduces several enhancements to the debugger API:
Enhanced Response Format
With these updates, the API response now includes a section for decoded errors. An example of how these decoded errors appear in the response is provided below: