token:set-approval-for-all
Approve or revoke an operator for all ERC721 or ERC1155 tokens of the connected account.
Supports runtime fields inside smart blocks. Use explicit @helper! expressions or captured outputs; other fields are evaluated at build time.
Syntax
Section titled “Syntax”token:set-approval-for-all <token> <operator> <approved>Arguments
Section titled “Arguments”| Name | Type | Evaluation | Description |
|---|---|---|---|
token | address | Runtime in smart blocks | Token address |
operator | address | Runtime in smart blocks | Operator address |
approved | bool | Runtime in smart blocks | 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.