We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Related: alloy-rs/alloy#1098 + https://github.com/alloy-rs/alloy/pull/1098/files
See:
fn custom_error_decoding() { sol!( library Errors { error SomeCustomError(uint256 a); } ); let json = r#"{"code":3,"message":"execution reverted: ","data":"0x810f00230000000000000000000000000000000000000000000000000000000000000001"}"#; let payload: ErrorPayload = serde_json::from_str(json).unwrap(); let Errors::ErrorsErrors::SomeCustomError(value) = payload.as_decoded_error::<Errors::ErrorsErrors>(false).unwrap(); assert_eq!(value.a, U256::from(1)); }
Likely best placed in the contracts as jsonrpc_error_decoding?
contracts
jsonrpc_error_decoding
The text was updated successfully, but these errors were encountered:
The attached code snippet looks good enough for the example. can we just add the same as example or do you prefer a more complex one?
Sorry, something went wrong.
I think we can just add this as an example
Looks like the change (as_decoded_error()) hasn't been released/published yet. will add this after the next release of alloy.
as_decoded_error()
https://github.com/alloy-rs/alloy/releases/tag/v0.2.1 was just released, removing the blocked tag :)
blocked
PraneshASP
Successfully merging a pull request may close this issue.
Related: alloy-rs/alloy#1098 + https://github.com/alloy-rs/alloy/pull/1098/files
See:
Likely best placed in the
contracts
asjsonrpc_error_decoding
?The text was updated successfully, but these errors were encountered: