Skip to main content

Claim / Claim Conditions

Functionality available for contracts that implement the LazyMint contract and either the Drop contract (for claim conditions and claiming), or the IClaimableERC721 contract (for claiming only).

Claim

Claim a specified number of tokens to the connected wallet.

var data = await contract.ERC721.Claim(1);
Configuration

quantity (required)

The number of tokens to claim.

Must be an int.

ClaimTo

The same as claim, but allows specifying the recipient address rather than using the connected wallet.

var data = await contract.ERC721.ClaimTo("{{wallet_address}}", 1);
Configuration

recipient (required)

The wallet address to receive the claimed tokens.

Must be a string.

quantity (required)

The number of tokens to claim.

Must be an int.

CanClaim

Check if tokens are currently available for claiming, optionally specifying if a specific wallet address can claim.

var data = await contract.ERC721.claimConditions.CanClaim(1, "{{wallet_address}}");
Configuration

quantity (required)

The amount of tokens to claim.

This checks to see if the specified amount of tokens are available for claiming. i.e.:

  • There is sufficient quantity available for claiming.
  • This amount of tokens can be claimed in a single transaction.

Must be an int.

addressToCheck (optional)

The wallet address to check if it can claim tokens.

This considers all aspects of the active claim phase, including allowlists, previous claims, etc.

Must be a string.

Return Value

Returns a bool indicating if the specified amount of tokens can be claimed or not.

bool

TotalClaimedSupply

Get the total number of tokens claimed from the drop so far.

var data = await contract.ERC721.TotalClaimedSupply();
Configuration

Return Value

Returns an int representing the total number of tokens claimed from the drop so far.

int

TotalUnclaimedSupply

Get the total number of tokens that are still available to be claimed from the drop.

var data = await contract.ERC721.TotalUnclaimedSupply();
Configuration

Return Value

Returns an int representing the total number of tokens that are still available to be claimed from the drop.

int

GetActive

Retrieve the currently active claim phase, if any.

var data = await contract.ERC721.claimConditions.GetActive();
Configuration

Return Value

If a claim condition is active, returns a ClaimConditions struct containing the following properties:

{
string availableSupply;
string currentMintSupply;
CurrencyValue currencyMetadata;
string currencyAddress;
string maxClaimableSupply;
string maxClaimablePerWallet;
string waitInSeconds;
}

GetIneligibilityReasons

Get an array of reasons why a specific wallet address is not eligible to claim tokens, if any.

var data = await contract.ERC721.claimConditions.GetIneligibilityReasons(1, "{{wallet_address}}");
Configuration

quantity (required)

The amount of tokens to check if the wallet address can claim.

Must be an int.

addressToCheck (optional)

The wallet address to check if it can claim tokens.

Must be a string.

Return Value

Returns an array of ClaimEligibility strings, which may be empty.

If the user is eligible to claim tokens, the method will return an empty array.

string[];

// Examples:
{
NotEnoughSupply = "There is not enough supply to claim.",
AddressNotAllowed = "This address is not on the allowlist.",
WaitBeforeNextClaimTransaction = "Not enough time since last claim transaction. Please wait.",
AlreadyClaimed = "You have already claimed the token.",
NotEnoughTokens = "There are not enough tokens in the wallet to pay for the claim.",
NoActiveClaimPhase = "There is no active claim phase at the moment. Please check back in later.",
NoClaimConditionSet = "There is no claim condition set.",
NoWallet = "No wallet connected.",
Unknown = "No claim conditions found.",
}

GetClaimerProofs

Returns allowlist information and merkle proofs for a given wallet address.

var data = await contract.ERC721.claimConditions.GetClaimerProofs("{{wallet_address}}");
Configuration

walletAddress (required)

The wallet address to get the merkle proofs for.

Must be a string.

Return Value

bool;