Skip to content

Commit

Permalink
updated Smart Contracts section with new sidebar + structure
Browse files Browse the repository at this point in the history
  • Loading branch information
SwiftAdviser committed Sep 13, 2023
1 parent 8108542 commit 395c475
Show file tree
Hide file tree
Showing 8 changed files with 148 additions and 211 deletions.
53 changes: 10 additions & 43 deletions docs/develop/smart-contracts/README.mdx
Original file line number Diff line number Diff line change
@@ -1,36 +1,26 @@
import Button from '@site/src/components/button'

# Introduction

Smart contract creation, development, and deployment on TON Blockchain leverages the [FunC programming language](/develop/smart-contracts/#func-language) and [TON Virtual Machine (TVM)](/develop/smart-contracts/#ton-virtual-machine).
## Quick Start

Write and deploy your first smart contract with either *Blueprint* or *toncli* frameworks.
## Quick Start with Blueprint

### Blueprint
Write and deploy your first smart contract with *Blueprint* framework.

Blueprint is a development environment for writing, testing, and deploying smart contracts.
Blueprint is a development environment for writing, testing, and deploying smart contracts.
To create a new demo project use the following command:

```bash
npm create ton@latest
```
<Button href="https://www.youtube.com/watch?v=7omBDfSqGfA&list=PLtUBO1QNEKwtO_zSyLj-axPzc9O9rkmYa" colorType={'primary'} sizeType={'sm'}>Learn Through Videos</Button>

<Button href="/develop/smart-contracts/sdk/javascript"
colorType="secondary" sizeType={'sm'}>
Learn More
colorType="primary" sizeType={'sm'}>
Read More
</Button>
<Button href="https://www.youtube.com/watch?v=7omBDfSqGfA&list=PLtUBO1QNEKwtO_zSyLj-axPzc9O9rkmYa" colorType={'secondary'} sizeType={'sm'}>Video Tutorials</Button>

### toncli

Toncli — is a TON cross-platform smart contract command line interface. Install this and run test project via following command:

```bash
toncli start wallet
```
<Button href="/develop/smart-contracts/sdk/toncli"
colorType="secondary" sizeType={'sm'}>
Learn More
</Button>


## Getting Started
Expand Down Expand Up @@ -107,34 +97,11 @@ Feel free to focus on smart contracts written using _FunC_. it's often better to

Standard examples of smart contracts on TON include wallets, electors (which manage validation on TON), multi-signature wallets can be a reference when studying.

If you're familiar with smart contracts, consider discover the following list:

- [Fungible (Jettons), Non-Fungible (NFT), Semi-Fungible Tokens smart contracts](https://github.com/ton-blockchain/token-contract/tree/main)
- [Getgems NFT, sale, auctions smart contracts (FunC)](https://github.com/getgems-io/nft-contracts)
- [Wallet V4 smart contract example](https://github.com/ton-blockchain/wallet-contract)
- [Standard smart contracts examples](https://github.com/ton-blockchain/ton/tree/master/crypto/smartcont)
- [Super Simple Chatbot: doge.fc](https://github.com/LaDoger/doge.fc)

Learn more examples on the [Examples of Smart Contracts](/develop/smart-contracts/examples) page.
Learn examples on the [Examples of Smart Contracts](/develop/smart-contracts/examples) page.

Additionally, discover more [FunC libraries and SDK](/develop/smart-contracts/libraries) in the FunC section of our documentation.


## Environment

The installation process for Local Environments may require more knowledge and time, but they are better suited for everyday use and eliminate the need for internet dependency.
These include IDE plugins, various SDKs, binaries, syntax highlighting, and more. Check out [our local environment installation guide](/develop/smart-contracts/environment/installation) to learn more.

## Development Toolkit

Development toolkits play a pivotal role in the development of smart contracts on TON Blockchain. To begin developing, testing, and debugging smart contracts on TON, we’ll make use of these products and services:

### SDKs

* [Blueprint](/develop/smart-contracts/sdk/javascript) - JS SDK for development and testing Smart Contracts.
* [SDKs](/develop/dapps/apis/sdk) - The Open Network SDKs list for applications.

### Other Tools
### Tools by Community

* [disintar/toncli](/develop/smart-contracts/sdk/toncli) — The toncli is the command line interface used to build, deploy, and test FunC contracts.
* [MyLocalTON](/participate/run-nodes/local-ton) — MyLocalTON is used to run a private TON Blockchain in your local environment.
Expand Down
6 changes: 5 additions & 1 deletion docs/develop/smart-contracts/compile/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# Build and Compile
# Compile and Build smart contracts on TON

Here is a list of libraries and repos to build your smart contract.

**TLDR:**
- In most cases, it's enough to use Blueprint SDK.
- If you need more low-level approach, you can use ton-compiler or func-js.

## Blueprint

### Overview
Expand Down
18 changes: 12 additions & 6 deletions docs/develop/smart-contracts/environment/installation.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import Button from '@site/src/components/button'

# Installation

## Javascript SDK
# Precompiled binaries

You no longer need to manually install binaries.

All binaries for development and testing are provided with the packages:
:::caution important
You no longer need to manually install binaries with Blueprint SDK.
:::

* [Choose your Javascript SDK](/develop/smart-contracts/sdk/javascript)
All binaries for development and testing are provided with the Blueprint SDK.

<Button href="/develop/smart-contracts/sdk/javascript"
colorType="primary" sizeType={'sm'}>
Migrate to Blueprint SDK
</Button>

## Precompiled binaries

If you don't use Blueprint SDK for smart contracts development, you can use precompiled binaries for your operating system and tool of choice.

### Prerequisites

For the local development of TON smart contracts _without Javascript_, you need to prepare binaries of `func`, `fift`, and `lite client` on your device.
Expand Down
2 changes: 1 addition & 1 deletion docs/develop/smart-contracts/environment/testnet.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Testnet
# Understanding Testnet

Use the TON test network for development and testing purpose.

Expand Down
5 changes: 0 additions & 5 deletions docs/develop/smart-contracts/guidelines.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# Overview

:::caution advanced level
This information can be hard to understand for newcomers.
So feel free to read about it later.
:::

This page collects some recommendations and best practices that could be followed when developing new smart contracts on TON Blockchain.

* [Internal messages](/develop/smart-contracts/guidelines/internal-messages)
Expand Down
2 changes: 1 addition & 1 deletion docs/develop/smart-contracts/sdk/javascript.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@


# Using Blueprint
# Blueprint SDK

![Blueprint](\img\blueprint\logo.svg)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Writing Test Examples
# Writing Tests Examples

## Writing Tests for Func

This page demonstrates how to write test for FunC contracts created in with [Blueprint](https://github.com/ton-org/blueprint) ([Sandbox](https://github.com/ton-org/sandbox)).
This page demonstrates how to write test for FunC contracts created in with [Blueprint SDK](https://github.com/ton-org/blueprint) ([Sandbox](https://github.com/ton-org/sandbox)).
Test suites built for demo contract [fireworks](https://github.com/ton-community/fireworks-func). The fireworks is a smart contract which initially run via `set_first` message.

Once a new FunC project is created via `npm create ton@latest`, a test file `tests/contract.spec.ts` will be autogenerated in the project directory for testing the contract:
Expand Down
Loading

0 comments on commit 395c475

Please sign in to comment.