alloy_multicall/
error.rs

1/// Errors when interacting with a Multicall contract.
2#[derive(Debug, thiserror::Error)]
3pub enum MulticallError {
4    /// Unsupported Chain ID used when creating the Multicall instance
5    #[error("Chain ID {0} is not supported by Multicall. Please use an address instead")]
6    InvalidChainId(u64),
7
8    /// An error occurred interacting with a contract over RPC.
9    #[error(transparent)]
10    TransportError(#[from] alloy::transports::TransportError),
11
12    /// Error when interacting with contracts. This is an error from the `contract` crate.
13    #[error(transparent)]
14    ContractError(#[from] alloy::contract::Error),
15
16    /// Multicall reverted due to an individual call failing.
17    #[error("Multicall call reverted but `allowFailure` is false")]
18    FailedCall,
19
20    /// Attempted to initialize the Multicall instance with no address or chain ID
21    #[error("Invalid params. Must provide at least one of: address or chain_id.")]
22    InvalidInitializationParams,
23}