Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update readme #13

Merged
merged 2 commits into from
Oct 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 61 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,72 @@
# jetton
TON jetton standard implementation on tact
# TON Jetton contract on Tact

## Project structure
ℹ️ Jetton implementation for The Open Network written in Tact language. Metadata is fully decentralized, it means that full token metadata is stored on-chain.

⚠️ <b>Warning!</b> This contract is not 100% tested and I would not recommend using it in production yet.

- `contracts` - source code of all the smart contracts of the project and their dependencies.
- `wrappers` - wrapper classes (implementing `Contract` from ton-core) for the contracts, including any [de]serialization primitives and compilation functions.
- `tests` - tests for the contracts.
- `scripts` - scripts used by the project, mainly the deployment scripts.
❤️ I'll be very grateful for any kind of contribution: code, docs, issues, bug reports, github stars or whatever

## How to use
<!-- # Deploy TODO -->

### Build
# Development

`npx blueprint build` or `yarn blueprint build`
This is default Tact blueprint project with default commands:

### Test
- `npm run build` - build project and compile contracts
- `npm test` - run contracts tests
- `npx blueprint run` - execute script from `/scripts` directory

`npx blueprint test` or `yarn blueprint test`
# Docs

## Project structure

### Deploy or run another script
- `contracts` - source code of all the smart contracts
- - `jetton` - entrypoints of jetton contracts with dependencies (traits) specified
- - - `master.tact` - jetton master contract entrypoint
- - - `wallet.tact` - jetton wallet contract entrypoint
- - `teps` - traits with [TEPs](https://github.com/ton-blockchain/TEPs/) realization
- - - `tep64.tact` - trait implementation of [TEP 64](https://github.com/ton-blockchain/TEPs/blob/master/text/0064-token-data-standard.md)
- - - `tep74.tact` - trait implementation of [TEP 74](https://github.com/ton-blockchain/TEPs/blob/master/text/0074-jettons-standard.md)
- - - `tep89.tact` - trait implementation of [TEP 89](https://github.com/ton-blockchain/TEPs/blob/master/text/0089-jetton-wallet-discovery.md)
- - `consts.tact` - project constants
- - `errors.tact` - custom project error codes (exit codes)
- - `messages.tact` - contracts API messages

`npx blueprint run` or `yarn blueprint run`
## Exit codes

### Add a new contract
[Standard Tact exit codes](https://docs.tact-lang.org/book/exit-codes)

`npx blueprint create ContractName` or `yarn blueprint create ContractName`
<table>
<tr>
<th>Code</th>
<th>Description</th>
</tr>
<tr><td colspan=2>Tact lang exit codes</td></tr>
<tr>
<td>132</td>
<td>
Invalid owner of contract.</br><i>Occurs when sender wallet is not owner of receiver contract when it is required.</i>
</td>
</tr>
<tr><td colspan=2>Custom exit codes</td></tr>
<tr>
<td>6901</td>
<td>No enough TON on contract balance.</td>
</tr>
<tr>
<td>6902</td>
<td>No enoght TON in message</td>
</tr>
<tr>
<td>6903</td>
<td>
Jetton already initialized.<br/><i>Occurs when you send <code>0x133701</code> message to jetton that has been already initialized.</i>
</td>
</tr>
<tr>
<td>6904</td>
<td>
Max supply exceeded.</br><i>Occurs when you try mint more tokens than max_supply parameter allow.</i>
</td>
</tr>
</table>
Loading