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§
sourcefn factory_address(&self, chain: Chain) -> Address
fn factory_address(&self, chain: Chain) -> Address
Returns the factory address for the given chain
sourcefn pair_created_signature(&self) -> &str
fn pair_created_signature(&self) -> &str
Returns the event signature for pool creation
sourcefn log_to_address(&self, log: &Log) -> Address
fn log_to_address(&self, log: &Log) -> Address
Attempts to create a Pool instance from a log entry