listLegacyFields

Standard EVM transaction fields

Standard EVM transaction fields used in metadata construction.

Overview

LegacyFields is a subset of standard Ethereum transaction parameters used when constructing TxSeismicMetadata for AAD (Additional Authenticated Data) in AES-GCM encryption.

Definition

@dataclass(frozen=True)
class LegacyFields:
    """Standard EVM transaction fields used in metadata construction.

    Attributes:
        chain_id: Numeric chain identifier.
        nonce: Sender's transaction count.
        to: Recipient address, or None for contract creation.
        value: Amount of wei to transfer.
    """
    chain_id: int
    nonce: int
    to: ChecksumAddress | None
    value: int

Fields

Field
Type
Description

chain_id

int

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

nonce

int

Sender's transaction count

to

ChecksumAddress | None

Recipient address, or None for contract creation

value

int

Amount of wei to transfer

Examples

Manual Construction

Contract Creation

Use in TxSeismicMetadata

Extract from Wallet Client

Field Details

chain_id

The numeric chain identifier prevents cross-chain replay attacks:

  • 5124 - Seismic testnet

  • 31337 - Seismic local (sanvil)

nonce

The sender's transaction count ensures:

  • Ordered execution - Transactions execute in sequence

  • Replay protection - Can't reuse old transactions

  • Fetched automatically - SDK calls eth_getTransactionCount

to

The recipient address:

  • Checksummed address - EIP-55 format (mixed case)

  • None - For contract creation transactions

  • Must be valid - Invalid addresses cause transaction failure

value

Amount of native currency to transfer:

  • In wei - Smallest unit (1 ETH = 10^18 wei)

  • Can be 0 - For pure function calls

  • Integer only - No fractional wei

Properties

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

  • Type-safe - All fields are validated at construction

  • Subset of full transaction - Excludes gas, gasPrice, data

Why Called "Legacy"?

These are the standard EVM fields that exist in all Ethereum transaction types:

  • Present in Legacy (pre-EIP-2718) transactions

  • Present in EIP-2930 (Type 1) transactions

  • Present in EIP-1559 (Type 2) transactions

  • Present in Seismic (Type 0x4a) transactions

The name emphasizes these fields are unchanged from traditional Ethereum transactions, unlike the new SeismicElements fields.

Notes

  • Used exclusively in TxSeismicMetadata

  • Part of the AAD (Additional Authenticated Data) for AES-GCM encryption

  • Automatically extracted by the SDK from wallet and chain config

  • Does not include gas, gasPrice, or data fields (those are in UnsignedSeismicTx)

See Also

Last updated