Mints ERC20 tokens to a specified address via a MintableERC20 module.
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 transactionawait sendTransaction({ transaction, account });
function mintWithRole( options: BaseTransactionOptions<TokenMintParams>,): PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>;
The options for minting tokens.
let options: BaseTransactionOptions<TokenMintParams>;
let returnType: PreparedTransaction< any, AbiFunction, PrepareTransactionOptions>;
A transaction to mint tokens.