Skip to content

Interface for errors RPC response in eth_call and eth_estimateGas #232

Open
@zemse

Description

@zemse

Currently when an eth_call or eth_estimateGas fails and if the revert data is present, geth's rpc returns:

{
  "jsonrpc":"2.0",
  "id":45,
  "error":{
    "code":3,
    "data":"0xbd3bb1d9", // solidity custom error data
    "message":"execution reverted"
  }
}

However, this seems to be nonstandardized. For e.g. some clients do not include data.

Also the open rpc link in readme as well as https://eth.wiki/json-rpc/API do not specify how the error response would be for eth_call or eth_estimateGas.

Would it be beneficial if the error response is also included in API spec?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-specArea: specification

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions