Skip to content

Commit

Permalink
chore: update readme (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
ya7on authored Oct 29, 2024
1 parent 9a5bbd0 commit 1cf39e2
Showing 1 changed file with 61 additions and 16 deletions.
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>

0 comments on commit 1cf39e2

Please sign in to comment.