mintTo

Mints a "supply" number of new ERC1155 tokens to the specified "to" address. If the nft parameter is a string, it will be used as the token URI. If the nft parameter is a file, it will be uploaded to the storage server and the resulting URI will be used as the token URI.

Example

import { mintTo } from "thirdweb/extensions/erc1155";
import { sendTransaction } from "thirdweb";
const transaction = mintTo({
contract,
to: "0x...",
supply: 10n,
nft: {
name: "My NFT",
description: "This is my NFT",
image: "https://example.com/image.png",
},
});
await sendTransaction({ transaction, account });
function mintTo(

Parameters

The transaction options.

Type

Returns

let returnType: PreparedTransaction<
any,
AbiFunction,
>;

A promise that resolves to the transaction result.