Class Erc1155BatchMintable

Mint Many ERC1155 NFTs at once

Remarks

NFT batch minting functionality that handles IPFS storage for you.

Example

const contract = await sdk.getContract("{{contract_address}}");
await contract.edition.mint.batch.to(walletAddress, [nftMetadataWithSupply1, nftMetadataWithSupply2, ...]);

Hierarchy

  • Erc1155BatchMintable

Implements

  • DetectableFeature

Constructors

Properties

contractWrapper: ContractWrapper<IMintableERC1155 & IMulticall>
erc1155: Erc1155<BaseERC1155 | BaseSignatureMintERC1155>
featureName: "ERC1155BatchMintable" = FEATURE_EDITION_BATCH_MINTABLE.name
storage: ThirdwebStorage<IpfsUploadBatchOptions>
to: {
    prepare: ((...args) => Promise<Transaction<TransactionResultWithId<NFT>[]>>);
    (...args): Promise<TResult>;
} = ...

Type declaration

    • (...args): Promise<TResult>
    • Mint Many NFTs with limited supplies

      Parameters

      • Rest ...args: [to: string, metadataWithSupply: {
            metadata: Object;
            supply: Object;
        }[]]

      Returns Promise<TResult>

      Remarks

      Mint many different NFTs with limited supplies to a specified wallet.

      Example

      // Address of the wallet you want to mint the NFT to
      const toAddress = "{{wallet_address}}"

      // Custom metadata and supplies of your NFTs
      const metadataWithSupply = [{
      supply: 50, // The number of this NFT you want to mint
      metadata: {
      name: "Cool NFT #1",
      description: "This is a cool NFT",
      image: fs.readFileSync("path/to/image.png"), // This can be an image url or file
      },
      }, {
      supply: 100,
      metadata: {
      name: "Cool NFT #2",
      description: "This is a cool NFT",
      image: fs.readFileSync("path/to/image.png"), // This can be an image url or file
      },
      }];

      const tx = await contract.edition.mint.batch.to(toAddress, metadataWithSupply);
      const receipt = tx[0].receipt; // same transaction receipt for all minted NFTs
      const firstTokenId = tx[0].id; // token id of the first minted NFT
      const firstNFT = await tx[0].data(); // (optional) fetch details of the first minted NFT
  • prepare: ((...args) => Promise<Transaction<TransactionResultWithId<NFT>[]>>)

Generated using TypeDoc