Skip to main content

Types of transactions

Transactions in the Ethereum Virtual Machine (EVM) are cryptographically signed instructions from accounts that can either transfer Ether or interact with smart contracts. There are several types of transactions in the EVM, each with unique attributes and use cases.

Legacy Transactions

Legacy transactions, also known as Type 0 transactions, are the original form of transactions on the Ethereum network. They include parameters such as nonce, gas price, gas limit, recipient address (to), value (amount of Ether to send), and data (calldata). These transactions do not utilize access lists or the fee market changes introduced in later Ethereum Improvement Proposals (EIPs) and are straightforward but less efficient in terms of gas usage.

EIP-2930 Transactions

Introduced with EIP-2930, these transactions (Type 1) add an access list parameter to the legacy transaction format. The access list specifies the addresses and storage keys that the transaction intends to access, which can lead to gas savings by pre-declaring the accessed contract and storage slots. This type of transaction is particularly useful for complex interactions involving multiple smart contracts, as it optimizes gas costs by reducing the need for repetitive access checks.

EIP-1559 Transactions

EIP-1559 transactions, or Type 2 transactions, were introduced to improve the efficiency and predictability of transaction fees. These transactions replace the traditional gas price with a base fee per gas, which is dynamically adjusted by the protocol to manage network congestion. They also include parameters for max priority fee per gas and max fee per gas, allowing users to specify the maximum fees they are willing to pay. The base fee is burned, reducing the overall supply of Ether, while the priority fee goes to the miner. This mechanism aims to create a more stable and predictable fee market.

EIP-4844 Transactions

EIP-4844 transactions (Type 3) were introduced to provide significant scaling relief for rollups by allowing them to scale initially to 0.375 MB per slot. These transactions include parameters such as max fee per blob gas and blob versioned hashes, which are associated with the transaction's data blobs. The blob fee is deducted from the sender's balance before transaction execution and burned, providing a temporary but effective scaling solution for the network.

Message Call Transactions

Message call transactions are used to interact with existing smart contracts or transfer Ether between externally owned accounts (EOAs). These transactions can initiate functions within smart contracts, such as token swaps or data storage operations, making them versatile for various decentralized applications.

Contract Creation Transactions

Contract creation transactions are used to deploy new smart contracts on the Ethereum network. These transactions contain the compiled bytecode of the smart contract and result in the creation of a new contract account. Once deployed, the contract can interact with other accounts and contracts on the network, enabling a wide range of decentralized functionalities. Understanding these different types of transactions and their specific attributes is essential for developers and users to optimize their interactions with the Ethereum network, ensuring efficient use of resources and minimizing transaction costs.