View Source Ethers.Transaction.Eip2930 (Ethers v0.6.3)

Transaction struct and protocol implementation for Ethereum Improvement Proposal (EIP) 2930 transactions. EIP-2930 introduced a new transaction type that includes an access list, allowing transactions to pre-specify and pre-pay for account and storage access to mitigate gas cost changes from EIP-2929 and prevent contract breakage. The access list format also enables future use cases like block-wide witnesses and static state access patterns.

See: https://eips.ethereum.org/EIPS/eip-2930

Summary

Types

t()

A transaction type following EIP-2930 (Type-1) and incorporating the following fields

Types

t()

@type t() :: %Ethers.Transaction.Eip2930{
  access_list: [{binary(), [binary()]}],
  chain_id: non_neg_integer(),
  gas: non_neg_integer(),
  gas_price: non_neg_integer(),
  input: binary(),
  nonce: non_neg_integer(),
  to: Ethers.Types.t_address() | nil,
  value: non_neg_integer()
}

A transaction type following EIP-2930 (Type-1) and incorporating the following fields:

  • chain_id - chain ID of network where the transaction is to be executed
  • nonce - sequence number for the transaction from this sender
  • gas_price: Price willing to pay for each unit of gas (in wei)
  • gas - maximum amount of gas allowed for transaction execution
  • to - destination address for transaction, nil for contract creation
  • value - amount of ether (in wei) to transfer
  • input - data payload of the transaction
  • access_list - list of addresses and storage keys to warm up (introduced in EIP-2930)