Open da-bao-jian opened 1 year ago
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.
@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
Sorry I should've been more clear on that
- Yes the ones returned from Json RPC API
- and yes, a single error code can have different things. Primarily I was dealing with insufficient verification/call/pre-verification gas errors. They all have the same error code
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
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.