eyeTransparent Calls

Standard Ethereum calls without encryption

Non-encrypted contract interactions using standard Ethereum transaction types. Use these for public data, contract deployment, and operations that do not require privacy.

Overview

Transparent calls are standard Ethereum operations that do not use Seismic encryption. Calldata and return values are visible on-chain, just like any regular Ethereum transaction. You build a transaction request without calling .seismic(), and use the standard Alloy send_transaction() or call() methods.

When to Use Transparent Calls

Scenario
Use Transparent
Use Shielded

Contract deployment

Yes

No (Create txs cannot be seismic)

Reading public state

Yes

No

Writing public state

Yes

Optional

Reading private state

No

Yes

Writing private state

No

Yes

Functions with shielded parameters

No

Yes

Contract Deployment

Contract deployment always uses transparent transactions because Create transactions cannot be seismic. After deployment, you can interact with the contract using shielded calls.

use seismic_prelude::foundry::*;
use alloy::primitives::{Bytes, TxKind};

// Contract bytecode (from compilation)
let bytecode: Bytes = "0x6080604052...".parse()?;

// Build a standard (non-seismic) transaction for deployment
let tx = seismic_foundry_tx_builder()
    .with_input(bytecode)
    .with_kind(TxKind::Create)  // Create transaction
    .into();
    // No .seismic() -- deployment is always transparent

// Send deployment transaction
let pending_tx = provider.send_transaction(tx).await?;
let receipt = pending_tx.get_receipt().await?;

// Extract deployed contract address
let contract_address = receipt.contract_address
    .expect("deployment should return contract address");
println!("Deployed to: {:?}", contract_address);
circle-info

After deploying a contract transparently, you can immediately interact with it using shielded calls. See Shielded Calls for details.

Transparent Write

A transparent write sends a standard eth_sendTransaction with unencrypted calldata. Use this for functions that do not handle private data.

Transparent Read

A transparent read executes a standard eth_call with unencrypted calldata. Both SeismicSignedProvider and SeismicUnsignedProvider can perform transparent reads.

Using an Unsigned Provider

Transparent reads do not require a private key, so you can use SeismicUnsignedProvider:

Complete Example: Deploy and Interact

This example demonstrates the typical workflow: deploy a contract transparently, then use both shielded and transparent calls.

Transparent vs. Shielded: The .seismic() Difference

The only API difference between transparent and shielded operations is the .seismic() call on the transaction builder:

When .seismic() is omitted:

  • No TxSeismicElements are attached

  • No calldata encryption occurs

  • The transaction is sent as a standard Ethereum type

  • Any provider type can execute the operation

See Also

Last updated