Skip to content

Commit 0eaf196

Browse files
authored
Concepts proofread and rework 1 (ton-community#982)
* concepts_headers_and_links_styling * update_pull_request_template * Update introduction.mdx rework_and_proofread * Update introduction.mdx proofread and active voice * rework_blockchain_explorers * explorers_style_update * Update explorers-in-ton.mdx proofread and active voice * Update explorers-in-ton.mdx proofread_check * wallet_concepts_update fixed style, updated information * Update wallet-apps.mdx proofread and style update * fix_tlb_example_mistake * Update wallet-apps.mdx proofread and info update * refactor_walletapps * extend_tondevwallet_description * Update wallet-apps.mdx Proofread and formatting * add_tonkey_to_dict * update_nft_usecases * Update nft.md Active voice and proofread. * style_reform * Update blockchain-of-blockchains.md proofread * Update blockchain-of-blockchains.md Proofread and active voice * smart_contract_concept_refactor Rework content * Update smart-contract-addresses.md Proofread and clarification. * comparison_update
1 parent 5e900ee commit 0eaf196

22 files changed

+385
-390
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
<!--- Provide a general summary of your changes in the Title above -->
21

3-
## Why is it important?
2+
## Description
43

5-
<!--- Describe your changes in detail -->
4+
<--Brief description of the changes introduced in this pull request. Include any relevant issue numbers or links.-->
65

7-
## Related Issue
6+
Closes <--link to issue]-->.
87

