Skip to main content

ERC1155Drop

The ERC1155Drop smart contract uses the ERC1155SignatureMint base contract along with the LazyMint, DelayedReveal and DropSinglePhase1155 contract extension.

The drop mechanism in the DropSinglePhase1155 extension is a distribution mechanism for lazy minted tokens. It lets you set restrictions such as a price to charge, an allowlist etc. when an address attempts to mint lazy minted tokens.

The ERC1155Drop contract lets you lazy mint tokens, and distribute those lazy minted tokens via signature minting, or via the drop mechanism.

Import

import "@thirdweb-dev/contracts/base/ERC1155Drop.sol";

Availability functionality

FunctionalityDescription
ERC1155SignatureMintSee the portal page for ERC1155SignatureMint.
LazyMintPrepare the metadata for NFTs that will be minted by an external party, without paying the gas cost for actually minting the NFTs.
DelayedRevealDistribute NFTs to your audience and reveal the metadata of the distributed NFTs, after the fact.
DropSinglePhase1155Set restrictions such as a price to charge, an allowlist etc. when an address attempts to mint lazy minted tokens.

Implementing the Contract

Import the contract extension and make your contract inherit it.

// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0;

import "@thirdweb-dev/contracts/base/ERC1155Drop.sol";

contract MyNFT is ERC1155Drop {
constructor(
string memory _name,
string memory _symbol,
address _royaltyRecipient,
uint128 _royaltyBps,
address _primarySaleRecipient
)
ERC1155Drop(
_name,
_symbol,
_royaltyRecipient,
_royaltyBps,
_primarySaleRecipient
)
{}
}

Unlocked Features

Once deployed, you'll be able to access the following contract extensions' features on the SDK and dashboard: