File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -8,10 +8,19 @@ import { ExecutionLib } from "@erc7579/lib/ExecutionLib.sol";
88
99/**
1010 * @title ERC1155TransferEnforcer
11- * @notice This enforcer restricts the execution to the transfer of specific ERC1155 tokens.
12- * @dev This enforcer operates only in single execution call type and with default execution mode.
13- * Supports both single and batch transfers. The terms include a boolean flag indicating the transfer type.
14- * @dev The enforcer tracks spent amounts per token ID to enforce transfer limits.
11+ * @notice Enforces transfer restrictions for ERC1155 tokens within delegation contexts
12+ * @dev This enforcer:
13+ * - Operates exclusively in single execution call type with default execution mode
14+ * - Supports both single and batch transfer operations (safeTransferFrom and safeBatchTransferFrom)
15+ * - Automatically selects transfer function based on terms length
16+ * - Maintains per-token ID transfer limits through spent amount tracking
17+ * - Implements cumulative spending limits per delegation hash
18+ * - Validates that only permitted contracts and token IDs can be transferred
19+ *
20+ * Terms Encoding Format:
21+ * - Single transfer: abi.encode(address contract, uint256 tokenId, uint256 maxAmount) [96 bytes]
22+ * - Batch transfer: abi.encode(address contract, uint256[] tokenIds, uint256[] maxAmounts) [≥224 bytes]
23+ * @notice For nonfungible ERC1155 tokens, the transfer amount must be 1.
1524 */
1625contract ERC1155TransferEnforcer is CaveatEnforcer {
1726 ////////////////////////////// State //////////////////////////////
You can’t perform that action at this time.
0 commit comments