Skip to main content

Overview

EIP-7702 is available as of [email protected] (web) and @magic-sdk/[email protected] / @magic-sdk/[email protected] (React Native).
EIP-7702 introduces a new transaction type (Type-4) that allows Externally Owned Accounts (EOAs) to temporarily delegate to smart contract code. This enables account abstraction features like batched transactions, gas sponsorship, and session keys for regular wallets. Magic supports EIP-7702 through two SDK methods:
  • wallet.sign7702Authorization() — Signs an authorization that delegates your EOA to a smart contract implementation
  • wallet.send7702Transaction() — Sends a Type-4 transaction that includes signed authorizations

Compatibility

  • EIP-7702 operates headlessly with no UI confirmation prompt
  • Requires a network that supports EIP-7702 (e.g., Ethereum Mainnet, Sepolia, Arbitrum, Base, Optimism)
  • The wallet must have ETH (or the network’s native token) to pay for gas

Use Cases

  • Temporarily delegate an EOA to a smart contract implementation for advanced features
  • Enable batched transactions through a delegated smart account
  • Integrate with account abstraction infrastructure that leverages EIP-7702

Usage

Step 1: Sign an EIP-7702 Authorization

The sign7702Authorization method signs an authorization that delegates your EOA to a specified smart contract. This authorization is then included in a Type-4 transaction.
JavaScript

Parameters

Response

Step 2: Send a Type-4 Transaction

The send7702Transaction method sends a Type-4 transaction that includes the signed authorization list. This is what actually executes the delegation on-chain.
JavaScript

Parameters

Response

Complete Example

JavaScript

Resources