9-
<!--- This project accepts pull requests related to open issues, if possible -->
10-
<!--- If suggesting a new feature or change, please discuss it in an issue first -->
11-
<!--- If fixing a bug, there should be an issue describing it with steps to reproduce -->
12-
<!--- Please link to the issue here, if possible: -->
8+
## Checklist
9+
10+
- [ ] I have created an issue.
11+
- [ ] I am working on content that aligns with the [Style guide](https://docs.ton.org/v3/contribute/style-guide/).
12+
- [ ] I have reviewed and formatted the content according to [Content standardization](https://docs.ton.org/v3/contribute/content-standardization/).
13+
- [ ] I have reviewed and formatted the text in the article according to [Typography](https://docs.ton.org/v3/contribute/typography/).

cspell.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,9 @@
116116
"Tolk",
117117
"Toncoin",
118118
"Toncoins",
119+
"Tonhub",
120+
"Tonkeeper",
121+
"Tonkey",
119122
"Underload",
120123
"Uninit",
121124
"WAGMI",

docs/v3/concepts/dive-into-ton/go-from-ethereum/blockchain-services.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# Blockchain Services
1+
# Blockchain services
22

3-
## Domain Name Systems
3+
## Domain name systems
44

5-
In Ethereum, users use the Ethereum Name Service (ENS), which is a decentralized naming system built on top of the Ethereum blockchain.
5+
In Ethereum, users use the **Ethereum Name Service (ENS)**, which is a decentralized naming system built on top of the Ethereum blockchain.
66

7-
The TON blockchain includes an embedded domain name system known as the TON DNS. It is a decentralized service that allows users to register human-readable domain names for their smart contracts, websites, or any other online content. Such a device facilitates interaction with decentralized applications (dApps) and other resources on the TON blockchain. The DNS system in TON functions similarly to traditional Internet DNS systems, but its decentralized nature eliminates the need for a centralized authority to control and manage domain names, thereby reducing the risks of censorship, fraud, and domain name hijacking.
7+
The TON blockchain includes an embedded domain name system known as the TON DNS. It's a decentralized service that allows users to register human-readable domain names for their smart contracts, websites, or any other online content. Such a device facilitates interaction with decentralized applications (dApps) and other resources on the TON blockchain. The DNS system in TON functions similarly to traditional Internet DNS systems, but its decentralized nature eliminates the need for a centralized authority to control and manage domain names, thereby reducing the risks of censorship, fraud, and domain name hijacking.
88

99
## WWW
1010

docs/v3/concepts/dive-into-ton/go-from-ethereum/difference-of-blockchains.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# The Difference of Blockchains
1+
# The difference of blockchains
22

33
In this chapter, we will examine the key differences between the Ethereum blockchain compared to the TON blockchain. The analysis will include an overview of the network architectures, highlight their unique features, and evaluate the advantages and disadvantages of each.
44

@@ -46,7 +46,7 @@ The result of scripts is always the creation of a transaction. The transactions
4646

4747
We have already discussed that in Ethereum, a user's wallet is generated based on their address, which is in a 1-to-1 relationship with their public key. But in TON, all wallets are smart contracts that must be deployed by the user himself. Since smart contracts can be configured in different ways and have different features, there are several versions of wallets, which you can read about [here](/v3/documentation/smart-contracts/contracts-specs/wallet-contracts). Due to the fact that wallets are smart contracts, a user can have multiple wallets with different addresses and initial parameters. To send a transaction, the user must sign the message with his private key and send it to his wallet contract, which in turn forwards it to the smart contract of a particular DApp application. This approach greatly increases flexibility in wallet design and developers can add new versions of the wallet in the future. In Ethereum at the moment developers are actively using multi-sig wallets (smart contracts) like gnosis and are just starting to introduce so-called `account-abstractions' like ERC-4337, where wallets will be filled with such functionality as sending transactions without a native token, account recovery, after its loss, etc., but it's worth noting, wallet accounts are much more expensive to use in terms of gas fees compared to EOA in Ethereum.
4848

49-
## Messages and Transactions
49+
## Messages and transactions
5050

5151
What happens between two contracts is called a message - a small number of tokens and arbitrary data are sent to a specified address. When the message arrives at the contract, it is processed by the contract code, the contract updates its state and optionally sends a new message. All these actions on the contract are recorded as transactions. Let's imagine an example, we have a chain of messages, from contract `A` to contract `B`, from contract `B`, to contract `C`, then we will have two messages and three transactions. But initially, to change the state of the blockchain, you need an outside signal. To invoke a smart contract, you need to send an external message that goes to the validators and they apply it to the smart contract. And we already discussed in the last subsection that a wallet is a smart contract, so this external message usually first goes to the wallet's smart contract, which records them as the first transaction and that first transaction usually contains an embedded message for the actual destination contract. When the wallet smart contract receives the message, it processes it and delivers it to the destination contract (in our example, contract `A` could be a wallet and when it receives the external message, it will have the first transaction). The sequence of transactions forms a chain. So you can see that each smart contract has its own transactions, which means that each contract has its own `little blockchain` (you can read more about it [here](/v3/concepts/dive-into-ton/ton-blockchain/blockchain-of-blockchains)), so the network can process the transactions due to this completely independent of each other
5252

docs/v3/concepts/dive-into-ton/go-from-ethereum/solidity-vs-func.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ In case of FunC, the main data types are:
3737

3838
Currently, FunC has no support for defining custom types.
3939

40-
### See Also
40+
### See also
4141

42-
- [Statements](/v3/documentation/smart-contracts/func/docs/statements)
42+
- [Statements](/v3/documentation/smart-contracts/func/docs/statements/)
4343

4444
## Declaring and using variables
4545

@@ -58,9 +58,9 @@ FunC is a more abstract and function-oriented language, it supports dynamic typi
5858
var z = x + y; // Dynamic variable declaration
5959
```
6060

61-
### See Also
61+
### See also
6262

63-
- [Statements](/v3/documentation/smart-contracts/func/docs/statements)
63+
- [Statements](/v3/documentation/smart-contracts/func/docs/statements/)
6464

6565
## Loops
6666

@@ -88,9 +88,9 @@ repeat(10) {
8888
;; x = 1024
8989
```
9090

91-
### See Also
91+
### See also
9292

93-
- [Statements](/v3/documentation/smart-contracts/func/docs/statements)
93+
- [Statements](/v3/documentation/smart-contracts/func/docs/statements/)
9494

9595
## Functions
9696

@@ -114,33 +114,33 @@ Transitioning to FunC, FunC program is essentially a list of function declaratio
114114
}
115115
```
116116

117-
### See Also
117+
### See also
118118

119-
- [Functions](/v3/documentation/smart-contracts/func/docs/functions)
119+
- [Functions](/v3/documentation/smart-contracts/func/docs/functions/)
120120

121121
## Flow control structures
122122

123123
Most of the control structures known from curly-braces languages are available in Solidity, including: `if`, `else`, `while`, `do`, `for`, `break`, `continue`, `return`, with the usual semantics known from C or JavaScript.
124124

125125
FunC supports classic `if-else` statements, as well as `ifnot`, `repeat`, `while` and `do/until` loops. Also since v0.4.0 `try-catch` statements are supported.
126126

127-
### See Also
127+
### See also
128128

129-
- [Statements](/v3/documentation/smart-contracts/func/docs/statements)
129+
- [Statements](/v3/documentation/smart-contracts/func/docs/statements/)
130130

131131
## Dictionaries
132132

133133
Dictionary (hashmap/mapping) data structure is very important for Solidity and FunC contract development because it allows developers to efficiently store and retrieve data in smart contracts, specifically data related to a specific key, such as a user’s balance or ownership of an asset.
134134

135135
Mapping is a hash table in Solidity that stores data as key-value pairs, where the key can be any of the built-in data types, excluding reference types, and the value of the data type can be any type. Mappings are most typically used in Solidity and the Ethereum blockchain to connect a unique Ethereum address to a corresponding value type. In any other programming language, a mapping is equivalent to a dictionary.
136136

137-
In Solidity, mappings do not have a length, nor do they have the concept of setting a key or a value. Mappings are only applicable to state variables that serve as store reference types. When mappings are initialised, they include every possible key, and are mapped to values whose byte-representations are all zeros.
137+
In Solidity, mappings don't have a length, nor do they have the concept of setting a key or a value. Mappings are only applicable to state variables that serve as store reference types. When mappings are initialised, they include every possible key, and are mapped to values whose byte-representations are all zeros.
138138

139139
An analogy of mappings in FunC are dictionaries, or TON hashmaps. In the context of TON, a hashmap is a data structure represented by a tree of cells. Hashmap maps keys to values ​​of arbitrary type so that quick lookup and modification are possible. The abstract representation of a hashmap in TVM is a Patricia tree, or a compact binary trie. Working with potentially large cell trees can create several problems. Each update operation builds an appreciable number of cells (each cell built costs 500 gas), which means that these operations can run out of resource if used carelessly. To avoid exceeding the gas limit, limit the number of dictionary updates in a single transaction. Also, a binary tree for `N` key-value pairs contains `N-1` forks, which means a total of at least `2N-1` cells. The storage of a smart contract is limited to `65536` unique cells, so the maximum number of entries in the dictionary is `32768`, or slightly more if there are repeating cells.
140140

141-
### See Also
141+
### See also
142142

143-
- [Dictionaries in TON](/v3/documentation/smart-contracts/func/docs/dictionaries)
143+
- [Dictionaries in TON](/v3/documentation/smart-contracts/func/docs/dictionaries/)
144144

145145
## Smart-contract communication
146146

@@ -208,15 +208,15 @@ var msg = begin_cell()
208208
send_raw_message(msg, mode);
209209
```
210210
Let's discuss in more detail what it looks like for our smart contract to send a message to our recipient:
211-
1. Initially, we need to build our message. The full structure of the send can be found [here](/v3/documentation/smart-contracts/message-management/sending-messages). We won't go into detail on how to assemble it here, you can read about that at the link.
211+
1. Initially, we need to build our message. The full structure of the send can be found [here](/v3/documentation/smart-contracts/message-management/sending-messages/). We won't go into detail on how to assemble it here, you can read about that at the link.
212212
2. The body of the message represents a cell. In `msg_body_cell` we do: `begin_cell()` - creates `Builder` for the future cell, first `store_uint` - stores the first uint into `Builder` (1 - this is our `op`), second `store_uint` - stores the second uint into `Builder` (num - this is our number that we will manipulate in the receiving contract), `end_cell()` - creates the cell.
213213
3. To attach the body that will come in `recv_internal` in the message, we reference the collected cell in the message itself with `store_ref`.
214214
4. Sending a message.
215215
216216
This example presented how smart contracts can communicate with each other.
217217
218-
### See Also
218+
### See also
219219
220-
- [Internal Messages](/v3/documentation/smart-contracts/message-management/internal-messages)
221-
- [Sending Messages](/v3/documentation/smart-contracts/message-management/sending-messages)
222-
- [Non-bouncable messages](/v3/documentation/smart-contracts/message-management/non-bounceable-messages)
220+
- [Internal Messages](/v3/documentation/smart-contracts/message-management/internal-messages/)
221+
- [Sending Messages](/v3/documentation/smart-contracts/message-management/sending-messages/)
222+
- [Non-bouncable messages](/v3/documentation/smart-contracts/message-management/non-bounceable-messages/)

docs/v3/concepts/dive-into-ton/go-from-ethereum/tvm-vs-evm.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# TVM vs EVM
22

3-
Ethereum Virtual Machine (EVM) and TON Virtual Machine (TVM) are both stack-based virtual machines developed for running smart contract code. Although they have common features, there are notable distinctions between them.
3+
**Ethereum Virtual Machine (EVM)** and **TON Virtual Machine (TVM)** are both stack-based virtual machines developed for running smart contract code. Although they have common features, there are notable distinctions between them.
44

55
## Data presentation
66

7-
### Ethereum Virtual Machine (EVM)
7+
### EVM
88
1. Fundamental Data Units
99
- The EVM operates primarily on 256-bit integers, reflecting its design around Ethereum's cryptographic functions (e.g., Keccak-256 hashing and elliptic curve operations).
1010
- Data types are limited mainly to integers, bytes, and occasionally arrays of these types, but all must conform to 256-bit processing rules.
@@ -15,7 +15,7 @@ Ethereum Virtual Machine (EVM) and TON Virtual Machine (TVM) are both stack-base
1515
- The simplification to 256-bit word constraints means that the EVM is not inherently designed to handle complex or custom data structures directly.
1616
- Developers often need to implement additional logic within smart contracts to simulate more complex data structures, which can lead to increased gas costs and complexity.
1717

18-
### TON Virtual Machine (TVM)
18+
### TVM
1919
1. Cell-Based Architecture
2020
- TVM uses a unique "bag of cells" model to represent data. Each cell can contain up to 128 data bytes and can have up to 4 references to other cells.
2121
- This structure allows the TVM to natively support arbitrary algebraic data types and more complex constructions such as trees or directed acyclic graphs (DAGs) directly within its storage model.
@@ -28,12 +28,12 @@ Ethereum Virtual Machine (EVM) and TON Virtual Machine (TVM) are both stack-base
2828

2929
## Stack machine
3030

31-
### Ethereum Virtual Machine (EVM)
31+
### EVM
3232

3333
- The EVM operates as a traditional stack-based machine, where it uses a last-in, first-out (LIFO) stack to manage computation.
3434
- It processes operations by pushing and popping 256-bit integers, which are the standard size for all elements in the stack.
3535

36-
### TON Virtual Machine (TVM)
36+
### TVM
3737

3838
- TVM also functions as a stack-based machine but with a key distinction: it supports both 257-bit integers and references to cells.
3939
- This allows TVM to push and pop these two distinct types of data onto/from the stack, providing enhanced flexibility in direct data manipulation.
@@ -75,41 +75,41 @@ It’s essential to note that the EVM supports complex data structures by levera
7575

7676
## Arithmetic operations
7777

78-
### Ethereum Virtual Machine (EVM)
78+
### EVM
7979

8080
- The Ethereum Virtual Machine (EVM) handles arithmetic using 256-bit integers, meaning operations such as addition, subtraction, multiplication, and division are tailored to this data size.
8181

82-
### TON Virtual Machine (TVM)
82+
### TVM
8383

8484
- The TON Virtual Machine (TVM) supports a more diverse range of arithmetic operations, including 64-bit, 128-bit, and 256-bit integers, both unsigned and signed, as well as modulo operations. TVM further enhances its arithmetic capabilities with operations like multiply-then-shift and shift-then-divide, which are particularly useful for implementing fixed-point arithmetic. This variety allows developers to select the most efficient arithmetic operations based on the specific requirements of their smart contracts, offering potential optimizations based on data size and type.
8585

8686
## Overflow checks
8787

88-
### Ethereum Virtual Machine (EVM)
88+
### EVM
8989

9090
- In the EVM, overflow checks are not inherently performed by the virtual machine itself. With the introduction of Solidity 0.8.0, automatic overflow and underflow checks were integrated into the language to enhance security. These checks help prevent common vulnerabilities related to arithmetic operations but require newer versions of Solidity, as earlier versions necessitate manual implementation of these safeguards.
9191

92-
### TON Virtual Machine (TVM)
92+
### TVM
9393

9494
- In contrast, TVM automatically performs overflow checks on all arithmetic operations, a feature built directly into the virtual machine. This design choice simplifies the development of smart contracts by inherently reducing the risk of errors and enhancing the overall reliability and security of the code.
9595

9696
## Cryptography and hash functions
9797

98-
### Ethereum Virtual Machine (EVM)
98+
### EVM
9999

100100
- EVM has support for the Ethereum-specific cryptography scheme, such as the secp256k1 elliptic curve and the keccak256 hash function. Also, EVM does not have built-in support for Merkle proofs, which are cryptographic proofs used to verify the membership of an element in a set.
101101

102-
### TON Virtual Machine (TVM)
102+
### TVM
103103

104104
- TVM offers support for 256-bit Elliptic Curve Cryptography (ECC) for predefined curves, like Curve25519. It also supports Weil pairings on some elliptic curves, which are useful for fast implementation of zk-SNARKs (zero-knowledge proofs). Popular hash functions like sha256 are also supported, providing more options for cryptographic operations. In addition, TVM can work with Merkle proofs, providing additional cryptographic features that can be beneficial for certain use cases, such as verifying the inclusion of a transaction in a block.
105105

106106
## High-level languages
107107

108-
### Ethereum Virtual Machine (EVM)
108+
### EVM
109109

110110
- EVM primarily uses Solidity as its high-level language, which is an object-oriented, statically-typed language similar to JavaScript and C++. Also, there are other languages for writing Ethereum smart-contracts such as Vyper, Yul, etc.
111111

112-
### TON Virtual Machine (TVM)
112+
### TVM
113113

114114
- TVM uses FunC as a high-level language designed for writing TON smart contracts. It is a procedural language with static types and support for algebraic data types. FunC compiles to Fift, which in turn compiles to TVM bytecode.
115115

0 commit comments

Comments
 (0)