#[cfg(feature = "use-bindings")]
use hopr_bindings::exports::alloy::{
contract::Error as ContractError, signers::Error as SignerError,
};
pub type Result<T, E = ChainTypesError> = core::result::Result<T, E>;
#[derive(thiserror::Error, Debug)]
pub enum ChainTypesError {
#[error("invalid state: {0}")]
InvalidState(&'static str),
#[error("invalid arguments: {0}")]
InvalidArguments(&'static str),
#[error("signing error: {0}")]
SigningError(#[source] anyhow::Error),
#[cfg(feature = "use-bindings")]
#[error(transparent)]
SignerError(#[from] SignerError),
#[cfg(feature = "use-bindings")]
#[error(transparent)]
ContractError(#[from] ContractError),
#[error("error while parsing an EIP-2718 transaction: {0}")]
ParseError(#[source] anyhow::Error),
}