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 /v1/wallet/sign/eip7702 with the delegation parameters.
cURL
Request Parameters
The chain ID for the authorization.
The smart contract implementation address to delegate to.
The account nonce for the authorization.
Response Fields
Response:The
r component of the signature, returned as a decimal string.The
s component of the signature, returned as a decimal string.The
y_parity value of the signature (0 or 1).Usage with viem
The response values need to be converted from decimal strings to hex to construct aSignedAuthorization object compatible with viem:
TypeScript