Skip to content

Solidity Custom Errors not supported by EthCall or Smart Contract Wrapper components #1812

Open
@AboldUSER

Description

@AboldUSER

Issue_title

Web3J does not currently support Custom Errors, introduced in Solidity v0.8.4

Issue_description

Smart contracts that include custom errors do not return error data when using EthCall directly or when interacting with smart contracts via a Web3J generated Smart Contract Wrapper.

Issue_context

Solidity's Custom Errors has introduced the ability to revert with errors other than the default error signature/selector - Error(String) / 0x08c379a0.
When using Web3J's EthCall.java to call a node client with eth.call endpoint, Web3J seems to currently use the default error selector to determine if the response's data contains an error message. If the data starts with 0x08c379a0, then it will decode and return it.
Web3J's Smart Contract Wrapper does not contain support for including custom errors defined in the smart contract's ABI.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-reviewissue/PR needs review from maintainer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions