hopr_chain_types/
errors.rs

1use alloy::{contract::Error as ContractError, signers::Error as SignerError};
2use thiserror::Error;
3
4/// Dynamic contract result type.
5pub type Result<T, E = ChainTypesError> = core::result::Result<T, E>;
6
7/// Error when working with chain types.
8#[derive(Error, Debug)]
9pub enum ChainTypesError {
10    /// An error occured while signing a hash.
11    #[error(transparent)]
12    SignerError(#[from] SignerError),
13
14    /// An error occured while interacting with contracts.
15    #[error(transparent)]
16    ContractError(#[from] ContractError),
17}