Skip to content

Support Pectra EVM Type 4 Transaction Encoding (EIP-7702) #2676

@0xivanov

Description

@0xivanov

Context

Ethereum's Pectra upgrade (EIP-7600) activated on May 7, 2025. To maintain EVM compatibility, Hiero must adopt the applicable EIPs from this release.

HIP-1341 defines the Hiero adoption of the Pectra release, distinguishing which EIPs are applicable to Hiero versus non-applicable. Of the twelve Pectra EIPs, three are applicable:

EIP Title SDK Impact
EIP-7702 Set EOA Account Code Yes — see HIP-1340
EIP-2537 Precompile for BLS12-381 curve operations No — consensus node change only
EIP-7623 Increase calldata cost No — consensus node and JSON-RPC relay change only

The remaining nine EIPs are non-applicable to Hiero (blob support, Ethereum validators, or ETH 2.0 features not present in Hiero).

Dependencies

What the SDKs Will Implement

All SDK work is driven by HIP-1340, which implements EIP-7702 (EOA Code Delegation). This feature allows EOAs to delegate code execution to a smart contract, enabling advanced account abstraction use cases such as transaction batching, gas sponsorship, and privilege de-escalation.

New Types

Authorization — Represents an EIP-7702 authorization tuple used to delegate code execution from an EOA to a smart contract address.

EthereumTransactionDataEip7702 — Encodes an Ethereum Type 4 transaction (EIP-7702) that includes an authorization list.

Updated APIs

AccountCreateTransaction — New delegationAddress field (nullable EvmAddress) that sets the EOA code delegation on account creation.

AccountUpdateTransaction — New delegationAddress field (nullable EvmAddress) that sets or clears the EOA code delegation. Setting to 20 zero-bytes or null clears any existing delegation.

AccountInfo — New delegationAddress field (nullable, immutable EvmAddress) returned when querying an account that has a delegation set.

Full API specification is in proposals/hips/hip-1340.md.

SDK Implementation Tasks

Each SDK must:

  • Add Authorization type
  • Add EthereumTransactionDataEip7702 type
  • Update AccountCreateTransaction with delegationAddress setter/getter
  • Update AccountUpdateTransaction with delegationAddress setter/getter (including null/zero-address clear)
  • Update AccountInfo with delegationAddress field
  • Add unit tests
  • Add integration tests (against a network that supports Pectra)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions