diff --git a/docs/develop/smart-contracts/README.mdx b/docs/develop/smart-contracts/README.mdx index 5a66f630c3..381b2da09c 100644 --- a/docs/develop/smart-contracts/README.mdx +++ b/docs/develop/smart-contracts/README.mdx @@ -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 ``` - + + -### 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 -``` - ## Getting Started @@ -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. diff --git a/docs/develop/smart-contracts/compile/README.md b/docs/develop/smart-contracts/compile/README.md index a20dc834c7..12ca4f5f98 100644 --- a/docs/develop/smart-contracts/compile/README.md +++ b/docs/develop/smart-contracts/compile/README.md @@ -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 diff --git a/docs/develop/smart-contracts/environment/installation.md b/docs/develop/smart-contracts/environment/installation.md index bce39d9887..1669ea2df1 100644 --- a/docs/develop/smart-contracts/environment/installation.md +++ b/docs/develop/smart-contracts/environment/installation.md @@ -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. + ## 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. diff --git a/docs/develop/smart-contracts/environment/testnet.md b/docs/develop/smart-contracts/environment/testnet.md index 9832131e6f..9697303746 100644 --- a/docs/develop/smart-contracts/environment/testnet.md +++ b/docs/develop/smart-contracts/environment/testnet.md @@ -1,4 +1,4 @@ -# Testnet +# Understanding Testnet Use the TON test network for development and testing purpose. diff --git a/docs/develop/smart-contracts/guidelines.md b/docs/develop/smart-contracts/guidelines.md index ceb13ecaa2..85f0d0887a 100644 --- a/docs/develop/smart-contracts/guidelines.md +++ b/docs/develop/smart-contracts/guidelines.md @@ -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) diff --git a/docs/develop/smart-contracts/sdk/javascript.md b/docs/develop/smart-contracts/sdk/javascript.md index 83de912388..4c36c06ff5 100644 --- a/docs/develop/smart-contracts/sdk/javascript.md +++ b/docs/develop/smart-contracts/sdk/javascript.md @@ -1,6 +1,6 @@ -# Using Blueprint +# Blueprint SDK ![Blueprint](\img\blueprint\logo.svg) diff --git a/docs/develop/smart-contracts/testing/writing-test-examples.mdx b/docs/develop/smart-contracts/testing/writing-test-examples.mdx index 4446cfb036..f947bd86bf 100644 --- a/docs/develop/smart-contracts/testing/writing-test-examples.mdx +++ b/docs/develop/smart-contracts/testing/writing-test-examples.mdx @@ -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: diff --git a/sidebars.js b/sidebars.js index 88e44bb943..41a3c6b9a8 100644 --- a/sidebars.js +++ b/sidebars.js @@ -108,12 +108,12 @@ const sidebars = { 'develop/overview', { type: 'doc', - label: 'Get Started with TON', + label: 'Step-by-Step TON Guide', id: 'develop/get-started-with-ton', }, { type: 'category', - label: 'TON Hello World', + label: 'TON Hello World series', items: [ { type: 'link', @@ -150,121 +150,85 @@ const sidebars = { label: 'Smart Contracts', items: [ 'develop/smart-contracts/README', + { type: 'category', - label: 'Learn', + label: 'Getting Started', items: [ - - // 'develop/smart-contracts/learn/deployment', - { - type: 'category', - label: 'Deploying Contract', - items: [ - { - type: 'link', - label: 'Using Blueprint', - href: 'https://ton-community.github.io/tutorials/02-contract/', - } - ], - }, + 'develop/smart-contracts/sdk/javascript', + 'develop/smart-contracts/environment/ide-plugins', + 'develop/smart-contracts/environment/testnet', + ], + }, + { + type: 'category', + label: 'Testing and Debugging', + items: [ + 'develop/smart-contracts/testing/overview', + 'develop/smart-contracts/testing/writing-test-examples', + ], + }, + { + type: 'category', + label: 'Development Guidelines', + items: [ + 'develop/smart-contracts/guidelines', + 'develop/smart-contracts/guidelines/get-methods', { type: 'category', - label: 'Testing & Debugging', + label: 'Message Management', items: [ - 'develop/smart-contracts/testing/overview', - 'develop/smart-contracts/testing/writing-test-examples', - 'develop/smart-contracts/testing/toncli', + 'develop/smart-contracts/messages', + 'develop/smart-contracts/guidelines/internal-messages', + 'develop/smart-contracts/guidelines/external-messages', + 'develop/smart-contracts/guidelines/non-bouncable-messages', + 'develop/smart-contracts/guidelines/message-delivery-guarantees', ], }, { type: 'category', - label: 'Tutorials & Examples', + label: 'Transaction Fees', items: [ - 'develop/smart-contracts/tutorials/multisig', - 'develop/smart-contracts/tutorials/multisig-js', - 'develop/smart-contracts/tutorials/wallet', - 'develop/smart-contracts/examples' + 'develop/smart-contracts/fees', + 'develop/howto/fees-low-level', + 'develop/smart-contracts/guidelines/accept', + 'develop/smart-contracts/guidelines/processing', ], }, - + { + type: 'category', + label: 'Security Measures', + items: [ + 'develop/smart-contracts/security/README', + 'develop/smart-contracts/security/ton-hack-challenge-1', + 'develop/smart-contracts/guidelines/random-number-generation', + 'develop/smart-contracts/security/random', + ], + }, + { + type: 'link', + label: 'How to shard your TON smart contract and why', + href: 'https://blog.ton.org/how-to-shard-your-ton-smart-contract-and-why-studying-the-anatomy-of-tons-jettons', + }, ], - }, - { - type: 'category', - label: 'Guidelines', - items: [ - 'develop/smart-contracts/guidelines', - 'develop/smart-contracts/compile/README', - { - type: 'category', - label: 'Messages', + }, + { + type: 'category', + label: 'Core Contracts', items: [ - 'develop/smart-contracts/messages', - 'develop/smart-contracts/guidelines/internal-messages', - 'develop/smart-contracts/guidelines/external-messages', - 'develop/smart-contracts/guidelines/non-bouncable-messages', - 'develop/smart-contracts/guidelines/message-delivery-guarantees', + 'develop/smart-contracts/governance', + 'develop/howto/config-params', + 'develop/research-and-development/minter-flow', ], - }, - { - type: 'category', - label: 'Fees', - items: [ - 'develop/smart-contracts/fees', - 'develop/howto/fees-low-level', - 'develop/smart-contracts/guidelines/accept', - 'develop/smart-contracts/guidelines/processing', - ], - }, - 'develop/smart-contracts/guidelines/get-methods', - { - type: 'category', - label: 'Security Rules', - items: [ - 'develop/smart-contracts/security/README', - 'develop/smart-contracts/security/ton-hack-challenge-1', - 'develop/smart-contracts/guidelines/random-number-generation', - 'develop/smart-contracts/security/random', - ], - }, - { - type: 'category', - label: 'Design and Architecture', - items: [ - { - type: 'link', - label: 'How to shard your TON smart contract and why', - href: 'https://blog.ton.org/how-to-shard-your-ton-smart-contract-and-why-studying-the-anatomy-of-tons-jettons', - }, - ], - }, - ], - }, - { - type: 'category', - label: 'Core Contracts', - items: [ - 'develop/smart-contracts/governance', - 'develop/howto/config-params', - 'develop/research-and-development/minter-flow', - ] }, { type: 'category', - label: 'Environment', + label: 'Tutorials & Examples', items: [ - 'develop/smart-contracts/environment/installation', - 'develop/smart-contracts/environment/ide-plugins', - 'develop/smart-contracts/environment/testnet', - - { - type: 'category', - label: 'Choose Your SDK', - items: [ - 'develop/smart-contracts/sdk/javascript', - 'develop/smart-contracts/sdk/toncli', - ], - }, + 'develop/smart-contracts/tutorials/multisig', + 'develop/smart-contracts/tutorials/multisig-js', + 'develop/smart-contracts/tutorials/wallet', + 'develop/smart-contracts/examples', ], }, ], @@ -288,7 +252,7 @@ const sidebars = { 'develop/dapps/telegram-apps/monetization', 'develop/dapps/telegram-apps/grants', - ] + ], }, { type: 'category', @@ -297,7 +261,7 @@ const sidebars = { 'develop/dapps/apis/README', 'develop/dapps/apis/toncenter', 'develop/dapps/apis/adnl', - 'develop/dapps/apis/sdk' + 'develop/dapps/apis/sdk', ], }, @@ -352,7 +316,7 @@ const sidebars = { }, ], }, - ] + ], }, { type: 'category', @@ -361,7 +325,7 @@ const sidebars = { 'develop/dapps/ton-connect/overview', { type: 'doc', - id: 'develop/dapps/ton-connect/wallet' + id: 'develop/dapps/ton-connect/wallet', }, { type: 'category', @@ -477,7 +441,7 @@ const sidebars = { 'develop/fift/overview', 'develop/fift/fift-and-tvm-assembly', 'develop/fift/fift-deep-dive', - ] + ], }, { @@ -509,11 +473,11 @@ const sidebars = { 'develop/data-formats/block-layout', 'develop/data-formats/transaction-layout', 'develop/data-formats/crc32', - 'develop/data-formats/tlb-ide' - ] + 'develop/data-formats/tlb-ide', + ], }, 'develop/data-formats/tl', - ] + ], }, { type: 'category', @@ -523,8 +487,8 @@ const sidebars = { 'develop/network/adnl-udp', 'develop/network/dht', 'develop/network/rldp', - 'develop/network/overlay' - ] + 'develop/network/overlay', + ], }, { type: 'category', @@ -549,6 +513,8 @@ const sidebars = { items: [ 'develop/archive/pow-givers', 'develop/archive/mining', + 'develop/smart-contracts/compile/README', + 'develop/smart-contracts/environment/installation', ], }, { @@ -561,7 +527,7 @@ const sidebars = { }, 'develop/companies/auditors', 'develop/companies/outsource', -], + ], participate: [ 'participate/README', { @@ -572,10 +538,10 @@ const sidebars = { 'type': 'html', 'value': ' Infrastructure ', }, - { - type: 'category', - label: 'Main Components', - items: [ + { + type: 'category', + label: 'Main Components', + items: [ 'participate/explorers', { type: 'category', @@ -601,37 +567,38 @@ const sidebars = { }, ], }, - ]}, + ], + }, { type: 'category', label: 'Blockchain Nodes', items: [ - { - type: 'category', - label: 'Run a Node', - items: [ - 'participate/nodes/node-types', - 'participate/run-nodes/full-node', - 'participate/run-nodes/liteserver', - 'participate/run-nodes/archive-node', - 'participate/run-nodes/local-ton', - { - type: 'link', - label: 'Become a Validator', - href: 'https://ton.org/validator', - }, - ], - }, - { - type: 'category', - label: 'Nodes Infrastructure', - items: [ - 'participate/nodes/lite-client', - 'participate/nodes/full-node', - 'participate/nodes/validator', - 'participate/nodes/node-maintenance-and-security', - ], - }, + { + type: 'category', + label: 'Run a Node', + items: [ + 'participate/nodes/node-types', + 'participate/run-nodes/full-node', + 'participate/run-nodes/liteserver', + 'participate/run-nodes/archive-node', + 'participate/run-nodes/local-ton', + { + type: 'link', + label: 'Become a Validator', + href: 'https://ton.org/validator', + }, + ], + }, + { + type: 'category', + label: 'Nodes Infrastructure', + items: [ + 'participate/nodes/lite-client', + 'participate/nodes/full-node', + 'participate/nodes/validator', + 'participate/nodes/node-maintenance-and-security', + ], + }, ], }, { @@ -688,21 +655,21 @@ const sidebars = { }, ], contribute: [ - 'contribute/README', - { - 'type': 'category', - 'label': 'Common Rules', - 'items': [ - 'contribute/contribution-rules', - 'contribute/participate', - 'contribute/maintainers', - ], - }, + 'contribute/README', + { + 'type': 'category', + 'label': 'Common Rules', + 'items': [ + 'contribute/contribution-rules', + 'contribute/participate', + 'contribute/maintainers', + ], + }, { 'type': 'category', 'label': 'Documentation', 'items': [ - 'contribute/docs/guidelines', + 'contribute/docs/guidelines', ], }, {