Skip to content

Commit e0b1da2

Browse files
committed
docs: improved natspec
1 parent d13c78b commit e0b1da2

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

src/enforcers/ERC1155TransferEnforcer.sol

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff 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
*/
1625
contract ERC1155TransferEnforcer is CaveatEnforcer {
1726
////////////////////////////// State //////////////////////////////

0 commit comments

Comments
 (0)