Skip to main content

mint

Description

The mint function is used to mint new ERC20 tokens and send them to a specified address.

Parameters

NameTypeDescription
tostringThe address to which the newly minted tokens will be sent.
amountnumberThe amount of tokens to mint.
overrides?OverridesOptional overrides for the contract call.

Example

import { ContractType } from "@openformat/sdk";

const contract = sdk.getContract({
contractAddress: "0x123...",
type: ContractType.Token,
});

const params = {
to: "0x123...",
amount: 1000,
};
await contract.mint(params);