Create Collection

Create Collection

The launchToken function from the Launchpad SDK is used to create collection of various types of tokens (ERC-721, ERC-1155, SoulBound, Certificate) on the blockchain. It handles public and private minting conditions based on the token type.


๐Ÿ”ง Function Signature

async function launchToken(
  tokenType,
  _name,
  _symbol,
  _maxSupply,
  price,
  _tokenURI,
  chainId,
  signer,
  contractAddress,
  env
)

chevron-right๐Ÿ“„ Parametershashtag
  • tokenType (number): Specifies the type of token to deploy. Possible values:

    • TokenType.SoulBoundPrivate (0)

    • TokenType.ERC1155Public (1)

    • TokenType.ERC1155Private (2)

    • TokenType.ERC721Public (3)

    • TokenType.ERC721Private (4)

    • TokenType.Certificate (5)

  • _name (string): The name of the token/collection.

  • _symbol (string): The symbol of the token (e.g., ETH, MATIC).

  • _maxSupply (number | ethers.MaxUint256): Maximum token supply. Not needed for ERC 1155 as it will be set later for each NFTs.

  • price (number): Minting price for ERC 721 public tokens. Set to 0 for private tokens,ERC 1155(later will set for each NFTs) and certificates.

  • _tokenURI (string): URI for metadata, required only for Certificate tokens. Use an empty string for other types.

  • chainId (number): The chain ID of the network where the token is deployed.

  • signer (ethers.Signer): Ethers.js signer object for transaction signing.

  • contractAddress (string): The address of the deployed contract.

  • env (string): The environment to use (testnet or mainnet).

chevron-rightโœ… Example Usagehashtag

1. SoulBound Private Token:

2. ERC-1155 Public Token:

3. ERC-1155 Private Token:

4. ERC-721 Public Token:

5. ERC-721 Private Token:

6. Certificate Token:

Last updated