> For the complete documentation index, see [llms.txt](https://docs.seismic.systems/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.seismic.systems/clients/alloy/chains.md).

# Chains

Chain configurations for Seismic networks

The `seismic-alloy` SDK supports multiple Seismic networks. Each chain has a specific chain ID, RPC endpoint, and recommended network type. This section documents the available chains and how to connect to them.

## Overview

`seismic-alloy` does not use pre-configured chain objects. Pass the RPC URL directly to `SeismicProviderBuilder` and select the appropriate network type (`SeismicReth` or `SeismicFoundry`); the chain ID is fetched automatically from the node.

```rust
use seismic_prelude::client::*;

let signer: PrivateKeySigner = "0xYOUR_PRIVATE_KEY".parse()?;
let wallet = SeismicWallet::<SeismicReth>::from(signer.clone());

// Testnet
let url = "https://testnet-1.seismictest.net/rpc".parse()?;
let provider = SeismicProviderBuilder::new()
    .wallet(wallet)
    .connect_http(url)
    .await?;

// Local (Sanvil)
let signer2: PrivateKeySigner = "0xYOUR_PRIVATE_KEY".parse()?;
let wallet2 = SeismicWallet::<SeismicFoundry>::from(signer2);
let url = "http://127.0.0.1:8545".parse()?;
let provider = SeismicProviderBuilder::new()
    .foundry()
    .wallet(wallet2)
    .connect_http(url)
    .await?;
```

## Supported Chains

| Chain                                                                                   | Chain ID | RPC URL                                 | Network Type     | Description                                |
| --------------------------------------------------------------------------------------- | -------- | --------------------------------------- | ---------------- | ------------------------------------------ |
| [Seismic Testnet](https://docs.seismic.systems/clients/alloy/chains/seismic-testnet.md) | `5124`   | `https://testnet-1.seismictest.net/rpc` | `SeismicReth`    | Public testnet for development and testing |
| [Sanvil (local)](https://docs.seismic.systems/clients/alloy/chains/sanvil.md)           | `31337`  | `http://127.0.0.1:8545`                 | `SeismicFoundry` | Local development node                     |

## Choosing a Chain

```
Are you developing and want to test against a live network?
  -> Use Seismic Testnet with SeismicReth

Are you running tests locally or doing rapid iteration?
  -> Use Sanvil with SeismicFoundry
```

## Chain ID Handling

The Alloy provider automatically fetches the chain ID from the connected node via the `ChainIdFiller`. You do not need to specify it manually in most cases. The chain ID is used for:

* EIP-155 replay protection in transaction signing
* EIP-712 typed data signing
* Transaction validation

```rust
use seismic_prelude::client::*;

let url = "https://testnet-1.seismictest.net/rpc".parse()?;
// Unsigned provider — connect_http is synchronous
let provider = SeismicProviderBuilder::new()
    .connect_http(url);

// Chain ID is fetched from the node
let chain_id = provider.get_chain_id().await?;
println!("Chain ID: {chain_id}");  // 5124 for testnet
```

## Pages

| Page                                                                                    | Description                            |
| --------------------------------------------------------------------------------------- | -------------------------------------- |
| [Seismic Testnet](https://docs.seismic.systems/clients/alloy/chains/seismic-testnet.md) | Public testnet configuration and usage |
| [Sanvil](https://docs.seismic.systems/clients/alloy/chains/sanvil.md)                   | Local development with Sanvil          |

## See Also

* [Network Overview](https://docs.seismic.systems/clients/alloy/network.md) - Network types for each chain
* [SeismicReth](https://docs.seismic.systems/clients/alloy/network/seismic-reth.md) - Production network type
* [SeismicFoundry](https://docs.seismic.systems/clients/alloy/network/seismic-foundry.md) - Development network type
* [Installation](https://docs.seismic.systems/clients/alloy/installation.md) - Cargo setup and prerequisites


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.seismic.systems/clients/alloy/chains.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
