For the complete documentation index, see llms.txt. This page is also available as Markdown.

Transparent 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. For functions without shielded parameters, simply use .call() or .send() directly (without .seismic()). Note that functions with shielded parameters (e.g., suint256) auto-encrypt by default — see Shielded Calls for details.

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. Use the #[sol(rpc, bytecode = "...")] attribute to generate a deploy() method:

use seismic_prelude::client::*;

sol! {
    #[sol(rpc, bytecode = "0x6080604052...")]
    contract SeismicCounter {
        function setNumber(suint256 newNumber) public;
        function isOdd() public view returns (bool);
    }
}

// Deploy with generated deploy() method
let contract = SeismicCounter::deploy(&provider).await?;
println!("Deployed to: {:?}", contract.address());

// Now interact with shielded calls
// isOdd has no shielded params, so use .seismic() for encryption
let is_odd = contract.isOdd().seismic().call().await?;

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 signed and unsigned providers can perform transparent reads.

Using an Unsigned Provider

Transparent reads do not require a private key, so you can use an unsigned provider:

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

There are two ways a call becomes shielded:

  1. Auto-encryption: Functions with shielded parameters (e.g., suint256) automatically return a ShieldedCallBuilder. Calling .send() or .call() encrypts automatically.

  2. Manual opt-in: For functions without shielded parameters, call .seismic() to convert a SolCallBuilder into a ShieldedCallBuilder.

When neither auto-encryption nor .seismic() is used:

  • 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