batchMint
Description
Mint multiple tokens and transfer them to the specified address.
Parameters
| Name | Type | Description |
|---|---|---|
| to | string | The address to mint the tokens to. |
| quantity | number | The number of tokens to mint. |
| baseURI | string | The base URI of the token metadata. |
| overrides? | Overrides | Optional 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);