-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: adding getting started docs and welcome blog post (#2)
- Loading branch information
Showing
8 changed files
with
140 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
title: Welcome, we are Tonion! | ||
description: The Tonion toolkit started its journey... | ||
slug: tonion | ||
authors: [kayhan, balthazar] | ||
tags: [announcement] | ||
image: https://raw.githubusercontent.com/ton-ion/tonion-contracts/main/assets/banner.png | ||
hide_table_of_contents: true | ||
--- | ||
|
||
Welcome to **Tonion** blog, we are exited to announce the starting the work of Tonion team on a new TON development toolkit. | ||
|
||
# What is Tonion? | ||
|
||
The Tonion is a toolkit for [TON](https://ton.org) development using [TACT](https://tact-lang.org) programming language. Tonion has a active development team who maintains the toolkit and supports it. We are aiming to do what [OpenZeppelin](https://www.openzeppelin.com) previously did on Ethereum using Solidity. Tonion toolkit is fully open-source and non-profit and it's basically backed by the [Dezh Technologies](https://dezh.tech). | ||
|
||
# Why Tonion? | ||
|
||
At the Dezh technologies we are working on DApps and Decentralized platforms to form the future of a real decentralized web. we find ourselves developing apps using FunC on TON and later we find a way more easy and fast path to our goals on TON called Tact, after our journey on Tact we find that there are no good toolkit and references, our more development tools, we decided to share the codes we mostly use in form of reference implementation and make them better day by day. We continued this work by adding more stuff such as development tools, and ... to our roadmap. | ||
|
||
# Future? | ||
|
||
We have plans to expand our toolkit and add more utils, we are planing to implement all possible standards, provide tools to use them easy and fast and add audit and reviews for a safe use. You can find documents in this website and later you can find full courses and step by step tutorials in this blog, so don't forget to check it later or just subscribe to our [Telegram](https://t.me/toniondev) channel right now to don'r miss anything new. Also, additionally you can join our dev chat in Telegram where our team and other people will help you with your questions. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
sidebar_position: 2 | ||
--- | ||
|
||
# Requirements | ||
|
||
Before getting started reading this document as a way to learn this toolkit, not as an reference you may need to check if you have some requirements and conditions. | ||
|
||
So, before diving deep into Ton and ION and make our hands Toniony, lets check requirements. | ||
|
||
## What you need to know! | ||
|
||
There is some specific stuff to learn, know and understand before start developing on the top of any blockchain, to start developing on TON, using Tonion you need the following list: | ||
|
||
1. Understanding blockchain and how it works in general | ||
2. The Open Network and TON blockchain and how they work | ||
3. Tact programming language basics | ||
|
||
If you you have all requirements, you can go to next part, otherwise it's recommended to use following resources and get back here once you finished them: | ||
|
||
1. https://docs.ton.org | ||
2. https://docs.tact-lang.org | ||
|
||
## A well-setup to get started! | ||
|
||
Once you had your brain ready, thats time to make your machine ready! | ||
Here is list of configs and setups you need to get started: | ||
|
||
1. Vs Code or any preferred code editor | ||
2. Tact support extensions | ||
3. Blueprint CLI | ||
4. Node.js and NPM | ||
|
||
Now, you have both your brain and machine ready, in the next part we will have a quick overview of Tonion and we will create a Jetton using it! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
--- | ||
sidebar_position: 1 | ||
--- | ||
|
||
# Quick start | ||
|
||
Here we are going to implement a simple Jetton using the Tonion toolkit to get you familiar with the Tonion quickly, in next chapters we will dive deep into details and make more complex contract and projects. | ||
|
||
## Download the Jetton trait | ||
|
||
In this quick guide we are going to use contract library of Tonion toolkit. | ||
|
||
First of all, you have to go to [Jetton](https://github.com/ton-ion/tonion-contracts/tree/main/contracts/traits/tokens/jetton) trait directory and download source code of both `JettonWallet.tact` and `JettonMaster.tact`, Alternatively you can get them using [Tonion CLI](https://github.com/ton-ion/tonion-cli). | ||
|
||
## Adding library to imports | ||
|
||
Once you had the source code of traits, you need to initialize your project using blueprint. Once you had your project ready, you can add it to `contracts/imports` directory (if you use Tonion CLI it will do it for you). | ||
|
||
## Writing our own token | ||
|
||
We are going to call our token Testetton as example, so we create these files: `contracts/TestettonMater.tact` and `contracts/TestettonWallet.tact`. then we continue them by adding the following code: | ||
|
||
contracts/TestettonMater.tact: | ||
|
||
```ts | ||
import "@stdlib/deploy"; | ||
import "../imports/JettonMaster.tact"; | ||
import "../imports/JettonWallet.tact"; | ||
|
||
contract TestettonMaster with JettonMaster, Deployable { | ||
total_supply: Int as coins; | ||
owner: Address; | ||
jetton_content: Cell; | ||
mintable: Bool; | ||
|
||
init(owner: Address, content: Cell){ | ||
self.total_supply = 1000000; | ||
self.owner = owner; | ||
self.mintable = true; | ||
self.jetton_content = content; | ||
} | ||
|
||
override inline fun calculate_jetton_wallet_init(owner_address: Address): StateInit { | ||
return initOf TestettonWallet(owner_address, myAddress()); | ||
} | ||
|
||
} | ||
``` | ||
|
||
contracts/TestettonWallet.tact: | ||
|
||
```ts | ||
import "@stdlib/deploy"; | ||
import "../imports/JettonMaster.tact"; | ||
import "../imports/JettonWallet.tact"; | ||
|
||
contract TestettonWallet with JettonWallet, Deployable { | ||
balance: Int as coins = 0; | ||
owner: Address; | ||
jetton_master: Address; | ||
|
||
init(owner: Address, jetton_master: Address) { | ||
self.owner = owner; | ||
self.jetton_master = jetton_master; | ||
} | ||
|
||
override inline fun calculate_jetton_wallet_init(owner_address: Address): StateInit { | ||
return initOf TestettonWallet(owner_address, self.jetton_master); | ||
} | ||
} | ||
``` | ||
|
||
Now, lets explain each part and how you can customize them: | ||
|
||
## Deploy our token | ||
## Compare with full implementation from scratch |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters