diff --git a/src/SablierV2MerkleStreamerLL.sol b/src/SablierV2MerkleStreamerLL.sol index 7b811446..94700f4f 100644 --- a/src/SablierV2MerkleStreamerLL.sol +++ b/src/SablierV2MerkleStreamerLL.sol @@ -1,6 +1,7 @@ // SPDX-License-Identifier: UNLICENSED pragma solidity >=0.8.19; +import { BitMaps } from "@openzeppelin/contracts/utils/structs/BitMaps.sol"; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import { ISablierV2LockupLinear } from "@sablier/v2-core/src/interfaces/ISablierV2LockupLinear.sol"; @@ -16,6 +17,7 @@ contract SablierV2MerkleStreamerLL is ISablierV2MerkleStreamerLL, // 2 inherited components SablierV2MerkleStreamer // 4 inherited components { + using BitMaps for BitMaps.BitMap; using SafeERC20 for IERC20; /*////////////////////////////////////////////////////////////////////////// @@ -79,7 +81,7 @@ contract SablierV2MerkleStreamerLL is _checkClaim(index, leaf, merkleProof); // Effects: mark the index as claimed. - _setClaimed(index); + _claimedBitMap.set(index); // Interactions: create the stream via {SablierV2LockupLinear}. streamId = LOCKUP_LINEAR.createWithDurations( diff --git a/src/abstracts/SablierV2MerkleStreamer.sol b/src/abstracts/SablierV2MerkleStreamer.sol index 8012b3a5..637735d7 100644 --- a/src/abstracts/SablierV2MerkleStreamer.sol +++ b/src/abstracts/SablierV2MerkleStreamer.sol @@ -43,7 +43,7 @@ abstract contract SablierV2MerkleStreamer is //////////////////////////////////////////////////////////////////////////*/ /// @dev Packed booleans that record the history of claims. - BitMaps.BitMap private _claimedBitMap; + BitMaps.BitMap internal _claimedBitMap; /*////////////////////////////////////////////////////////////////////////// CONSTRUCTOR @@ -125,14 +125,4 @@ abstract contract SablierV2MerkleStreamer is revert Errors.SablierV2MerkleStreamer_InvalidProof(); } } - - /*////////////////////////////////////////////////////////////////////////// - INTERNAL NON-CONSTANT FUNCTIONS - //////////////////////////////////////////////////////////////////////////*/ - - /// @notice Marks an index as claimed in the bitmap. - /// @param index The index of the recipient to mark as claimed. - function _setClaimed(uint256 index) internal { - _claimedBitMap.set(index); - } }