A Rust toolkit that extends Alloy to support the Seismic network. Seismic is an EVM-compatible blockchain that allows smart contracts to manage shielded state through encrypted transactions.
Seismic-Alloy provides the transaction types, network abstractions, and provider implementations necessary to interact with Seismic. It introduces the Seismic transaction type where calldata is encrypted using ECDH + AEAD before submission, ensuring that only nodes with the network's secret key can decrypt it. Its counterpart is the "signed read" – an eth_call that's sent as a raw transaction, so we can prevent users from spoofing the "from" address. Seismic still supports stock eth_call, but the "from" field is zeroed out
- Support for all standard Ethereum transaction types (Legacy, EIP-2930, EIP-1559, EIP-4844, EIP-7702)
- Custom Seismic transaction type (type ID
74) with encryption metadata - Network abstractions for both testing (Seismic Anvil) and production (Seismic Reth)
- Provider implementations with automatic encryption/decryption
- Genesis configuration with shielded state support
- Rust: 1.82 or later
- Seismic Anvil: Required for running provider tests
Seismic Foundry includes sanvil (Seismic Anvil), which is required for the test suite.
For installation instructions, see the Seismic documentation.
Before running tests: Install Seismic Anvil (sanvil) to run the full test suite. See installation instructions for sfoundryup.
Run the full test suite:
cargo test --workspaceRun tests for a specific crate:
cargo test -p seismic-alloy-consensus
cargo test -p seismic-alloy-network
cargo test -p seismic-alloy-providerThe provider test suite spawns local blockchain instances using sanvil to test encrypted transactions, provider functionality, and transaction validation.
Build the project:
cargo build # Debug build
cargo build --release # Release buildCheck without building:
cargo checkFormat code:
cargo fmt --allCheck formatting:
cargo fmt --all --checkCheck with warnings as errors:
RUSTFLAGS="-D warnings" cargo checkThis is a Cargo workspace with six crates:
crates/
├── consensus/ # Transaction types, receipts, validation
├── network/ # Network abstractions (Seismic Anvil & Seismic Reth)
├── provider/ # Blockchain interaction layer
├── rpc-types/ # RPC request/response types, genesis
├── genesis/ # Genesis file definitions
└── prelude/ # Convenience re-exports
Dependency chain: consensus → network → provider
crates/consensus/src/transaction/seismic.rs- Core Seismic transaction typecrates/consensus/src/transaction/envelope.rs- Transaction envelope with Seismic supportcrates/network/src/seismic_network.rs- Network trait defining encryption/signing behaviorcrates/provider/src/provider.rs- Provider implementations with encryption supportcrates/rpc-types/src/genesis.rs- Genesis format with shielded state support
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contributions are welcome! Please ensure:
- All tests pass (
cargo test --workspace) - Code is formatted (
cargo fmt --all) - No warnings (
RUSTFLAGS="-D warnings" cargo check)