layer-groupFillers

Transaction filler pipeline for Seismic-specific processing

Fillers are Alloy's middleware pattern for preparing transactions before they are sent. Each filler in the pipeline examines a transaction request, optionally fetches data (e.g., nonce, gas price, TEE public key), and fills in missing fields. The Seismic SDK adds two custom fillers to handle shielded transaction preparation.

Overview

When you call a method that sends a transaction through SeismicSignedProvider, the transaction request passes through a chain of fillers before it reaches the network. Each filler has two phases:

  1. Prepare -- Check what data is needed and fetch it (async). For example, fetch the TEE public key from the node.

  2. Fill -- Apply the prepared data to the transaction request. For example, encrypt the calldata and attach seismic elements.

The full filler chain for SeismicSignedProvider is:

WalletFiller (signing)
  -> NonceFiller + ChainIdFiller (standard Alloy fillers)
  -> SeismicElementsFiller (encryption elements + calldata encryption)
  -> SeismicGasFiller (gas estimation, deferred for seismic txs)
circle-info

Execution order matters. SeismicGasFiller must run after SeismicElementsFiller because gas estimation for shielded transactions must happen on the encrypted calldata, not the plaintext.

Seismic Fillers

Filler
Description

Generates encryption nonce, fetches TEE public key, encrypts calldata, and attaches seismic elements to the transaction request

Estimates gas for transactions. Defers estimation for seismic transactions until after encryption.

How the Pipeline Works

For Seismic Transactions (type 0x4A)

  1. NonceFiller fetches and fills the sender's nonce

  2. ChainIdFiller fills the chain ID

  3. SeismicElementsFiller:

    • Fetches the TEE public key from the node (cached after first fetch)

    • Fetches the latest block number for expiration calculation

    • Generates an encryption nonce using ECDH with the ephemeral secret key

    • Encrypts the calldata using AES-GCM

    • Attaches TxSeismicElements to the transaction request

  4. SeismicGasFiller estimates gas on the now-encrypted transaction

  5. WalletFiller signs the complete transaction

For Standard Transactions (legacy, EIP-1559, etc.)

  1. NonceFiller and ChainIdFiller work as usual

  2. SeismicElementsFiller skips (no seismic elements needed)

  3. SeismicGasFiller delegates to the standard GasFiller

  4. WalletFiller signs as normal

Configuration

Both fillers are automatically configured when you create a SeismicSignedProvider. You do not need to instantiate them manually in most cases.

Custom Configuration

If you need to customize filler behavior, you can construct them manually:

Pages

Page
Description

Encryption elements generation and calldata encryption

Gas estimation with deferred support for seismic transactions

See Also

Last updated