loom_types_events/
defi_events.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
use alloy_primitives::{BlockHash, BlockNumber, TxHash};

#[derive(Clone, Debug)]
pub enum MarketEvents {
    BlockHeaderUpdate { block_number: BlockNumber, block_hash: BlockHash, timestamp: u64, base_fee: u64, next_base_fee: u64 },
    BlockTxUpdate { block_number: BlockNumber, block_hash: BlockHash },
    BlockLogsUpdate { block_number: BlockNumber, block_hash: BlockHash },
    BlockStateUpdate { block_hash: BlockHash },
}

#[derive(Clone, Debug)]
pub enum MempoolEvents {
    /// The transaction has a valid nonce and provides enough gas to pay for the base fee of the next block.
    MempoolActualTxUpdate {
        tx_hash: TxHash,
    },
    /// The transaction has been added to the mempool without any validation.
    MempoolTxUpdate {
        tx_hash: TxHash,
    },
    MempoolStateUpdate {
        tx_hash: TxHash,
    },
    MempoolLogUpdate {
        tx_hash: TxHash,
    },
}