mintWithRole

Mints ERC1155 tokens to a specified address via a MintableERC1155 module.

Example

import { MintableERC1155 } from "thirdweb/modules";
const transaction = MintableERC1155.mintWithRole({
contract,
to: "0x...", // Address to mint tokens to
amount: 2, // Amount of tokens to mint
nft: {
name: "My NFT",
description: "This is my NFT",
image: "ipfs://...",
},
});
// Send the transaction
await sendTransaction({ transaction, account });
function mintWithRole(

Parameters

The options for minting tokens.

Type

Returns

let returnType: PreparedTransaction<
any,
AbiFunction,
>;

A transaction to mint tokens.