# Development guide

ℹ️ This document describes how to build application based on this jetton. If you are looking for guideline how to contribute to this project, please read [this](https://docs.supadupa.space/jetton/contributing) document

* [Definitions](#definitions)
* [Exit codes](#exit-codes)

## Definitions

According to [TON Jetton Standard](https://github.com/ton-blockchain/TEPs/blob/master/text/0074-jettons-standard.md) there are actually 2 smart contracts:

* **Jetton Master** contract that deploys in single copy for your jetton
* **Jetton Wallet** contract that deploys for each jetton owner

[Read more about jetton architecture on TON](https://docs.ton.org/develop/dapps/asset-processing/jettons#jetton-architecture)

## Exit codes

This project using custom exit codes for specific error. You can match received exit code with following list and get human-friednly error text.

[Standard Tact exit codes](https://docs.tact-lang.org/book/exit-codes)

| Code                 | Description                                                                                                                                    |
| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| Tact lang exit codes |                                                                                                                                                |
| 132                  | <p>Invalid owner of contract.<br><em>Occurs when sender wallet is not owner of receiver contract when it is required.</em></p>                 |
| Custom exit codes    |                                                                                                                                                |
| 6901                 | No enough TON on contract balance.                                                                                                             |
| 6902                 | No enough TON in message                                                                                                                       |
| 6903                 | <p>Jetton already initialized.<br><em>Occurs when you send <code>0x133701</code> message to jetton that has been already initialized.</em></p> |
| 6904                 | <p>Max supply exceeded.<br><em>Occurs when you try mint more tokens than max\_supply parameter allow.</em></p>                                 |
| 6905                 | <p>Invalid transfer amount.<br><em>Occurs when you try to send, burn or mint 0 tokens.</em></p>                                                |
| 6906                 | <p>Minting already disabled.<br><em>Occurs when you attempt to enable minting after it has been permanently disabled.</em></p>                 |
| 6907                 | <p>Minting is disabled.<br><em>Occurs when you try to mint tokens while the minting functionality is disabled.</em></p>                        |


---

# 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.supadupa.space/jetton/development.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.
