> For the complete documentation index, see [llms.txt](https://docs.kuthulu.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kuthulu.xyz/contracts/doom.md).

# DOOM

DOOM is the utility token within the KUTHULU ecosystem

### Table of Contents

1. [Events](#events)
2. [Public Functions](#public-functions)

***

## <mark style="color:purple;">Events</mark>

#### logMintTokens

This event is emitted whenever new DOOM tokens are minted.

| Input (Type)        | Description                                           |
| ------------------- | ----------------------------------------------------- |
| purchaser (address) | The address of the account that purchased the tokens. |
| amount (uint256)    | The number of tokens minted.                          |

***

### Modifiers

#### onlyAdmins

This modifier ensures that only addresses marked as admins can call certain functions in the contract. The `admins` mapping in the contract stores whether an address is an admin.

***

## <mark style="color:purple;">Public Functions</mark>

#### publicMint

The `publicMint` function is used to mint new DOOM tokens. The caller must send MATIC equivalent to the cost of the tokens they want to mint.

| Input (Type)     | Description                        |
| ---------------- | ---------------------------------- |
| amount (uint256) | The number of DOOM tokens to mint. |

| Return (Type) | Description |
| ------------- | ----------- |
| None          |             |

Example usage:

```javascript
const contract = new ethers.Contract(contractAddress, contractABI, signer);

const amount = ethers.utils.parseEther("1");

await contract.publicMint(amount);
```

Note: Remember to send MATIC along with the transaction equal to `amount * costToMint`.
