diff --git a/src/account/PluginManager2.sol b/src/account/PluginManager2.sol index 34e1d1c7..0e860848 100644 --- a/src/account/PluginManager2.sol +++ b/src/account/PluginManager2.sol @@ -12,6 +12,7 @@ import {AccountStorage, getAccountStorage, toSetValue} from "./AccountStorage.so abstract contract PluginManager2 { using EnumerableSet for EnumerableSet.Bytes32Set; + // Index marking the start of the data for the validation function. uint8 internal constant _RESERVED_VALIDATION_DATA_INDEX = 255; error DefaultValidationAlreadySet(FunctionReference validationFunction); diff --git a/src/helpers/SparseCalldataSegmentLib.sol b/src/helpers/SparseCalldataSegmentLib.sol index e19b2244..6e3003cb 100644 --- a/src/helpers/SparseCalldataSegmentLib.sol +++ b/src/helpers/SparseCalldataSegmentLib.sol @@ -1,6 +1,10 @@ // SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.25; +/// @title Sparse Calldata Segment Library +/// @notice Library for working with sparsely-packed calldata segments, identified with an index. +/// @dev The first byte of each segment is the index of the segment. +/// To prevent accidental stack-to-deep errors, the body and index of the segment are extracted separately, rather than inline as part of the tuple returned by `getNextSegment`. library SparseCalldataSegmentLib { /// @notice Splits out a segment of calldata, sparsely-packed /// @param source The calldata to extract the segment from