# Minting

Minting the token is done after all the required documents have been put together and uploaded to ArWeave. Minting is done by the backend. A mint queue is in place to ensure that all NFTs are correctly minted.

The mint function in the TimePieceNFT contract has a mechanism to avoid double mints.

```solidity
/// @param to The owner of the watch
/// @param passportName A unique name to avoid double mints.
/// @param documentId The id of the document on external storage
function mint(
    address to,
    string calldata passportName,
    string calldata documentId
) external;
```

The `passportName` parameter avoid double mints by keeping track of the claim status of that passport name. So even if the backend sends two mint transactions with the same parameters, only one will be successful. This is because on the first mint `passportName` will be claimed.<br>


---

# 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://openchrono.gitbook.io/openchrono/platform-technical-info/minting.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.
