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

Parse ABI errors in abi/bind #287

Merged
merged 1 commit into from
Feb 5, 2024
Merged

Parse ABI errors in abi/bind #287

merged 1 commit into from
Feb 5, 2024

Conversation

PlasmaPower
Copy link
Collaborator

@PlasmaPower PlasmaPower commented Feb 1, 2024

Newer Solidity versions support returning ABI encoded errors, instead of the old string errors. This PR updates abi/bind to parse them, and provide nice errors like execution reverted: NoSuchKeyset(0x0100000000000000000000000000000000000000000000000000000000000000)

This can't decode the errors of anything called by the target contract unless it also includes those errors, but this should already be a big improvement.

This PR also updates the incorrect (or rather, too vague) return type of the Error Unpack method.

Copy link
Member

@joshuacolvin0 joshuacolvin0 left a comment

Choose a reason for hiding this comment

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

LGTM

@joshuacolvin0 joshuacolvin0 merged commit db9ad5a into master Feb 5, 2024
3 checks passed
@joshuacolvin0 joshuacolvin0 deleted the parse-abi-errors branch February 5, 2024 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s CLA signed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants