Skip to main content

ERC1155 Base Contract

The ERC1155Base smart contract implements the ERC1155 NFT standard.

The ERC1155Base smart contract is usable as it is. It is sufficient for the use case of minting NFTs for yourself (or to someone else) and selling those NFTs on a marketplace.

Import

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

Available Functionality

FunctionalityDescription
ERC1155Basic implementation of the ERC1155 NFT standard.
MintableMint functionality (only callable by the owner, by default).
MulticallCapability for better developer experience for your contract; the ability to batch together multiple contract calls in a single call.
OwnableOwnership of the contract for the contract deployer, and (1) the ability to transfer this ownership, and (2) restrict functions to be callable only by the owner of the contract.
BurnableAbility for the owner of a token to transfer their NFT to a null address (cannot be recovered).
RoyaltyFull royalty support on marketplaces like OpenSea, and EIP 2981 NFT Royalty Standard compliance.
ContractMetadataSet a metadata URI on the contract, to give your collection a name, image, description and symbol.

Implementing the Contract Extension

Import the contract extension and make your contract inherit it.

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

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

contract MyNFT is ERC1155Base {

constructor(
string memory _name,
string memory _symbol,
address _royaltyRecipient,
uint128 _royaltyBps
)
ERC1155Base(
_name,
_symbol,
_royaltyRecipient,
_royaltyBps
)
{}

}

Unlocked Features

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