Skip to main content

Drop

Methods

claim

function claim(address _receiver, uint256 _quantity, address _currency, uint256 _pricePerToken, IDrop.AllowlistProof _allowlistProof, bytes _data) external payable

Lets an account claim tokens.

Parameters

NameTypeDescription
_receiveraddressundefined
_quantityuint256undefined
_currencyaddressundefined
_pricePerTokenuint256undefined
_allowlistProofIDrop.AllowlistProofundefined
_databytesundefined

claimCondition

function claimCondition() external view returns (uint256 currentStartId, uint256 count)

The active conditions for claiming tokens.

Returns

NameTypeDescription
currentStartIduint256undefined
countuint256undefined

getActiveClaimConditionId

function getActiveClaimConditionId() external view returns (uint256)

At any given moment, returns the uid for the active claim condition.

Returns

NameTypeDescription
_0uint256undefined

getClaimConditionById

function getClaimConditionById(uint256 _conditionId) external view returns (struct IClaimCondition.ClaimCondition condition)

Returns the claim condition at the given uid.

Parameters

NameTypeDescription
_conditionIduint256undefined

Returns

NameTypeDescription
conditionIClaimCondition.ClaimConditionundefined

getClaimTimestamp

function getClaimTimestamp(uint256 _conditionId, address _claimer) external view returns (uint256 lastClaimTimestamp, uint256 nextValidClaimTimestamp)

Returns the timestamp for when a claimer is eligible for claiming NFTs again.

Parameters

NameTypeDescription
_conditionIduint256undefined
_claimeraddressundefined

Returns

NameTypeDescription
lastClaimTimestampuint256undefined
nextValidClaimTimestampuint256undefined

setClaimConditions

function setClaimConditions(IClaimCondition.ClaimCondition[] _conditions, bool _resetClaimEligibility) external nonpayable

Lets a contract admin set claim conditions.

Parameters

NameTypeDescription
_conditionsIClaimCondition.ClaimCondition[]undefined
_resetClaimEligibilityboolundefined

verifyClaim

function verifyClaim(uint256 _conditionId, address _claimer, uint256 _quantity, address _currency, uint256 _pricePerToken, bool verifyMaxQuantityPerTransaction) external view

Checks a request to claim NFTs against the active claim condition's criteria.

Parameters

NameTypeDescription
_conditionIduint256undefined
_claimeraddressundefined
_quantityuint256undefined
_currencyaddressundefined
_pricePerTokenuint256undefined
verifyMaxQuantityPerTransactionboolundefined

verifyClaimMerkleProof

function verifyClaimMerkleProof(uint256 _conditionId, address _claimer, uint256 _quantity, IDrop.AllowlistProof _allowlistProof) external view returns (bool validMerkleProof, uint256 merkleProofIndex)

Checks whether a claimer meets the claim condition's allowlist criteria.

Parameters

NameTypeDescription
_conditionIduint256undefined
_claimeraddressundefined
_quantityuint256undefined
_allowlistProofIDrop.AllowlistProofundefined

Returns

NameTypeDescription
validMerkleProofboolundefined
merkleProofIndexuint256undefined

Events

ClaimConditionsUpdated

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

Parameters

NameTypeDescription
claimConditionsIClaimCondition.ClaimCondition[]undefined
resetEligibilityboolundefined

TokensClaimed

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

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.