ERC1155Revealable
Encrypt the metadata of your NFTs until you reveal them by implementing ERC1155, LazyMint, and DelayedReveal.
Base Contracts Implementing This Feature
Unlocked Features
By implementing ERC1155Claimable, you unlock the following features in the SDK and dashboard:
| SDK Usage | Description |
|---|---|
| Delayed Reveals | Pass in an array of NFT metadata to encrypt it and reveal it at a later time. |
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/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 _canLazyMint() internal view override returns (bool) {
// Your custom implementation here
}
function mintDelayedRevealNFT(
address to,
string memory beforeRevealURI,
bytes memory encryptedPostRevealURI
) public {
// Your custom implementation here
}
function reveal(uint256 tokenId, bytes calldata key)
external
override
returns (string memory revealedURI)
{
// Your custom implementation here
}
}
}