-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide error code for simulation related errors #211
Comments
@da-bao-jian Can you please provide more information about which error codes exactly - the ones returned from JSON-RPC API? We should follow the specs fully for error codes: https://eips.ethereum.org/EIPS/eip-4337#rpc-methods-eth-namespace . Or do you mean that single error code in the specs can mean different things? |
Sorry I should've been more clear on that
|
Ok, got it. Thinking about what would be the best approach, I am not sure if introducing custom codes would be the best approach since it deviates from standard. But maybe structuring the error message in the meaningful way could be the way to go. |
What do you recommend for implementation. I can work on it when my schedule is a little bit better |
We could do something similar to errors from the entry points: the message should always start with AA(INT) - https://github.com/eth-infinitism/account-abstraction/blob/develop/contracts/core/EntryPoint.sol#L60. Maybe something like B1 for call gas limit, B2 for preverificationgas ... |
It'll be nice to have customized error code for each of simulation related errors
Currently, one would have to parse through the error message to get the returned variables. See handle_response function in ethers-userop.
The text was updated successfully, but these errors were encountered: