# MintTransfer method

The `mintTransfer()` is a `payable` method that allows users to buy newly minted TPAs. To use this method, you need to send `plaquePrice * _names.length` amount of `value` in Wei to this transaction as TPAs price.

```solidity
function mintTransfer(bytes32[] _names, uint32[] _amounts, string _outputData) external payable
```

#### Input & Output

* `_names`: an array of `bytes32` representing the TPA names to be minted.
* `_amounts`: an array of `uint32` representing the amount of TPAs to be minted. The length of this array should be the same as the length of the `_names` array, and all elements should be set to 1.
* `_outputData`: a string representing the output data to be sent to us. It should be a JSON-encoded object with either a "username" or a "name" property. Recording the username or TPA name in the output data and pinging someone is optional. However, it's worth noting that to ping a TPA, the TPA owner must have registered their username on the platform. Additionally, you cannot use both the "username" and "name" properties simultaneously.
* This function doesn't return anything, only a transaction hash to follow your transaction with.

#### Usage

&#x20;To use this method, you can create a new instance of the StageMeta smart-contract and call the `mintTransfer()` method, like this:

<pre class="language-typescript"><code class="lang-typescript">const options = {
  value: ethers.utils.parseEther("0.06498719370006499"), // TPAs price
  gasLimit: 500000,
};

const mintTransferResult = await stageMetaContract.mintTransfer(
  [
    ethers.utils.formatBytes32String("aaa-888"),
<strong>    ethers.utils.formatBytes32String("aaa-999")
</strong>  ],
  [1, 1],
  JSON.stringify({
    name: 'aaa-000', //or username: 'stagemeta'
  }),
  options
);
console.log("mintTransferResult:", mintTransferResult);
</code></pre>


---

# Agent Instructions: 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:

```
GET https://dev.stagemeta.world/reference/blockchain-smart-contract/minttransfer-method.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
