Skip to main content

Contract Deployer

deploy_nft_collection

Deploy an nft collection prebuilt contract.

from thirdweb.types.settings.metadata import NFTCollectionContractMetadata

metadata = NFTCollectionContractMetadata(
name="Python NFT Collection",
primary_sale_recipient="0x...",
seller_fee_basis_points=500, # 5% royalty fee
fee_recipient="0x...",
platform_fee_basis_points=10, # 0.1% platform fee
platform_fee_recipient="0x...",
)
sdk.deployer.deploy_nft_collection(metadata)
Configuration

metadata

The contract metadata. Must be an NFTCollectionContractMetadata object:

class NFTCollectionContractMetadata(
ContractMetadataSchema,
ContractRoyaltySchema,
ContractSymbolSchema,
ContractPlatformFeeSchema,
ContractPrimarySaleSchema,
ContractTrustedForwarderSchema
):

class ContractMetadataSchema:
name: str = ""
description: Optional[str] = None
image: Optional[Union[str, TextIO, BinaryIO]] = None
external_link: Optional[str] = None

class ContractRoyaltySchema:
seller_fee_basis_points: int = 0
fee_recipient: str = ZERO_ADDRESS

class ContractPrimarySaleSchema:
primary_sale_recipient: str = ZERO_ADDRESS

class ContractPlatformFeeSchema:
platform_fee_basis_points: int = 0
platform_fee_recipient: str = ZERO_ADDRESS

class ContractSymbolSchema:
symbol: str = ""

class ContractTrustedForwarderSchema:
trusted_forwarders: List[str] = dataclasses.field(default_factory=list)

deploy_edition

Deploy an Edition contract

from thirdweb.types.settings.metadata import EditionContractMetadata

metadata = EditionContractMetadata(
name="My contract",
# ...
)
sdk.deployer.deploy_edition(metadata)
Configuration

metadata

The contract metadata. Must be an EditionContractMetadata object:

class EditionContractMetadata(
ContractMetadataSchema,
ContractRoyaltySchema,
ContractSymbolSchema,
ContractPlatformFeeSchema,
ContractPrimarySaleSchema,
ContractTrustedForwarderSchema
):

class ContractMetadataSchema:
name: str = ""
description: Optional[str] = None
image: Optional[Union[str, TextIO, BinaryIO]] = None
external_link: Optional[str] = None

class ContractRoyaltySchema:
seller_fee_basis_points: int = 0
fee_recipient: str = ZERO_ADDRESS

class ContractPrimarySaleSchema:
primary_sale_recipient: str = ZERO_ADDRESS

class ContractPlatformFeeSchema:
platform_fee_basis_points: int = 0
platform_fee_recipient: str = ZERO_ADDRESS

class ContractSymbolSchema:
symbol: str = ""

class ContractTrustedForwarderSchema:
trusted_forwarders: List[str] = dataclasses.field(default_factory=list)

deploy_token

Deploy a Token contract

from thirdweb.types.settings.metadata import TokenContractMetadata

metadata = TokenContractMetadata(
name="my contract"
# ...
)
sdk.deployer.deploy_token(metadata)
Configuration

metadata

The contract metadata. Must be a TokenContractMetadata object:

class TokenContractMetadata(
ContractMetadataSchema,
ContractSymbolSchema,
ContractPrimarySaleSchema,
ContractTrustedForwarderSchema,
ContractPlatformFeeSchema,
):

class ContractMetadataSchema:
name: str = ""
description: Optional[str] = None
image: Optional[Union[str, TextIO, BinaryIO]] = None
external_link: Optional[str] = None

class ContractPrimarySaleSchema:
primary_sale_recipient: str = ZERO_ADDRESS

class ContractPlatformFeeSchema:
platform_fee_basis_points: int = 0
platform_fee_recipient: str = ZERO_ADDRESS

class ContractSymbolSchema:
symbol: str = ""

class ContractTrustedForwarderSchema:
trusted_forwarders: List[str] = dataclasses.field(default_factory=list)

deploy_marketplace

Deploy a Marketplace contract

from thirdweb.types.settings.metadata import MarketplaceContractMetadata

metadata = MarketplaceContractMetadata(
name="my contract"
# ...
)
sdk.deployer.deploy_marketplace(metadata)
Configuration

metadata

The contract metadata. Must be a MarketplaceContractMetadata object:

class MarketplaceContractMetadata(
ContractMetadataSchema,
ContractPlatformFeeSchema,
ContractTrustedForwarderSchema
):

class ContractMetadataSchema:
name: str = ""
description: Optional[str] = None
image: Optional[Union[str, TextIO, BinaryIO]] = None
external_link: Optional[str] = None

