file-contractUnsignedSeismicTx

Complete unsigned Seismic transaction

All fields of a TxSeismic (type 0x4a) transaction before signing.

Overview

UnsignedSeismicTx represents a complete Seismic transaction with encrypted calldata, ready to be signed. It combines standard EVM fields with Seismic-specific encryption metadata.

Definition

@dataclass(frozen=True)
class UnsignedSeismicTx:
    """All fields of a TxSeismic before signing.

    The data field contains encrypted calldata (ciphertext).
    Use the serialization functions in transaction.serialize to
    RLP-encode this for hashing and signing.
    """
    chain_id: int
    nonce: int
    gas_price: int
    gas: int
    to: ChecksumAddress | None
    value: int
    data: HexBytes
    seismic: SeismicElements

Fields

Field
Type
Description

chain_id

int

Numeric chain identifier (e.g., 5124 for Seismic testnet)

nonce

int

Sender's transaction count

gas_price

int

Gas price in wei

gas

int

Gas limit

to

ChecksumAddress | None

Recipient address, or None for contract creation

value

int

Amount of wei to transfer

data

HexBytes

Encrypted calldata (ciphertext)

seismic

Seismic-specific encryption and expiry fields

Examples

Manual Construction

Signing with EIP-712

Access from Debug Write

Inspect Seismic Elements

Build EIP-712 Typed Data

Field Details

data (Encrypted Calldata)

The data field contains encrypted calldata:

  • Plaintext calldata is encrypted with AES-GCM

  • Encryption key is derived via ECDH with the TEE's public key

  • The TEE decrypts it inside the secure enclave

seismic

Contains SeismicElements with:

  • Encryption parameters (encryption_pubkey, encryption_nonce)

  • Signing mode (message_version)

  • Expiry and freshness fields (recent_block_hash, expires_at_block)

  • Read/write flag (signed_read)

to (Recipient Address)

  • Standard checksummed Ethereum address for normal transactions

  • None for contract creation (deploys new contract)

value

Amount of native currency (ETH) to transfer, in wei:

  • 1 ETH = 1_000_000_000_000_000_000 wei

  • Can be 0 for pure function calls

Properties

  • Immutable - Cannot be modified after construction (frozen=True)

  • Type-safe - All fields are validated at construction

  • Ready to sign - Contains all fields needed for signing

Transaction Lifecycle

Notes

  • Created automatically by the SDK's write methods

  • Visible in DebugWriteResult for inspection

  • The data field is encrypted — plaintext is not recoverable without the TEE's private key

  • Compatible with both raw signing (message_version=0) and EIP-712 (message_version=2)

See Also

Last updated