Skip to content
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

Return Revert result as Data #1566

Conversation

vcastellm
Copy link
Contributor

@vcastellm vcastellm commented May 29, 2023

Description

This allows returning custom revert errors from solidity, they are ABI encoded functions that can represent rich and gas efficient revert messages.

Details of custom errors: https://blog.soliditylang.org/2021/04/21/custom-errors/

This is the implementation expected by ethers.js and web3.js and the format go-ethereum chose ethereum/go-ethereum#19027 (comment)

image

This PR implements it following this format.

Fixes #1350

Changes include

  • Bugfix (non-breaking change that solves an issue)
  • Hotfix (change that solves an urgent issue, and requires immediate attention)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (change that is not backwards-compatible and/or changes current functionality)

Checklist

  • I have assigned this PR to myself
  • I have added at least 1 reviewer
  • I have added the relevant labels
  • I have updated the official documentation
  • I have added sufficient documentation in code

Testing

  • I have tested this code with the official test suite
  • I have tested this code manually

This allows returning custom revert errors from solidity, they are ABI encoded functions that can represent rich and gas efficient revert messages.
@vcastellm vcastellm added the feature New update to Polygon Edge label May 29, 2023
@vcastellm vcastellm self-assigned this May 29, 2023
@vcastellm vcastellm requested a review from a team May 30, 2023 13:30
@vcastellm vcastellm marked this pull request as ready for review May 30, 2023 15:47
Victor Castell added 2 commits May 31, 2023 10:55
jsonrpc/codec.go Outdated Show resolved Hide resolved
jsonrpc/codec.go Outdated Show resolved Hide resolved
@vcastellm vcastellm merged commit 7e66cd5 into develop Jun 2, 2023
7 checks passed
@vcastellm vcastellm deleted the EVM-602-custom-solidity-errors-introduced-in-0-8-4-not-supported branch June 2, 2023 09:22
@github-actions github-actions bot locked and limited conversation to collaborators Jun 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature New update to Polygon Edge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Custom solidity errors (introduced in 0.8.4) not supported
4 participants