// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.16; import "./IClaimCondition.sol"; import "@openzeppelin/contracts/utils/structs/BitMaps.sol"; import "../../lib/TWBitMaps.sol"; /** * The interface `IClaimConditionMultiPhase` is written for thirdweb's 'Drop' contracts, which are distribution mechanisms for tokens. * * An authorized wallet can set a series of claim conditions, ordered by their respective `startsAt`. * A claim condition defines criteria under which accounts can mint tokens. Claim conditions can be overwritten * or added to by the contract admin. At any moment, there is only one active claim condition. */ interface IClaimConditionMultiPhase is IClaimCondition { /** * @notice The set of all claim conditions, at any given moment. * Claim Phase ID = [currentStartId, currentStartId + length - 1]; * * @param currentStartId The uid for the first claim condition amongst the current set of * claim conditions. The uid for each next claim condition is one * more than the previous claim condition's uid. * * @param count The total number of phases / claim conditions in the list * of claim conditions. * * @param conditions The claim conditions at a given uid. Claim conditions * are ordered in an ascending order by their `startsAt`. * * @param lastClaimTimestamp Map from an account and uid for a claim condition, to the last timestamp * at which the account claimed tokens under that claim condition. * * @param usedAllowlistSpot Map from a claim condition uid to whether an address in an allowlist * has already claimed tokens i.e. used their place in the allowlist. */ struct ClaimConditionList { uint256 currentStartId; uint256 count; mapping(uint256 => ClaimCondition) conditions; mapping(uint256 => mapping(address => uint256)) lastClaimTimestamp; mapping(uint256 => TWBitMaps.BitMap) usedAllowlistSpot; } }