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

feat: add helper for decoding custom errors #1098

Merged
merged 2 commits into from
Jul 24, 2024

Conversation

klkvr
Copy link
Member

@klkvr klkvr commented Jul 24, 2024

Motivation

Closes #787

Solution

Adds helper method allowing decoding of custom errors from ErrorPayload

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

crates/json-rpc/src/response/error.rs Outdated Show resolved Hide resolved
Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

nice!

I think we could add an example for this @zerosnacks @yash-atreya

@mattsse mattsse merged commit f2d8003 into alloy-rs:main Jul 24, 2024
22 checks passed
ben186 pushed a commit to ben186/alloy that referenced this pull request Jul 27, 2024
* feat: add helper for decoding custom errors

* use find_map
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Get abi error data from an error response on call / send transaction
3 participants