Skip to main content

IDrop

Methods

claim

function claim(address receiver, uint256 quantity, address currency, uint256 pricePerToken, IDrop.AllowlistProof allowlistProof, bytes data) external payable

Lets an account claim a given quantity of NFTs.

Parameters

NameTypeDescription
receiveraddressThe receiver of the NFTs to claim.
quantityuint256The quantity of NFTs to claim.
currencyaddressThe currency in which to pay for the claim.
pricePerTokenuint256The price per token to pay for the claim.
allowlistProofIDrop.AllowlistProofThe proof of the claimer's inclusion in the merkle root allowlist of the claim conditions that apply.
databytesArbitrary bytes data that can be leveraged in the implementation of this interface.

setClaimConditions

function setClaimConditions(IClaimCondition.ClaimCondition[] phases, bool resetClaimEligibility) external nonpayable

Lets a contract admin (account with DEFAULT_ADMIN_ROLE) set claim conditions.

Parameters

NameTypeDescription
phasesIClaimCondition.ClaimCondition[]Claim conditions in ascending order by startTimestamp.
resetClaimEligibilityboolWhether to reset limitLastClaimTimestamp and limitMerkleProofClaim values when setting new claim conditions.

Events

ClaimConditionsUpdated

event ClaimConditionsUpdated(IClaimCondition.ClaimCondition[] claimConditions, bool resetEligibility)

Emitted when the contract's claim conditions are updated.

Parameters

NameTypeDescription
claimConditionsIClaimCondition.ClaimCondition[]undefined
resetEligibilityboolundefined

TokensClaimed

event TokensClaimed(uint256 indexed claimConditionIndex, address indexed claimer, address indexed receiver, uint256 startTokenId, uint256 quantityClaimed)

Emitted when tokens are claimed via claim.

Parameters

NameTypeDescription
claimConditionIndex indexeduint256undefined
claimer indexedaddressundefined
receiver indexedaddressundefined
startTokenIduint256undefined
quantityClaimeduint256undefined

Errors

Drop__CannotClaimYet

error Drop__CannotClaimYet(uint256 blockTimestamp, uint256 startTimestamp, uint256 lastClaimedAt, uint256 nextValidClaimTimestamp)

Emitted when the current timestamp is invalid for claim.

Parameters

NameTypeDescription
blockTimestampuint256undefined
startTimestampuint256undefined
lastClaimedAtuint256undefined
nextValidClaimTimestampuint256undefined

Drop__ExceedMaxClaimableSupply

error Drop__ExceedMaxClaimableSupply(uint256 supplyClaimed, uint256 maxClaimableSupply)

Emitted when claiming given quantity will exceed max claimable supply.

Parameters

NameTypeDescription
supplyClaimeduint256undefined
maxClaimableSupplyuint256undefined

Drop__InvalidCurrencyOrPrice

error Drop__InvalidCurrencyOrPrice(address givenCurrency, address requiredCurrency, uint256 givenPricePerToken, uint256 requiredPricePerToken)

Emitted when given currency or price is invalid.

Parameters

NameTypeDescription
givenCurrencyaddressundefined
requiredCurrencyaddressundefined
givenPricePerTokenuint256undefined
requiredPricePerTokenuint256undefined

Drop__InvalidQuantity

error Drop__InvalidQuantity()

Emitted when claiming invalid quantity of tokens.

Drop__InvalidQuantityProof

error Drop__InvalidQuantityProof(uint256 maxQuantityInAllowlist)

Emitted when claiming more than allowed quantity in allowlist.

Parameters

NameTypeDescription
maxQuantityInAllowlistuint256undefined

Drop__MaxSupplyClaimedAlready

error Drop__MaxSupplyClaimedAlready(uint256 supplyClaimedAlready)

Emitted when max claimable supply in given condition is less than supply claimed already.

Parameters

NameTypeDescription
supplyClaimedAlreadyuint256undefined

Drop__NotAuthorized

error Drop__NotAuthorized()

Emitted when an unauthorized caller tries to set claim conditions.

Drop__NotInWhitelist

error Drop__NotInWhitelist()

Emitted when given allowlist proof is invalid.

Drop__ProofClaimed

error Drop__ProofClaimed()

Emitted when allowlist spot is already used.