> For the complete documentation index, see [llms.txt](https://docs.non-obvious.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.non-obvious.ai/sdks-guide/blockchain-sdks/evm-chains-sdk/contracts/erc20/mint.md).

# mint

## Description

The `mint` function is an asynchronous function that mints a specified amount of ERC20 tokens to the specified receiver address and returns the transaction receipt.

## Parameters

| Parameter         | Type   | Description                                                                                                               |
| ----------------- | ------ | ------------------------------------------------------------------------------------------------------------------------- |
| `blockchain`      | string | Takes a string parameter specifying the name of the blockchain network (For eg. bsc, polygon, eth, ava, gnosis, moonbeam) |
| `contractAddress` | string | Requires a contract address of the token (ERC20) that is already deployed                                                 |
| `receiver`        | string | Expects the receiving account address for the mint of the token (ERC20)                                                   |
| `amount`          | string | Expects the receiving account address for the mint of the token (ERC20)                                                   |
| `privateKey`      | string | Expects the receiving account address for the mint of the token (ERC20)                                                   |

## Response

| Property          | Type   | Description                            |
| ----------------- | ------ | -------------------------------------- |
| `Promise<Object>` | object | Returns the transaction receipt object |

## Example Request and Response

### Prerequisites

Before making requests with NO.AI SDK, you must have it installed.

You can install NO.AI SDK using either **`npm`** or **`yarn`**. Use the following commands to install NO.AI SDK:

```
npm install @nest25/evm-chains-lib
OR
yarn add @nest25/evm-chains-lib
```

### Request

Here is an example of how to make a mint request using the NO.AI SDK:

```
// import the Nest SDK
const { ERC20 } = require('@nest25/evm-chains-lib');

// create a new instance of the ERC20 class
const erc20 = new ERC20();

// define the main function
const main = async () => {
    // call the mint function
    const receipt = await erc20.mint(
        'klay',
        '0x3c40d011838f0ecd5b601104eeb5e27172c92231',
        '0x13CC66D6611bb754647Bf2977881eA0e35A48FB4',
        '100',
        'your-private-key',
    );

    // print the receipt
    console.log({ receipt });
};
// call the main function
main();
```

### Response

```
 {
  receipt: {
    type: 2,
    chainId: 1001,
    nonce: 237,
    maxPriorityFeePerGas: BigNumber { _hex: '0x3b9aca00', _isBigNumber: true },
    maxFeePerGas: BigNumber { _hex: '0x0bdfd63e00', _isBigNumber: true },
    gasPrice: null,
    gasLimit: BigNumber { _hex: '0xa822', _isBigNumber: true },
    to: '0x3c40d011838F0EcD5B601104EEb5E27172C92231',
    value: BigNumber { _hex: '0x00', _isBigNumber: true },
    data: '0x40c10f1900000000000000000000000013cc66d6611bb754647bf2977881ea0e35a48fb40000000000000000000000000000000000000000000000000000000000000064',
    accessList: [],
    hash: '0xadbd2e3e340fa378b87b8d40225c3e9e17daf0f3bb86e2316398549504759562',
    v: 1,
    r: '0xe377d367c0f892d67884b1134ff5c35dfb9e9ecec15d2409843c560a19a9168c',
    s: '0x1477b80e71f3fda2096006fcffd0bb48c7bbe455c73ba8a9f7e8bbaca84c2478',
    from: '0xE668C72D4C67236A712Ce69A91C74358586f31ed',
    wait: [Function (anonymous)]
  }
}
```

## Use Cases

* **Bulk token distribution:** The primary use case for the **`mint`** function is to distribute multiple ERC20 tokens to a specified receiver address in bulk.
* **Automated token distribution:** The **`mint`** function can be integrated into automated workflows for token distribution, allowing developers to automatically distribute tokens as part of their continuous integration and deployment process.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.non-obvious.ai/sdks-guide/blockchain-sdks/evm-chains-sdk/contracts/erc20/mint.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
