Skip to content

Commit 2e7f225

Browse files
authored
Merge branch 'main' into node-overview-feedback
2 parents 02096f2 + b28a4b9 commit 2e7f225

File tree

47 files changed

+2717
-203
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+2717
-203
lines changed

.cspell.jsonc

Lines changed: 52 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,21 @@
77
"language": "en-US",
88
"dictionaryDefinitions": [
99
{
10+
// Allowed words
1011
"name": "main-list",
1112
"path": "resources/dictionaries/custom.txt",
1213
"addWords": true,
1314
},
1415
{
16+
// Banned words with no clear or correct replacements
17+
// For a few words with those, see the flagWords property later in this file
1518
"name": "deny-list",
1619
"path": "resources/dictionaries/ban.txt"
1720
},
21+
{
22+
"name": "2lw-deny-list",
23+
"path": "resources/dictionaries/two-letter-words-ban.txt"
24+
},
1825
{
1926
"name": "tvm-instructions",
2027
"path": "resources/dictionaries/tvm-instructions.txt"
@@ -23,43 +30,80 @@
2330
"dictionaries": [
2431
"main-list",
2532
"deny-list",
33+
"2lw-deny-list",
2634
"tvm-instructions",
2735
],
2836
"useGitignore": true,
2937
"files": [
3038
"**/*.{md,mdx}",
31-
"**/*.{js,jsx}",
39+
"**/*.{js,jsx,mjs}",
3240
],
3341
"minWordLength": 3,
3442
"overrides": [
3543
// Enable case sensitivity for Markdown and MDX files only
3644
{
3745
"filename": "**/*.{md,mdx}",
38-
"caseSensitive": true
46+
"caseSensitive": true,
47+
// Known incorrect spellings and correct suggestions
48+
"flagWords": [
49+
"AccountChain->accountchain",
50+
"BaseChain->basechain",
51+
"boc->BoC",
52+
"BOC->BoC",
53+
"Github->GitHub",
54+
"MasterChain->masterchain",
55+
"ShardChain->shardchain",
56+
"Toncenter->TON Center",
57+
"toncoins->Toncoin",
58+
"Toncoins->Toncoin",
59+
"WorkChain->workchain",
60+
],
3961
},
40-
// Do not check for banned words (denylist) in certain files
62+
// Do not check for banned words (denylists or flagWords) in certain files
4163
{
4264
"filename": "contribute/style-guide*.mdx",
4365
"ignoreWords": [
4466
"tos",
4567
"DOI",
68+
"boc",
4669
"BOC",
4770
],
71+
"ignoreRegExpList": [
72+
"\\b[tT]on[a-zA-Z]+\\b", // ton or Ton-prefixed words
73+
"\\b[a-zA-Z]+Chain\\b", // Chain-suffixed words
74+
],
4875
"dictionaries": [
49-
"!deny-list"
76+
"!deny-list", // turns off the dictionary
77+
"!2lw-deny-list", // turns off the dictionary
5078
]
5179
},
5280
{
53-
"filename": "**/api/**/v*",
81+
"filename": "**/api/**/*.{json,yml,yaml}",
82+
"ignoreWords": [
83+
"smc",
84+
],
5485
"dictionaries": [
55-
"!deny-list"
86+
"!deny-list", // turns off the dictionary
87+
"!2lw-deny-list", // turns off the dictionary
5688
]
5789
},
90+
{
91+
"filename": "**/*.{js,jsx,mjs}",
92+
"ignoreWords": [
93+
"Dests",
94+
],
95+
"dictionaries": [
96+
"!deny-list", // turns off the dictionary
97+
"!2lw-deny-list", // turns off the dictionary
98+
]
99+
}
58100
],
59101
"ignorePaths": [
60102
// Some whitepapers
61103
"foundations/whitepapers/tblkch.mdx",
62104
"foundations/whitepapers/ton.mdx",
105+
"foundations/whitepapers/tvm.mdx",
106+
"languages/fift/whitepaper.mdx",
63107
// Generated files
64108
"tvm/instructions.mdx",
65109
// Binaries
@@ -80,6 +124,7 @@
80124
"**/*.svg",
81125
"**/*.txt",
82126
"CODEOWNERS",
127+
"LICENSE-*",
83128
"snippets/tvm-instruction-table.jsx",
84129
],
85130
"ignoreRegExpList": [
@@ -110,11 +155,11 @@
110155
"=\\s*\".*?\"", // ="..."
111156
"(?<!\\\\)\\$(?:\\\\.|[^$\\\\])*?\\$", // inline math
112157
"/(?<!\\\\)\\$\\$[\\s\\S]*?\\$\\$/g", // block math
158+
"(?<!\\\\)``.*?``", // inline code with double backticks
113159
"(?<!\\\\)`.*?`", // inline code
114160
"/^([ \\t]*```).*([\\s\\S]*?)^\\1$/gmx", // block code
115161
"^import[ \\t].+$", // import ...
116162
"/^export[ \\t].+?(?=\\r?\\n\\r?\\n)/gms", // export ...
117163
"(?<!\\\\)\\{(?:[^{}]|\\{(?:[^{}]|\\{[^{}]*\\})*\\})*\\}", // jsx expressions in {}
118-
"/\\bton-?[a-z]+/gi", // ton-prefixed product names
119164
],
120165
}

.github/workflows/linter.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ jobs:
8888
steps:
8989
- name: Checkout repository
9090
uses: actions/checkout@v4
91-
with:
92-
fetch-depth: 0
91+
# The fetch-depth is not set to 0 to prevent the cspell-action
92+
# from misfiring on files that are in main but not on this PR branch
9393

9494
- name: Setup Node.js
9595
uses: actions/setup-node@v4
@@ -108,6 +108,7 @@ jobs:
108108
with:
109109
check_dot_files: explicit
110110
suggestions: true
111+
config: ".cspell.jsonc"
111112

112113
redirects-check:
113114
name: "Redirects"

.remarkignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ node_modules/
1616
/tvm/instructions.mdx
1717
/ecosystem/api/toncenter/v2/
1818
/ecosystem/api/toncenter/v3/
19+
/ecosystem/api/toncenter/smc-index/

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ The dictionaries (or vocabularies) for custom words are placed under `resources/
4545

4646
The primary dictionary is `resources/dictionaries/custom.txt` — extend it in case a word exists but was flagged by CSpell as invalid, or in cases where the word does not exist and shall be prohibited. For the latter, use the `!` prefix when adding words.
4747

48+
If an existing two-letter word was flagged as forbidden, remove it from the `resources/dictionaries/two-letter-words-ban.txt` file.
49+
4850
See more: [CSpell docs on custom dictionaries](https://cspell.org/docs/dictionaries/custom-dictionaries).
4951

5052
### Format checks

contract-dev/blueprint/api.mdx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ Waits for a contract to be deployed by polling the address until the contract ap
240240
export async function run(provider: NetworkProvider) {
241241
// Send deployment transaction
242242
await contract.sendDeploy(provider.sender(), { value: toNano('0.01') });
243-
243+
244244
// Wait for deployment to complete
245245
await provider.waitForDeploy(contract.address);
246246
console.log('Contract deployed successfully');
@@ -490,14 +490,14 @@ Presents a list of choices to the user and returns the selected option.
490490
```typescript
491491
export async function run(provider: NetworkProvider) {
492492
const ui = provider.ui();
493-
493+
494494
const networks = ['mainnet', 'testnet'];
495495
const selectedNetwork = await ui.choose(
496496
'Select deployment network:',
497497
networks,
498498
(network) => network.toUpperCase()
499499
);
500-
500+
501501
ui.write(`Selected network: ${selectedNetwork}`);
502502
}
503503
```
@@ -520,10 +520,10 @@ Sets a persistent action prompt that remains visible during operations.
520520
export async function run(provider: NetworkProvider) {
521521
const ui = provider.ui();
522522
ui.setActionPrompt('⏳ Waiting for transaction confirmation...');
523-
523+
524524
await contract.send(provider.sender(), { value: toNano('0.01') }, 'increment');
525525
await provider.waitForLastTransaction();
526-
526+
527527
ui.clearActionPrompt();
528528
ui.write('✅ Transaction confirmed');
529529
}
@@ -543,10 +543,10 @@ Clears the current action prompt, removing it from display.
543543
export async function run(provider: NetworkProvider) {
544544
const ui = provider.ui();
545545
ui.setActionPrompt('🔄 Processing...');
546-
546+
547547
// Perform some operation
548548
await someAsyncOperation();
549-
549+
550550
ui.clearActionPrompt();
551551
ui.write('Operation completed');
552552
}
@@ -789,10 +789,10 @@ type Explorer = 'tonscan' | 'tonviewer' | 'toncx' | 'dton';
789789

790790
**Supported explorers:**
791791

792-
- `'tonscan'`TONScan explorer
792+
- `'tonscan'`Tonscan explorer
793793
- `'tonviewer'` — Tonviewer explorer (default)
794794
- `'toncx'` — TON.cx explorer
795-
- `'dton'`dton.io explorer
795+
- `'dton'`dTON.io explorer
796796

797797
## Configuration
798798

contract-dev/blueprint/cli.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ npx blueprint run <SCRIPT> <ARGS...>
159159

160160
- `--tonscan` — use Tonscan explorer
161161
- `--tonviewer` — use Tonviewer explorer (default)
162-
- `--toncx` — use Toncx explorer
163-
- `--dton` — use Dton explorer
162+
- `--toncx` — use TON.cx explorer
163+
- `--dton` — use dTON explorer
164164

165165
**Usage examples:**
166166

contract-dev/blueprint/overview.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ npm create ton@latest
5050
- `scripts/` — deployment scripts for Mainnet and Testnet, as well as scripts for interacting with live contracts.
5151
- `tests/` — TypeScript test suite for all contracts, using [Sandbox](https://github.com/ton-org/sandbox) for in-process execution.
5252
- `wrappers/` — TypeScript interface classes for all contracts **except Tact**.
53-
- Each wrapper implements the `Contract` interface from [@ton/core](https://www.npmjs.com/package/@ton/core).
53+
- Each wrapper implements the `Contract` interface from [`@ton/core`](https://www.npmjs.com/package/@ton/core).
5454
- Provides message serialization and deserialization, getter wrappers, and compilation helpers.
5555
- Used in both the test suite and client code to interact with contracts from TypeScript.
5656
- `build/` — compilation artifacts generated by the build command.

contract-dev/debug.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: "Debugging smart contracts"
55
import {Aside} from "/snippets/aside.jsx";
66

77
<Aside>
8-
All examples from this article are available on [Github](https://github.com/ton-org/docs-examples/tree/main/guidebook/debug).
8+
All examples from this article are available on [GitHub](https://github.com/ton-org/docs-examples/tree/main/guidebook/debug).
99
</Aside>
1010

1111
Errors in smart contracts can produce an [exit code](/tvm/exit-codes), often indicating a bug in the contract. Use debugging methods to locate and fix the issue.

contract-dev/signing.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ TVM exposes additional cryptographic primitives beyond Ed25519. These are useful
3333
| [BLS12-381](https://en.wikipedia.org/wiki/BLS_digital_signature) | Pairing-based operations for signature aggregation and zero-knowledge proofs |
3434
| [Ristretto255](https://en.wikipedia.org/wiki/Curve25519#Ristretto) | Prime-order group over Curve25519 for advanced cryptographic constructions |
3535

36-
For details, see crypto instructions in [TVM instructions](/tvm/instructions), [TVM changelog](/tvm/changelog), or [GlobalVersions.md](https://github.com/ton-blockchain/ton/blob/5c0349110bb03dd3a241689f2ab334ae1a554ffb/doc/GlobalVersions.md).
36+
For details, see crypto instructions in [TVM instructions](/tvm/instructions), [TVM changelog](/tvm/changelog), or [`GlobalVersions.md`](https://github.com/ton-blockchain/ton/blob/5c0349110bb03dd3a241689f2ab334ae1a554ffb/doc/GlobalVersions.md).
3737

3838
This guide focuses on Ed25519, usually used for TON.
3939

@@ -167,7 +167,7 @@ graph
167167
C ~~~ D
168168
D ~~~ E
169169
E ~~~ F
170-
170+
171171
```
172172

173173
Verification in FunC:
@@ -215,14 +215,14 @@ graph LR
215215
A[**signature**]
216216
B((msg_inner))
217217
end
218-
218+
219219
subgraph Ref["Signed data (next cell)"]
220220
direction LR
221221
C[valid_until]
222222
D[seqno]
223223
E((actions))
224224
end
225-
225+
226226
A ~~~ B
227227
B -.-> Ref
228228
C ~~~ D
@@ -276,7 +276,7 @@ Gas comparison:
276276
Conclusion:\
277277
With builder hashing optimization, both approaches are gas-efficient. New contracts can choose based on code simplicity and forward fee considerations.
278278

279-
Reference: [GlobalVersions.md — TVM improvements](https://github.com/ton-blockchain/ton/blob/5c0349110bb03dd3a241689f2ab334ae1a554ffb/doc/GlobalVersions.md#new-tvm-instructions-4)
279+
Reference: [`GlobalVersions.md` — TVM improvements](https://github.com/ton-blockchain/ton/blob/5c0349110bb03dd3a241689f2ab334ae1a554ffb/doc/GlobalVersions.md#new-tvm-instructions-4)
280280

281281
## How to sign messages in TypeScript
282282

contract-dev/using-onchain-libraries.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ code:(just
4343
...
4444
```
4545

46-
While it is not crucial to understand the exact representation shown on [https://explorer.toncoin.org/](https://explorer.toncoin.org/) ([more about explorers](/ecosystem/explorers/overview)), the key point is that there is only one cell in the contract code, tagged as `SPECIAL` (indicating it is an exotic cell). Following this is the hexadecimal representation of the library cell's internals. The first byte equals 2, indicating that it is a library cell, and the remaining bytes contain the hash of the referenced cell.
46+
While it is not crucial to understand the exact representation shown on the [TON Explorer](https://explorer.toncoin.org/) ([more about explorers](/ecosystem/explorers/overview)), the key point is that there is only one cell in the contract code, tagged as `SPECIAL`, indicating it is an exotic cell. Following this is the hexadecimal representation of the library cell's internals. The first byte equals 2, indicating that it is a library cell, and the remaining bytes contain the hash of the referenced cell.
4747

4848
Here you can see that the entire contract code consists of the 8‑bit tag equal to 2 and a 256‑bit representation hash of the referenced cell.
4949

0 commit comments

Comments
 (0)