Skip to main content

Try it Live

Run Transaction examples in the interactive playground

Transaction

New to transactions? Start with Transaction Fundamentals to learn about transaction types, lifecycle, signing, and gas mechanics.
Complete Ethereum transaction implementation supporting all transaction types from Legacy to EIP-7702.

Overview

Transaction module provides type-safe encoding, decoding, signing, and hashing for all Ethereum transaction types. Supports Legacy (Type 0), EIP-2930 (Type 1), EIP-1559 (Type 2), EIP-4844 (Type 3), and EIP-7702 (Type 4) transactions with full RLP serialization.

Quick Start

Effect Schema

Quick Reference

Core Operations

Signature Operations

RPC Conversion

Utilities

Transaction Types

Type Definitions

Source: types.ts

API Methods

Serialization

  • serialize - RLP encode transaction to bytes
  • deserialize - RLP decode transaction from bytes
  • detectType - Detect transaction type from serialized bytes
  • toRpc - Convert transaction to JSON-RPC format
  • fromRpc - Parse transaction from JSON-RPC format

Hashing

Signatures

Gas Pricing

Access Lists

Utilities

  • getChainId - Extract chain ID from transaction
  • format - Format transaction for display

Usage Patterns

Common patterns for working with transactions: View usage patterns →

Tree-Shaking

Import only what you need:

Specification