From 98ffd5e466bdd1936cf53e997e3f5144e760d499 Mon Sep 17 00:00:00 2001 From: Aliaksandr Bahdanau Date: Fri, 18 Oct 2024 17:23:51 +0300 Subject: [PATCH] feat: implement guidelines --- cspell.json | 4 +- docs/develop/dapps/cookbook.mdx | 2 +- docs/develop/func/cookbook.md | 2 +- docs/develop/func/overview.mdx | 2 +- docs/develop/func/stdlib.mdx | 2 +- docs/develop/get-started-with-ton.mdx | 2 +- docs/develop/overview.mdx | 2 +- docs/develop/smart-contracts/README.mdx | 2 +- .../environment/installation.md | 2 +- docs/develop/smart-contracts/examples.md | 2 +- docs/develop/smart-contracts/guidelines.mdx | 2 +- .../smart-contracts/sdk/javascript.mdx | 2 +- .../smart-contracts/security/README.mdx | 2 +- .../testing/writing-test-examples.mdx | 2 +- .../asset-processing/payments-processing.md | 2 +- .../smart-contracts}/get-methods.md | 4 +- .../howto}/airdrop-claim-best-practice.mdx | 12 ++-- .../compile/compilation-instructions.md} | 16 ++--- .../howto/compile/instructions-low-memory.md} | 0 .../smart-contracts/howto}/multisig-js.md | 4 +- .../smart-contracts/howto}/multisig.md | 0 .../howto}/shard-optimization.mdx | 0 .../smart-contracts/howto}/wallet.md | 14 ++--- .../security}/random-number-generation.md | 4 +- .../smart-contracts/security/random.md | 0 .../security/secure-programming.mdx | 24 +++---- .../security/things-to-focus.md | 0 .../security/ton-hack-challenge-1.md | 0 .../running-your-own-ton-proxy.md | 16 ++--- .../web3/ton-storage/storage-daemon.md | 4 +- .../web3/ton-storage/storage-provider.md | 2 +- old-docs/lite-client.md | 2 +- redirects/redirects.json | 62 ++++++++++++++++++- sidebars/guidelines.js | 26 ++++---- 34 files changed, 142 insertions(+), 80 deletions(-) rename docs/{develop/smart-contracts/guidelines => v3/guidelines/smart-contracts}/get-methods.md (98%) rename docs/{develop/smart-contracts/tutorials => v3/guidelines/smart-contracts/howto}/airdrop-claim-best-practice.mdx (97%) rename docs/{develop/howto/compile.md => v3/guidelines/smart-contracts/howto/compile/compilation-instructions.md} (81%) rename docs/{develop/howto/compile-swap.md => v3/guidelines/smart-contracts/howto/compile/instructions-low-memory.md} (100%) rename docs/{develop/smart-contracts/tutorials => v3/guidelines/smart-contracts/howto}/multisig-js.md (97%) rename docs/{develop/smart-contracts/tutorials => v3/guidelines/smart-contracts/howto}/multisig.md (100%) rename docs/{develop/smart-contracts/tutorials => v3/guidelines/smart-contracts/howto}/shard-optimization.mdx (100%) rename docs/{develop/smart-contracts/tutorials => v3/guidelines/smart-contracts/howto}/wallet.md (99%) rename docs/{develop/smart-contracts/guidelines => v3/guidelines/smart-contracts/security}/random-number-generation.md (94%) rename docs/{develop => v3/guidelines}/smart-contracts/security/random.md (100%) rename docs/{develop => v3/guidelines}/smart-contracts/security/secure-programming.mdx (97%) rename docs/{develop => v3/guidelines}/smart-contracts/security/things-to-focus.md (100%) rename docs/{develop => v3/guidelines}/smart-contracts/security/ton-hack-challenge-1.md (100%) diff --git a/cspell.json b/cspell.json index 57143f6ce84..bb6ecca75c3 100644 --- a/cspell.json +++ b/cspell.json @@ -187,6 +187,8 @@ "keystream", "leaderboard", "leaderboards", + "libmicrohttpd", + "libatomic", "liteserver", "liteservers", "logname", @@ -270,7 +272,7 @@ "xlarge", "xtwitter", "yourname", - "zerostate", + "zerostate" ], "ignoreRegExpList": [ "\\(#.*\\)", diff --git a/docs/develop/dapps/cookbook.mdx b/docs/develop/dapps/cookbook.mdx index 19a0fb7b61a..5b6ead4ba30 100644 --- a/docs/develop/dapps/cookbook.mdx +++ b/docs/develop/dapps/cookbook.mdx @@ -308,7 +308,7 @@ Most SDKs provide the following process for sending messages from your wallet: - You create wallet wrapper (object in your program) of a correct version (in most cases, v3r2; see also [wallet versions](/participate/wallets/contracts)), using secret key and workchain (usually 0, which stands for [basechain](/v3/concepts/dive-into-ton/ton-blockchain/blockchain-of-blockchains#workchain-blockchain-with-your-own-rules)). - You also create blockchain wrapper, or "client" - object that will route requests to API or liteservers, whichever you choose. - Then, you *open* contract in the blockchain wrapper. This means contract object is no longer abstract and represents actual account in either TON mainnet or testnet. -- After that, you can form messages you want and send them. You can also send up to 4 messages per request, as described in an [advanced manual](/develop/smart-contracts/tutorials/wallet#sending-multiple-messages-simultaneously). +- After that, you can form messages you want and send them. You can also send up to 4 messages per request, as described in an [advanced manual](/v3/guidelines/smart-contracts/howto/wallet#sending-multiple-messages-simultaneously). diff --git a/docs/develop/func/cookbook.md b/docs/develop/func/cookbook.md index 76e1d89e130..f419f222618 100644 --- a/docs/develop/func/cookbook.md +++ b/docs/develop/func/cookbook.md @@ -735,7 +735,7 @@ if (current_time > 1672080143) { :::caution draft Please note that this method of generating random numbers isn't safe. -Checkout [Random Number Generation](https://docs.ton.org/develop/smart-contracts/guidelines/random-number-generation) for more information. +Checkout [Random Number Generation](https://docs.ton.org/v3/guidelines/smart-contracts/security/random-number-generation) for more information. ::: ```func diff --git a/docs/develop/func/overview.mdx b/docs/develop/func/overview.mdx index a9d3626a7b7..bfcf1723668 100644 --- a/docs/develop/func/overview.mdx +++ b/docs/develop/func/overview.mdx @@ -55,7 +55,7 @@ If you want to use native TON compiler FunC locally you need binaries setup on y :::info At the same time you can always make binaries from sources like: -[FunC compiler source code](https://github.com/ton-blockchain/ton/tree/master/crypto/func) (read [how to compile](/develop/howto/compile#func) a FunC compiler from sources). +[FunC compiler source code](https://github.com/ton-blockchain/ton/tree/master/crypto/func) (read [how to compile](/v3/guidelines/smart-contracts/howto/compile/compilation-instructions#func) a FunC compiler from sources). ::: ## TON Course: FunC diff --git a/docs/develop/func/stdlib.mdx b/docs/develop/func/stdlib.mdx index 753fe1f325c..e347566c46b 100644 --- a/docs/develop/func/stdlib.mdx +++ b/docs/develop/func/stdlib.mdx @@ -530,7 +530,7 @@ The pseudo-random number generator uses the random seed, an unsigned 256-bit Int :::caution Keep in mind that random numbers generated by the functions below can be predicted if you do not use additional tricks. -- [Random number generation](/develop/smart-contracts/guidelines/random-number-generation) +- [Random number generation](/v3/guidelines/smart-contracts/security/random-number-generation) ::: diff --git a/docs/develop/get-started-with-ton.mdx b/docs/develop/get-started-with-ton.mdx index 8244d08ebbc..e04263d1231 100644 --- a/docs/develop/get-started-with-ton.mdx +++ b/docs/develop/get-started-with-ton.mdx @@ -726,7 +726,7 @@ After finishing the TON Onboarding Challenge where we successfully mined an NFT, * [TON Hello World: Step-by-step guide for writing your first smart contract](https://ton-community.github.io/tutorials/02-contract/) * [Develop Smart Contracts: Introduction](/develop/smart-contracts/) * [[YouTube] Ton Dev Study - FunC & Blueprint](https://www.youtube.com/playlist?list=PLyDBPwv9EPsDjIMAF3XqNI2XGNwdcB3sg) -* [How to work with wallet smart contracts](/develop/smart-contracts/tutorials/wallet) +* [How to work with wallet smart contracts](/v3/guidelines/smart-contracts/howto/wallet) * [FunC Journey: Part 1](https://blog.ton.org/func-journey) * [Bot for sales of dumplings](/v3/guidelines/dapps/tutorials/telegram-bot-examples/accept-payments-in-a-telegram-bot-js) * [Mint Your first Jetton](/v3/guidelines/dapps/tutorials/mint-your-first-token) diff --git a/docs/develop/overview.mdx b/docs/develop/overview.mdx index e851ea9d071..46c72efa502 100644 --- a/docs/develop/overview.mdx +++ b/docs/develop/overview.mdx @@ -143,7 +143,7 @@ Use Blueprint The following resources provide valuable information for TON smart contract development: * [TON Hello World: Step-by-step guide for writing your first smart contract](https://ton-community.github.io/tutorials/02-contract/) - An accessible and concise explanation of the fundamentals with JS. -* [How to work with wallet smart contracts](/develop/smart-contracts/tutorials/wallet) - Detailed and careful explanations of smart contract basics with the use of JS and GO. +* [How to work with wallet smart contracts](/v3/guidelines/smart-contracts/howto/wallet) - Detailed and careful explanations of smart contract basics with the use of JS and GO. * [Learn Smart Contracts by examples](/develop/smart-contracts/examples) (FunC, Fift) * [Speed Run TON](/develop/smart-contracts/examples) - 6 interactive challenges and step-by-step tutorials to learn smart contracts development. diff --git a/docs/develop/smart-contracts/README.mdx b/docs/develop/smart-contracts/README.mdx index bcb89d465bd..a73fbebdc90 100644 --- a/docs/develop/smart-contracts/README.mdx +++ b/docs/develop/smart-contracts/README.mdx @@ -91,7 +91,7 @@ RU For those who prefer detail and nuance, visit: -* [How to work with wallet smart contracts](/develop/smart-contracts/tutorials/wallet) +* [How to work with wallet smart contracts](/v3/guidelines/smart-contracts/howto/wallet) diff --git a/docs/develop/smart-contracts/environment/installation.md b/docs/develop/smart-contracts/environment/installation.md index a860b11ea5e..cdfc2206494 100644 --- a/docs/develop/smart-contracts/environment/installation.md +++ b/docs/develop/smart-contracts/environment/installation.md @@ -135,7 +135,7 @@ Remember to set the [environment variable](https://stackoverflow.com/questions/1 ## Build from source -If you don't want to rely on pre-compiled binaries and prefer to compile the binaries yourself, you can follow the [official instructions](/develop/howto/compile). +If you don't want to rely on pre-compiled binaries and prefer to compile the binaries yourself, you can follow the [official instructions](/v3/guidelines/smart-contracts/howto/compile/compilation-instructions). The ready-to-use gist instructions are provided below: diff --git a/docs/develop/smart-contracts/examples.md b/docs/develop/smart-contracts/examples.md index 54b0ebcf3e2..ce43ec214de 100644 --- a/docs/develop/smart-contracts/examples.md +++ b/docs/develop/smart-contracts/examples.md @@ -156,6 +156,6 @@ If you want to share a new example smart contract, make your PR for this [page]( ## See Also * [Develop Smart Contracts Introduction](/develop/smart-contracts/) -* [How to work with wallet smart contracts](/develop/smart-contracts/tutorials/wallet) +* [How to work with wallet smart contracts](/v3/guidelines/smart-contracts/howto/wallet) * [[You Tube] Ton Dev Study FunC & BluePrint lessons](https://www.youtube.com/watch?v=7omBDfSqGfA&list=PLtUBO1QNEKwtO_zSyLj-axPzc9O9rkmYa) diff --git a/docs/develop/smart-contracts/guidelines.mdx b/docs/develop/smart-contracts/guidelines.mdx index e7b80438c40..ce94eff099e 100644 --- a/docs/develop/smart-contracts/guidelines.mdx +++ b/docs/develop/smart-contracts/guidelines.mdx @@ -7,7 +7,7 @@ This page collects some recommendations and best practices that could be followe * [Internal messages](/develop/smart-contracts/guidelines/internal-messages) * [External messages](/develop/smart-contracts/guidelines/external-messages) * [Using non-bounceable messages](/develop/smart-contracts/guidelines/non-bouncable-messages) -* [Get-methods](/develop/smart-contracts/guidelines/get-methods) +* [Get-methods](/v3/guidelines/smart-contracts/get-methods) * ["accept_message" effects](/develop/smart-contracts/guidelines/accept) * [Paying for processing queries and sending responses](/develop/smart-contracts/guidelines/processing) * [How and why to shard your TON smart contract. Studying the anatomy of TON's Jettons](https://blog.ton.org/how-to-shard-your-ton-smart-contract-and-why-studying-the-anatomy-of-tons-jettons) diff --git a/docs/develop/smart-contracts/sdk/javascript.mdx b/docs/develop/smart-contracts/sdk/javascript.mdx index ac31b45d461..82d6e2e22f7 100644 --- a/docs/develop/smart-contracts/sdk/javascript.mdx +++ b/docs/develop/smart-contracts/sdk/javascript.mdx @@ -56,7 +56,7 @@ Watch Video Tutorials ## See Also * [Develop Smart Contract Introduction](/develop/smart-contracts/) -* [How to work with wallet smart contracts](/develop/smart-contracts/tutorials/wallet) +* [How to work with wallet smart contracts](/v3/guidelines/smart-contracts/howto/wallet) * [Using toncli](/develop/smart-contracts/sdk/toncli) * [SDKs](/develop/dapps/apis/sdk) diff --git a/docs/develop/smart-contracts/security/README.mdx b/docs/develop/smart-contracts/security/README.mdx index 89cdce7f94f..04d1a9111e9 100644 --- a/docs/develop/smart-contracts/security/README.mdx +++ b/docs/develop/smart-contracts/security/README.mdx @@ -11,7 +11,7 @@ This article needs an update. Please, help us to improve it. If you are creating a smart contract, then here you can see some examples of what errors can lead you to losing funds: - [TON Hack Challenge #1](https://github.com/ton-blockchain/hack-challenge-1) - - [Drawing conclusions from TON Hack Challenge](/develop/smart-contracts/security/ton-hack-challenge-1) + - [Drawing conclusions from TON Hack Challenge](/v3/guidelines/smart-contracts/security/ton-hack-challenge-1) ## TON Course: Security diff --git a/docs/develop/smart-contracts/testing/writing-test-examples.mdx b/docs/develop/smart-contracts/testing/writing-test-examples.mdx index 4ef1c67841e..d024efd0eca 100644 --- a/docs/develop/smart-contracts/testing/writing-test-examples.mdx +++ b/docs/develop/smart-contracts/testing/writing-test-examples.mdx @@ -554,7 +554,7 @@ This exit code is responsible for most of the errors when working with actions: ### Action Phase | exit code = 35 -During the building of the [CommonMsgInfo](/develop/smart-contracts/tutorials/wallet#commonmsginfo) part of the message, you must specify the correct source address. It must be equal to either [addr_none](/develop/data-formats/msg-tlb#addr_none00) or the address of the account that sends the message. +During the building of the [CommonMsgInfo](/v3/guidelines/smart-contracts/howto/wallet#commonmsginfo) part of the message, you must specify the correct source address. It must be equal to either [addr_none](/develop/data-formats/msg-tlb#addr_none00) or the address of the account that sends the message. In the blockchain code, this is handled by the [check_replace_src_addr](https://github.com/ton-blockchain/ton/blob/9728bc65b75defe4f9dcaaea0f62a22f198abe96/crypto/block/transaction.cpp#L1985). diff --git a/docs/v3/guidelines/dapps/asset-processing/payments-processing.md b/docs/v3/guidelines/dapps/asset-processing/payments-processing.md index 4ebab50719d..0e6c8319338 100644 --- a/docs/v3/guidelines/dapps/asset-processing/payments-processing.md +++ b/docs/v3/guidelines/dapps/asset-processing/payments-processing.md @@ -35,7 +35,7 @@ To deploy a wallet via TonLib one needs to: 6. Check the contract in a few seconds with [getAccountState](https://github.com/ton-blockchain/ton/blob/master/tl/generate/scheme/tonlib_api.tl#L288) method. :::tip -Read more in the [Wallet Tutorial](/develop/smart-contracts/tutorials/wallet#-deploying-a-wallet) +Read more in the [Wallet Tutorial](/v3/guidelines/smart-contracts/howto/wallet#-deploying-a-wallet) ::: ### Check the validity of wallet address diff --git a/docs/develop/smart-contracts/guidelines/get-methods.md b/docs/v3/guidelines/smart-contracts/get-methods.md similarity index 98% rename from docs/develop/smart-contracts/guidelines/get-methods.md rename to docs/v3/guidelines/smart-contracts/get-methods.md index ec99d771df7..99a8ff685b6 100644 --- a/docs/develop/smart-contracts/guidelines/get-methods.md +++ b/docs/v3/guidelines/smart-contracts/get-methods.md @@ -70,7 +70,7 @@ int seqno() method_id { } ``` -Returns the sequence number of the transaction within a specific wallet. This method is primarily used for [replay protection](/develop/smart-contracts/tutorials/wallet#replay-protection---seqno). +Returns the sequence number of the transaction within a specific wallet. This method is primarily used for [replay protection](/v3/guidelines/smart-contracts/howto/wallet#replay-protection---seqno). #### get_subwallet_id() @@ -80,7 +80,7 @@ int get_subwallet_id() method_id { } ``` -- [What is Subwallet ID?](/develop/smart-contracts/tutorials/wallet#what-is-subwallet-id) +- [What is Subwallet ID?](/v3/guidelines/smart-contracts/howto/wallet#what-is-subwallet-id) #### get_public_key() diff --git a/docs/develop/smart-contracts/tutorials/airdrop-claim-best-practice.mdx b/docs/v3/guidelines/smart-contracts/howto/airdrop-claim-best-practice.mdx similarity index 97% rename from docs/develop/smart-contracts/tutorials/airdrop-claim-best-practice.mdx rename to docs/v3/guidelines/smart-contracts/howto/airdrop-claim-best-practice.mdx index 904de99866b..39c66e249dd 100644 --- a/docs/develop/smart-contracts/tutorials/airdrop-claim-best-practice.mdx +++ b/docs/v3/guidelines/smart-contracts/howto/airdrop-claim-best-practice.mdx @@ -41,7 +41,7 @@ Any kind of wallet contract ### V1 -First desing that comes to mind is something like this: +First design that comes to mind is something like this: - User sends proof to the distributor - Distributor checks proof and deploys `double spend` contract - Distributor passes message to the double spend. @@ -56,12 +56,12 @@ Looks like a loop is redundant here. ### V2 -Linear desing is much better: +Linear design is much better: - User deploys the `double spend` and it proxies proof to the distributor - Distributor checks the sending `double spend` address by state init `(distributor_address, user_address?)` - Distributor checks proof, in this case user index should be part of the proof and releases jettons. - Distributor sends fee to the fee wallet -**MOAR NAIVE ART** +**MORE NAIVE ART** ## Shard optimizations @@ -154,7 +154,7 @@ Should be good to go now! - Distributor sends fee to the fee wallet - Distributor checks proof, in this case user index should be part of the proof and releases jettons via jetton wallet in same shard. -**MOAR NAIVE ART** +**MORE NAIVE ART** Is there anything wrong with that? Let's take a good look. .... Damn right! There is only one fee wallet, and fees are queueing up to a single shard. That could have been a disaster! (Wondering if it ever happened for real?). @@ -163,7 +163,7 @@ Damn right! There is only one fee wallet, and fees are queueing up to a single s - Same as V3 but 16 wallets now, each in same shard as it's *distributor*. - Going to have to make *fee wallet* address updatable -**Bit moar art** +**Bit more art** How about now? LGTM. @@ -172,4 +172,4 @@ We always can go even further. Take a look at a custom [jetton wallet](https://github.com/ton-community/mintless-jetton/blob/main/contracts/jetton-utils.fc#L142) which has a built-in shard optimization. As a result user's jetton wallet ends up in the same shard as a user with 87% probability. But that's a fairly uncharted territory yet, so you're on your own. -Good luck with TGE! \ No newline at end of file +Good luck with TGE! diff --git a/docs/develop/howto/compile.md b/docs/v3/guidelines/smart-contracts/howto/compile/compilation-instructions.md similarity index 81% rename from docs/develop/howto/compile.md rename to docs/v3/guidelines/smart-contracts/howto/compile/compilation-instructions.md index df0f7f50c34..a05759fc490 100644 --- a/docs/develop/howto/compile.md +++ b/docs/v3/guidelines/smart-contracts/howto/compile/compilation-instructions.md @@ -107,7 +107,7 @@ cmake -GNinja -DCMAKE_BUILD_TYPE=Release .. \ ::: :::tip -If you are compiling on a computer with low memory (e.g., 1 Gb), don't forget to [create a swap partitions](/develop/howto/compile-swap). +If you are compiling on a computer with low memory (e.g., 1 Gb), don't forget to [create a swap partitions](/v3/guidelines/smart-contracts/howto/compile/instructions-low-memory). ::: ## Download Global Config @@ -128,7 +128,7 @@ wget https://ton-blockchain.github.io/testnet-global.config.json ## Lite Client -To build a lite client, do [common part](/develop/howto/compile#common), [download the config](/develop/howto/compile#download-global-config), and then do: +To build a lite client, do [common part](/v3/guidelines/smart-contracts/howto/compile/compilation-instructions#common), [download the config](/v3/guidelines/smart-contracts/howto/compile/compilation-instructions#download-global-config), and then do: ```bash cmake --build . --target lite-client @@ -152,7 +152,7 @@ Basic help info can be obtained by typing `help` into the Lite Client. Type `qui ## FunC -To build FunC compiler from source code, do [common part](/develop/howto/compile#common) described above and then: +To build FunC compiler from source code, do [common part](/v3/guidelines/smart-contracts/howto/compile/compilation-instructions#common) described above and then: ```bash cmake --build . --target func @@ -166,7 +166,7 @@ func -o output.fif -SPA source0.fc source1.fc ... ## Fift -To build Fift compiler from source code, do [common part](/develop/howto/compile#common) described above and then: +To build Fift compiler from source code, do [common part](/v3/guidelines/smart-contracts/howto/compile/compilation-instructions#common) described above and then: ```bash cmake --build . --target fift @@ -180,7 +180,7 @@ fift -s script.fif script_param0 script_param1 .. ## Tonlib-cli -To build tonlib-cli, do [common part](/develop/howto/compile#common), [download the config](/develop/howto/compile#download-global-config) and then do: +To build tonlib-cli, do [common part](/v3/guidelines/smart-contracts/howto/compile/compilation-instructions#common), [download the config](/v3/guidelines/smart-contracts/howto/compile/compilation-instructions#download-global-config) and then do: ```bash cmake --build . --target tonlib-cli @@ -196,7 +196,7 @@ Basic help info can be obtained by typing `help` into the tonlib-cli. Type `quit ## RLDP-HTTP-Proxy -To build rldp-http-proxy, do [common part](/develop/howto/compile#common), [download the config](/develop/howto/compile#download-global-config) and then do: +To build rldp-http-proxy, do [common part](/v3/guidelines/smart-contracts/howto/compile/compilation-instructions#common), [download the config](/v3/guidelines/smart-contracts/howto/compile/compilation-instructions#download-global-config) and then do: ```bash cmake --build . --target rldp-http-proxy @@ -210,7 +210,7 @@ rldp-http-proxy/rldp-http-proxy ## generate-random-id -To build generate-random-id, do [common part](/develop/howto/compile#common) and then do: +To build generate-random-id, do [common part](/v3/guidelines/smart-contracts/howto/compile/compilation-instructions#common) and then do: ```bash cmake --build . --target generate-random-id @@ -224,7 +224,7 @@ utils/generate-random-id ## storage-daemon -To build storage-daemon and storage-daemon-cli, do [common part](/develop/howto/compile#common) and then do: +To build storage-daemon and storage-daemon-cli, do [common part](/v3/guidelines/smart-contracts/howto/compile/compilation-instructions#common) and then do: ```bash cmake --build . --target storage-daemon storage-daemon-cli diff --git a/docs/develop/howto/compile-swap.md b/docs/v3/guidelines/smart-contracts/howto/compile/instructions-low-memory.md similarity index 100% rename from docs/develop/howto/compile-swap.md rename to docs/v3/guidelines/smart-contracts/howto/compile/instructions-low-memory.md diff --git a/docs/develop/smart-contracts/tutorials/multisig-js.md b/docs/v3/guidelines/smart-contracts/howto/multisig-js.md similarity index 97% rename from docs/develop/smart-contracts/tutorials/multisig-js.md rename to docs/v3/guidelines/smart-contracts/howto/multisig-js.md index c1b2a5dcbf6..9adf6037d0f 100644 --- a/docs/develop/smart-contracts/tutorials/multisig-js.md +++ b/docs/v3/guidelines/smart-contracts/howto/multisig-js.md @@ -5,7 +5,7 @@ description: At the end of this guide you will deploy multisig wallet and send s # Interact with multisig wallets using TypeScript ## Introduction -If you don't know what is multisig wallet in TON, you can check it out [here](/develop/smart-contracts/tutorials/multisig) +If you don't know what is multisig wallet in TON, you can check it out [here](/v3/guidelines/smart-contracts/howto/multisig) Following this steps you will learn how to: * Create and deploy multisig wallet @@ -159,6 +159,6 @@ And of course you can get public properties from `MultisigWallet`, `MultisigOrde - `signatures` - `Dictionary` of signatures *ownerId => signature* ## References - * [Low-level multisig guide](/develop/smart-contracts/tutorials/multisig) + * [Low-level multisig guide](/v3/guidelines/smart-contracts/howto/multisig) * [ton.js Documentation](https://ton-community.github.io/ton/) * [Multisig contract sources](https://github.com/ton-blockchain/multisig-contract) diff --git a/docs/develop/smart-contracts/tutorials/multisig.md b/docs/v3/guidelines/smart-contracts/howto/multisig.md similarity index 100% rename from docs/develop/smart-contracts/tutorials/multisig.md rename to docs/v3/guidelines/smart-contracts/howto/multisig.md diff --git a/docs/develop/smart-contracts/tutorials/shard-optimization.mdx b/docs/v3/guidelines/smart-contracts/howto/shard-optimization.mdx similarity index 100% rename from docs/develop/smart-contracts/tutorials/shard-optimization.mdx rename to docs/v3/guidelines/smart-contracts/howto/shard-optimization.mdx diff --git a/docs/develop/smart-contracts/tutorials/wallet.md b/docs/v3/guidelines/smart-contracts/howto/wallet.md similarity index 99% rename from docs/develop/smart-contracts/tutorials/wallet.md rename to docs/v3/guidelines/smart-contracts/howto/wallet.md index 8abef5c2074..f5bfab0e6ba 100644 --- a/docs/develop/smart-contracts/tutorials/wallet.md +++ b/docs/v3/guidelines/smart-contracts/howto/wallet.md @@ -140,7 +140,7 @@ It is also possible to use another IDE since GoLand isn’t free, but it is pref ::: :::warning IMPORTANT -All coding components should be added to the `main` function that was created in the [⚙ Set Your Environment](/develop/smart-contracts/tutorials/wallet#-set-your-environment) section. +All coding components should be added to the `main` function that was created in the [⚙ Set Your Environment](/v3/guidelines/smart-contracts/howto/wallet#-set-your-environment) section. Additionally, only the imports required for a specific code section will be specified in each new section and new imports will need to be added and combined with old ones. ::: @@ -1354,7 +1354,7 @@ for i := 0; i < len(internalMessagesAmount); i++ { -Now let's use our knowledge from [chapter two](/develop/smart-contracts/tutorials/wallet#-deploying-our-wallet) to build a message for our wallet that can send 4 messages simultaneously: +Now let's use our knowledge from [chapter two](/v3/guidelines/smart-contracts/howto/wallet#-deploying-our-wallet) to build a message for our wallet that can send 4 messages simultaneously: @@ -1643,13 +1643,13 @@ internalMessage := cell.BeginCell(). The NFT transfer opcode comes from [the same standard](https://github.com/ton-blockchain/TEPs/blob/master/text/0062-nft-standard.md#tl-b-schema). -Now let's complete the message, as is laid out in the previous sections of this tutorial. The correct code needed to complete the message is found in the [GitHub repository](/develop/smart-contracts/tutorials/wallet#source-code). +Now let's complete the message, as is laid out in the previous sections of this tutorial. The correct code needed to complete the message is found in the [GitHub repository](/v3/guidelines/smart-contracts/howto/wallet#source-code). The same procedure can be completed with Jettons. To conduct this process, read the TL-B [standart](https://github.com/ton-blockchain/TEPs/blob/master/text/0074-jettons-standard.md) for jettons transfer. To this point specifically, a small difference between NFT and Jettons transfers exists. ### Wallet v3 and Wallet v4 Get Methods -Smart contracts often make use of [GET methods](/develop/smart-contracts/guidelines/get-methods), however, they don’t run inside the blockchain but instead on the client side. GET methods have many uses and provide accessibility to different data types for smart contracts. For example, the [get_nft_data() method in NFT smart contracts](https://github.com/ton-blockchain/token-contract/blob/991bdb4925653c51b0b53ab212c53143f71f5476/nft/nft-item.fc#L142-L145) allows users to retrieve specific content, owner, and NFT collection information. +Smart contracts often make use of [GET methods](/v3/guidelines/smart-contracts/get-methods), however, they don’t run inside the blockchain but instead on the client side. GET methods have many uses and provide accessibility to different data types for smart contracts. For example, the [get_nft_data() method in NFT smart contracts](https://github.com/ton-blockchain/token-contract/blob/991bdb4925653c51b0b53ab212c53143f71f5476/nft/nft-item.fc#L142-L145) allows users to retrieve specific content, owner, and NFT collection information. Below we’ll learn more about the basics of GET methods used with [V3](https://github.com/ton-blockchain/ton/blob/e37583e5e6e8cd0aebf5142ef7d8db282f10692b/crypto/smartcont/wallet3-code.fc#L31-L41) and [V4](https://github.com/ton-blockchain/wallet-contract/blob/4111fd9e3313ec17d99ca9b5b1656445b5b49d8f/func/wallet-v4-code.fc#L164-L198). Let’s start with the methods that are the same for both wallet versions: @@ -1821,7 +1821,7 @@ The response must be `-1`, meaning the result is true. It is also possible to se In chapter three, we deployed a wallet. To accomplish this, we initially sent some TON and then a message from the wallet to deploy a smart contract. However, this process is not broadly used with external messages and is often primarily used for wallets only. While developing contracts, the deployment process is initialized by sending internal messages. -To accomplish this, will use the V3R2 wallet smart contract that was used in [the third chapter](/develop/smart-contracts/tutorials/wallet#compiling-our-wallet-code). +To accomplish this, will use the V3R2 wallet smart contract that was used in [the third chapter](/v3/guidelines/smart-contracts/howto/wallet#compiling-our-wallet-code). In this case, we’ll set the `subwallet_id` to `3` or any other number needed to retrieve another address when using the same private key (it's changeable): @@ -2690,7 +2690,7 @@ This means that if the query_id passed to the method is smaller than the last la In order to deploy a high-load wallet it is necessary to generate a mnemonic key in advance, which will be used by the user. It is possible to use the same key that was used in previous sections of this tutorial. -To begin the process required to deploy a high-load wallet it's necessary to copy [the code of the smart contract](https://github.com/ton-blockchain/ton/blob/master/crypto/smartcont/highload-wallet-v2-code.fc) to the same directory where the stdlib.fc and wallet_v3 are located and remember to add `#include "stdlib.fc";` to the beginning of the code. Next we’ll compile the high-load wallet code like we did in [section three](/develop/smart-contracts/tutorials/wallet#compiling-wallet-code): +To begin the process required to deploy a high-load wallet it's necessary to copy [the code of the smart contract](https://github.com/ton-blockchain/ton/blob/master/crypto/smartcont/highload-wallet-v2-code.fc) to the same directory where the stdlib.fc and wallet_v3 are located and remember to add `#include "stdlib.fc";` to the beginning of the code. Next we’ll compile the high-load wallet code like we did in [section three](/v3/guidelines/smart-contracts/howto/wallet#compiling-wallet-code): @@ -2836,7 +2836,7 @@ log.Println("Contract address:", contractAddress.String()) // Output contract :::caution -Everything we have detailed above follows the same steps as the contract [deployment via wallet](/develop/smart-contracts/tutorials/wallet#contract-deployment-via-wallet) section. To better understanding, read the entire [GitHub source code]((https://github.com/aSpite/wallet-tutorial)). +Everything we have detailed above follows the same steps as the contract [deployment via wallet](/v3/guidelines/smart-contracts/howto/wallet#contract-deployment-via-wallet) section. To better understanding, read the entire [GitHub source code]((https://github.com/aSpite/wallet-tutorial)). ::: ### Sending High-Load Wallet V2 Messages diff --git a/docs/develop/smart-contracts/guidelines/random-number-generation.md b/docs/v3/guidelines/smart-contracts/security/random-number-generation.md similarity index 94% rename from docs/develop/smart-contracts/guidelines/random-number-generation.md rename to docs/v3/guidelines/smart-contracts/security/random-number-generation.md index e2e77df6fe1..384f6cc058d 100644 --- a/docs/develop/smart-contracts/guidelines/random-number-generation.md +++ b/docs/v3/guidelines/smart-contracts/security/random-number-generation.md @@ -8,7 +8,7 @@ Computers are terrible at generating random information because all they do is f These algorithms typically require you to provide a _seed_ value that will be used to generate a sequence of _pseudo-random_ numbers. So, if you run the same program with the same _seed_ multiple times, you'll consistently get the same result. In TON, the _seed_ is different for each block. -- [Generation of block random seed](/develop/smart-contracts/security/random) +- [Generation of block random seed](/v3/guidelines/smart-contracts/security/random) Therefore, to predict the result of the `random()` function in a smart contract, you just need to know the current `seed` of the block, which isn't possible if you're not a validator. @@ -97,7 +97,7 @@ Deploy this contract in any workchain you need (probably Basechain) and you're d ## Is this method 100% secure? -While it certainly helps, there's still a chance of manipulation if an intruder has control over several validators simultaneously. In this case, they might, with some probability, [affect](/develop/smart-contracts/security/random#conclusion) the _seed_, which the random number depends on. Even if this probability is extremely small, it's still worth considering. +While it certainly helps, there's still a chance of manipulation if an intruder has control over several validators simultaneously. In this case, they might, with some probability, [affect](/v3/guidelines/smart-contracts/security/random#conclusion) the _seed_, which the random number depends on. Even if this probability is extremely small, it's still worth considering. With the latest TVM upgrade, the introduction of new values to the `c7` register can further boost the security of random number generation. Specifically, the upgrade adds information about the last 16 masterchain blocks to the `c7` register. diff --git a/docs/develop/smart-contracts/security/random.md b/docs/v3/guidelines/smart-contracts/security/random.md similarity index 100% rename from docs/develop/smart-contracts/security/random.md rename to docs/v3/guidelines/smart-contracts/security/random.md diff --git a/docs/develop/smart-contracts/security/secure-programming.mdx b/docs/v3/guidelines/smart-contracts/security/secure-programming.mdx similarity index 97% rename from docs/develop/smart-contracts/security/secure-programming.mdx rename to docs/v3/guidelines/smart-contracts/security/secure-programming.mdx index 7ee393b8a2c..a8acccf2c0b 100644 --- a/docs/develop/smart-contracts/security/secure-programming.mdx +++ b/docs/v3/guidelines/smart-contracts/security/secure-programming.mdx @@ -1,6 +1,6 @@ import ThemedImage from '@theme/ThemedImage'; -# Secure Smart Contract Programming +# Secure Smart Contract Programming In this section, we'll look at a few of the most interesting features of the TON blockchain, and then walk through a list of best practices for developers programming smart contracts on FunC. @@ -25,7 +25,7 @@ A new unique property appears in the logic of your contract: partial execution o For example, consider the message flow of a standard TON Jetton: -![smart1.png](../../../../static/img/docs/security-measures/secure-programming/smart1.png) +![smart1.png](/img/docs/security-measures/secure-programming/smart1.png) As follows from the diagram: 1. sender sends an `op::transfer` message to its wallet (`sender_wallet`); @@ -67,11 +67,11 @@ Unfortunately, we are noticing a trend: `` is a real enumeration ```func ( - int total_supply, int swap_fee, int min_amount, int is_stopped, int user_count, int max_user_count, - slice admin_address, slice router_address, slice jettonA_address, slice jettonA_wallet_address, - int jettonA_balance, int jettonA_pending_balance, slice jettonB_address, slice jettonB_wallet_address, - int jettonB_balance, int jettonB_pending_balance, int mining_amount, int datetime_amount, int minable_time, - int half_life, int last_index, int last_mined, cell mining_rate_cell, cell user_info_dict, cell operation_gas, + int total_supply, int swap_fee, int min_amount, int is_stopped, int user_count, int max_user_count, + slice admin_address, slice router_address, slice jettonA_address, slice jettonA_wallet_address, + int jettonA_balance, int jettonA_pending_balance, slice jettonB_address, slice jettonB_wallet_address, + int jettonB_balance, int jettonB_pending_balance, int mining_amount, int datetime_amount, int minable_time, + int half_life, int last_index, int last_mined, cell mining_rate_cell, cell user_info_dict, cell operation_gas, cell content, cell lp_wallet_code ) = load_data(); ``` @@ -104,7 +104,7 @@ And finally, parsing the entire storage and packing it back on every call to eve Even in a simple contract like a TON Jetton, there are already quite a few messages, senders, receivers, and pieces of data contained in messages. Now imagine how it looks when you’re developing something a little more complex, like a decentralized exchange (DEX) where the number of messages in one workflow can exceed ten. -![smart2.png](../../../../static/img/docs/security-measures/secure-programming/smart2.png) +![smart2.png](/img/docs/security-measures/secure-programming/smart2.png) At CertiK, we use the [DOT](https://en.wikipedia.org/wiki/DOT_(graph_description_language)) language to describe and update such diagrams during the course of the audit. Our auditors find that this helps them visualize and understand the complex interactions within and between contracts. @@ -157,7 +157,7 @@ In the same TON Jetton, this is demonstrated: `sender_wallet` subtracts the bala And here is an example of incorrect implementation. Why can't you find out your Jetton balance on-chain? Because such a question does not fit the pattern. By the time the response to the `op::get_balance` message reaches the requester, this balance could already have been spent by someone. In this case, you can implement an alternative: -![smart3.png](../../../../static/img/docs/security-measures/secure-programming/smart3.png) +![smart3.png](/img/docs/security-measures/secure-programming/smart3.png) 1. master sends a message `op::provide_balance` to the wallet; 1. wallet zeroes its balance and sends back `op::take_balance`; @@ -232,7 +232,7 @@ TON has a useful mechanism: `SEND_MODE_CARRY_ALL_REMAINING_MESSAGE_VALUE = 64`. .store_uint(0, 64 + 32 + 1 + 1) ;; lt, at, init, body .store_query_id(query_id) .end_cell(); - + send_raw_message(msg, SEND_MODE_REGULAR); } ``` @@ -335,7 +335,7 @@ var msg = begin_cell() .store_uint(0x4e565354, 32) .store_uint(query_id, 64) .store_ref(vset); - + send_raw_message(msg.end_cell(), 1); ``` @@ -360,7 +360,7 @@ builder store_body_header(builder b, int op, int query_id) inline { () mint_tokens(slice to_address, cell jetton_wallet_code, int amount, cell master_msg) impure { cell state_init = calculate_jetton_wallet_state_init(to_address, my_address(), jetton_wallet_code); slice to_wallet_address = calculate_address_by_state_init(state_init); - + var msg = begin_cell() .store_msg_flags(BOUNCEABLE) .store_slice(to_wallet_address) diff --git a/docs/develop/smart-contracts/security/things-to-focus.md b/docs/v3/guidelines/smart-contracts/security/things-to-focus.md similarity index 100% rename from docs/develop/smart-contracts/security/things-to-focus.md rename to docs/v3/guidelines/smart-contracts/security/things-to-focus.md diff --git a/docs/develop/smart-contracts/security/ton-hack-challenge-1.md b/docs/v3/guidelines/smart-contracts/security/ton-hack-challenge-1.md similarity index 100% rename from docs/develop/smart-contracts/security/ton-hack-challenge-1.md rename to docs/v3/guidelines/smart-contracts/security/ton-hack-challenge-1.md diff --git a/docs/v3/guidelines/web3/ton-proxy-sites/running-your-own-ton-proxy.md b/docs/v3/guidelines/web3/ton-proxy-sites/running-your-own-ton-proxy.md index d21317b17ce..8a9d9ab4e8a 100644 --- a/docs/v3/guidelines/web3/ton-proxy-sites/running-your-own-ton-proxy.md +++ b/docs/v3/guidelines/web3/ton-proxy-sites/running-your-own-ton-proxy.md @@ -14,9 +14,9 @@ In order to access existing TON Sites, you need to run a RLDP-HTTP Proxy on your 1. Download **rldp-http-proxy** from [TON Auto Builds](https://github.com/ton-blockchain/ton/releases/latest). - Or you can compile the **rldp-http-proxy** yourself by following these [instructions](/develop/howto/compile#rldp-http-proxy). + Or you can compile the **rldp-http-proxy** yourself by following these [instructions](/v3/guidelines/smart-contracts/howto/compile/compilation-instructions#rldp-http-proxy). -2. [Download](/develop/howto/compile#download-global-config) TON global config. +2. [Download](/v3/guidelines/smart-contracts/howto/compile/compilation-instructions#download-global-config) TON global config. 3. Run **rldp-http-proxy** @@ -34,13 +34,13 @@ Your entry proxy will be available by HTTP on `localhost` port `8080`. 1. Download **rldp-http-proxy** from [TON Auto Builds](https://github.com/ton-blockchain/ton/releases/latest). - Or you can compile the **rldp-http-proxy** yourself by following these [instructions](/develop/howto/compile#rldp-http-proxy). + Or you can compile the **rldp-http-proxy** yourself by following these [instructions](/v3/guidelines/smart-contracts/howto/compile/compilation-instructions#rldp-http-proxy). -2. [Download](/develop/howto/compile#download-global-config) TON global config. +2. [Download](/v3/guidelines/smart-contracts/howto/compile/compilation-instructions#download-global-config) TON global config. 3. Download **generate-random-id** from [TON Auto Builds](https://github.com/ton-blockchain/ton/releases/latest). - Or you can compile the **generate-random-id** yourself by following these [instructions](/develop/howto/compile#generate-random-id). + Or you can compile the **generate-random-id** yourself by following these [instructions](/v3/guidelines/smart-contracts/howto/compile/compilation-instructions#generate-random-id). 4. Generate a persistent ANDL Address for your entry proxy @@ -128,13 +128,13 @@ We suppose that you know already how to set up an ordinary website, and that you 1. Download **rldp-http-proxy** from [TON Auto Builds](https://github.com/ton-blockchain/ton/releases/latest). - Or you can compile the **rldp-http-proxy** yourself by this [instruction](/develop/howto/compile#rldp-http-proxy). + Or you can compile the **rldp-http-proxy** yourself by this [instruction](/v3/guidelines/smart-contracts/howto/compile/compilation-instructions#rldp-http-proxy). -2. [Download](/develop/howto/compile#download-global-config) TON global config. +2. [Download](/v3/guidelines/smart-contracts/howto/compile/compilation-instructions#download-global-config) TON global config. 3. Download **generate-random-id** from [TON Auto Builds](https://github.com/ton-blockchain/ton/releases/latest). - Or you can compile the **generate-random-id** yourself by following these [instructions](/develop/howto/compile#generate-random-id). + Or you can compile the **generate-random-id** yourself by following these [instructions](/v3/guidelines/smart-contracts/howto/compile/compilation-instructions#generate-random-id). 4. Generate a persistent ANDL Address for your server diff --git a/docs/v3/guidelines/web3/ton-storage/storage-daemon.md b/docs/v3/guidelines/web3/ton-storage/storage-daemon.md index 3edaff74e90..a7e79d70446 100644 --- a/docs/v3/guidelines/web3/ton-storage/storage-daemon.md +++ b/docs/v3/guidelines/web3/ton-storage/storage-daemon.md @@ -17,7 +17,7 @@ You can download `storage-daemon` and `storage-daemon-cli` for Linux/Windows/Mac ## Compile from sources -You can compile `storage-daemon` and `storage-damon-cli` from sources using this [instruction](/develop/howto/compile#storage-daemon). +You can compile `storage-daemon` and `storage-damon-cli` from sources using this [instruction](/v3/guidelines/smart-contracts/howto/compile/compilation-instructions#storage-daemon). ## Key concepts * *Bag of files* or *Bag* - a collection of files distributed through TON Storage @@ -42,7 +42,7 @@ You can compile `storage-daemon` and `storage-damon-cli` from sources using this ```storage-daemon -v 3 -C global.config.json -I :3333 -p 5555 -D storage-db``` * `-v` - verbosity level (INFO) -* `-C` - global network config ([download global config](/develop/howto/compile#download-global-config)) +* `-C` - global network config ([download global config](/v3/guidelines/smart-contracts/howto/compile/compilation-instructions#download-global-config)) * `-I` - IP address and port for adnl * `-p` - TCP port for console interface * `-D` - directory for the storage daemon database diff --git a/docs/v3/guidelines/web3/ton-storage/storage-provider.md b/docs/v3/guidelines/web3/ton-storage/storage-provider.md index 80733557152..b25e31ec7f0 100644 --- a/docs/v3/guidelines/web3/ton-storage/storage-provider.md +++ b/docs/v3/guidelines/web3/ton-storage/storage-provider.md @@ -8,7 +8,7 @@ You can download `storage-daemon` and `storage-daemon-cli` for Linux/Windows/Mac ## Compile from sources -You can compile `storage-daemon` and `storage-damon-cli` from sources using this [instruction](/develop/howto/compile#storage-daemon). +You can compile `storage-daemon` and `storage-damon-cli` from sources using this [instruction](/v3/guidelines/smart-contracts/howto/compile/compilation-instructions#storage-daemon). ## Key concepts It consists of a smart contract that accepts storage requests and manages payment from clients, and an application that uploads and serves the files to clients. Here's how it works: diff --git a/old-docs/lite-client.md b/old-docs/lite-client.md index ad0c6aa1a58..ec9c7857490 100644 --- a/old-docs/lite-client.md +++ b/old-docs/lite-client.md @@ -5,7 +5,7 @@ Lite Client is a native software that allows you to read information from TON Blockchain. Clients, such as wallets, do not store the full state of the blockchain but instead request only the necessary information from full nodes. -Lite Client is a standalone utility that can run without any dependencies. It can be downloaded from [precompiled binaries](/develop/smart-contracts/environment/installation#1-download) or [compiled from sources](/develop/howto/compile#lite-client). +Lite Client is a standalone utility that can run without any dependencies. It can be downloaded from [precompiled binaries](/develop/smart-contracts/environment/installation#1-download) or [compiled from sources](/v3/guidelines/smart-contracts/howto/compile/compilation-instructions#lite-client). ## Hardware requirements diff --git a/redirects/redirects.json b/redirects/redirects.json index 1841702ba10..14c087e3a4c 100644 --- a/redirects/redirects.json +++ b/redirects/redirects.json @@ -294,5 +294,65 @@ { "from": "/develop/dapps/asset-processing/nfts", "to": "/v3/guidelines/dapps/asset-processing/nft-processing/nfts" + }, + { + "from": "/develop/smart-contracts/guidelines/get-methods", + "to": "/v3/guidelines/smart-contracts/get-methods" + }, + { + "from": "/develop/smart-contracts/security/secure-programming", + "to": "/v3/guidelines/smart-contracts/security/secure-programming" + }, + { + "from": "/develop/smart-contracts/security/random", + "to": "/v3/guidelines/smart-contracts/security/random" + }, + { + "from": "/develop/smart-contracts/security/things-to-focus", + "to": "/v3/guidelines/smart-contracts/security/things-to-focus" + }, + { + "from": "/develop/smart-contracts/security/ton-hack-challenge-1", + "to": "/v3/guidelines/smart-contracts/security/ton-hack-challenge-1" + }, + { + "from": "/develop/smart-contracts/guidelines/random-number-generation", + "to": "/v3/guidelines/smart-contracts/security/random-number-generation" + }, + { + "from": "/v3/guidelines/smart-contracts/howto", + "to": "/v3/guidelines/smart-contracts/howto" + }, + { + "from": "/v3/guidelines/smart-contracts/how-to/compile", + "to": "/v3/guidelines/smart-contracts/howto/compile" + }, + { + "from": "/develop/howto/compile", + "to": "/v3/guidelines/smart-contracts/howto/compile/compilation-instructions" + }, + { + "from": "/develop/howto/compile-swap", + "to": "/v3/guidelines/smart-contracts/howto/compile/instructions-low-memory" + }, + { + "from": "/develop/smart-contracts/tutorials/multisig", + "to": "/v3/guidelines/smart-contracts/howto/multisig" + }, + { + "from": "/develop/smart-contracts/tutorials/multisig-js", + "to": "/v3/guidelines/smart-contracts/howto/multisig-js" + }, + { + "from": "/develop/smart-contracts/tutorials/airdrop-claim-best-practice", + "to": "/v3/guidelines/smart-contracts/howto/airdrop-claim-best-practice" + }, + { + "from": "/develop/smart-contracts/tutorials/shard-optimization", + "to": "/v3/guidelines/smart-contracts/howto/shard-optimization" + }, + { + "from": "/develop/smart-contracts/tutorials/wallet", + "to": "/v3/guidelines/smart-contracts/howto/wallet" } -] +] \ No newline at end of file diff --git a/sidebars/guidelines.js b/sidebars/guidelines.js index 723a26b04e0..3db30abb144 100644 --- a/sidebars/guidelines.js +++ b/sidebars/guidelines.js @@ -39,7 +39,7 @@ module.exports = [ 'value': ' Smart Contracts Guidelines ', }, 'develop/smart-contracts/guidelines', - 'develop/smart-contracts/guidelines/get-methods', + 'v3/guidelines/smart-contracts/get-methods', { type: 'doc', label: 'Transaction fees calculation', @@ -50,11 +50,11 @@ module.exports = [ label: 'Security Measures', items: [ 'develop/smart-contracts/security/README', - 'develop/smart-contracts/security/secure-programming', - 'develop/smart-contracts/security/things-to-focus', - 'develop/smart-contracts/security/ton-hack-challenge-1', - 'develop/smart-contracts/guidelines/random-number-generation', - 'develop/smart-contracts/security/random', + 'v3/guidelines/smart-contracts/security/secure-programming', + 'v3/guidelines/smart-contracts/security/things-to-focus', + 'v3/guidelines/smart-contracts/security/ton-hack-challenge-1', + 'v3/guidelines/smart-contracts/security/random-number-generation', + 'v3/guidelines/smart-contracts/security/random', ], }, { @@ -68,20 +68,20 @@ module.exports = [ { type: 'doc', label: 'Compilation Instructions', - id: 'develop/howto/compile', + id: 'v3/guidelines/smart-contracts/howto/compile/compilation-instructions', }, { type: 'doc', label: 'Instructions for low-memory machines', - id: 'develop/howto/compile-swap', + id: 'v3/guidelines/smart-contracts/howto/compile/instructions-low-memory', }, ], }, - 'develop/smart-contracts/tutorials/multisig', - 'develop/smart-contracts/tutorials/multisig-js', - 'develop/smart-contracts/tutorials/airdrop-claim-best-practice', - 'develop/smart-contracts/tutorials/shard-optimization', - 'develop/smart-contracts/tutorials/wallet', + 'v3/guidelines/smart-contracts/howto/multisig', + 'v3/guidelines/smart-contracts/howto/multisig-js', + 'v3/guidelines/smart-contracts/howto/airdrop-claim-best-practice', + 'v3/guidelines/smart-contracts/howto/shard-optimization', + 'v3/guidelines/smart-contracts/howto/wallet', { type: 'link', label: 'How to shard your TON smart contract and why',