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
//! # evmify
//!
//! **EVM-ify any chain.** One read API for EVM and non-EVM chains, always answered in EVM JSON-RPC shape.
//!
//! * [`EvmClient`] — typed `eth_*` client that works on any EVM chain (Ethereum, L2s,
//! sidechains). Unknown response fields are preserved, never dropped.
//! * [`pipeline`] — a modular **adapter → normalizer → transformer** pipeline that serves
//! non-EVM chains (Solana and Bitcoin included) as EVM blocks, transactions, receipts
//! and logs.
//! * [`ChainProvider`] — the trait both implement, so you can hold them side by side.
//!
//! ```no_run
//! # #[cfg(feature = "http")]
//! # async fn demo() -> evmify::Result<()> {
//! use evmify::{BlockId, ChainProvider, EvmClient, HttpTransport, adapters::solana};
//!
//! let chains: Vec<Box<dyn ChainProvider>> = vec![
//! Box::new(EvmClient::connect("https://eth.llamarpc.com").await?),
//! Box::new(solana::pipeline(solana::SolanaAdapter::mainnet(
//! HttpTransport::new("https://api.mainnet-beta.solana.com"),
//! ))),
//! ];
//! for chain in &chains {
//! let block = chain.block(BlockId::Latest, false).await?;
//! println!("{}: {:?}", chain.chain().name, block.map(|b| b.number));
//! }
//! # Ok(()) }
//! ```
pub use ;
pub use ;
pub use ;
pub use EvmClient;
pub use ;
pub use ChainProvider;
pub use HttpTransport;
pub use ;
pub use *;