alloy_provider/
lib.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#![doc = include_str!("../README.md")]
#![doc(
    html_logo_url = "https://raw.githubusercontent.com/alloy-rs/core/main/assets/alloy.jpg",
    html_favicon_url = "https://raw.githubusercontent.com/alloy-rs/core/main/assets/favicon.ico"
)]
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]

// For features.
#[cfg(any(feature = "reqwest", feature = "hyper"))]
use alloy_transport_http as _;

/// Type alias for a [`RootProvider`] using the [`Http`] transport and a
/// reqwest client.
///
/// [`Http`]: alloy_transport_http::Http
#[cfg(any(test, feature = "reqwest"))]
#[deprecated(since = "0.9.0", note = "use `RootProvider` instead")]
pub type ReqwestProvider<N = alloy_network::Ethereum> = crate::RootProvider<N>;

/// Type alias for a [`RootProvider`] using the [`Http`] transport and a hyper
/// client.
///
/// [`Http`]: alloy_transport_http::Http
#[cfg(feature = "hyper")]
#[deprecated(since = "0.9.0", note = "use `RootProvider` instead")]
pub type HyperProvider<N = alloy_network::Ethereum> = crate::RootProvider<N>;

#[macro_use]
extern crate tracing;

mod builder;
pub use builder::{Identity, ProviderBuilder, ProviderLayer, Stack};

mod blocks;

pub mod ext;

pub mod fillers;

mod heart;
pub use heart::{
    PendingTransaction, PendingTransactionBuilder, PendingTransactionConfig,
    PendingTransactionError, WatchTxError,
};

pub mod layers;

mod provider;
pub use provider::{
    bindings, builder, CallInfoTrait, CallItem, CallItemBuilder, CallTuple, Caller, DynProvider,
    Dynamic, Empty, EthCall, EthCallMany, EthCallManyParams, EthCallParams, Failure,
    FilterPollerBuilder, MulticallBuilder, MulticallError, MulticallItem, ParamsWithBlock,
    Provider, ProviderCall, Result, RootProvider, RpcWithBlock, SendableTx, SendableTxErr,
    WalletProvider, MULTICALL3_ADDRESS,
};

pub mod utils;

#[doc(no_inline)]
pub use alloy_network::{self as network, Network};

#[cfg(feature = "ws")]
pub use alloy_rpc_client::WsConnect;

#[cfg(feature = "ipc")]
pub use alloy_rpc_client::IpcConnect;