// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.16; import "./IClaimConditionMultiPhase.sol"; /** * The interface `IDrop` 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 IDrop is IClaimConditionMultiPhase { /// @notice Emitted when tokens are claimed via `claim`. event TokensClaimed( uint256 indexed claimConditionIndex, address indexed claimer, address indexed receiver, uint256 startTokenId, uint256 quantityClaimed ); error StartTimeStampError(uint256 index, uint256 lastConditionEndTimestamp, uint256 startsAt); error MaxSupplyClaimedAlreadyError(uint256 index, uint256 supplyClaimedAlready, uint256 maxClaimableSupply); error InvalidQuantityClaimedError( uint256 quantity, bool verifyMaxQuantityPerTransaction, uint256 quantityLimitPerTransaction ); error ExceedMaxClaimableSupplyError(uint256 quantity, uint256 supplyClaimed, uint256 maxClaimableSupply); error CannotClaimYetError(uint256 lastClaimTimestamp, uint256 blockTimestamp, uint256 nextValidClaimTimestamp); error NotInWhitelistError(); error ProofClaimedError(); error NoActiveClaimConditionError(); /// @notice Emitted when the contract's claim conditions are updated. event ClaimConditionsUpdated(ClaimCondition[] claimConditions, bool resetEligibility); /** * @notice Lets an account claim a given quantity of NFTs. * * @param receiver The receiver of the NFTs to claim. * @param quantity The quantity of NFTs to claim. * @param proof The proof of the claimer's inclusion in the merkle root allowlist * of the claim conditions that apply. */ function claim(address receiver, uint256 quantity, bytes32[] calldata proof) external payable; /** * @notice Lets a contract admin (account with `DEFAULT_ADMIN_ROLE`) set claim conditions. * * @param phases Claim conditions in ascending order by `startsAt`. * * @param resetClaimEligibility Whether to honor the restrictions applied to wallets who have claimed tokens in the current conditions, * in the new claim conditions being set. * */ function setClaimConditions(ClaimCondition[] calldata phases, bool resetClaimEligibility) external; }