> ## Documentation Index
> Fetch the complete documentation index at: https://docs.allium.so/llms.txt
> Use this file to discover all available pages before exploring further.

# Transactions

Transactions are cryptographically signed instructions from accounts.

An account will initiate a transaction to update the state of the blockchain network. Transactions always originate from an externally owned account (a smart contract can not initiate a transaction). Transactions, which change the state of the EVM, need to be broadcast to the whole network. Any node can broadcast a request for a transaction to be executed on the EVM; after this happens, a validator will execute the transaction and propagate the resulting state change to the rest of the network.

Learn more in the official Ethereum documentation [here](https://ethereum.org/en/developers/docs/transactions/).

<Info>
  EIP-7702 Support (Live as of May 7, 2025)

  EIP-7702 (enabled with Ethereum's Pectra hardfork) introduces a new transaction type (type = 4) that lets EOAs delegate execution to a contract. The **authorization\_list** includes the delegated address, chain ID, nonce, and signature data (r, s, yParity).
  Allium has done the work to embed **authority** directly in the authorization\_list, enabling identification of the delegated source — built using logic from [viem](https://viem.sh/docs/utilities/recoverMessageAddress.html).

  authorization\_list allows you to:

  * Detect if an EOA has become a smart wallet
  * Identify the contract it delegated to
  * Determine which chain the delegation occurred on

  ✅ Live on: Ethereum, BSC

  ⏳ Enabled and awaiting data: Base, Worldchain, Optimism, Polygon, Arbitrum, Unichain
</Info>

<Accordion title="Sample Query: Find authority & delegated contracts in 7702 transactions">
  ```sql theme={null}
  SELECT
    hash,
    block_timestamp,
    from_address,
    authorization_list
  FROM
    ethereum.raw.transactions
  WHERE
    transaction_type = 4
    AND block_timestamp >= '2025-05-07'
  LIMIT 10;
  ```
</Accordion>

### Transaction Fees

<Info>
  For detailed metrics on transaction fees in native tokens and USD, including average transfer costs, see [Metrics](/historical-data/supported-blockchains/evm/core-schemas/metrics).
</Info>

Transaction fees vary across different blockchains. Layer 1 chains typically have a single fee component, while Layer 2 chains include both L1 and L2 fees. Each chain may handle system transactions and fee calculations differently.

<Accordion title="Chain-Specific Fee Calculations Details">
  **Layer 2 Chains with L1 + L2 Fees (Base, Mode, Scroll, Optimism, Worldchain, Unichain)**

  The total transaction fee consists of two components:

  1. **L2 Fee**:

     * Total L2 Fee = Base Fee + Priority Fee

     * Note: `(receipt_effective_gas_price * receipt_gas_used) / 10^18` ETH combines both components

     * **Base Fee**: `(block.base_fee_per_gas * receipt_gas_used) / 10^18` ETH

       * Requires join with blocks table on `block_number`: see [example query](https://app.allium.so/s/R1DvhNk2).

     * **Priority Fee**: L2 fee - base fee

  2. **L1 Fee**:

     * Given by `receipt_l1_fee / 10^18` ETH

     * Represents cost of posting transaction data to Ethereum mainnet

  Total Fee = `L2 Fee + L1 Fee` = `((receipt_gas_used * receipt_effective_gas_price) + receipt_l1_fee) / 10^18` ETH

  **Standard EVM Chains (Arbitrum, BSC, Avalanche, Polygon zkEVM)**

  Total Fee = `(receipt_gas_used * receipt_effective_gas_price) / 1e18` ETH

  Note: On Arbitrum, receipt\_gas\_used includes both L1 and L2 fees.

  **Ethereum**

  Total Fee = Calldata Fee + Blob Fee (Post EIP-4844)

  * Calldata Fee = `(receipt_gas_used * receipt_effective_gas_price) / 1e18` ETH

  * Blob Fee = `(receipt_blob_gas_used * receipt_blob_gas_price) / 1e18` ETH (for transaction\_type = 3)

  **Polygon**

  Total Fee = `(receipt_gas_used * COALESCE(receipt_effective_gas_price, gas_price)) / 1e18` ETH

  Note: receipt\_effective\_gas\_price values may be null, in which case gas\_price is used.

  **System Transactions**

  Different chains handle system transactions differently:

  * Base/Optimism/Scroll: Identified by `receipt_l1_fee IS NULL OR receipt_l1_fee = 0`

  * Polygon: Identified by `gas_price IS NULL OR gas_price = 0` (e.g., State Syncs)

  * Arbitrum: Identified by `transaction_type BETWEEN 100 AND 106`

  * BSC: Identified by `receipt_effective_gas_price IS NULL OR receipt_effective_gas_price = 0`
</Accordion>

### Table Columns

<Info>
  Several columns may only be applicable for specific EVM-compatible blockchains. The list of columns present in the table is not exhaustive.
</Info>

Unique Key: `hash`

| Column Name                          | Description                                                                                                                                                                                                                                    |
| ------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| block\_number                        | The length of the chain, in blocks.                                                                                                                                                                                                            |
| block\_timestamp                     | The time when the block that contains this transaction was included on the blockchain.                                                                                                                                                         |
| block\_hash                          | Unique identifier of the block that includes this transaction.                                                                                                                                                                                 |
| hash                                 | Unique identifier of a transaction.                                                                                                                                                                                                            |
| nonce                                | [The transaction nonce, unique to the wallet](https://evm.org/en/glossary/#nonce)                                                                                                                                                              |
| transaction\_index                   | The position of this transaction in the block that it belongs to. The first transaction has index 0.                                                                                                                                           |
| from\_address                        | The address of the sending party of this transaction.                                                                                                                                                                                          |
| to\_address                          | The address of the receiving party of this transaction (could be a contract address).                                                                                                                                                          |
| value                                | The amount of ether sent in this transaction, in wei.                                                                                                                                                                                          |
| gas                                  | The maximum amount of gas allocated for this transaction in wei.                                                                                                                                                                               |
| gas\_price                           | Cost per unit of gas specified by the transaction in wei. The higher the gas price, the higher chance of getting included in a block.                                                                                                          |
| input                                | The data sent along with the transaction.                                                                                                                                                                                                      |
| max\_fee\_per\_gas                   | [The maximum fee per gas that the transaction sender is willing to pay for this transaction (introduced in EIP1559)](https://eips.ethereum.org/EIPS/eip-1559)                                                                                  |
| max\_priority\_fee\_per\_gas         | [The maximum fee per gas the transaction sender is willing to give to validators (Proof of Stake) or miners (Proof of Work) to incentivize them to include their transaction (introduced in EIP1559)](https://eips.ethereum.org/EIPS/eip-1559) |
| l1\_base\_fee                        | L1 base fee at the time the transaction was submitted                                                                                                                                                                                          |
| receipt\_gas\_used                   | The total amount of gas consumed by a transaction as recorded in its receipt                                                                                                                                                                   |
| receipt\_cumulative\_gas\_used       | The total amount of gas used when this transaction was executed in the block.                                                                                                                                                                  |
| receipt\_effective\_gas\_price       | The sum of the base fee and tip paid per unit of gas.                                                                                                                                                                                          |
| receipt\_contract\_address           | The contract address created, if the transaction was a contract creation, otherwise null.                                                                                                                                                      |
| receipt\_root                        | Transaction stateroot (pre Byzantium).                                                                                                                                                                                                         |
| receipt\_status                      | Success status of the transaction. Either 1 (success) or 0 (failure).                                                                                                                                                                          |
| receipt\_l1\_block\_number           | The L1 block number where this L2 transaction was finalized                                                                                                                                                                                    |
| receipt\_l1\_fee                     | The Layer 1 fee paid for the transaction (applicable for Layer 2 transactions).                                                                                                                                                                |
| receipt\_l1\_fee\_scalar             | Multiplier used to adjust L1 data fees for L2s (applicable for Layer 2 transactions).                                                                                                                                                          |
| receipt\_l1\_base\_fee\_scalar       | The base fee scalar component applied to L1 base fee to calculate L1 data costs for rollups (applicable for Layer 2 transactions).                                                                                                             |
| receipt\_l1\_gas\_price              | The gas price used to compute L1 calldata fee (applicable for Layer 2 transactions).                                                                                                                                                           |
| receipt\_l1\_gas\_used               | The amount of gas used on the L1 chain for posting transaction data (applicable for Layer 2 transactions).                                                                                                                                     |
| receipt\_gas\_used\_for\_l1          | The amount of gas used for L1 data submission for the L2 transaction                                                                                                                                                                           |
| receipt\_l1\_blob\_base\_fee         | Base fee per blob (in wei) on L1 (post-EIP-4844) (applicable for Layer 2 transactions).                                                                                                                                                        |
| receipt\_l1\_blob\_base\_fee\_scalar | Scalar applied to blob base fee to adjust L1 blob costs on L2 (applicable for Layer 2 transactions).                                                                                                                                           |
| receipt\_blob\_gas\_used             | Total blob gas used for the transactions                                                                                                                                                                                                       |
| receipt\_deposit\_nonce              | Nonce used to track L1→L2 deposit transactions, for tracking cross-chain deposits and preventing replay attacks.                                                                                                                               |
| receipt\_deposit\_receipt\_version   | Version identifier for the L1 deposit receipt format.                                                                                                                                                                                          |
| log\_count                           | Number of event logs emitted in the transaction.                                                                                                                                                                                               |
| transaction\_type                    | The integer of the transaction type, 0x0 for legacy transactions, 0x1 for access list types, 0x2 for dynamic fees.                                                                                                                             |
| authorization\_list                  | An array of objects present in 7702 transactions, each containing the delegated address, chain ID, nonce, signature data (r, s, yParity), and the recovered authority.                                                                         |
| access\_list                         | A list of addresses and storage keys that the transaction plans to access, introduced in EIP-2930 to help optimize gas costs.                                                                                                                  |
| y\_parity                            | The parity (0 or 1) of the y-coordinate of the curve point for the signature's recovery identifier.                                                                                                                                            |
| beneficiary                          | Address receiving block rewards or fees                                                                                                                                                                                                        |
| deposit\_value                       | Amount bridged from L1 in a deposit transaction                                                                                                                                                                                                |
| max\_submission\_fee                 | Maximum fee paid for submitted a retryable ticket (for Arbitrum Orbit chains)                                                                                                                                                                  |
| retry\_to                            | Target address of the retryable transaction on rollups (for Arbitrum Orbit chains)                                                                                                                                                             |
| retry\_value                         | ETH value sent with the retryable transaction (for Arbitrum Orbit chains)                                                                                                                                                                      |
| retry\_data                          | Calldata payload for the retryable execution (for Arbitrum Orbit chains)                                                                                                                                                                       |
| refund\_to                           | Address receiving any unused submission fee refunds (for Arbitrum Orbit chains)                                                                                                                                                                |
| request\_id                          | Unique identifier for L1-to-L2 messages or retryable tickets (for Arbitrum Orbit chains)                                                                                                                                                       |
| max\_refund                          | The maximum amount that can be refunded to the user if the retryable ticket is canceled or not executed (for Arbitrum Orbit chains)                                                                                                            |
| ticket\_id                           | The unique identifier (message hash) for a retryable ticket used in Arbitrum’s L1 → L2 messaging system (for Arbitrum Orbit chains)                                                                                                            |
| submission\_fee\_refund              | The portion of the submission fee returned to the user (for Arbitrum Orbit chains)                                                                                                                                                             |
| index                                | Position index of the transaction within a sequence, returned from the RPC response.                                                                                                                                                           |
| l1\_block\_number                    | Block number on L1 where this L2 transaction originated                                                                                                                                                                                        |
| l1\_timestamp                        | Timestamp of the L1 block where this L2 transaction originated                                                                                                                                                                                 |
| l1\_tx\_origin                       | Original sender address on L1 that initiated this L2 transaction                                                                                                                                                                               |
| queue\_index                         | Position in the L2 transaction queue                                                                                                                                                                                                           |
| queue\_origin                        | Origin of the transaction in the queue                                                                                                                                                                                                         |
| seq\_r                               | R component of the sequencer's signature                                                                                                                                                                                                       |
| seq\_s                               | S component of the sequencer's signature                                                                                                                                                                                                       |
| seq\_v                               | V component of the sequencer's signature                                                                                                                                                                                                       |
| raw\_transaction                     | Complete raw transaction data in hexadecimal format                                                                                                                                                                                            |
| deposit\_receipt\_version            | Version identifier for the deposit receipt format used in L1->L2 deposits                                                                                                                                                                      |
| deposit\_receipt\_nonce              | Unique nonce used to track and verify L1->L2 deposit transactions                                                                                                                                                                              |
| fee\_token                           | The token address used to pay transaction fees, enabling gas payment in tokens other than the native currency (ERC-4337 account abstraction).                                                                                                  |
| receipt\_fee\_token                  | The actual token used for fee payment as recorded in the transaction receipt, may differ from the requested fee\_token.                                                                                                                        |
| fee\_payer\_signature                | The signature authorizing a third party (paymaster) to pay transaction fees on behalf of the sender (ERC-4337 sponsored transactions).                                                                                                         |
| receipt\_fee\_payer                  | The address that paid the transaction fees, which may differ from the sender when using paymasters or sponsored transactions.                                                                                                                  |
| nonce\_key                           | The key component of a two-dimensional nonce system, allowing multiple independent nonce sequences per account (ERC-4337).                                                                                                                     |
| calls                                | Array of call data for batch transactions, enabling multiple contract calls in a single transaction (account abstraction feature).                                                                                                             |
| signature                            | The cryptographic signature authorizing the transaction, format varies based on the account type (EOA vs smart contract wallet).                                                                                                               |
| valid\_before                        | The Unix timestamp before which the transaction authorization is valid, used for time-bounded permits (ERC-3009).                                                                                                                              |
| valid\_after                         | The Unix timestamp after which the transaction authorization becomes valid, used for delayed execution permits (ERC-3009).                                                                                                                     |
| aa\_authorization\_list              | List of account abstraction authorizations for ERC-4337 UserOperations, containing paymaster and signature data.                                                                                                                               |
| key\_authorization                   | Authorization data for key-based access control in smart contract wallets, specifying permitted signing keys.                                                                                                                                  |
| \_extra\_fields                      | Any additional fields that aren't explicitly defined                                                                                                                                                                                           |
| \_created\_at                        | Timestamp of the entry creation.                                                                                                                                                                                                               |
| \_updated\_at                        | Timestamp of the entry update.                                                                                                                                                                                                                 |
