Skip to content

Support Solidity custom errors per ERC-6093#344

Merged
q9f merged 4 commits intomainfrom
codex/add-support-for-solidity-0.8.4+-custom-errors
Aug 4, 2025
Merged

Support Solidity custom errors per ERC-6093#344
q9f merged 4 commits intomainfrom
codex/add-support-for-solidity-0.8.4+-custom-errors

Conversation

@q9f
Copy link
Owner

@q9f q9f commented Aug 4, 2025

  • add RpcError for rich RPC error info and decode custom errors
  • handle error ABI entries and provide decoder
  • cover decoding of custom errors in tests

@q9f q9f added the codex Codex is a durable, decentralised data storage protocol label Aug 4, 2025 — with ChatGPT Codex Connector
@q9f q9f merged commit 3033608 into main Aug 4, 2025
6 checks passed
@q9f q9f deleted the codex/add-support-for-solidity-0.8.4+-custom-errors branch August 4, 2025 06:53
# @param contract [Eth::Contract] the contract with error definitions.
# @param rpc_error [RpcError] the RPC error containing revert data.
# @return [String] a human readable error message.
def decode_contract_error(contract, rpc_error)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is so weird that this method is in Client but not Contract. It has nothing to do with client and uses contract related methods.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed but to be fair the entire client class is a patchwork holding this gem together.

let's move it to the contract class

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codex Codex is a durable, decentralised data storage protocol

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants