Docs

ERC721ClaimCustom

import "@thirdweb-dev/contracts/eip/ERC721.sol";
import "@thirdweb-dev/contracts/extension/interface/IClaimableERC721.sol";

Allow other wallets to claim/mint tokens that you have Lazy Minted by implementing ERC721 and ERC721Claimable extensions.

This is an extension which is detectable in the dashboard if the smart contract implements the ERC721 and ERC721Claimable extensions.

View on GitHub

Usage

This is an example smart contract demonstrating how to inherit from the extensions which make up the ERC721ClaimCustom detectable extension. The functions which are available to be overridden (optionally) are also detailed.

// 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/interface/IClaimableERC1155.sol";
contract Contract is ERC721A, LazyMint, IClaimableERC1155 {
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
}
function claim(address _receiver, uint256 _quantity) external payable override {
// Your custom implementation here
}
function verifyClaim(address _claimer, uint256 _quantity) external view override {
// Your custom implementation here
}
}

Base Contracts Implementing This Extension