# Smart Contracts

## Composition

#### There are 3 Smart Contracts in the whole interaction:

{% hint style="info" %}
**Items Contract.**

This are the final NFT items a user has&#x20;

**Deployment on testnet** <https://explorer.stacks.co/txid/ST15DF8K1Z4XQ952AC2GFY106XRTNJSWE9SP6VZYA.background-item?chain=testnet>
{% endhint %}

{% hint style="info" %}
**Lootbox Contract.**

This is a contract that creates the random unique for each NFT and gives the ability directly, with only 1 function call, to the owners to redeem the equivalent item after the block with specified block height is minted.

**Deployment on testnet** <https://explorer.stacks.co/txid/ST15DF8K1Z4XQ952AC2GFY106XRTNJSWE9SP6VZYA.lootbox-background?chain=testnet>
{% endhint %}

{% hint style="info" %}
**Lootbox Manager**

Is a contract for managing who can mint and how many lootboxes.

Users should not be able to mint freely looboxes directly because that would abuse the system and would compromise the whole point of rarities.

The admin of the `lootbox-manager` facilitate the minting for selected addresses based on events he consider properly ( eg. addresses that whitelisted have 2 lootbox-mints or winner of a tournament gets 3 lootbox-mints )

**Deployment on testnet** <https://explorer.stacks.co/txid/ST15DF8K1Z4XQ952AC2GFY106XRTNJSWE9SP6VZYA.send-lootbox?chain=testnet>
{% endhint %}


---

# 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://docs.degenlab.io/gamefistacks/lootbox-on-chain-m3/smart-contracts.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.
