Overview
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.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
Compatibility
- Requires a network that supports EIP-7702 (e.g., Ethereum Mainnet, Sepolia, Arbitrum, Base, Optimism)
- Signing an authorization is gasless; gas is only required when the signed authorization is included in an on-chain transaction
Sign an EIP-7702 Authorization
Send aPOST request to /v2/wallet/sign/eip7702 with the delegation parameters.
cURL
Request Parameters
Response Fields
Response:Usage with viem
The response values need to be converted from decimal strings to hex to construct aSignedAuthorization object compatible with viem:
TypeScript