Overview
EIP-7702 delegation upgrades an end user’s EVM EOA with smart account capabilities — batched transactions, gas sponsorship, and optionally spend permissions — while keeping the same address. Unlike ERC-4337 smart accounts, which create a separate contract account, EIP-7702 upgrades your user’s existing EOA in place.Operation lifecycle
Delegation is asynchronous. When you create a delegation, the API returns an operation ID immediately while the transaction is submitted and confirmed onchain. You poll the operation until it reachesCOMPLETED, at which point the account is ready to send user operations.
| Status | Meaning |
|---|---|
PENDING | The delegation operation has been created but not yet submitted to the network. |
SUBMITTED | The delegation transaction has been submitted to the network. |
COMPLETED | The delegation is active. The account can now submit user operations. |
FAILED | The delegation failed. |
Prerequisites
- A CDP Portal account and project
- Node.js 22+ and a package manager (npm, pnpm, or yarn)
- Basic familiarity with React and TypeScript
- A CDP project with Embedded Wallets enabled
- Your app domain allowlisted
@coinbase/cdp-core,@coinbase/cdp-hooks, and@coinbase/cdp-api-clientinstalled
Create an EIP-7702 delegation
UseuseCreateEvmEip7702Delegation to upgrade an end user’s EOA. The hook creates the delegation and automatically polls until the operation completes.
Parameters
| Parameter | Type | Description |
|---|---|---|
| address | string | The user’s EOA address to delegate (must belong to the current user). |
| network | EvmEip7702DelegationNetwork | Target network. Use the EvmEip7702DelegationNetwork enum from @coinbase/cdp-api-client (e.g. EvmEip7702DelegationNetwork["base-sepolia"]). See supported networks. |
| enableSpendPermissions | boolean | Whether to enable spend permissions on the delegated account. Optional, defaults to false. |
| idempotencyKey | string | An idempotency key for safe retries. Optional. |
Check delegation status
Automatic polling
useCreateEvmEip7702Delegation automatically polls for completion. The hook exposes three fields:
data: Set immediately when the delegation is created:{ delegationOperationId }. Use this to show a “waiting” state while polling is in progress.status: The hook’s actual property name for the polling result. It holds the fullEvmEip7702DelegationOperationobject (with.status,.transactionHash, and.delegateAddress) once polling reaches a terminal state.error: Any error from creation or polling.
data is set and status is still null, the delegation is in flight (the operation is PENDING or SUBMITTED on the network).
Manual polling
UseuseWaitForEvmEip7702Delegation for standalone polling of a delegation operation:
One-shot status check
UseuseGetEvmEip7702DelegationOperation for a single query of the operation status (no polling):
Core SDK actions
The underlying core actions are also available from@coinbase/cdp-core for non-React contexts:
Response: EvmEip7702DelegationOperation
| Field | Type | Description |
|---|---|---|
| delegationOperationId | string | Unique identifier for the delegation operation. |
| status | string | One of: PENDING, SUBMITTED, COMPLETED, FAILED. |
| transactionHash | string | The hash of the delegation transaction. Present once submitted. |
| network | string | The network the delegation was created on. |
| delegateAddress | string | The address the account delegated to. Present when active. |
Full end-to-end example
This example shows a complete React component that delegates a user’s EOA and displays the result.Complete delegation component
Complete delegation component
React hooks reference
| Hook | Description |
|---|---|
useCreateEvmEip7702Delegation | Create a delegation and automatically poll until completion |
useWaitForEvmEip7702Delegation | Poll a delegation operation status (standalone) |
useGetEvmEip7702DelegationOperation | One-shot query of operation status |
Questions? Contact us in the #embedded-wallets channel on Discord.
Supported networks
Mainnets
Arbitrum, Base, Ethereum, Optimism, PolygonDelegation transactions are sponsored by Coinbase, so no ETH is required. Pair with the CDP Paymaster on Base, or a custom ERC-7677 paymaster on other networks, for fully gasless user operations.
Testnets
Base Sepolia, Ethereum SepoliaThe user’s EOA must hold ETH to pay for the delegation transaction. Use the CDP Faucet to fund accounts for testing.
EIP-7702 vs ERC-4337 smart accounts
| Aspect | EIP-7702 Delegation | ERC-4337 Smart Account |
|---|---|---|
| Address | Same EOA address, upgraded in place | New contract address |
| Account type | EOA with smart account capabilities | Standalone smart contract |
| Creation | Delegation operation on existing account | Separate smart account creation |
| User operations | Supported after delegation | Supported after first user operation |
| Spend permissions | Optional via enableSpendPermissions | Optional via enableSpendPermissions |
What to read next
- Smart Accounts: Learn about ERC-4337 Smart Accounts
- Spend Permissions: Configure spending limits for delegated accounts
- React Hooks: Explore all available hooks for embedded wallets