mint
Description
The mint function is used to mint new ERC20 tokens and send them to a specified address.
Parameters
| Name | Type | Description |
|---|---|---|
| to | string | The address to which the newly minted tokens will be sent. |
| amount | number | The amount of tokens to mint. |
| overrides? | Overrides | Optional 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);