kabu_types_events/
defi_events.rs

1use alloy_primitives::{BlockHash, BlockNumber, TxHash};
2use kabu_types_market::PoolId;
3
4#[derive(Clone, Debug)]
5pub enum MarketEvents {
6    BlockHeaderUpdate { block_number: BlockNumber, block_hash: BlockHash, timestamp: u64, base_fee: u64, next_base_fee: u64 },
7    BlockTxUpdate { block_number: BlockNumber, block_hash: BlockHash },
8    BlockStateUpdate { block_hash: BlockHash },
9    NewPoolLoaded { pool_id: PoolId, swap_path_idx_vec: Vec<usize> },
10}
11
12#[derive(Clone, Debug)]
13pub enum MempoolEvents {
14    /// The transaction has a valid nonce and provides enough gas to pay for the base fee of the next block.
15    MempoolActualTxUpdate {
16        tx_hash: TxHash,
17    },
18    /// The transaction has been added to the mempool without any validation.
19    MempoolTxUpdate {
20        tx_hash: TxHash,
21    },
22    MempoolStateUpdate {
23        tx_hash: TxHash,
24    },
25    MempoolLogUpdate {
26        tx_hash: TxHash,
27    },
28}