What is EIP-7702?
EIP-7702 is an Ethereum improvement proposal that enables EOAs to delegate their execution to a smart contract implementation. This provides:- Smart account features for EOAs: Use account abstraction without migration
- Temporary delegation: The EOA can revoke delegation at any time
- Backward compatibility: Works with existing wallets and tools
- User operations: Send transactions via ERC-4337 bundlers
- Spend permissions: Enable gasless allowance-based spending
Creating an EIP-7702 Delegation
Using the Delegated Account
Once delegation is active, convert the EOA to a delegated account:- TypeScript
- Python
Sending User Operations
Delegated accounts can send user operations like smart accounts:- TypeScript
- Python
Batch Operations
Execute multiple operations atomically:- TypeScript
- Python
Spend Permissions
WithenableSpendPermissions: true, delegated accounts support spend permissions:
- TypeScript
- Python
Checking Delegation Status
Check the current delegation status:- TypeScript
- Python
Delegation Lifecycle
- NOT_STARTED: No delegation has been created
- PENDING: Delegation transaction is submitted but not confirmed
- CURRENT: Delegation is active and the account has smart account features
- REVOKED: Delegation has been revoked (future feature)
Complete Example
- TypeScript
- Python
Supported Networks
EIP-7702 delegation is currently supported on:- Base Sepolia:
base-sepolia(testnet)
Troubleshooting
Delegation Transaction Failed
Ensure the account has sufficient ETH for gas:Delegation Status Stuck at PENDING
Wait for the transaction to be mined. You can check the transaction on a block explorer using the returnedtxHash.