Docs

ERC1155Revealable

import "@thirdweb-dev/contracts/eip/ERC1155.sol";
import "@thirdweb-dev/contracts/extension/DelayedReveal.sol";

Create batches of 'delayed-reveal' NFTs that can be revealed at a later date after they have been minted and claimed.

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

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/DelayedReveal.sol";
contract Contract is ERC1155, LazyMint, DelayedReveal {
constructor(
string memory _name,
string memory _symbol
)
ERC1155(
_name,
_symbol
)
{}
function reveal(uint256 _index, bytes calldata _key)
external
override
returns (string memory revealedURI)
{
// Your custom implementation here
}
function _canLazyMint() internal view override returns (bool) {
// Your custom implementation here
}
}

Base Contracts Implementing This Extension