Docs

ERC1155Claimable

import "@thirdweb-dev/contracts/extension/interface/IMintableERC721.sol";

Allow other wallets to claim NFTs that you have lazy-minted.

It is recommended to use this extension alongside the LazyMint extension.


View on GitHub

Usage

This is an example smart contract demonstrating how to inherit from this extension and override the functions to add (optional) custom functionality.

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

import "@thirdweb-dev/contracts/eip/ERC1155.sol";
import "@thirdweb-dev/contracts/extension/LazyMint.sol";
import "@thirdweb-dev/contracts/extension/interface/IClaimableERC1155.sol";

contract Contract is ERC1155, LazyMint, IClaimableERC1155 {
    constructor(
        string memory _name,
        string memory _symbol
    )
        ERC1155(
            _name,
            _symbol
        )
    {}

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

    function verifyClaim(address _claimer, uint256 _quantity) public view virtual override {
        // Your custom implementation here
    }

    function claim(address _receiver, uint256 _quantity) public payable virtual override {
        // Your custom implementation here
    }

}

Base Contracts Implementing This Extension

This extension is used as part of the ERC1155ClaimCustom extension. The base contracts which have ERC1155ClaimCustom detected on them will also implement ERC1155Claimable.