signet_types/agg/
error.rs

1use alloy::primitives::{Address, U256};
2
3/// Error type for market processing.
4#[derive(Debug, Copy, Clone, thiserror::Error, PartialEq, Eq)]
5pub enum MarketError {
6    /// Insufficient balance to settle a trade.
7    #[error("Insufficient balance when taking from context")]
8    InsufficientBalance {
9        /// The chain ID on which the asset is deployed.
10        chain_id: u64,
11        /// The asset we expected to be in the context.
12        asset: Address,
13        /// The recipient account we tried to take from.
14        recipient: Address,
15        /// The amount we tried to take.
16        amount: U256,
17    },
18    /// Missing asset in the context.
19    #[error("No recipients of asset when taking from context")]
20    MissingAsset {
21        /// The chain ID on which the asset is deployed.
22        chain_id: u64,
23        /// The asset we expected to be in the context.
24        asset: Address,
25    },
26}