> 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

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](/clients/alloy/chains/seismic-testnet.md) | `5124`   | `https://testnet-1.seismictest.net/rpc` | `SeismicReth`    | Public testnet for development and testing |
| [Sanvil (local)](/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](/clients/alloy/chains/seismic-testnet.md) | Public testnet configuration and usage |
| [Sanvil](/clients/alloy/chains/sanvil.md)                   | Local development with Sanvil          |

## See Also

* [Network Overview](/clients/alloy/network.md) - Network types for each chain
* [SeismicReth](/clients/alloy/network/seismic-reth.md) - Production network type
* [SeismicFoundry](/clients/alloy/network/seismic-foundry.md) - Development network type
* [Installation](/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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
