You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Interacting with contract instances can result in reverts. It would be nice to add an example of how to get the revert data out of alloy::contract::Error, in cases where you want to manually handle the revert data.
Currently, to me this seems a bit cumbersome, but I might be wrong:
match res {Err(alloy::contract::Error::TransportError(rpc_err)) => {let revert_data = rpc_err.as_error_resp().and_then(|res| res.as_revert_data());// Option<Bytes>},
_ => unimplemented!()}
The text was updated successfully, but these errors were encountered:
Interacting with contract instances can result in reverts. It would be nice to add an example of how to get the revert data out of
alloy::contract::Error
, in cases where you want to manually handle the revert data.Currently, to me this seems a bit cumbersome, but I might be wrong:
The text was updated successfully, but these errors were encountered: