Trait brontes_types::db::traits::LibmdbxReader
source · pub trait LibmdbxReader:
Send
+ Sync
+ Unpin
+ 'static {
Show 30 methods
// Required methods
fn get_most_recent_block(&self) -> Result<u64>;
fn get_metadata_no_dex_price(
&self,
block_num: u64,
quote_asset: Address,
) -> Result<Metadata>;
fn has_dex_quotes(&self, block_num: u64) -> Result<bool>;
fn try_fetch_address_metadatas(
&self,
addresses: Vec<Address>,
) -> Result<FastHashMap<Address, AddressMetadata>>;
fn fetch_all_searcher_eoa_info(
&self,
) -> Result<Vec<(Address, SearcherInfo)>>;
fn fetch_all_searcher_contract_info(
&self,
) -> Result<Vec<(Address, SearcherInfo)>>;
fn try_fetch_searcher_eoa_info(
&self,
searcher_eoa: Address,
) -> Result<Option<SearcherInfo>>;
fn try_fetch_searcher_contract_info(
&self,
searcher_contract: Address,
) -> Result<Option<SearcherInfo>>;
fn try_fetch_searcher_eoa_infos(
&self,
searcher_eoa: Vec<Address>,
) -> Result<FastHashMap<Address, SearcherInfo>>;
fn try_fetch_searcher_contract_infos(
&self,
searcher_contract: Vec<Address>,
) -> Result<FastHashMap<Address, SearcherInfo>>;
fn try_fetch_builder_info(
&self,
builder_coinbase_addr: Address,
) -> Result<Option<BuilderInfo>>;
fn fetch_all_builder_info(&self) -> Result<Vec<(Address, BuilderInfo)>>;
fn get_metadata(
&self,
block_num: u64,
quote_asset: Address,
) -> Result<Metadata>;
fn get_cex_trades(&self, block: u64) -> Result<CexTradeMap>;
fn try_fetch_address_metadata(
&self,
address: Address,
) -> Result<Option<AddressMetadata>>;
fn fetch_all_address_metadata(
&self,
) -> Result<Vec<(Address, AddressMetadata)>>;
fn get_dex_quotes(&self, block: u64) -> Result<DexQuotes>;
fn try_fetch_token_info(
&self,
address: Address,
) -> Result<TokenInfoWithAddress>;
fn try_fetch_mev_blocks(
&self,
start_block: Option<u64>,
end_block: u64,
) -> Result<Vec<MevBlockWithClassified>>;
fn fetch_all_mev_blocks(
&self,
start_block: Option<u64>,
) -> Result<Vec<MevBlockWithClassified>>;
fn protocols_created_before(
&self,
start_block: u64,
) -> Result<FastHashMap<(Address, Protocol), Pair>>;
fn protocols_created_range(
&self,
start_block: u64,
end_block: u64,
) -> Result<ProtocolCreatedRange>;
fn get_protocol_details(&self, address: Address) -> Result<ProtocolInfo>;
fn load_trace(&self, block_num: u64) -> Result<Vec<TxTrace>>;
// Provided methods
fn try_fetch_searcher_info(
&self,
eoa_address: Address,
contract_address: Option<Address>,
) -> Result<(Option<SearcherInfo>, Option<SearcherInfo>)> { ... }
fn try_fetch_searcher_infos(
&self,
eoa: Vec<Address>,
contract: Vec<Address>,
) -> Result<FastHashMap<Address, (SearcherInfo, Option<SearcherInfo>)>> { ... }
fn fetch_all_searcher_info(&self) -> Result<AllSearcherInfo> { ... }
fn try_fetch_token_decimals(&self, address: Address) -> Result<u8> { ... }
fn get_protocol(&self, address: Address) -> Result<Protocol> { ... }
fn get_protocol_details_sorted(
&self,
address: Address,
) -> Result<ProtocolInfo> { ... }
}
Required Methods§
fn get_most_recent_block(&self) -> Result<u64>
fn get_metadata_no_dex_price( &self, block_num: u64, quote_asset: Address, ) -> Result<Metadata>
fn has_dex_quotes(&self, block_num: u64) -> Result<bool>
fn try_fetch_address_metadatas( &self, addresses: Vec<Address>, ) -> Result<FastHashMap<Address, AddressMetadata>>
fn fetch_all_searcher_eoa_info(&self) -> Result<Vec<(Address, SearcherInfo)>>
fn fetch_all_searcher_contract_info( &self, ) -> Result<Vec<(Address, SearcherInfo)>>
fn try_fetch_searcher_eoa_info( &self, searcher_eoa: Address, ) -> Result<Option<SearcherInfo>>
fn try_fetch_searcher_contract_info( &self, searcher_contract: Address, ) -> Result<Option<SearcherInfo>>
fn try_fetch_searcher_eoa_infos( &self, searcher_eoa: Vec<Address>, ) -> Result<FastHashMap<Address, SearcherInfo>>
fn try_fetch_searcher_contract_infos( &self, searcher_contract: Vec<Address>, ) -> Result<FastHashMap<Address, SearcherInfo>>
fn try_fetch_builder_info( &self, builder_coinbase_addr: Address, ) -> Result<Option<BuilderInfo>>
fn fetch_all_builder_info(&self) -> Result<Vec<(Address, BuilderInfo)>>
fn get_metadata(&self, block_num: u64, quote_asset: Address) -> Result<Metadata>
fn get_cex_trades(&self, block: u64) -> Result<CexTradeMap>
fn try_fetch_address_metadata( &self, address: Address, ) -> Result<Option<AddressMetadata>>
fn fetch_all_address_metadata(&self) -> Result<Vec<(Address, AddressMetadata)>>
fn get_dex_quotes(&self, block: u64) -> Result<DexQuotes>
fn try_fetch_token_info(&self, address: Address) -> Result<TokenInfoWithAddress>
fn try_fetch_mev_blocks( &self, start_block: Option<u64>, end_block: u64, ) -> Result<Vec<MevBlockWithClassified>>
fn fetch_all_mev_blocks( &self, start_block: Option<u64>, ) -> Result<Vec<MevBlockWithClassified>>
fn protocols_created_before( &self, start_block: u64, ) -> Result<FastHashMap<(Address, Protocol), Pair>>
fn protocols_created_range( &self, start_block: u64, end_block: u64, ) -> Result<ProtocolCreatedRange>
fn get_protocol_details(&self, address: Address) -> Result<ProtocolInfo>
fn load_trace(&self, block_num: u64) -> Result<Vec<TxTrace>>
Provided Methods§
fn try_fetch_searcher_info( &self, eoa_address: Address, contract_address: Option<Address>, ) -> Result<(Option<SearcherInfo>, Option<SearcherInfo>)>
fn try_fetch_searcher_infos( &self, eoa: Vec<Address>, contract: Vec<Address>, ) -> Result<FastHashMap<Address, (SearcherInfo, Option<SearcherInfo>)>>
fn fetch_all_searcher_info(&self) -> Result<AllSearcherInfo>
fn try_fetch_token_decimals(&self, address: Address) -> Result<u8>
fn get_protocol(&self, address: Address) -> Result<Protocol>
sourcefn get_protocol_details_sorted(&self, address: Address) -> Result<ProtocolInfo>
fn get_protocol_details_sorted(&self, address: Address) -> Result<ProtocolInfo>
returns protocol details with the tokens sorted from smallest to biggest. This is needed as for some reason the tokens in the database for a given protocol don’t seems to always be ordered correctly