Installation
Cargo setup, dependencies, and prerequisites for seismic-alloy
Prerequisites
OpenSSL
System
Required by seismic-enclave for cryptographic operations
Tokio runtime
1.x
Async runtime (most Alloy operations are async)
Add to Cargo.toml
seismic-alloy is a workspace of several crates, not a single crate. Depend on the specific members you need via git (the crates are not yet published to crates.io). For most applications, the short list is:
[dependencies]
seismic-prelude = { git = "https://github.com/SeismicSystems/seismic-alloy" }
seismic-alloy-network = { git = "https://github.com/SeismicSystems/seismic-alloy" }
seismic-alloy-provider = { git = "https://github.com/SeismicSystems/seismic-alloy" }
alloy-provider = "1.1" # Provider trait (get_block_number, get_balance, ...)
alloy-signer-local = "1.1" # PrivateKeySigner
alloy-primitives = "1.1" # Address, U256, aliases::SUInt, ...
tokio = { version = "1", features = ["full"] }
reqwest = "0.12" # for reqwest::Url in the http connect callsRequired [patch.crates-io] block
seismic-alloy depends on forked crates that are not on crates.io (seismic-enclave, seismic-revm, Seismic's forks of alloy-primitives / alloy-sol-types / alloy-trie). A git dependency does not inherit the parent workspace's patches, so your own Cargo.toml needs this block at the end:
Pin to a specific revision
For reproducible builds, pin each git dependency to a specific commit:
Workspace Crates
The seismic-alloy workspace contains these crates:
seismic-alloy-provider
SeismicProviderBuilder, filler pipeline, precompile helpers
seismic-alloy-network
SeismicNetwork trait, SeismicReth, SeismicFoundry network types
seismic-alloy-consensus
Seismic transaction types and consensus logic
seismic-alloy-rpc-types
Seismic-specific RPC request and response types
seismic-alloy-genesis
Genesis configuration types
seismic-prelude
Convenience re-exports (seismic_prelude::client::*) used by most app code
Pull in only the ones you need. Most applications use seismic-prelude, seismic-alloy-network, and seismic-alloy-provider. Add seismic-alloy-consensus if you pattern-match on SeismicReceiptEnvelope or build TxSeismic/TxSeismicElements directly. Add seismic-alloy-rpc-types for SeismicTransactionRequest.
Recommended Imports
The recommended approach is to use the client prelude, which re-exports the most commonly used types and traits:
This single import provides: SeismicCallExt, ShieldedCallExt, SeismicProviderBuilder, SeismicProviderExt, SignedProviderExt, SeismicSignedProvider, SeismicUnsignedProvider, SeismicWallet, sol, Address, Bytes, FixedBytes, U256, ReceiptResponse, and PrivateKeySigner.
For types not in the prelude (e.g., SeismicReth, SeismicFoundry, Anvil, Filter), add explicit imports alongside the prelude:
Key Dependencies
seismic-alloy builds on these foundational crates:
alloy
1.1.0
Core Ethereum toolkit (providers, signers, transports)
alloy-primitives
—
With "seismic" feature flag enabled
seismic-enclave
0.1.0
TEE key exchange and AES-GCM encryption
tokio
1.x
Async runtime
reqwest
—
HTTP transport for RPC calls
Minimal Working Example
Create a new project:
Set up Cargo.toml (adding the [patch.crates-io] block shown above):
Write src/main.rs:
Build and run:
Troubleshooting
OpenSSL Not Found
If you see linker errors related to OpenSSL:
Rust Version Too Old
seismic-alloy requires Rust 1.82 or newer:
Git Authentication
If the git dependency fails to fetch, ensure you have SSH or HTTPS access to the repository:
Notes
The workspace version is
0.0.1— the API may change before a stable releaseThe Rust edition is 2021
alloy-primitivesis used with the"seismic"feature flag, which adds Seismic-specific primitive typesAll provider operations are async and require a Tokio runtime
See Also
Provider Overview — Signed and unsigned provider types
SeismicSignedProvider — Full-featured provider
SeismicUnsignedProvider — Read-only provider
Encryption — How calldata encryption works
Last updated

