Skip to main content
EIP-7702 is an upgrade to EVM blockchains that enables externally owned accounts (EOAs) to set their code to that of a smart contract. In practical terms, this means that EOA wallets will gain AA (account abstraction) capabilities such as transaction bundling, gas sponsorship, and custom permissions. Privy supports all low level interfaces required by 7702 - signing authorizations and sending type 4 transactions, allowing you to use any implementation of EIP-7702. Use the following guides to get started with EIP-7702 in your application:

Signing EIP-7702 authorizations

Privy provides methods to sign EIP-7702 authorizations using the user’s embedded wallet. This authorization is a cryptographic signature that allows an EOA to set its code to that of a smart contract, enabling the EOA to behave like a smart account. Learn more about signing EIP-7702 authorizations in our dedicated guide. Learn more about using the signed authorization in the integration guides below!

Detect current 7702 authorization state and implementation address

You can determine whether an EOA is currently delegated via EIP-7702 and read the authorized implementation address with a single eth_getCode call on the EOA address. Under EIP-7702, an authorized EOA temporarily exposes a small bytecode stub that begins with the magic prefix 0xef0100, followed immediately by the 20-byte implementation address. If eth_getCode returns empty code (0x or 0x0), the EOA is not currently delegated on that chain. The snippets below return the current implementation address or null.
import {createPublicClient, http} from 'viem';
import {mainnet} from 'viem/chains'; // replace with your chain

const publicClient = createPublicClient({
  chain: mainnet,
  transport: http('your RPC URL here')
});
const address = '0x...'; // the EOA address here

const code = (await publicClient.getCode({address}))?.toLowerCase() ?? '0x';
const prefixIndex = code.indexOf('0xef0100');
const authorizedImplementationAddress =
  prefixIndex === -1
    ? null
    : (`0x${code.slice(prefixIndex + 8, prefixIndex + 48)}` as `0x${string}`);
Authorization state is per-chain. Under 7702, an authorized EOA will return non-empty code with the 0xef0100 prefix; other non-empty code indicates a deployed contract account.

Using EIP-7702 capabilities