alloy_provider/ext/
mod.rs

1//! Extended APIs for the provider module.
2
3#[cfg(feature = "admin-api")]
4mod admin;
5#[cfg(feature = "admin-api")]
6pub use admin::AdminApi;
7
8#[cfg(feature = "anvil-api")]
9mod anvil;
10#[cfg(feature = "anvil-api")]
11pub use anvil::{AnvilApi, ImpersonateConfig};
12
13#[cfg(feature = "engine-api")]
14mod engine;
15#[cfg(feature = "engine-api")]
16pub use engine::EngineApi;
17
18#[cfg(feature = "debug-api")]
19mod debug;
20#[cfg(feature = "debug-api")]
21pub use debug::DebugApi;
22
23#[cfg(feature = "net-api")]
24mod net;
25#[cfg(feature = "net-api")]
26pub use net::NetApi;
27
28#[cfg(feature = "trace-api")]
29mod trace;
30#[cfg(feature = "trace-api")]
31pub use trace::{TraceApi, TraceBuilder, TraceCallList, TraceParams};
32
33#[cfg(feature = "rpc-api")]
34mod rpc;
35#[cfg(feature = "rpc-api")]
36pub use rpc::RpcApi;
37
38#[cfg(feature = "txpool-api")]
39mod txpool;
40#[cfg(feature = "txpool-api")]
41pub use txpool::TxPoolApi;
42
43#[cfg(feature = "erc4337-api")]
44mod erc4337;
45#[cfg(feature = "erc4337-api")]
46pub use erc4337::Erc4337Api;
47
48#[cfg(feature = "mev-api")]
49mod mev;
50
51#[cfg(feature = "mev-api")]
52pub use mev::{sign_flashbots_payload, MevApi, MevBuilder, FLASHBOTS_SIGNATURE_HEADER};
53
54#[cfg(test)]
55pub(crate) mod test {
56    #[allow(dead_code)] // dead only when all features off
57    /// Run the given function only if we are in a CI environment.
58    pub(crate) async fn async_ci_only<F, Fut>(f: F)
59    where
60        F: FnOnce() -> Fut,
61        Fut: std::future::Future<Output = ()>,
62    {
63        if ci_info::is_ci() {
64            f().await;
65        }
66    }
67}