Expand description
axum RPC server implementations This module provides the infrastructure to launch an Ethereum JSON-RPC server (via HTTP, WebSocket, and IPC) and Beacon Node REST API.
Re-exportsยง
use crate::EthApi;๐use crate::IpcTask;๐use anvil_server::ServerConfig;๐use anvil_server::ipc::IpcEndpoint;๐use axum::Router;๐use foundry_primitives::FoundryNetwork;๐use futures::StreamExt;๐use rpc_handlers::HttpEthRpcHandler;๐use rpc_handlers::PubSubEthRpcHandler;๐use std::io;๐use std::net::SocketAddr;๐use std::pin::pin;๐use tokio::net::TcpListener;๐use tokio::task::JoinSet;๐
Modulesยง
- beacon ๐
- Beacon Node REST API implementation for Anvil.
- rpc_
handlers ๐ - Contains RPC handlers
Functionsยง
- router
- Configures an [
axum::Router] that handlesEthApirelated JSON-RPC calls via HTTP and WS, and Beacon REST API calls. - serve
- Configures a server that handles
EthApirelated JSON-RPC calls via HTTP and WS. - serve_
on - Configures a server that handles
EthApirelated JSON-RPC calls via HTTP and WS. - spawn_
ipc - Launches an ipc server at the given path in a new task
- try_
spawn_ ipc - Launches an ipc server at the given path in a new task.