Skip to main content

Extensions

Extensions are individual pieces of functionality you can add to your smart contracts.

Each extension you implement in your smart contract unlocks the corresponding functionality for you to utilize in the SDK.

There are two kinds of extensions:

  1. Contracts: Fully implemented smart contracts you can import and use.
  2. Abstract contracts: Smart contracts where one or more functions is defined but not implemented. They are left for you to implement in the way that makes overall sense for your smart contract.

We provide several features for adding functionality to your ERC721, ERC1155, and ERC20, as well as general extension for common use cases.

thirdweb dashboardthirdweb dashboard

Detecting Extensions

You can detect all of the extensions your contract implements using the CLI:

npx thirdweb detect

List of Extensions

Below is a list of all the extensions available.

NameDescription
ContractMetadataSet metadata for your smart contract. This extension is necessary for NFT contracts that want royalties to get distributed on OpenSea.
MulticallProvides a function to batch together multiple calls in a single external call.
OwnableSet an owner for your smart contract; restrict your smart contract's functions to only be callable by this owner.
RoyaltyAn EIP-2981: NFT Royalty Standard compliant extension. Set a royalty fee and recipient for all your NFTs, or on a per NFT basis.
BatchMintMetadataSet metadata for n number of NFTs all at once. This is enabled by storing a single base URI for a batch of n NFTs, where the metadata for each NFT in a relevant batch is baseURI/tokenId.
LazyMintLazy mint any number of NFTs at once. Here, 'lazy mint' means defining the metadata for particular tokenIds of your NFT contract, without actually minting a non-zero balance of NFTs of those tokenIds.
DelayedRevealCreate batches of 'delayed-reveal' NFTs. Lazy mint a batch of NFTs without initially revealing the metadata of these NFTs to spectators, and reveal it later at your discretion.
PlatformFeeCharge a percentage fee wherever there is a transfer of currency (ERC20 tokens or native tokens) in your contract.
PrimarySaleSet and manage a primary sale recipient for your smart contract.
PermissionsAssign roles to wallets; restrict your smart contract's functions based on the roles held or not held by a wallet.
PermissionsEnumerableSame as Permissions but with added functionality - view all members with a given role, and total count of members.
DropSinglePhaseA distribution mechanic for tokens. Set conditions - such as a price, an allowlist, etc. - under which tokens can be claimed on your smart contract.
DropSinglePhase1155A distribution mechanic for ERC1155 tokens. Set conditions - such as a price, an allowlist, etc. - under which tokens can be claimed on your smart contract.
SignatureMintERC20A distribution mechanic for ERC20 tokens. Authorize a wallet to mint tokens on your smart contract on-demand; optionally, set a price and other configurables for the mint.
SignatureMintERC721A distribution mechanic for ERC721 tokens. Authorize a wallet to mint tokens on your smart contract on-demand; optionally, set a price and other configurables for the mint.
SignatureMintERC1155A distribution mechanic for ERC1155 tokens. Authorize a wallet to mint tokens on your smart contract on-demand; optionally, set a price and other configurables for the mint.

Resources