Skip to main content

Claim / Claim Conditions

Functionality available for contracts that inherit from the LazyMint extension and either the Drop extensions (for claim conditions and claiming), or the ERC721Claimable extension (for claiming only).

claim

Claim a specified number of tokens to the connected wallet.

quantity = 1

tx = contract.erc721.claim(quantity)
receipt = tx.receipt
claimed_token_id = tx.id
claimed_nft = tx.data()
Configuration

quantity (required)

The number of tokens to claim.

Must be an int.

claim_to

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

address = "0x7fDae677aA6f94Edff9872C4b91D26407709c790"
quantity = 1

tx = contract.erc721.claim_to(address, quantity)
receipt = tx.receipt
claimed_token_id = tx.id
claimed_nft = tx.data()
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.

total_claimed_supply

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

total_claimed = contract.erc721.total_claimed_supply()
print(total_claimed)
Configuration

Return Value

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

total_unclaimed_supply

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

total_unclaimed = contract.erc721.total_unclaimed_supply()
print(total_unclaimed)
Configuration

Return Value

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

get_active

Retrieve the currently active claim phase, if any.

 active_phase =  contract.erc721.claim_conditions.get_active()
Configuration

Return Value

If there is no active claim phase, returns undefined.

If a claim condition is active, returns a ClaimCondition object containing the following properties:

{
maxClaimableSupply: string
startTime: Date
price: BigNumber
currencyAddress: string
maxClaimablePerWallet: string
waitInSeconds: BigNumber
merkleRootHash: string | number[]
availableSupply: string
currentMintSupply: string
currencyMetadata: {
symbol: string
value: BigNumber
name: string
decimals: number
displayValue: string
}
metadata?: {
[x: string]: unknown
name?: string | undefined
} | undefined
snapshot?: {
price?: string | undefined
currencyAddress?: string | undefined
address: string
maxClaimable: string
}[] | null | undefined
}

get_all

Get all the claim phases configured.

 claimPhases =  contract.erc721.claimConditions.get_all()
Configuration

Return Value

Returns a list of ClaimCondition objects.

{
maxClaimableSupply: string
startTime: Date
price: BigNumber
currencyAddress: string
maxClaimablePerWallet: string
waitInSeconds: BigNumber
merkleRootHash: string | number[]
availableSupply: string
currentMintSupply: string
currencyMetadata: {
symbol: string
value: BigNumber
name: string
decimals: number
displayValue: string
}
metadata?: {
[x: string]: unknown
name?: string | undefined
} | undefined
snapshot?: {
price?: string | undefined
currencyAddress?: string | undefined
address: string
maxClaimable: string
}[] | null | undefined
}[]