mintWithRole

Mints ERC20 tokens to a specified address via a MintableERC20 module.

Example

import { MintableERC20 } from "thirdweb/modules";
const transaction = MintableERC20.mintWithRole({
contract,
to: "0x...", // Address to mint tokens to
quantity: 2, // Amount of tokens to mint (in decimals)
});
// 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.