Skip to main content

ERC721ClaimableWithConditions

Allow other wallets to claim NFTs that you have lazy-minted using (using ERC721LazyMintable) under the criteria of claim conditions by implementing ERC721A, LazyMint, and DropSinglePhase.

Base Contracts Implementing This Feature

Unlocked Features

By implementing ERC721Claimable, you unlock the following features in the SDK and dashboard:

SDK UsageDescription
Claim NFTClaim (mint) a lazy-minted NFT to a wallet address.
Claim ConditionsMints a quantity of lazy-minted NFTs from the drop to a specified wallet address.

Implementing It Yourself

This section is meant for advanced users who want to write the functionality from scratch.

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@thirdweb-dev/contracts/eip/ERC721A.sol";
import "@thirdweb-dev/contracts/extension/LazyMint.sol";
import "@thirdweb-dev/contracts/extension/DropSinglePhase.sol";

contract Contract is ERC721A, LazyMint, DropSinglePhase {
constructor(
string memory _name,
string memory _symbol
)
ERC721A(
_name,
_symbol
)
{}

function _canLazyMint() internal view override returns (bool) {
// Your custom implementation here
}

function _canSetClaimConditions() internal view override returns (bool) {
// Your custom implementation here
}

function _collectPriceOnClaim(
address _primarySaleRecipient,
uint256 _quantityToClaim,
address _currency,
uint256 _pricePerToken
) internal virtual override {
// Your custom implementation here
}

function _transferTokensOnClaim(address _to, uint256 _quantityBeingClaimed)
internal
virtual
override
returns (uint256 startTokenId)
{
// Your custom implementation here
}
}