token:set-approval-for-all
Approve or revoke an operator for all ERC721 or ERC1155 tokens of the connected account.
Syntax
Section titled “Syntax”token:set-approval-for-all <token> <operator> <approved>Arguments
Section titled “Arguments”| Name | Type | Description |
|---|---|---|
token |
address |
Token address |
operator |
address |
Operator address |
approved |
bool |
true to approve, false to revoke |
Examples
Section titled “Examples”load token
set $nft 0x22C1f6050E56d2876009903609a2cC3fEf83B415set $operator 0x4F2083f5fBede34C2714aFfb3105539775f7FE64
token:set-approval-for-all $nft $operator true
# Revoke the operatortoken:set-approval-for-all $nft $operator false- Applies to all current and future ERC721 / ERC1155 tokens the connected account holds in the contract.