Trait pool_sync::pools::PoolFetcher

source ·
pub trait PoolFetcher: Send + Sync {
    // Required methods
    fn pool_type(&self) -> PoolType;
    fn factory_address(&self, chain: Chain) -> Address;
    fn pair_created_signature(&self) -> &str;
    fn log_to_address(&self, log: &Log) -> Address;
}
Expand description

Defines common functionality for fetching and decoding pool creation events

This trait provides a unified interface for different pool types to implement their specific logic for identifying and parsing pool creation events.

Required Methods§

source

fn pool_type(&self) -> PoolType

Returns the type of pool this fetcher is responsible for

source

fn factory_address(&self, chain: Chain) -> Address

Returns the factory address for the given chain

source

fn pair_created_signature(&self) -> &str

Returns the event signature for pool creation

source

fn log_to_address(&self, log: &Log) -> Address

Attempts to create a Pool instance from a log entry

Implementors§