Contract Deployment
Deploy and interact with a shielded contract
Prerequisites
# Install Seismic Foundry tools
# See Seismic Foundry documentation for installation
# Set environment variables
export PRIVATE_KEY="0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"
export RPC_URL="https://testnet-1.seismictest.net/rpc"
export WS_URL="wss://testnet-1.seismictest.net/ws"[package]
name = "contract-deployment"
version = "0.1.0"
edition = "2021"
rust-version = "1.82"
[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"
alloy-signer-local = "1.1"
alloy-primitives = "1.1"
alloy-sol-types = "1.1"
alloy-network = "1.1"
alloy-rpc-types-eth = "1.1"
futures-util = "0.3"
tokio = { version = "1", features = ["full"] }
reqwest = "0.12"
# [patch.crates-io] block required — see Installation.Step 1: Compile the Contract
Step 2: Deploy and Interact
Step 3: Shielded Interactions
Step 4: Subscribe to Events (WebSocket)
Full Working Example
Expected Output
Next Steps
See Also
Last updated

