pub enum DefiData {
Block(Block),
Pool(Pool),
PoolSnapshot(PoolSnapshot),
PoolSwap(PoolSwap),
PoolLiquidityUpdate(PoolLiquidityUpdate),
PoolFeeCollect(PoolFeeCollect),
PoolFeeProtocolUpdate(PoolFeeProtocolUpdate),
PoolFeeProtocolCollect(PoolFeeProtocolCollect),
PoolFlash(PoolFlash),
}Expand description
Represents DeFi-specific data events in a decentralized exchange ecosystem.
Variants§
Block(Block)
A block completion in a blockchain network.
Pool(Pool)
A DEX liquidity pool definition or update.
PoolSnapshot(PoolSnapshot)
A complete snapshot of a pool’s state at a specific point in time.
PoolSwap(PoolSwap)
A token swap transaction on a decentralized exchange.
PoolLiquidityUpdate(PoolLiquidityUpdate)
A liquidity update event (mint/burn) in a DEX pool.
PoolFeeCollect(PoolFeeCollect)
A fee collection event from a DEX pool position.
PoolFeeProtocolUpdate(PoolFeeProtocolUpdate)
A protocol-fee configuration change in a DEX pool.
PoolFeeProtocolCollect(PoolFeeProtocolCollect)
A protocol-fee withdrawal from a DEX pool.
PoolFlash(PoolFlash)
A flash event
Implementations§
Source§impl DefiData
impl DefiData
Sourcepub fn block_position(&self) -> (u64, u32, u32)
pub fn block_position(&self) -> (u64, u32, u32)
Returns the block position associated with this DeFi data.
Sourcepub fn block_number(&self) -> u64
pub fn block_number(&self) -> u64
Returns the block number associated with this DeFi data.
Sourcepub fn transaction_index(&self) -> u32
pub fn transaction_index(&self) -> u32
Returns the transaction index associated with this DeFi data.
Sourcepub fn ts_event(&self) -> UnixNanos
pub fn ts_event(&self) -> UnixNanos
Returns the event timestamp associated with this DeFi data.
Sourcepub fn timestamp(&self) -> UnixNanos
pub fn timestamp(&self) -> UnixNanos
Returns the event timestamp associated with this DeFi data.
Sourcepub fn ts_init(&self) -> UnixNanos
pub fn ts_init(&self) -> UnixNanos
Returns the initialization timestamp associated with this DeFi data.
Sourcepub fn instrument_id(&self) -> InstrumentId
pub fn instrument_id(&self) -> InstrumentId
Returns the instrument ID associated with this DeFi data.
§Panics
Panics if the variant is a Block or PoolSnapshot where instrument IDs are not applicable.