Skip to main content

batchMint

Description

Mint multiple tokens and transfer them to the specified address.

Parameters

NameTypeDescription
tostringThe address to mint the tokens to.
quantitynumberThe number of tokens to mint.
baseURIstringThe base URI of the token metadata.
overrides?OverridesOptional overrides for the contract call.

Throws

Throws an Error if the wallet or baseURI is invalid or if the transaction fails.

Example

import { ContractType } from "@openformat/sdk";

const contract = sdk.getContract({
contractAddress: "0x123...",
type: ContractType.NFT,
});

const params = {
to: "0x123...",
quantity: 5,
baseURI: "ipfs://",
};

const tx = await contract.batchMint(params);