// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.16; import "./IClaimConditionMultiPhase.sol"; /** * The interface `IDrop1155` 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 IDrop1155 is IClaimConditionMultiPhase { /// @notice Emitted when tokens are claimed. event TokensClaimed( uint256 indexed claimConditionIndex, address indexed claimer, address indexed receiver, uint256 tokenId, uint256 quantityClaimed ); /// @notice Emitted when the contract's claim conditions are updated. event ClaimConditionsUpdated(uint256 indexed tokenId, ClaimCondition[] claimConditions, bool resetEligibility); error StartTimeStampError(uint256 index, uint256 lastConditionStartTimestamp, 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 Lets an account claim a given quantity of NFTs. * * @param receiver The receiver of the NFTs to claim. * @param tokenId The tokenId of the NFT 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 tokenId, uint256 quantity, bytes32[] calldata proof) external payable; /** * @notice Lets a contract admin (account with `DEFAULT_ADMIN_ROLE`) set claim conditions. * * @param tokenId The token ID for which to set mint 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(uint256 tokenId, ClaimCondition[] calldata phases, bool resetClaimEligibility) external; }