Skip to main content

Module filter

Module filter 

Source
Expand description

support for polling filters Support for polling based filters

Re-exportsยง

use crate::StorageInfo; ๐Ÿ”’
use crate::eth::backend::notifications::ChainNotification; ๐Ÿ”’
use crate::eth::backend::notifications::ChainNotifications; ๐Ÿ”’
use crate::eth::error::ToRpcResponseResult; ๐Ÿ”’
use crate::pubsub::filter_logs; ๐Ÿ”’
use crate::pubsub::filter_removed_logs; ๐Ÿ”’
use alloy_consensus::TxReceipt; ๐Ÿ”’
use alloy_network::AnyRpcTransaction; ๐Ÿ”’
use alloy_network::Network; ๐Ÿ”’
use alloy_primitives::TxHash; ๐Ÿ”’
use alloy_primitives::map::HashMap; ๐Ÿ”’
use alloy_rpc_types::Filter; ๐Ÿ”’
use alloy_rpc_types::FilteredParams; ๐Ÿ”’
use alloy_rpc_types::Log; ๐Ÿ”’
use anvil_core::eth::subscription::SubscriptionId; ๐Ÿ”’
use anvil_rpc::error::ErrorCode; ๐Ÿ”’
use anvil_rpc::error::RpcError; ๐Ÿ”’
use anvil_rpc::response::ResponseResult; ๐Ÿ”’
use futures::Stream; ๐Ÿ”’
use futures::StreamExt; ๐Ÿ”’
use futures::channel::mpsc::Receiver; ๐Ÿ”’
use std::pin::Pin; ๐Ÿ”’
use std::sync::Arc; ๐Ÿ”’
use std::task::Context; ๐Ÿ”’
use std::task::Poll; ๐Ÿ”’
use std::time::Duration; ๐Ÿ”’
use std::time::Instant; ๐Ÿ”’
use tokio::sync::Mutex; ๐Ÿ”’
use tokio::sync::mpsc; ๐Ÿ”’

Structsยง

Filters
Contains all registered filters
LogsFilter
Listens for new blocks and matching logs emitted in that block

Enumsยง

EthFilter
Represents a poll based filter

Constantsยง

ACTIVE_FILTER_TIMEOUT_SECS
timeout after which to remove an active filter if it wasnโ€™t polled since then

Functionsยง

new_id ๐Ÿ”’
returns a new random hex id

Type Aliasesยง

FilterMap ๐Ÿ”’
Type alias for filters identified by their id and their expiration timestamp