Skip to content

Commit

Permalink
error impl
Browse files Browse the repository at this point in the history
  • Loading branch information
klkvr committed Oct 22, 2024
1 parent a52b237 commit e3b0080
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions crates/eip7702/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,13 @@ pub enum Eip7702Error {
#[from]
Signature(alloy_primitives::SignatureError),
}

#[cfg(feature = "std")]
impl std::error::Error for Eip7702Error {
fn source(&self) -> Option<&(dyn core::error::Error + 'static)> {
match self {
Self::InvalidSValue(_) => None,
Self::Signature(err) => Some(err),
}
}
}

0 comments on commit e3b0080

Please sign in to comment.