Introduction
Hi, I'm cardene, a software engineer and technical writer focused on blockchain and AI.
I've also authored Japanese technical books on specification-driven development with LLMs and decentralized application (DApp) development.
I also build and publish a variety of tools, libraries, and open-source projects.
ERC-7564 proposes a mechanism for managing NFTs inside smart contract wallets, with the aim of making asset management more flexible and secure.
This article explains the following proposal, with additional context and examples.
You can find my other proposal articles here.
Overview
The proposal uses the programmable behavior of smart contract wallets to manage NFTs. It introduces wallet-level functions for approvals and transfers.
- nftApprove grants an operator permission to manage a particular NFT.
- nftSetApprovalForOneAll grants or revokes permission for an operator to manage the wallet's NFTs from a specific asset contract.
- nftSetApprovalForAllAll grants or revokes permission across the wallet's supported NFT contracts.
- nftGetApproved checks whether a specified operator is approved for a particular NFT.
- nftIsApprovedForOneAll checks whether an operator has collection-wide approval.
- nftIsApprovedForAllAll checks whether an operator has wallet-wide NFT approval.
- nftTransfer allows an authorized caller to initiate an NFT transfer through the wallet.
These operations move approval policy into the wallet. Programmable conditions and account-level permissions can provide additional flexibility compared with relying exclusively on token-contract approvals.
The intended benefits include more efficient management and customized security controls. The wallet must correctly enforce those controls, particularly when granting broad permissions to an operator.
Motivation
Unlike traditional externally owned accounts (EOAs), smart contract wallets have executable code and can maintain contract storage. This allows them to implement programmable asset-management policies.
State refers to data maintained by the contract.
Account abstraction (AA)
Account abstraction is one approach to enabling programmable account behavior. ERC-7564 can be used in an ERC-4337 account or implemented as a wallet extension or plugin.
For background on ERC-4337, see:
ERC-4337: Account abstraction without protocol changes
Objectives of the proposal
Managing NFTs at the wallet level
The proposal moves NFT authorization and management into the user's contract wallet. This can reduce dependence on persistent token-contract approvals and allow user-specific authorization policies.
For background on ERC-721, see:
Adding nftTransfer
The wallet exposes a method that invokes the underlying asset's transfer operation on behalf of an authorized caller.
This does not allow a contract to initiate a top-level blockchain transaction autonomously. An external transaction or equivalent account-abstraction execution must trigger the wallet.
Extending approvals and transfers
The six approval-related functions and nftTransfer support management at individual-token, collection-wide, and wallet-wide scopes. A wallet may combine them with its batch-execution functionality. The displayed interface itself does not define a dedicated batch-transfer function.
Custom transfer hooks
Wallet implementations can add custom checks and other logic before or after transfers to enforce their policies.
Implementing nftReceive
A wallet may implement custom NFT-receiving behavior. Where ERC-721 safe transfers are used, the recipient must still satisfy the applicable receiver requirements. The displayed ERC-7564 interface does not define nftReceive as a mandatory method.
Supported NFT standards
The proposal discusses SimpleNFT, identified as ERC-X in the original article and associated with ERC-7561, as well as existing ERC-721 assets.
The objective is to support NFT management across compatible asset contracts, rather than guarantee support for every possible NFT implementation.
The proposal aims to improve the flexibility, security, and efficiency of NFT management through programmable wallets. Its actual guarantees depend on the wallet's authorization rules and integration with the underlying asset contracts.
Specification
A conforming contract must implement ERC-165 interface detection.
For background on ERC-165, see:
ERC-165: Detecting supported contract interfaces
/// @title ERC-7564
/// @dev See https://eips.ethereum.org/EIPS/eip-7564
/// @dev Note: the ERC-165 identifier for this interface is
pragma solidity ^0.8.20;
interface IERC7564{
/**
* @notice Used to notify listeners that owner has granted approval to the user to manage one nft.
* @param _asset Address of the nft
* @param _owner Address of the account that has granted the approval for nft‘s assets
* @param _operator Address of the operator
* @param _tokenId The unique identifier of the NFT
*/
event NftApproval(
address indexed _asset,
address indexed _owner,
address indexed _operator,
uint256 _tokenId
);
/**
* @notice Used to notify listeners that owner has granted approval to the operator to manage all nft of one asset contract.
* @param _asset Address of the nft
* @param _owner Address of the account that has granted the approval for nft‘s assets
* @param _operator Address of the operator
* @param _approved approve all nft of one asset contract
*/
event NftApprovalForOneAll(
address indexed _asset,
address indexed _owner,
address indexed _operator,
bool _approved
);
/**
* @notice Used to notify listeners that owner has granted approval to the operator to manage all nft .
* @param _owner Address of the account that has granted the approval for nft‘s assets
* @param _operator Address of the operator
* @param _approved approve all nft
*/
event NftApprovalForAllAll(
address indexed _owner,
address indexed _operator,
bool _approved
);
/**
* @notice Approve nft
* @dev Allows operator address to withdraw from your wallet one nft.
* @dev Emits an {nftApproval} event.
* @param _asset Address of the nft
* @param _operator Address of the operator
* @param _tokenId The unique identifier of the NFT
*/
function nftApprove(address _asset, address _operator, uint256 _tokenId) external;
/**
* @notice Approve all nft of one asset
* @dev Allows operator address to withdraw from your wallet all nft.
* @dev Emits an {nftApprovalForOneAll} event.
* @param _asset Address of the nft
* @param _operator Address of the operator
* @param _approved Approved all nfts of one asset
*/
function nftSetApprovalForOneAll(address _asset, address _operator, bool _approved) external;
/**
* @notice Approve all nft
* @dev Allows operator address to withdraw from your wallet all nft.
* @dev Emits an {nftApprovalForAllAll} event.
* @param _operator Address of the operator
* @param _approved Approved all nfts
*/
function nftSetApprovalForAllAll(address _operator, bool _approved) external;
/**
* @notice read operator approved
* @param _asset Address of the nft
* @param _operator Address of the operator
* @param _tokenId The unique identifier of the NFT
* @return _approved Whether to approved operator one nft
*/
function nftGetApproved(address _asset, address _operator, uint256 _tokenId)
external
view
returns (bool _approved);
/**
* @notice read operator approved
* @param _asset Address of the nft
* @param _operator Address of the operator
* @return _approved Whether to approved operator all nfts of this one asset
*/
function nftIsApprovedForOneAll(address _asset, address _operator)
external
view
returns (bool _approved);
/**
* @notice read operator approved
* @param _operator Address of the operator
* @return _approved Whether to approved operator all nfts
*/
function nftIsApprovedForAllAll(address _operator)
external
view
returns (bool _approved);
/**
* @notice Transfer nft
* @dev must call nft asset transfer() inside the function
* @dev If the caller is not wallet self, must verify the approve and update
* @param _asset Address of the nft
* @param _to Address of the receive
* @param _tokenId The transaction amount
* @return _success The bool value returns whether the transfer is successful
*/
function nftTransfer(address _asset, address _to, uint256 _tokenId)
external
returns (bool _success);
}NftApproval
event NftApproval(
address indexed _asset,
address indexed _owner,
address indexed _operator,
uint256 _tokenId
);Overview
An event recording approval for an operator to manage an individual NFT.
Details
It identifies the asset contract, owner, operator, and token ID involved in the approval. The authorized operator may subsequently act through the wallet within the applicable scope.
Parameters
- _asset: Address of the NFT contract.
- _owner: Address of the account granting approval.
- _operator: Operator address.
- _tokenId: Identifier of the NFT within its asset contract.
NftApprovalForOneAll
event NftApprovalForOneAll(
address indexed _asset,
address indexed _owner,
address indexed _operator,
bool _approved
);Overview
An event recording the grant or revocation of operator approval for a specific NFT contract.
Details
The event tells listeners that an operator's collection-wide approval has changed. That scope concerns NFTs belonging to the owner's wallet, not every NFT issued by the collection.
Parameters
- _asset: Address of the NFT contract.
- _owner: Account granting or revoking approval.
- _operator: Operator address.
- _approved: Boolean indicating whether the collection-wide approval is enabled.
NftApprovalForAllAll
event NftApprovalForAllAll(
address indexed _owner,
address indexed _operator,
bool _approved
);Overview
An event recording the grant or revocation of an operator's wallet-wide NFT approval.
Details
This scope covers the wallet's supported NFT holdings across asset contracts. It does not grant authority over NFTs belonging to unrelated accounts.
Parameters
- _owner: Account granting or revoking approval.
- _operator: Operator address.
- _approved: Boolean indicating whether wallet-wide NFT approval is enabled.
nftApprove
function nftApprove(address _asset, address _operator, uint256 _tokenId) external;Overview
Approves an operator for a specific NFT.
Details
This function allows an operator to withdraw or transfer a particular NFT from the wallet under the applicable authorization rules. It emits NftApproval.
Parameters
- _asset: Address of the NFT contract.
- _operator: Operator address.
- _tokenId: Identifier of the NFT.
nftSetApprovalForOneAll
function nftSetApprovalForOneAll(address _asset, address _operator, bool _approved) external;Overview
Sets operator approval for the wallet's NFTs associated with one asset contract.
Details
The operator may manage NFTs from the specified collection held by the wallet when approval is enabled. The function emits NftApprovalForOneAll.
Parameters
- _asset: Address of the NFT contract.
- _operator: Operator address.
- _approved: Boolean enabling or disabling the approval.
nftSetApprovalForAllAll
function nftSetApprovalForAllAll(address _operator, bool _approved) external;Overview
Sets operator approval for all supported NFTs held by the wallet.
Details
This broad approval allows an operator to manage the wallet's NFT holdings across asset contracts. It emits NftApprovalForAllAll.
Parameters
- _operator: Operator address.
- _approved: Boolean enabling or disabling wallet-wide approval.
nftGetApproved
function nftGetApproved(address _asset, address _operator, uint256 _tokenId) external view returns (bool _approved);Overview
Checks whether a specified operator has approval for a particular NFT.
Details
Unlike ERC-721's getApproved, this method receives the operator address as an argument and returns a Boolean rather than an approved address.
Parameters
- _asset: Address of the NFT contract.
- _operator: Operator address being checked.
- _tokenId: NFT identifier.
Return value
- _approved: True if the specified operator is approved under this query; otherwise false.
nftIsApprovedForOneAll
function nftIsApprovedForOneAll(address _asset, address _operator) external view returns (bool _approved);Overview
Checks whether an operator has collection-wide NFT approval.
Details
It reports the operator's authorization for NFTs associated with a particular asset contract, allowing applications to inspect collection-level approval.
Parameters
- _asset: Address of the NFT contract.
- _operator: Operator address.
Return value
- _approved: Boolean indicating the collection-wide approval status.
nftIsApprovedForAllAll
function nftIsApprovedForAllAll(address _operator) external view returns (bool _approved);Overview
Checks whether an operator has wallet-wide NFT approval.
Details
The query is useful for inspecting authorization across the wallet's supported NFT contracts.
Parameter
- _operator: Operator address.
Return value
- _approved: Boolean indicating the wallet-wide approval status.
nftTransfer
function nftTransfer(address _asset, address _to, uint256 _tokenId) external returns (bool _success);Overview
Transfers an NFT through the contract wallet.
Details
The function invokes the relevant asset contract to transfer the specified NFT. If the caller is not the wallet itself, the wallet must verify and update the applicable approval state.
Parameters
- _asset: Address of the NFT contract.
- _to: Recipient address.
- _tokenId: Identifier of the NFT being transferred, not a fungible token amount.
Return value
- _success: Boolean indicating whether the transfer succeeded.
The implementation must preserve the underlying asset's transfer semantics and handle failed external calls safely.
Rationale
The main design decisions concern wallet-level approvals, the transfer process, and support for managing multiple assets efficiently.
Improved approval mechanism
Existing and proposed approaches
Under ERC-721, token owners can directly grant approvals through the NFT contract. ERC-7564 defines additional approval methods within the wallet, allowing the wallet to enforce its own policies for NFT use.
Security
Moving approval management into the wallet can reduce some risks associated with persistent token-level approvals. It does not eliminate authorization risks. Wallet-wide approvals may be more powerful than collection-specific approvals and should be granted only when necessary.
Programmability
Wallet implementations can support conditional or time-limited approvals. These are examples of custom policies rather than fields explicitly required by the displayed interface.
The nftSetApprovalForAllAll function provides a broad authorization scope across NFT contracts.
Optimized transfer process
Efficiency and security
The nftTransfer function provides a common wallet-level entry point for NFT transfers. This can simplify integrations and consolidate authorization checks. Actual security and gas costs depend on the implementation.
Flexibility
Developers can integrate hooks or other custom logic before and after transfers. These can enforce additional security checks or trigger application-specific behavior.
Managing multiple operations
Efficiency
A wallet with batch execution can combine multiple approvals or transfers into one execution flow. Collection-wide and wallet-wide approval scopes may also reduce the number of approval calls.
User experience
Common wallet-level operations can simplify the management of a portfolio containing NFTs from multiple contracts.
ERC-7564 aims to make NFT management more flexible and efficient by exposing programmable approval and transfer operations at the wallet level. Secure implementation remains necessary, especially for broad operator approvals.
Compatibility
The proposal can be used as an extension to ERC-4337. The wallet-level interface does not require changes to the ERC-4337 protocol. Developers must still integrate the functionality with their particular account implementation and asset contracts.
Citation
Xiang (@wenzhenxiang), Ben77 (@ben2077), Mingshi S. (@newnewsms), "ERC-7564: Contract wallet management NFT [DRAFT]," Ethereum Improvement Proposals, no. 7564, November 2023. [Online serial]. Available: https://eips.ethereum.org/EIPS/eip-7564.
Conclusion
ERC-7564 defines a wallet-level approach to NFT approvals and transfers. It supports individual-token, collection-wide, and wallet-wide authorization scopes and allows programmable wallets to customize asset management.
If you have questions, feel free to contact me on Twitter.
You can also find my work on the following sites.



