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:
- Contracts: Fully implemented smart contracts you can import and use.
- 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.
You can detect all of the extensions your contract implements using the CLI:
npx thirdweb@latest detect
List of Extensions
Below is a list of all the extensions available.
|ContractMetadata||Set metadata for your smart contract. This extension is necessary for NFT contracts that want royalties to get distributed on OpenSea.|
|Multicall||Provides a function to batch together multiple calls in a single external call.|
|Ownable||Set an owner for your smart contract; restrict your smart contract's functions to only be callable by this owner.|
|Royalty||An EIP-2981: NFT Royalty Standard compliant extension. Set a royalty fee and recipient for all your NFTs, or on a per NFT basis.|
|BatchMintMetadata||Set metadata for |
|LazyMint||Lazy 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.|
|DelayedReveal||Create 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.|
|PlatformFee||Charge a percentage fee wherever there is a transfer of currency (ERC20 tokens or native tokens) in your contract.|
|PrimarySale||Set and manage a primary sale recipient for your smart contract.|
|Permissions||Assign roles to wallets; restrict your smart contract's functions based on the roles held or not held by a wallet.|
|PermissionsEnumerable||Same as Permissions but with added functionality - view all members with a given role, and total count of members.|
|DropSinglePhase||A distribution mechanic for tokens. Set conditions - such as a price, an allowlist, etc. - under which tokens can be claimed on your smart contract.|
|DropSinglePhase1155||A distribution mechanic for ERC1155 tokens. Set conditions - such as a price, an allowlist, etc. - under which tokens can be claimed on your smart contract.|
|SignatureMintERC20||A 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.|
|SignatureMintERC721||A 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.|
|SignatureMintERC1155||A 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.|