class ContractPlatformFeeSchema:
platform_fee_basis_points: int = 0
platform_fee_recipient: str = ZERO_ADDRESS

class ContractTrustedForwarderSchema:
trusted_forwarders: List[str] = dataclasses.field(default_factory=list)

deploy_nft_drop

Deploy an NFT Drop contract

from thirdweb.types.settings.metadata import NFTDropContractMetadata

metadata = NFTDropContractMetadata(
name="my contract",
primary_sale_recipient="0x...",
seller_fee_basis_points=500, # 5% royalty fee
fee_recipient="0x...",
platform_fee_basis_points=10, # 0.1% platform fee
platform_fee_recipient="0x...",
)
sdk.deployer.deploy_nft_drop(metadata)
Configuration

metadata

The contract metadata. Must be an NFTDropContractMetadata object:

class NFTDropContractMetadata(
ContractMetadataSchema,
ContractRoyaltySchema,
ContractSymbolSchema,
ContractPlatformFeeSchema,
ContractPrimarySaleSchema,
ContractTrustedForwarderSchema,
MerkleSchema,
):

class ContractMetadataSchema:
name: str = ""
description: Optional[str] = None
image: Optional[Union[str, TextIO, BinaryIO]] = None
external_link: Optional[str] = None

class ContractRoyaltySchema:
seller_fee_basis_points: int = 0
fee_recipient: str = ZERO_ADDRESS

class ContractPrimarySaleSchema:
primary_sale_recipient: str = ZERO_ADDRESS

class ContractPlatformFeeSchema:
platform_fee_basis_points: int = 0
platform_fee_recipient: str = ZERO_ADDRESS

class ContractSymbolSchema:
symbol: str = ""

class ContractTrustedForwarderSchema:
trusted_forwarders: List[str] = dataclasses.field(default_factory=list)

class MerkleSchema:
merkle: Dict[str, str] = dataclasses.field(default_factory=lambda: {})

deploy_edition_drop

Deploy an Edition Drop contract

from thirdweb.types.settings.metadata import EditionDropContractMetadata

metadata = EditionDropContractMetadata(
name="my contract"
primary_sale_recipient="0x...",
seller_fee_basis_points=500, # 5% royalty fee
fee_recipient="0x...",
platform_fee_basis_points=10, # 0.1% platform fee
platform_fee_recipient="0x...",
)
sdk.deployer.deploy_edition_drop(metadata)
Configuration

metadata

The contract metadata. Must be an EditionDropContractMetadata object:

class EditionDropContractMetadata(
ContractMetadataSchema,
ContractRoyaltySchema,
ContractSymbolSchema,
ContractPlatformFeeSchema,
ContractPrimarySaleSchema,
ContractTrustedForwarderSchema,
MerkleSchema,
):

class ContractMetadataSchema:
name: str = ""
description: Optional[str] = None
image: Optional[Union[str, TextIO, BinaryIO]] = None
external_link: Optional[str] = None

class ContractRoyaltySchema:
seller_fee_basis_points: int = 0
fee_recipient: str = ZERO_ADDRESS

class ContractPrimarySaleSchema:
primary_sale_recipient: str = ZERO_ADDRESS

class ContractPlatformFeeSchema:
platform_fee_basis_points: int = 0
platform_fee_recipient: str = ZERO_ADDRESS

class ContractSymbolSchema:
symbol: str = ""

class ContractTrustedForwarderSchema:
trusted_forwarders: List[str] = dataclasses.field(default_factory=list)

class MerkleSchema:
merkle: Dict[str, str] = dataclasses.field(default_factory=lambda: {})

deploy_multiwrap

Deploy a Multiwrap contract

from thirdweb.types.settings.metadata import MultiwrapContractMetadata

metadata = MultiwrapContractMetadata(
name="my contract"
# ...
)
sdk.deployer.deploy_multiwrap(metadata)
Configuration

metadata

The contract metadata. Must be a MultiwrapContractMetadata object:

class MultiwrapContractMetadata(
ContractMetadataSchema,
ContractRoyaltySchema,
ContractSymbolSchema,
ContractTrustedForwarderSchema
):

class ContractMetadataSchema:
name: str = ""
description: Optional[str] = None
image: Optional[Union[str, TextIO, BinaryIO]] = None
external_link: Optional[str] = None

class ContractRoyaltySchema:
seller_fee_basis_points: int = 0
fee_recipient: str = ZERO_ADDRESS

class ContractSymbolSchema:
symbol: str = ""

class ContractTrustedForwarderSchema:
trusted_forwarders: List[str] = dataclasses.field(default_factory=list)