Drop
Methods
claim
function claim(address _receiver, uint256 _quantity, address _currency, uint256 _pricePerToken, IDrop.AllowlistProof _allowlistProof, bytes _data) external payable
Parameters
Name | Type | Description |
---|
_receiver | address | undefined |
_quantity | uint256 | undefined |
_currency | address | undefined |
_pricePerToken | uint256 | undefined |
_allowlistProof | IDrop.AllowlistProof | undefined |
_data | bytes | undefined |
claimCondition
function claimCondition() external view returns (uint256 currentStartId, uint256 count)
The active conditions for claiming tokens.
Returns
Name | Type | Description |
---|
currentStartId | uint256 | undefined |
count | uint256 | undefined |
getActiveClaimConditionId
function getActiveClaimConditionId() external view returns (uint256)
At any given moment, returns the uid for the active claim condition.
Returns
Name | Type | Description |
---|
_0 | uint256 | undefined |
getClaimConditionById
function getClaimConditionById(uint256 _conditionId) external view returns (struct IClaimCondition.ClaimCondition condition)
Returns the claim condition at the given uid.
Parameters
Name | Type | Description |
---|
_conditionId | uint256 | undefined |
Returns
Name | Type | Description |
---|
condition | IClaimCondition.ClaimCondition | undefined |
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
Name | Type | Description |
---|
_conditionId | uint256 | undefined |
_claimer | address | undefined |
Returns
Name | Type | Description |
---|
lastClaimTimestamp | uint256 | undefined |
nextValidClaimTimestamp | uint256 | undefined |
setClaimConditions
function setClaimConditions(IClaimCondition.ClaimCondition[] _conditions, bool _resetClaimEligibility) external nonpayable
Parameters
Name | Type | Description |
---|
_conditions | IClaimCondition.ClaimCondition[] | undefined |
_resetClaimEligibility | bool | undefined |
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
Name | Type | Description |
---|
_conditionId | uint256 | undefined |
_claimer | address | undefined |
_quantity | uint256 | undefined |
_currency | address | undefined |
_pricePerToken | uint256 | undefined |
verifyMaxQuantityPerTransaction | bool | undefined |
verifyClaimMerkleProof
function verifyClaimMerkleProof(uint256 _conditionId, address _claimer, uint256 _quantity, IDrop.AllowlistProof _allowlistProof) external view returns (bool validMerkleProof, uint256 merkleProofIndex)
Parameters
Name | Type | Description |
---|
_conditionId | uint256 | undefined |
_claimer | address | undefined |
_quantity | uint256 | undefined |
_allowlistProof | IDrop.AllowlistProof | undefined |
Returns
Name | Type | Description |
---|
validMerkleProof | bool | undefined |
merkleProofIndex | uint256 | undefined |
Events
ClaimConditionsUpdated
event ClaimConditionsUpdated(IClaimCondition.ClaimCondition[] claimConditions, bool resetEligibility)
Parameters
Name | Type | Description |
---|
claimConditions | IClaimCondition.ClaimCondition[] | undefined |
resetEligibility | bool | undefined |
TokensClaimed
event TokensClaimed(uint256 indexed claimConditionIndex, address indexed claimer, address indexed receiver, uint256 startTokenId, uint256 quantityClaimed)
Parameters
Name | Type | Description |
---|
claimConditionIndex indexed | uint256 | undefined |
claimer indexed | address | undefined |
receiver indexed | address | undefined |
startTokenId | uint256 | undefined |
quantityClaimed | uint256 | undefined |
Errors
Drop__CannotClaimYet
error Drop__CannotClaimYet(uint256 blockTimestamp, uint256 startTimestamp, uint256 lastClaimedAt, uint256 nextValidClaimTimestamp)
Emitted when the current timestamp is invalid for claim.
Parameters
Name | Type | Description |
---|
blockTimestamp | uint256 | undefined |
startTimestamp | uint256 | undefined |
lastClaimedAt | uint256 | undefined |
nextValidClaimTimestamp | uint256 | undefined |
Drop__ExceedMaxClaimableSupply
error Drop__ExceedMaxClaimableSupply(uint256 supplyClaimed, uint256 maxClaimableSupply)
Emitted when claiming given quantity will exceed max claimable supply.
Parameters
Name | Type | Description |
---|
supplyClaimed | uint256 | undefined |
maxClaimableSupply | uint256 | undefined |
Drop__InvalidCurrencyOrPrice
error Drop__InvalidCurrencyOrPrice(address givenCurrency, address requiredCurrency, uint256 givenPricePerToken, uint256 requiredPricePerToken)
Emitted when given currency or price is invalid.
Parameters
Name | Type | Description |
---|
givenCurrency | address | undefined |
requiredCurrency | address | undefined |
givenPricePerToken | uint256 | undefined |
requiredPricePerToken | uint256 | undefined |
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
Name | Type | Description |
---|
maxQuantityInAllowlist | uint256 | undefined |
Drop__MaxSupplyClaimedAlready
error Drop__MaxSupplyClaimedAlready(uint256 supplyClaimedAlready)
Emitted when max claimable supply in given condition is less than supply claimed already.
Parameters
Name | Type | Description |
---|
supplyClaimedAlready | uint256 | undefined |
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.