diff --git a/.cspell.jsonc b/.cspell.jsonc index 26b52f7a3..cda902f80 100644 --- a/.cspell.jsonc +++ b/.cspell.jsonc @@ -16,28 +16,20 @@ // Banned words with no clear or correct replacements // For a few words with those, see the flagWords property later in this file "name": "deny-list", - "path": "public/dictionaries/ban.txt" + "path": "public/dictionaries/ban.txt", }, { "name": "2lw-deny-list", - "path": "public/dictionaries/two-letter-words-ban.txt" + "path": "public/dictionaries/two-letter-words-ban.txt", }, { "name": "tvm-instructions", - "path": "public/dictionaries/tvm-instructions.txt" - } - ], - "dictionaries": [ - "main-list", - "deny-list", - "2lw-deny-list", - "tvm-instructions", + "path": "public/dictionaries/tvm-instructions.txt", + }, ], + "dictionaries": ["main-list", "deny-list", "2lw-deny-list", "tvm-instructions"], "useGitignore": true, - "files": [ - "**/*.{md,mdx}", - "**/*.{js,jsx,mjs}", - ], + "files": ["**/*.{md,mdx}", "**/*.{js,jsx,mjs}"], "minWordLength": 3, "overrides": [ // Enable case sensitivity for Markdown and MDX files only @@ -69,12 +61,7 @@ // Do not check for banned words (denylists or flagWords) in certain files { "filename": "content/contribute/style-guide*.mdx", - "ignoreWords": [ - "tos", - "DOI", - "boc", - "BOC", - ], + "ignoreWords": ["tos", "DOI", "boc", "BOC"], "ignoreRegExpList": [ "\\b[tT]on[a-zA-Z]+\\b", // ton or Ton-prefixed words "\\b[a-zA-Z]+Chain\\b", // Chain-suffixed words @@ -82,45 +69,35 @@ "dictionaries": [ "!deny-list", // turns off the dictionary "!2lw-deny-list", // turns off the dictionary - ] + ], }, { "filename": "content/tolk/features/compiler-optimizations.mdx", - "ignoreWords": [ - "fifting", - ] + "ignoreWords": ["fifting"], }, { "filename": "**/api/**/*.{json,yml,yaml}", - "ignoreWords": [ - "multisigs", - "smc", - "Uninited", - ], + "ignoreWords": ["multisigs", "smc", "Uninited"], "dictionaries": [ "!deny-list", // turns off the dictionary "!2lw-deny-list", // turns off the dictionary - ] + ], }, { "filename": "**/*.{js,jsx,mjs}", - "ignoreWords": [ - "Dests", - ], + "ignoreWords": ["Dests"], "dictionaries": [ "!deny-list", // turns off the dictionary "!2lw-deny-list", // turns off the dictionary - ] + ], }, { "filename": "public/grammars/*.json", - "ignoreWords": [ - "tlb", - ], + "ignoreWords": ["tlb"], "dictionaries": [ "!deny-list", // turns off the dictionary "!2lw-deny-list", // turns off the dictionary - ] + ], }, { "filename": "content/ecosystem/ai/mcp.mdx", @@ -133,7 +110,7 @@ "ignoreWords": [ "subsecond", // without a hyphen in the filename ], - } + }, ], "ignorePaths": [ // Some whitepapers @@ -165,7 +142,7 @@ "CODEOWNERS", "LICENSE-*", "snippets/tvm-instruction-table.jsx", - "snippets/catchain-visualizer.jsx" + "snippets/catchain-visualizer.jsx", ], "ignoreRegExpList": [ // diff --git a/.github/scripts/common.mjs b/.github/scripts/common.mjs index 8d7067456..648dbed4c 100644 --- a/.github/scripts/common.mjs +++ b/.github/scripts/common.mjs @@ -11,12 +11,13 @@ export async function hidePriorCommentsWithPrefix({ owner: context.repo.owner, repo: context.repo.repo, issue_number: context.issue.number, - }) + }), ); await exec.exec('sleep 0.5s'); for (const comment of comments.data) { const commentData = await withRetry(() => - github.graphql(` + github.graphql( + ` query($nodeId: ID!) { node(id: $nodeId) { ... on IssueComment { @@ -24,18 +25,20 @@ export async function hidePriorCommentsWithPrefix({ } } } - `, { nodeId: comment.node_id }) + `, + { nodeId: comment.node_id }, + ), ); await exec.exec('sleep 0.5s'); const isHidden = commentData?.node?.isMinimized; - if (isHidden) { continue; } - if ( - comment.user.login === user && - comment.body.startsWith(prefix) - ) { + if (isHidden) { + continue; + } + if (comment.user.login === user && comment.body.startsWith(prefix)) { console.log('Comment node_id:', comment.node_id); const commentStatus = await withRetry(() => - github.graphql(` + github.graphql( + ` mutation($subjectId: ID!, $classifier: ReportedContentClassifiers!) { minimizeComment(input: { subjectId: $subjectId, @@ -47,10 +50,12 @@ export async function hidePriorCommentsWithPrefix({ } } } - `, { - subjectId: comment.node_id, - classifier: resolved ? 'RESOLVED' : 'OUTDATED', - }) + `, + { + subjectId: comment.node_id, + classifier: resolved ? 'RESOLVED' : 'OUTDATED', + }, + ), ); await exec.exec('sleep 0.5s'); console.log(commentStatus); @@ -70,7 +75,7 @@ export async function createComment({ repo: context.repo.repo, issue_number: context.issue.number, body: body, - }) + }), ); await exec.exec('sleep 0.2s'); } diff --git a/.github/scripts/generate-meta-schema.mjs b/.github/scripts/generate-meta-schema.mjs index a94e61591..250fd3f4a 100644 --- a/.github/scripts/generate-meta-schema.mjs +++ b/.github/scripts/generate-meta-schema.mjs @@ -6,7 +6,10 @@ import * as z from 'zod'; */ const metaSchema = z.object({ /** Name of the folder in the sidebar (page tree on the left) */ - title: z.string().optional().describe('Name of the folder in the sidebar (page tree on the left)'), + title: z + .string() + .optional() + .describe('Name of the folder in the sidebar (page tree on the left)'), /** Icon of the folder in the sidebar (page tree on the left) */ icon: z.string().optional().describe('Icon of the folder in the sidebar (page tree on the left)'), @@ -16,30 +19,46 @@ const metaSchema = z.object({ * * Root folders form the layout tabs (or dropdown) menu: https://www.fumadocs.dev/docs/ui/layouts/docs#layout-tabs */ - root: z.boolean().optional().describe([ - 'When set to `true`, only the items in this folder will be shown when navigating to them.', - '\nRoot folders form the layout tabs (or dropdown) menu: https://www.fumadocs.dev/docs/ui/layouts/docs#layout-tabs' - ].join(' ')), + root: z + .boolean() + .optional() + .describe( + [ + 'When set to `true`, only the items in this folder will be shown when navigating to them.', + '\nRoot folders form the layout tabs (or dropdown) menu: https://www.fumadocs.dev/docs/ui/layouts/docs#layout-tabs', + ].join(' '), + ), /** * When set to `true`, the folder will be opened by default. * * Defaults to `false`. */ - defaultOpen: z.boolean().default(false).optional().describe([ - 'When set to `true`, the folder will be opened by default.', - '\nDefaults to `false`.' - ].join(' ')), + defaultOpen: z + .boolean() + .default(false) + .optional() + .describe( + ['When set to `true`, the folder will be opened by default.', '\nDefaults to `false`.'].join( + ' ', + ), + ), /** * When set to `false`, the folder will **not** be collapsible. * * Defaults to `true`. */ - collapsible: z.boolean().default(true).optional().describe([ - 'When set to `false`, the folder will **not** be collapsible.', - '\nDefaults to `true`.' - ].join(' ')), + collapsible: z + .boolean() + .default(true) + .optional() + .describe( + [ + 'When set to `false`, the folder will **not** be collapsible.', + '\nDefaults to `true`.', + ].join(' '), + ), /** * When a folder has an `index.mdx` file, clicks on the folder @@ -50,27 +69,38 @@ const metaSchema = z.object({ * - Path — a string like `"overview"` (will look for `overview.mdx`) * - Link — an external path like `"[Link name](https://yourmom.zip)"` */ - pagesIndex: z.union([ - z.stringFormat('Path', /^[\.a-zA-Z_\-0-9 \/]+$/), - z.stringFormat('Link', /^\[.*?\]\(http.*?\)$/), - ]).default('index').optional().describe([ - 'When a folder has an `index.mdx` file, clicks on the folder', - '\nin the sidebar (page tree on the left) route to that page', - '\nin addition to toggling the collapsible state of the folder.', - '\n', - 'This field allows to specify a different index item of a folder as either:', - '\n- Path — a string like `"overview"` (will look for `overview.mdx`)', - '\n- Link — an external path like `"[Link name](https://yourmom.zip)"`', - ].join(' ')), + pagesIndex: z + .union([ + z.stringFormat('Path', /^[\.a-zA-Z_\-0-9 \/]+$/), + z.stringFormat('Link', /^\[.*?\]\(http.*?\)$/), + ]) + .default('index') + .optional() + .describe( + [ + 'When a folder has an `index.mdx` file, clicks on the folder', + '\nin the sidebar (page tree on the left) route to that page', + '\nin addition to toggling the collapsible state of the folder.', + '\n', + 'This field allows to specify a different index item of a folder as either:', + '\n- Path — a string like `"overview"` (will look for `overview.mdx`)', + '\n- Link — an external path like `"[Link name](https://yourmom.zip)"`', + ].join(' '), + ), /** * Description of the folder in the sidebar (page tree on the left). * Directly related to the index item set in the `pagesIndex` field. */ - description: z.string().optional().describe([ - 'Description of the folder in the sidebar (page tree on the left).', - '\nDirectly related to the index item set in the `pagesIndex` field.', - ].join(' ')), + description: z + .string() + .optional() + .describe( + [ + 'Description of the folder in the sidebar (page tree on the left).', + '\nDirectly related to the index item set in the `pagesIndex` field.', + ].join(' '), + ), /** * Array of pages in the folder. @@ -109,52 +139,74 @@ const metaSchema = z.object({ * } * ``` */ - pages: z.array(z.union([ - z.stringFormat('Path', /^[\.a-zA-Z_\-0-9 \/]+$/), - z.stringFormat('Separator', /^---(\[[a-zA-Z_\-0-9]+\])?[^\-]+---$/), - z.stringFormat('Link', /^(external:)?(\[[a-zA-Z_\-0-9]+\])?\[.*?\]\(.*?\)$/), - z.stringFormat('External link', /^external:\[.*?\]\(.*?\)$/), - z.stringFormat('Rest', /^\.\.\.$/), - z.stringFormat('Reversed rest', /^z\.\.\.a$/), - z.stringFormat('Extract', /^\.\.\.[a-zA-Z_\-0-9 \.]+$/), - z.stringFormat('Except', /^\![a-zA-Z_\-0-9 \.]+$/), - ])).optional().describe([ - 'Array of pages in the folder.', - '\nItems in the folder appear or disappear (see `"!file"`) in their listed order.', - '\n', - '\nThe following example documents available options and syntaxes for listing:', - '\n', - '\n```jsonc', - '\n{', - '\n "pages": [', - '\n // A path to page or folder. File extensions are allowed, but discouraged.', - '\n "components",', - '\n', - '\n // Exclude an item from being included in a folder.', - '\n "!file",', - '\n', - '\n // A vertical separator between sections which can be prefixed with an [Icon] from Lucide.', - '\n "---My Separator---",', - '\n', - '\n // Include the rest of the pages in alphabetical order.', - '\n "...",', - '\n', - '\n // Include the rest of the pages in reverse-alphabetical order.', - '\n "z...a",', - '\n', - '\n // Extract the items from a folder below.', - '\n "...folder"', - '\n', - '\n // Insert a link. Can be prefixed with an [Icon] from Lucide.', - '\n "[TON Docs](https://docs.ton.org)",', - '\n "[Triangle][TON Docs](https://docs.ton.org)"', - '\n', - '\n // Insert a link marked as external — it will have a special icon shown to the left of the name.', - '\n "external:[TON website](https://ton.org)"', - '\n ]', - '\n}', - '\n```', - ].join(' ')), + pages: z + .array( + z.union([ + z.stringFormat('Path', /^[\.a-zA-Z_\-0-9 \/]+$/), + z.stringFormat('Separator', /^---(\[[a-zA-Z_\-0-9]+\])?[^\-]+---$/), + z.stringFormat('Link', /^(external:)?(\[[a-zA-Z_\-0-9]+\])?\[.*?\]\(.*?\)$/), + z.stringFormat('External link', /^external:\[.*?\]\(.*?\)$/), + z.stringFormat('Rest', /^\.\.\.$/), + z.stringFormat('Reversed rest', /^z\.\.\.a$/), + z.stringFormat('Extract', /^\.\.\.[a-zA-Z_\-0-9 \.]+$/), + z.stringFormat('Except', /^\![a-zA-Z_\-0-9 \.]+$/), + ]), + ) + .optional() + .describe( + [ + 'Array of pages in the folder.', + '\nItems in the folder appear or disappear (see `"!file"`) in their listed order.', + '\n', + '\nThe following example documents available options and syntaxes for listing:', + '\n', + '\n```jsonc', + '\n{', + '\n "pages": [', + '\n // A path to page or folder. File extensions are allowed, but discouraged.', + '\n "components",', + '\n', + '\n // Exclude an item from being included in a folder.', + '\n "!file",', + '\n', + '\n // A vertical separator between sections which can be prefixed with an [Icon] from Lucide.', + '\n "---My Separator---",', + '\n', + '\n // Include the rest of the pages in alphabetical order.', + '\n "...",', + '\n', + '\n // Include the rest of the pages in reverse-alphabetical order.', + '\n "z...a",', + '\n', + '\n // Extract the items from a folder below.', + '\n "...folder"', + '\n', + '\n // Insert a link. Can be prefixed with an [Icon] from Lucide.', + '\n "[TON Docs](https://docs.ton.org)",', + '\n "[Triangle][TON Docs](https://docs.ton.org)"', + '\n', + '\n // Insert a link marked as external — it will have a special icon shown to the left of the name.', + '\n "external:[TON website](https://ton.org)"', + '\n ]', + '\n}', + '\n```', + ].join(' '), + ), + + /** + * Optional tag of the folder in the sidebar (page tree on the left). + * + * This is custom field that extends the default schema. + */ + tag: z + .string() + .optional() + .describe( + [ + 'Optional tag of the folder in the sidebar (page tree on the left).', + '\nThis is custom field that extends the default schema.', + ].join(' '), + ), }); const metaJsonSchema = z.toJSONSchema(metaSchema); diff --git a/.github/scripts/generate-openapi-pages.mjs b/.github/scripts/generate-openapi-pages.mjs new file mode 100644 index 000000000..b4d4fce31 --- /dev/null +++ b/.github/scripts/generate-openapi-pages.mjs @@ -0,0 +1,74 @@ +import path from 'node:path'; +import { generateFiles } from 'fumadocs-openapi'; +import { createOpenAPI } from 'fumadocs-openapi/server'; + +/** + * @type {Omit} + */ +const commonConfig = { + frontmatter: () => ({ noindex: true }), + includeDescription: true, + addGeneratedComment: true, + beforeWrite: (files) => files.forEach((file) => (file.content += '\n')), +}; + +/** + * @param name {string} + */ +const commonNameTransform = (name) => + name + .toLocaleLowerCase() + .replace(/[^a-z0-9\s\-]/g, '') + .replace(/\s+/g, '-') + .replace(/-+/g, '-') + .replace(/^-+/, '') + .replace(/-+$/, ''); + +const genV2 = async () => + await generateFiles({ + ...commonConfig, + input: createOpenAPI({ + // NOTE: Key here must match the one used in .github/scripts/generate-openapi-pages.mjs + input: () => ({ + v2: path.resolve('./content/ecosystem/api/toncenter/v2.json'), + }), + }), + output: path.resolve('./content/ecosystem/api/toncenter/v2'), + per: 'operation', + groupBy: 'tag', + name: (path) => commonNameTransform(path.info.title), + }); + +const genV3 = async () => + await generateFiles({ + ...commonConfig, + input: createOpenAPI({ + // NOTE: Key here must match the one used in .github/scripts/generate-openapi-pages.mjs + input: () => ({ + v3: path.resolve('./content/ecosystem/api/toncenter/v3.yaml'), + }), + }), + output: path.resolve('./content/ecosystem/api/toncenter/v3'), + per: 'operation', + groupBy: 'tag', + name: (path) => commonNameTransform(path.info.title), + }); + +const genSmcIndex = async () => + await generateFiles({ + ...commonConfig, + input: createOpenAPI({ + // NOTE: Key here must match the one used in .github/scripts/generate-openapi-pages.mjs + input: () => ({ + 'smc-index': path.resolve('./content/ecosystem/api/toncenter/smc-index.json'), + }), + }), + output: path.resolve('./content/ecosystem/api/toncenter/smc-index'), + per: 'operation', + groupBy: 'none', + name: (path) => commonNameTransform(path.info.title), + }); + +await genV2(); +await genV3(); +await genSmcIndex(); diff --git a/.github/scripts/tvm-instruction-gen.py b/.github/scripts/generate-tvm-instructions-table.py similarity index 99% rename from .github/scripts/tvm-instruction-gen.py rename to .github/scripts/generate-tvm-instructions-table.py index 70ca6e19f..023f8ce34 100644 --- a/.github/scripts/tvm-instruction-gen.py +++ b/.github/scripts/generate-tvm-instructions-table.py @@ -32,7 +32,7 @@ def render_instruction(insn, aliases): {insn['doc']['description'].replace('\n', '
')}
**Category:** {humanize_category(insn['doc']['category'])} ({insn['doc']['category']})
-```fift Fift +```fift title="Fift" {insn['doc']['fift']} ``` diff --git a/.github/scripts/generate-v3-api-table.py b/.github/scripts/generate-v3-api-table.py index fea0cbb32..a0f709cd2 100644 --- a/.github/scripts/generate-v3-api-table.py +++ b/.github/scripts/generate-v3-api-table.py @@ -27,13 +27,13 @@ 'vesting', 'stats', 'utils', - 'api/v2', + 'api v2', ] # Map tag slugs to Mintlify's actual URL slugs -TAG_SLUG_MAP = { - 'api-v2': 'apiv2', -} +# TAG_SLUG_MAP = { +# 'api-v2': 'api-v2', +# } def load_openapi_spec(filepath: Path) -> dict: @@ -78,7 +78,7 @@ def generate_mintlify_link(endpoint: dict) -> str: tag = endpoint['tag'].lower().replace(' ', '-').replace('_', '-').replace('/', '-') # Apply tag slug mapping for Mintlify - tag = TAG_SLUG_MAP.get(tag, tag) + # tag = TAG_SLUG_MAP.get(tag, tag) summary = endpoint.get('summary', '') @@ -129,7 +129,7 @@ def sort_key(tag): # Handle tag display display_tag = tag - if tag.lower() == 'api/v2': + if tag.lower() == 'api v2': display_tag = 'Legacy (v2)' elif tag.lower() == 'blockchain data': display_tag = 'Blockchain data' diff --git a/.github/scripts/stats.py b/.github/scripts/stats.py index 43d768a69..aa19da8b4 100755 --- a/.github/scripts/stats.py +++ b/.github/scripts/stats.py @@ -74,8 +74,8 @@ def resolve_file(slug: str) -> Optional[str]: str(Path(slug) / "index.mdx"), str(Path(slug) / "index.md"), ): - if (REPO_ROOT / rel).exists(): - return rel + if (REPO_ROOT / 'content' / rel).exists(): + return 'content' / rel return None diff --git a/.github/workflows/instructions.yml b/.github/workflows/instructions.yml index 69a3c9e82..025668237 100644 --- a/.github/workflows/instructions.yml +++ b/.github/workflows/instructions.yml @@ -46,7 +46,7 @@ jobs: - name: Update instructions.mdx and cp0.json # cp0.txt is a workaround: mintlify gives 404 for url /resources/tvm/cp0.json -_- - run: python3 .github/scripts/tvm-instruction-gen.py tvm-spec/cp0.json public/tvm/cp0.txt content/tvm/instructions.mdx + run: python3 .github/scripts/generate-tvm-instructions-table.py tvm-spec/cp0.json public/tvm/cp0.txt content/tvm/instructions.mdx - name: Check for changes id: git-diff diff --git a/.gitignore b/.gitignore index dec678033..8556b9f30 100644 --- a/.gitignore +++ b/.gitignore @@ -41,3 +41,6 @@ next-env.d.ts /out/ /build *.tsbuildinfo + +# Temporary folders cloned for technical accuracy checks +/ctx diff --git a/.prettierignore b/.prettierignore index 61dc5bd72..6c1b7e71c 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,6 +1,12 @@ *.mdx *.md -/content/ecosystem/api/toncenter/v2/ -/content/ecosystem/api/toncenter/v3/ -/content/ecosystem/api/toncenter/smc-index/ +/content/**/api/**/*.json +/content/**/api/**/*.yml +/content/**/api/**/*.yaml +/content/**/meta.json +/public/grammars +/scripts/sidebars +/.github/workflows +/meta-schema.json +/docs.json /LICENSE* diff --git a/.prettierrc.mjs b/.prettierrc.mjs new file mode 100644 index 000000000..e347d819d --- /dev/null +++ b/.prettierrc.mjs @@ -0,0 +1,18 @@ +/** + * @see https://prettier.io/docs/configuration + * @type {import("prettier").Config} + */ +const config = { + singleQuote: true, + printWidth: 100, + overrides: [ + { + files: ['*.yml', '*.yaml', '*.py'], + options: { + singleQuote: false, + }, + }, + ], +}; + +export default config; diff --git a/.remarkignore b/.remarkignore index aa749e397..f48429377 100644 --- a/.remarkignore +++ b/.remarkignore @@ -1,6 +1,13 @@ # Ignore folders node_modules/ /pending/ +/stats/ +.source +/coverage +/.next/ +/out/ +/build +/ctx/ # Ignore some whitepapers /content/languages/fift/whitepaper.mdx @@ -17,3 +24,4 @@ node_modules/ # Ignore some other files /content/index.mdx /LICENSE* +*.tsbuildinfo diff --git a/.remarkrc.mjs b/.remarkrc.mjs index 490363658..f0d2e7edd 100644 --- a/.remarkrc.mjs +++ b/.remarkrc.mjs @@ -40,7 +40,9 @@ const remarkConfig = { // a JSX element embedded in flow (block) visitParents(tree, 'mdxJsxFlowElement', (node, ancestors) => { try { - if (!node.attributes) { return; } + if (!node.attributes) { + return; + } for (const attr of node.attributes) { if ( attr.type === 'mdxJsxAttribute' && @@ -57,7 +59,9 @@ const remarkConfig = { } // Multi-line expressions - if (!expr.data) { continue; } + if (!expr.data) { + continue; + } const indent = ancestors.length === 0 ? 0 : ancestors.length; const formatted = generate(expr.data.estree.body[0].expression, { startingIndentLevel: indent, @@ -73,7 +77,9 @@ const remarkConfig = { // a JSX element embedded in text (span, inline) visitParents(tree, 'mdxJsxTextElement', (node) => { try { - if (!node.attributes) { return SKIP; } + if (!node.attributes) { + return SKIP; + } for (const attr of node.attributes) { if ( attr.type === 'mdxJsxAttribute' && @@ -81,7 +87,9 @@ const remarkConfig = { attr.value.data?.estree ) { const expr = attr.value; - if (!expr.data) { continue; } + if (!expr.data) { + continue; + } const formatted = generate(expr.data.estree.body[0].expression); expr.value = formatted; delete expr.data.estree; @@ -95,7 +103,9 @@ const remarkConfig = { // a JavaScript expression embedded in flow (block) visitParents(tree, 'mdxFlowExpression', (node) => { try { - if (!node.data) { return SKIP; } + if (!node.data) { + return SKIP; + } const formatted = generate(node.data.estree.body[0].expression); node.value = formatted; delete node.data.estree; @@ -107,7 +117,9 @@ const remarkConfig = { // a JavaScript expression embedded in text (span, inline) visitParents(tree, 'mdxTextExpression', (node) => { try { - if (!node.data) { return SKIP; } + if (!node.data) { + return SKIP; + } const formatted = generate(node.data.estree.body[0].expression); node.value = formatted; delete node.data.estree; diff --git a/content/contract-dev/blueprint/api.mdx b/content/contract-dev/blueprint/api.mdx index 5012b12c8..ecb62ed35 100644 --- a/content/contract-dev/blueprint/api.mdx +++ b/content/contract-dev/blueprint/api.mdx @@ -87,7 +87,7 @@ This function ensures consistent hashing of external-in messages by following [T ### `compile` -Compiles a contract using the specified configuration for `tact`, `func`, or `tolk` languages. +Compiles a contract using the specified configuration for `func` or `tolk` languages. ```typescript async function compile(name: string, opts?: CompileOpts): Promise @@ -707,39 +707,6 @@ export const compile: CompilerConfig = { }; ``` -### `TactLegacyCompilerConfig` - -Configuration for the Tact compiler (legacy configuration format). - -```typescript -type TactLegacyCompilerConfig = { - lang: 'tact'; - target: string; - options?: Options; -}; -``` - -**Properties:** - -- `lang` — compiler language identifier (must be `'tact'`) -- `target` — path to the main Tact source file -- `options` — additional Tact compiler options - -**Usage example:** - -```typescript title="./wrappers/MyContract.compile.ts" -import { CompilerConfig } from '@ton/blueprint'; - -export const compile: CompilerConfig = { - lang: 'tact', - target: 'contracts/my_contract.tact', - options: { - debug: false, - external: true - } -}; -``` - ### `HookParams` Parameters passed to compilation hooks, providing context about the compilation process. diff --git a/content/contract-dev/blueprint/cli.mdx b/content/contract-dev/blueprint/cli.mdx index 3fe58f521..a5e73ae92 100644 --- a/content/contract-dev/blueprint/cli.mdx +++ b/content/contract-dev/blueprint/cli.mdx @@ -30,7 +30,7 @@ npx blueprint create Launches an interactive wizard that guides you through: 1. Contract name selection (validates CamelCase format) -1. Programming language choice (Tolk, FunC, or Tact) +1. Programming language choice (Tolk or FunC) 1. Template type selection (empty or counter example) #### Non-interactive mode @@ -48,10 +48,8 @@ npx blueprint create --type - `tolk-empty` — an empty contract (Tolk) - `func-empty` — an empty contract (FunC) -- `tact-empty` — an empty contract (Tact) - `tolk-counter` — a simple counter contract (Tolk) - `func-counter` — a simple counter contract (FunC) -- `tact-counter` — a simple counter contract (Tact) **Usage examples:** @@ -68,7 +66,7 @@ npx blueprint create **Generated files:** -- `contracts/MyContract.{tolk|fc|tact}` — contract source code +- `contracts/MyContract.{tolk|fc}` — contract source code - `wrappers/MyContract.ts` — TypeScript wrapper for contract interaction - `tests/MyContract.spec.ts` — Jest test suite with basic test cases - `scripts/deployMyContract.ts` — deployment script with network configuration diff --git a/content/contract-dev/blueprint/coverage.mdx b/content/contract-dev/blueprint/coverage.mdx index 03a8e17a5..bcd6c226b 100644 --- a/content/contract-dev/blueprint/coverage.mdx +++ b/content/contract-dev/blueprint/coverage.mdx @@ -151,7 +151,7 @@ console.log(`Combined coverage: ${totalCoverage.summary().coveragePercentage}%`) When testing systems with multiple contracts: -```typescript not runnable +```typescript title="Not runnable" describe('Multi-Contract System', () => { let blockchain: Blockchain; let contract1: SandboxContract; @@ -196,29 +196,3 @@ Apart from the header statistics, the line-by-line coverage report is the most i To understand the TVM assembly output, read [TVM](/foundations/whitepapers/tvm). - -## Limitations - -Note that when code of other contracts is stored directly in the code of the contract ([Tact](/languages/tact) does that automatically if a contract system does not contain circular dependencies), that affects the overall code coverage percentage. - -To mitigate this effect in coverage estimation, add a circular dependency. For example, import a file with the following content. - -```tact title="Tact" -contract A { - receive() { - let x = initOf B(); - drop2(x); - } -} - -contract B() { - receive() { - let x = initOf A(); - drop2(x); - } -} - -asm fun drop2(x: StateInit) { - DROP2 -} -``` diff --git a/content/contract-dev/blueprint/debug.mdx b/content/contract-dev/blueprint/debug.mdx index 9bd1ba324..2f59dc14c 100644 --- a/content/contract-dev/blueprint/debug.mdx +++ b/content/contract-dev/blueprint/debug.mdx @@ -22,7 +22,7 @@ Most commonly used to print common values: transactions and get-method results. {/* NB! There are two imports from @ton/test-utils, so that it's easier for a user to copy the one they need. */} -```ts TypeScript +```ts title="TypeScript" import '@ton/test-utils'; import { toNano } from '@ton/core'; import { Blockchain } from '@ton/sandbox'; @@ -72,7 +72,6 @@ These instructions are wrapped in functions with different names in each languag - Tolk: Functions on a global `debug` object. - FunC: Global functions from `stdlib.fc`. -- Tact: `dumpStack` for `DUMPSTK` and the [dump function](https://docs.tact-lang.org/ref/core-debug/#dump) for the other two. Tact also prints the exact line where `dump` is called, so it can quickly be found in the code. Debug instructions consume gas and affect gas measurement. Remove them before measuring gas or deploying to production. @@ -80,7 +79,7 @@ These instructions are wrapped in functions with different names in each languag ## Explore TVM logs -```ts TypeScript +```ts title="TypeScript" const blockchain = await Blockchain.create(); blockchain.verbosity.vmLogs = "vm_logs"; ``` @@ -155,7 +154,7 @@ When the output exceeds its limit, it is truncated **from the bottom** — older For traces that are not too large, print all transactions and inspect them. -```ts TypeScript +```ts title="TypeScript" const result = await contract.send( owner.getSender(), { value: toNano(0.5), bounce: true }, diff --git a/content/contract-dev/blueprint/develop.mdx b/content/contract-dev/blueprint/develop.mdx index e0209d2ee..b8305c542 100644 --- a/content/contract-dev/blueprint/develop.mdx +++ b/content/contract-dev/blueprint/develop.mdx @@ -30,7 +30,7 @@ npx blueprint create --type ``` - ``- contract name -- ``- template type, e.g., tolk-empty, func-empty, tact-empty, tolk-counter, func-counter, tact-counter +- ``- template type, e.g., tolk-empty, func-empty, tolk-counter, func-counter **Example:** diff --git a/content/contract-dev/blueprint/meta.json b/content/contract-dev/blueprint/meta.json new file mode 100644 index 000000000..0f9d1b865 --- /dev/null +++ b/content/contract-dev/blueprint/meta.json @@ -0,0 +1,18 @@ +{ + "$schema": "../../../meta-schema.json", + "title": "Blueprint", + "tag": "legacy", + "pages": [ + "overview", + "first-smart-contract", + "develop", + "testing", + "debug", + "deploy", + "coverage", + "benchmarks", + "config", + "cli", + "api" + ] +} diff --git a/content/contract-dev/blueprint/overview.mdx b/content/contract-dev/blueprint/overview.mdx index e57774044..8e571a2f2 100644 --- a/content/contract-dev/blueprint/overview.mdx +++ b/content/contract-dev/blueprint/overview.mdx @@ -54,7 +54,7 @@ npm create ton@latest - `contracts/` — smart contract source code and imports. - `scripts/` — deployment scripts for Mainnet and Testnet, as well as scripts for interacting with live contracts. - `tests/` — TypeScript test suite for all contracts, using [Sandbox](https://github.com/ton-org/sandbox) for in-process execution. -- `wrappers/` — TypeScript interface classes for all contracts **except Tact**. +- `wrappers/` — TypeScript interface classes for all contracts. - Each wrapper implements the `Contract` interface from [`@ton/core`](https://www.npmjs.com/package/@ton/core). - Provides message serialization and deserialization, getter wrappers, and compilation helpers. - Used in both the test suite and client code to interact with contracts from TypeScript. diff --git a/content/contract-dev/blueprint/testing/meta.json b/content/contract-dev/blueprint/testing/meta.json new file mode 100644 index 000000000..72609f98b --- /dev/null +++ b/content/contract-dev/blueprint/testing/meta.json @@ -0,0 +1,9 @@ +{ + "$schema": "../../../../meta-schema.json", + "title": "Testing", + "pages": [ + "overview", + "style-guide", + "reference" + ] +} diff --git a/content/contract-dev/testing/overview.mdx b/content/contract-dev/blueprint/testing/overview.mdx similarity index 100% rename from content/contract-dev/testing/overview.mdx rename to content/contract-dev/blueprint/testing/overview.mdx diff --git a/content/contract-dev/testing/reference.mdx b/content/contract-dev/blueprint/testing/reference.mdx similarity index 100% rename from content/contract-dev/testing/reference.mdx rename to content/contract-dev/blueprint/testing/reference.mdx diff --git a/content/contract-dev/testing/style-guide.mdx b/content/contract-dev/blueprint/testing/style-guide.mdx similarity index 100% rename from content/contract-dev/testing/style-guide.mdx rename to content/contract-dev/blueprint/testing/style-guide.mdx diff --git a/content/contract-dev/meta.json b/content/contract-dev/meta.json index 9225abab3..6c6799029 100644 --- a/content/contract-dev/meta.json +++ b/content/contract-dev/meta.json @@ -1,8 +1,11 @@ { "$schema": "../../meta-schema.json", + "title": "Contract development", "pages": [ "!acton", "external:[Acton toolchain](https://ton-blockchain.github.io/acton/docs/welcome)", - "..." + "...ide", + "techniques", + "blueprint" ] } diff --git a/content/contract-dev/overview.mdx b/content/contract-dev/overview.mdx index 00c691b6e..1e20e444d 100644 --- a/content/contract-dev/overview.mdx +++ b/content/contract-dev/overview.mdx @@ -14,7 +14,7 @@ How to build, test, deploy, and debug TON smart contracts. This section covers t ## Toolchain -The recommended language for TON smart contracts is [Tolk](/tolk/overview). [Acton ↗️](/contract-dev/acton) is the recommended all-in-one toolchain for the entire contract development lifecycle, including building, testing, and deploying Tolk contracts. +[Tolk](/tolk/overview) is the recommended language for TON smart contracts. [Acton ↗️](/contract-dev/acton) is the recommended all-in-one toolchain for the entire contract development lifecycle, including building, testing, and deploying Tolk contracts. --network testnet ``` -Expected output +There, + +`` — path to the local ledger directory. +`` — HTTPS endpoint of the TON RPC provider. + +Expected output: ```text Node started. Workchain: 0 Shard: -1 Status: running ``` +```` -Define placeholders (first use): -`` — path to the local ledger directory. -`` — HTTPS endpoint of the TON RPC provider. - -Bad +Bad: +````text ```bash $ ton-node start --ledger /home/bob/ledger --network mainnet # includes prompt, hard-coded values ``` +```` ### 10.2 Partial snippets diff --git a/content/ecosystem/ai/meta.json b/content/ecosystem/ai/meta.json new file mode 100644 index 000000000..a4171c56f --- /dev/null +++ b/content/ecosystem/ai/meta.json @@ -0,0 +1,10 @@ +{ + "$schema": "../../../meta-schema.json", + "title": "AI", + "defaultOpen": true, + "pages": [ + "overview", + "mcp", + "wallets" + ] +} diff --git a/content/ecosystem/api/meta.json b/content/ecosystem/api/meta.json new file mode 100644 index 000000000..75021fe42 --- /dev/null +++ b/content/ecosystem/api/meta.json @@ -0,0 +1,9 @@ +{ + "$schema": "../../../meta-schema.json", + "title": "APIs", + "pages": [ + "overview", + "toncenter", + "price" + ] +} diff --git a/content/ecosystem/api/toncenter/meta.json b/content/ecosystem/api/toncenter/meta.json new file mode 100644 index 000000000..dbb856e31 --- /dev/null +++ b/content/ecosystem/api/toncenter/meta.json @@ -0,0 +1,26 @@ +{ + "$schema": "../../../../meta-schema.json", + "title": "TON Center", + "defaultOpen": true, + "pages": [ + "introduction", + "rate-limit", + "get-api-key", + "---API v2---", + "v2/overview", + "v2-authentication", + "v2-errors", + "v2-tonlib-types", + "...v2", + "---API v3---", + "v3/overview", + "v3-errors", + "v3-authentication", + "v3-pagination", + "...v3", + "---Streaming API---", + "...streaming", + "---Nominator Pools API---", + "...smc-index" + ] +} diff --git a/content/ecosystem/api/toncenter/smc-index/get-nominator-bookings-method.mdx b/content/ecosystem/api/toncenter/smc-index/get-nominator-bookings-method.mdx index bbdd8be05..5c0640cb7 100644 --- a/content/ecosystem/api/toncenter/smc-index/get-nominator-bookings-method.mdx +++ b/content/ecosystem/api/toncenter/smc-index/get-nominator-bookings-method.mdx @@ -1,4 +1,17 @@ --- -openapi: get /getNominatorBookings +title: Get Nominator Bookings Method +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: Get nominator bookings (debits and credits) in specified pool. --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/smc-index/get-nominator-earnings-method.mdx b/content/ecosystem/api/toncenter/smc-index/get-nominator-earnings-method.mdx index 4bb72bcd8..189fa99a4 100644 --- a/content/ecosystem/api/toncenter/smc-index/get-nominator-earnings-method.mdx +++ b/content/ecosystem/api/toncenter/smc-index/get-nominator-earnings-method.mdx @@ -1,4 +1,19 @@ --- -openapi: get /getNominatorEarnings +title: Get Nominator Earnings Method +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: >- + Get nominator income in specified pool with his stake on each + timepoint. --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/smc-index/get-nominator-method.mdx b/content/ecosystem/api/toncenter/smc-index/get-nominator-method.mdx index 04b9fcf9b..b1bc7ed7c 100644 --- a/content/ecosystem/api/toncenter/smc-index/get-nominator-method.mdx +++ b/content/ecosystem/api/toncenter/smc-index/get-nominator-method.mdx @@ -1,4 +1,19 @@ --- -openapi: get /getNominator +title: Get Nominator Method +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: >- + Get nominator data in given pool (the only in list) or, if pool is not + specified, in all pools where nominator stakes. --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/smc-index/get-pool-bookings-method.mdx b/content/ecosystem/api/toncenter/smc-index/get-pool-bookings-method.mdx index 227c93a2d..a71bf9af2 100644 --- a/content/ecosystem/api/toncenter/smc-index/get-pool-bookings-method.mdx +++ b/content/ecosystem/api/toncenter/smc-index/get-pool-bookings-method.mdx @@ -1,4 +1,17 @@ --- -openapi: get /getPoolBookings +title: Get Pool Bookings Method +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: Get all the bookings (debits and credits) in specified pool. --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/smc-index/get-pool-method.mdx b/content/ecosystem/api/toncenter/smc-index/get-pool-method.mdx index 431ce2f60..7e487d20a 100644 --- a/content/ecosystem/api/toncenter/smc-index/get-pool-method.mdx +++ b/content/ecosystem/api/toncenter/smc-index/get-pool-method.mdx @@ -1,4 +1,17 @@ --- -openapi: get /getPool +title: Get Pool Method +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: Get pool data with all its nominators. --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/smc-index/lifecheck-method.mdx b/content/ecosystem/api/toncenter/smc-index/lifecheck-method.mdx index cd223f0d6..ffa96e075 100644 --- a/content/ecosystem/api/toncenter/smc-index/lifecheck-method.mdx +++ b/content/ecosystem/api/toncenter/smc-index/lifecheck-method.mdx @@ -1,4 +1,19 @@ --- -openapi: get /lifecheck +title: Lifecheck Method +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: |- + Check if there are any bookings in the last 19 hours. + Returns status "ok" if bookings exist, "dead" otherwise. --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v2.json b/content/ecosystem/api/toncenter/v2.json index ff192ac25..91118edaf 100644 --- a/content/ecosystem/api/toncenter/v2.json +++ b/content/ecosystem/api/toncenter/v2.json @@ -128,7 +128,7 @@ "Accounts" ], "summary": "Get wallet information", - "description": "Returns wallet-specific information for an address. If the address is a known wallet contract, returns the wallet type, current `seqno` (needed for sending transactions), and wallet_id. Always check `wallet: true` before using wallet-specific fields. Call this before sending any transaction to get the current `seqno`.", + "description": "Returns wallet-specific information for an address. If the address is a known wallet contract, returns the wallet type, current `seqno` (needed for sending transactions), and `wallet_id`. Always check `wallet: true` before using wallet-specific fields. Call this before sending any transaction to get the current `seqno`.", "operationId": "getWalletInformation_get", "parameters": [ { @@ -1523,7 +1523,7 @@ "Utils" ], "summary": "Detect address", - "description": "Validates an address and returns it in all standard formats. Use this to convert between address formats or to validate user input. Returns raw format (0:abc), base64 bounceable (EQ), base64 non-bounceable (UQ), and URL-safe variants.", + "description": "Validates an address and returns it in all standard formats. Use this to convert between address formats or to validate user input. Returns raw format (`0:abc`), base64 bounceable (`EQ`), base64 non-bounceable (`UQ`), and URL-safe variants.", "operationId": "detectAddress_get", "parameters": [ { diff --git a/content/ecosystem/api/toncenter/v2/accounts/get-address-balance.mdx b/content/ecosystem/api/toncenter/v2/accounts/get-address-balance.mdx index 5bf40948f..918b6df6d 100644 --- a/content/ecosystem/api/toncenter/v2/accounts/get-address-balance.mdx +++ b/content/ecosystem/api/toncenter/v2/accounts/get-address-balance.mdx @@ -1,4 +1,21 @@ --- -openapi: get /api/v2/getAddressBalance +title: Get address balance +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: >- + Returns the TON balance of an account in nanotons. 1 TON = + 1,000,000,000 nanotons. A lightweight endpoint that returns only the + balance without contract code, data, or other account details. Returns + "0" for addresses that have never received any funds. --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v2/accounts/get-address-information.mdx b/content/ecosystem/api/toncenter/v2/accounts/get-address-information.mdx index eafb9cc56..ed3d32139 100644 --- a/content/ecosystem/api/toncenter/v2/accounts/get-address-information.mdx +++ b/content/ecosystem/api/toncenter/v2/accounts/get-address-information.mdx @@ -1,4 +1,22 @@ --- -openapi: get /api/v2/getAddressInformation +title: Get address information +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: >- + Returns the current state of any account on the TON blockchain. + Includes the balance (in nanotons), smart contract code and data (if + deployed), account status, and a reference to the last transaction. + This is the primary endpoint for checking if an address exists and + what's deployed there. --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v2/accounts/get-address-state.mdx b/content/ecosystem/api/toncenter/v2/accounts/get-address-state.mdx index 7795194f7..a6a58939a 100644 --- a/content/ecosystem/api/toncenter/v2/accounts/get-address-state.mdx +++ b/content/ecosystem/api/toncenter/v2/accounts/get-address-state.mdx @@ -1,4 +1,23 @@ --- -openapi: get /api/v2/getAddressState +title: Get address state +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: >- + Returns the lifecycle state of an account. Possible values: + `uninitialized` (address has no deployed contract but can receive + TON), `active` (contract is deployed and working), `frozen` (contract + suspended due to zero balance, send TON to unfreeze). Refer to the + [account lifecycle states documentation](/foundations/status) for + details. Check this before interacting with a contract. --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v2/accounts/get-extended-address-information.mdx b/content/ecosystem/api/toncenter/v2/accounts/get-extended-address-information.mdx index aa65bf0a1..8c3780c25 100644 --- a/content/ecosystem/api/toncenter/v2/accounts/get-extended-address-information.mdx +++ b/content/ecosystem/api/toncenter/v2/accounts/get-extended-address-information.mdx @@ -1,4 +1,21 @@ --- -openapi: get /api/v2/getExtendedAddressInformation +title: Get extended address information +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: >- + Returns detailed account information with parsed contract state. For + wallet contracts, identifies the wallet version (v3, v4, v5) and + extracts wallet-specific fields like `seqno` and public key. For other + contracts, returns the raw state. --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v2/accounts/get-token-data.mdx b/content/ecosystem/api/toncenter/v2/accounts/get-token-data.mdx index 0e40efd26..5c825c796 100644 --- a/content/ecosystem/api/toncenter/v2/accounts/get-token-data.mdx +++ b/content/ecosystem/api/toncenter/v2/accounts/get-token-data.mdx @@ -1,4 +1,22 @@ --- -openapi: get /api/v2/getTokenData +title: Get token data +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: >- + Returns metadata for Jetton or NFT contracts. Automatically detects + the contract type and returns appropriate fields. For Jetton masters: + total supply, admin, metadata. For Jetton wallets: balance, owner. For + NFT items: collection, owner, content. For NFT collections: item + count, metadata. --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v2/accounts/get-wallet-information.mdx b/content/ecosystem/api/toncenter/v2/accounts/get-wallet-information.mdx index 0a0d84c50..89a569f37 100644 --- a/content/ecosystem/api/toncenter/v2/accounts/get-wallet-information.mdx +++ b/content/ecosystem/api/toncenter/v2/accounts/get-wallet-information.mdx @@ -1,4 +1,22 @@ --- -openapi: get /api/v2/getWalletInformation +title: Get wallet information +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: >- + Returns wallet-specific information for an address. If the address is + a known wallet contract, returns the wallet type, current `seqno` + (needed for sending transactions), and `wallet_id`. Always check + `wallet: true` before using wallet-specific fields. Call this before + sending any transaction to get the current `seqno`. --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v2/blocks/get-block-header.mdx b/content/ecosystem/api/toncenter/v2/blocks/get-block-header.mdx index 3f0f3dd36..43fe83b64 100644 --- a/content/ecosystem/api/toncenter/v2/blocks/get-block-header.mdx +++ b/content/ecosystem/api/toncenter/v2/blocks/get-block-header.mdx @@ -1,4 +1,21 @@ --- -openapi: get /api/v2/getBlockHeader +title: Get block header +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: >- + Returns block metadata without the full transaction list. Includes + timestamps, validator info, and references to previous blocks. + Intended for block explorers and other use cases that require block + information without transactions. --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v2/blocks/get-consensus-block.mdx b/content/ecosystem/api/toncenter/v2/blocks/get-consensus-block.mdx index 016cedbc3..78566f562 100644 --- a/content/ecosystem/api/toncenter/v2/blocks/get-consensus-block.mdx +++ b/content/ecosystem/api/toncenter/v2/blocks/get-consensus-block.mdx @@ -1,4 +1,20 @@ --- -openapi: get /api/v2/getConsensusBlock +title: Get consensus block +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: >- + Returns the latest block that has reached consensus and is guaranteed + to be final. This block will never be reverted, making it safe for + confirming transactions that require absolute finality. --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v2/blocks/get-masterchain-block-signatures.mdx b/content/ecosystem/api/toncenter/v2/blocks/get-masterchain-block-signatures.mdx index 55b4b120f..5db779ed4 100644 --- a/content/ecosystem/api/toncenter/v2/blocks/get-masterchain-block-signatures.mdx +++ b/content/ecosystem/api/toncenter/v2/blocks/get-masterchain-block-signatures.mdx @@ -1,4 +1,21 @@ --- -openapi: get /api/v2/getMasterchainBlockSignatures +title: Get masterchain block signatures +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: >- + Returns validator signatures for a specific masterchain block. Each + signature proves that a validator approved this block. Use this for + building cryptographic proofs or verifying block authenticity in + trustless applications. --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v2/blocks/get-masterchain-info.mdx b/content/ecosystem/api/toncenter/v2/blocks/get-masterchain-info.mdx index a28cb54e3..e88db1cf7 100644 --- a/content/ecosystem/api/toncenter/v2/blocks/get-masterchain-info.mdx +++ b/content/ecosystem/api/toncenter/v2/blocks/get-masterchain-info.mdx @@ -1,4 +1,21 @@ --- -openapi: get /api/v2/getMasterchainInfo +title: Get masterchain info +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: >- + Returns the current state of the TON masterchain. The `last` field + contains the latest block used for querying current state. The `seqno` + in `last` is the current block height. Use this endpoint to obtain the + latest block reference for other queries. --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v2/blocks/get-outbound-message-queue-size.mdx b/content/ecosystem/api/toncenter/v2/blocks/get-outbound-message-queue-size.mdx index e6fb8e7dd..e1fa3d861 100644 --- a/content/ecosystem/api/toncenter/v2/blocks/get-outbound-message-queue-size.mdx +++ b/content/ecosystem/api/toncenter/v2/blocks/get-outbound-message-queue-size.mdx @@ -1,4 +1,21 @@ --- -openapi: get /api/v2/getOutMsgQueueSize +title: Get outbound message queue size +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: >- + Returns the current size of the outbound message queue for each shard. + A growing queue indicates network congestion. If the queue is large, + transactions may take longer to process. Monitor this to detect + network issues. --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v2/blocks/get-shard-block-proof.mdx b/content/ecosystem/api/toncenter/v2/blocks/get-shard-block-proof.mdx index e454bbcc3..57b741e85 100644 --- a/content/ecosystem/api/toncenter/v2/blocks/get-shard-block-proof.mdx +++ b/content/ecosystem/api/toncenter/v2/blocks/get-shard-block-proof.mdx @@ -1,4 +1,21 @@ --- -openapi: get /api/v2/getShardBlockProof +title: Get shard block proof +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: >- + Returns a Merkle proof that links a shardchain block to a masterchain + block. This proof cryptographically verifies that the shard block is + part of the canonical chain. Used by light clients and cross-chain + bridges to verify shard data without trusting the API. --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v2/blocks/get-shards.mdx b/content/ecosystem/api/toncenter/v2/blocks/get-shards.mdx index 067451823..24b9ece05 100644 --- a/content/ecosystem/api/toncenter/v2/blocks/get-shards.mdx +++ b/content/ecosystem/api/toncenter/v2/blocks/get-shards.mdx @@ -1,4 +1,21 @@ --- -openapi: get /api/v2/getShards +title: Get shards +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: >- + Returns the active shardchain block identifiers at a given masterchain + block height. Each shard processes a subset of accounts in parallel. + The response shows how the basechain is currently partitioned and + which block each shard is at. --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v2/blocks/lookup-block.mdx b/content/ecosystem/api/toncenter/v2/blocks/lookup-block.mdx index 04a8d7b4d..25df7d7d9 100644 --- a/content/ecosystem/api/toncenter/v2/blocks/lookup-block.mdx +++ b/content/ecosystem/api/toncenter/v2/blocks/lookup-block.mdx @@ -1,4 +1,22 @@ --- -openapi: get /api/v2/lookupBlock +title: Lookup block +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: >- + Finds a block by position or time. Specify workchain and shard, then + provide either: `seqno` (exact block number), lt (find block + containing this logical time), or unixtime (find block closest to this + timestamp). Returns the full block ID including hashes needed for + verification. --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v2/configuration/get-all-config-parameters.mdx b/content/ecosystem/api/toncenter/v2/configuration/get-all-config-parameters.mdx index 23b599bd4..27df15a23 100644 --- a/content/ecosystem/api/toncenter/v2/configuration/get-all-config-parameters.mdx +++ b/content/ecosystem/api/toncenter/v2/configuration/get-all-config-parameters.mdx @@ -1,4 +1,21 @@ --- -openapi: get /api/v2/getConfigAll +title: Get all config parameters +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: >- + Returns all blockchain configuration parameters at once. Includes gas + prices, validator settings, workchain configs, and governance rules. + Use the optional `seqno` to get historical configuration at a specific + block height. --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v2/configuration/get-config-parameter.mdx b/content/ecosystem/api/toncenter/v2/configuration/get-config-parameter.mdx index 6caecc7c9..bbca86a04 100644 --- a/content/ecosystem/api/toncenter/v2/configuration/get-config-parameter.mdx +++ b/content/ecosystem/api/toncenter/v2/configuration/get-config-parameter.mdx @@ -1,4 +1,22 @@ --- -openapi: get /api/v2/getConfigParam +title: Get config parameter +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: >- + Returns a specific blockchain configuration parameter. TON stores all + network settings on-chain as numbered parameters. Common ones: 0 + (config contract), 1 (elector), 15 (election timing), 17 (stake + limits), 20-21 (gas prices), 34 (current validators). Check TON + documentation for the full list. --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v2/configuration/get-libraries.mdx b/content/ecosystem/api/toncenter/v2/configuration/get-libraries.mdx index 33db6ce93..fa0b20118 100644 --- a/content/ecosystem/api/toncenter/v2/configuration/get-libraries.mdx +++ b/content/ecosystem/api/toncenter/v2/configuration/get-libraries.mdx @@ -1,4 +1,21 @@ --- -openapi: get /api/v2/getLibraries +title: Get libraries +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: >- + Returns smart contract library code by hash. Some contracts reference + shared libraries instead of including all code directly. When a + library reference appears in contract code, this endpoint fetches the + actual library implementation. --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v2/rpc/json-rpc-endpoint.mdx b/content/ecosystem/api/toncenter/v2/rpc/json-rpc-endpoint.mdx index 3bdc3397f..982bed68b 100644 --- a/content/ecosystem/api/toncenter/v2/rpc/json-rpc-endpoint.mdx +++ b/content/ecosystem/api/toncenter/v2/rpc/json-rpc-endpoint.mdx @@ -1,4 +1,21 @@ --- -openapi: post /api/v2/jsonRPC +title: JSON-RPC endpoint +full: true noindex: true +_openapi: + method: POST + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: >- + All API methods are available through this single endpoint using + JSON-RPC 2.0 protocol. Send the method name in the `method` field and + parameters as a dictionary in `params`. Useful for calling multiple + methods in sequence or when JSON-RPC is preferred over REST. --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v2/rpc/meta.json b/content/ecosystem/api/toncenter/v2/rpc/meta.json new file mode 100644 index 000000000..01a779486 --- /dev/null +++ b/content/ecosystem/api/toncenter/v2/rpc/meta.json @@ -0,0 +1,7 @@ +{ + "$schema": "../../../../../../meta-schema.json", + "title": "RPC", + "pages": [ + "json-rpc-endpoint" + ] +} diff --git a/content/ecosystem/api/toncenter/v2/run-method/run-get-method-standard.mdx b/content/ecosystem/api/toncenter/v2/run-method/run-get-method-standard.mdx index b5164c6d2..0f9170f68 100644 --- a/content/ecosystem/api/toncenter/v2/run-method/run-get-method-standard.mdx +++ b/content/ecosystem/api/toncenter/v2/run-method/run-get-method-standard.mdx @@ -1,4 +1,23 @@ --- -openapi: post /api/v2/runGetMethodStd +title: Run get method (standard) +full: true noindex: true +_openapi: + method: POST + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: >- + Executes a read-only method on a smart contract using typed stack + entries. Input and output stack entries use explicit types + (`TvmStackEntryNumber`, `TvmStackEntryCell`, etc.) for structured + input/output handling. Common methods: `seqno` (wallet sequence + number), `get_wallet_data` (wallet info), `get_jetton_data` (token + info). --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v2/run-method/run-get-method.mdx b/content/ecosystem/api/toncenter/v2/run-method/run-get-method.mdx index 6d7593d2b..3284bccb3 100644 --- a/content/ecosystem/api/toncenter/v2/run-method/run-get-method.mdx +++ b/content/ecosystem/api/toncenter/v2/run-method/run-get-method.mdx @@ -1,4 +1,22 @@ --- -openapi: post /api/v2/runGetMethod +title: Run get method +full: true noindex: true +_openapi: + method: POST + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: >- + Executes a read-only method on a smart contract. Get methods query + contract state without sending a transaction. Common methods include + `seqno` (wallet sequence number), `get_wallet_data` (wallet info), and + `get_jetton_data` (token info). Method arguments are provided in the + `stack` array. --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v2/send/estimate-fee.mdx b/content/ecosystem/api/toncenter/v2/send/estimate-fee.mdx index d14e55012..7a4062982 100644 --- a/content/ecosystem/api/toncenter/v2/send/estimate-fee.mdx +++ b/content/ecosystem/api/toncenter/v2/send/estimate-fee.mdx @@ -1,4 +1,22 @@ --- -openapi: post /api/v2/estimateFee +title: Estimate fee +full: true noindex: true +_openapi: + method: POST + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: >- + Calculates the fees required to send a message. Provide the + destination address and message body. For new contract deployments, + also include init_code and init_data. Set ignore_chksig to true when + estimating before signing. Returns a breakdown of storage, gas, and + forwarding fees. --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v2/send/send-boc-return-hash.mdx b/content/ecosystem/api/toncenter/v2/send/send-boc-return-hash.mdx index 24778aba0..59c8b915d 100644 --- a/content/ecosystem/api/toncenter/v2/send/send-boc-return-hash.mdx +++ b/content/ecosystem/api/toncenter/v2/send/send-boc-return-hash.mdx @@ -1,4 +1,22 @@ --- -openapi: post /api/v2/sendBocReturnHash +title: Send BoC (return hash) +full: true noindex: true +_openapi: + method: POST + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: >- + Broadcasts a signed message to the TON network and returns the message + hash. The `boc` parameter must contain a complete, signed external + message in base64 format. The API validates the message and forwards + it to validators. The returned hash can be used to track the message's + processing status. --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v2/send/send-boc.mdx b/content/ecosystem/api/toncenter/v2/send/send-boc.mdx index aed7aac3e..bd87e84ed 100644 --- a/content/ecosystem/api/toncenter/v2/send/send-boc.mdx +++ b/content/ecosystem/api/toncenter/v2/send/send-boc.mdx @@ -1,4 +1,22 @@ --- -openapi: post /api/v2/sendBoc +title: Send BoC +full: true noindex: true +_openapi: + method: POST + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: >- + Broadcasts a signed message to the TON network. The `boc` parameter + must contain a complete, signed external message in base64 format. The + API validates the message and forwards it to validators. Returns + immediately after acceptance; use getTransactions to confirm the + transaction was processed. --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v2/transactions/get-block-transactions-extended.mdx b/content/ecosystem/api/toncenter/v2/transactions/get-block-transactions-extended.mdx index 8d8f2d984..b4d00912c 100644 --- a/content/ecosystem/api/toncenter/v2/transactions/get-block-transactions-extended.mdx +++ b/content/ecosystem/api/toncenter/v2/transactions/get-block-transactions-extended.mdx @@ -1,4 +1,22 @@ --- -openapi: get /api/v2/getBlockTransactionsExt +title: Get block transactions (extended) +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: >- + Returns full transaction objects for all transactions in a specific + block. Each transaction includes complete data: inbound and outbound + messages, fees, state changes, and BoC-encoded raw data. Use `count` + to limit results and `after_lt`/`after_hash` for pagination when + `incomplete` is true. --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v2/transactions/get-block-transactions.mdx b/content/ecosystem/api/toncenter/v2/transactions/get-block-transactions.mdx index 2435f324d..cac2f00dc 100644 --- a/content/ecosystem/api/toncenter/v2/transactions/get-block-transactions.mdx +++ b/content/ecosystem/api/toncenter/v2/transactions/get-block-transactions.mdx @@ -1,4 +1,22 @@ --- -openapi: get /api/v2/getBlockTransactions +title: Get block transactions +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: >- + Returns a summary of transactions in a specific block. Each item + contains the account address and transaction ID, but not full + transaction details. Use `count` to limit results and + `after_lt`/`after_hash` for pagination. Call getTransactions with each + transaction ID to get full details. --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v2/transactions/get-transactions-standard.mdx b/content/ecosystem/api/toncenter/v2/transactions/get-transactions-standard.mdx index 5a126aa83..b91eb7f98 100644 --- a/content/ecosystem/api/toncenter/v2/transactions/get-transactions-standard.mdx +++ b/content/ecosystem/api/toncenter/v2/transactions/get-transactions-standard.mdx @@ -1,4 +1,22 @@ --- -openapi: get /api/v2/getTransactionsStd +title: Get transactions (standard) +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: >- + Returns transaction history for an account in a standardized format. + Transactions are returned newest-first. Each transaction includes the + triggering inbound message, all outbound messages, and fees paid. The + response includes a `previous_transaction_id` cursor for paginating + through older transactions. --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v2/transactions/get-transactions.mdx b/content/ecosystem/api/toncenter/v2/transactions/get-transactions.mdx index 62dca9fb3..cba6516d9 100644 --- a/content/ecosystem/api/toncenter/v2/transactions/get-transactions.mdx +++ b/content/ecosystem/api/toncenter/v2/transactions/get-transactions.mdx @@ -1,4 +1,22 @@ --- -openapi: get /api/v2/getTransactions +title: Get transactions +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: >- + Returns transaction history for an account. Transactions are returned + newest-first. Each transaction shows the incoming message that + triggered it, all outgoing messages, and fees paid. For pagination: + use the `lt` and `hash` from the oldest transaction as the starting + point for the next request. --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v2/transactions/try-locate-result-transaction.mdx b/content/ecosystem/api/toncenter/v2/transactions/try-locate-result-transaction.mdx index 59571679c..a35054152 100644 --- a/content/ecosystem/api/toncenter/v2/transactions/try-locate-result-transaction.mdx +++ b/content/ecosystem/api/toncenter/v2/transactions/try-locate-result-transaction.mdx @@ -1,4 +1,21 @@ --- -openapi: get /api/v2/tryLocateResultTx +title: Try locate result transaction +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: >- + Finds the transaction that received a specific message. Given message + parameters, returns the transaction on the destination account that + processed the incoming message. Use this to trace message delivery + across accounts. --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v2/transactions/try-locate-source-transaction.mdx b/content/ecosystem/api/toncenter/v2/transactions/try-locate-source-transaction.mdx index aa0ca5585..16d36ecb6 100644 --- a/content/ecosystem/api/toncenter/v2/transactions/try-locate-source-transaction.mdx +++ b/content/ecosystem/api/toncenter/v2/transactions/try-locate-source-transaction.mdx @@ -1,4 +1,21 @@ --- -openapi: get /api/v2/tryLocateSourceTx +title: Try locate source transaction +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: >- + Finds the transaction that sent a specific message. Given message + parameters, returns the transaction on the source account that created + this outgoing message. Useful for tracing where a message originated + from. --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v2/transactions/try-locate-transaction.mdx b/content/ecosystem/api/toncenter/v2/transactions/try-locate-transaction.mdx index 07e7446a3..1b1abfc6b 100644 --- a/content/ecosystem/api/toncenter/v2/transactions/try-locate-transaction.mdx +++ b/content/ecosystem/api/toncenter/v2/transactions/try-locate-transaction.mdx @@ -1,4 +1,21 @@ --- -openapi: get /api/v2/tryLocateTx +title: Try locate transaction +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: >- + Finds a transaction by message parameters. Given a source address, + destination address, and message creation time (created_lt), returns + the transaction that processed this message. Useful for locating when + a previously sent message was executed. --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v2/utils/detect-address.mdx b/content/ecosystem/api/toncenter/v2/utils/detect-address.mdx index d4eadfdf8..36a824178 100644 --- a/content/ecosystem/api/toncenter/v2/utils/detect-address.mdx +++ b/content/ecosystem/api/toncenter/v2/utils/detect-address.mdx @@ -1,4 +1,21 @@ --- -openapi: get /api/v2/detectAddress +title: Detect address +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: >- + Validates an address and returns it in all standard formats. Use this + to convert between address formats or to validate user input. Returns + raw format (`0:abc`), base64 bounceable (`EQ`), base64 non-bounceable + (`UQ`), and URL-safe variants. --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v2/utils/detect-hash.mdx b/content/ecosystem/api/toncenter/v2/utils/detect-hash.mdx index 14827358e..88be05169 100644 --- a/content/ecosystem/api/toncenter/v2/utils/detect-hash.mdx +++ b/content/ecosystem/api/toncenter/v2/utils/detect-hash.mdx @@ -1,4 +1,21 @@ --- -openapi: get /api/v2/detectHash +title: Detect hash +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: >- + Validates a hash and returns it in all standard formats. Use this to + convert between hex (64 chars) and base64 (44 chars) representations. + Works with any 256-bit hash including transaction hashes, block + hashes, and message hashes. --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v2/utils/pack-address.mdx b/content/ecosystem/api/toncenter/v2/utils/pack-address.mdx index e3be26ee5..2a0304a31 100644 --- a/content/ecosystem/api/toncenter/v2/utils/pack-address.mdx +++ b/content/ecosystem/api/toncenter/v2/utils/pack-address.mdx @@ -1,4 +1,20 @@ --- -openapi: get /api/v2/packAddress +title: Pack address +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: >- + Converts a raw address to user-friendly base64 format. Raw addresses + use the format `workchain:hex` (e.g., `0:abc...`). The packed format + is shorter and includes a checksum for error detection. --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v2/utils/unpack-address.mdx b/content/ecosystem/api/toncenter/v2/utils/unpack-address.mdx index 92af90d74..b35f1b8da 100644 --- a/content/ecosystem/api/toncenter/v2/utils/unpack-address.mdx +++ b/content/ecosystem/api/toncenter/v2/utils/unpack-address.mdx @@ -1,4 +1,20 @@ --- -openapi: get /api/v2/unpackAddress +title: Unpack address +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: >- + Converts a user-friendly base64 address back to its raw components. + Returns the workchain ID, account hex, and flags indicating if the + address is bounceable or testnet-only. --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v3.yaml b/content/ecosystem/api/toncenter/v3.yaml index 84344fe42..d92165587 100644 --- a/content/ecosystem/api/toncenter/v3.yaml +++ b/content/ecosystem/api/toncenter/v3.yaml @@ -282,7 +282,7 @@ paths: security: [] description: Get smart contract information. tags: - - Api/v2 + - API v2 summary: Get Address Information operationId: api_v3_get_v2_addressInformation parameters: @@ -576,7 +576,7 @@ paths: description: Estimate fees required for query processing. Fields body, init-code and init-data accepted in serialized format (b64-encoded). tags: - - Api/v2 + - API v2 summary: Estimate Fee operationId: api_v3_post_v2_estimate_fee requestBody: @@ -1033,7 +1033,7 @@ paths: security: [] description: Send an external message to the TON network. tags: - - Api/v2 + - API v2 summary: Send Message operationId: api_v3_post_v2_message requestBody: @@ -1737,7 +1737,7 @@ paths: ] ``` tags: - - Api/v2 + - API v2 summary: Run Get-Method operationId: api_v3_post_v2_rungetmethod requestBody: @@ -2235,7 +2235,7 @@ paths: description: 'Get wallet smart contract information. The following wallets are supported: `v1r1`, `v1r2`, `v1r3`, `v2r1`, `v2r2`, `v3r1`, `v3r2`, `v4r1`, `v4r2`, `v5beta`, `v5r1`. In case the account is not a wallet error code 409 is returned.' tags: - - Api/v2 + - API v2 summary: Get Wallet Information operationId: api_v3_get_wallet_information parameters: @@ -2295,6 +2295,29 @@ paths: application/json: schema: $ref: '#/components/schemas/RequestError' +tags: +- name: Accounts + description: Information about accounts +- name: Actions and traces + description: High-level actions and execution traces +- name: Blockchain Data + description: Blocks, transactions and messages +- name: Jettons + description: Jetton masters, wallets, transfers and burns +- name: NFTs + description: NFT collections, items and transfers +- name: Dns + description: DNS records +- name: Multisig + description: Multisig wallets and orders +- name: Stats + description: Aggregated blockchain statistics +- name: Vesting + description: Vesting contracts +- name: Utils + description: Some useful methods +- name: API v2 + description: Endpoints proxied from API v2 components: schemas: AccountBalance: @@ -2989,7 +3012,7 @@ components: actions: type: array items: - $ref: '#/components/schemas/index.OrderAction' + $ref: '#/components/schemas/OrderAction' address: type: string approvals_mask: @@ -3481,7 +3504,7 @@ components: vesting_contracts: type: array items: - $ref: '#/components/schemas/index.VestingInfo' + $ref: '#/components/schemas/VestingInfo' WalletState: type: object properties: diff --git a/content/ecosystem/api/toncenter/v3/accounts/address-book.mdx b/content/ecosystem/api/toncenter/v3/accounts/address-book.mdx index 21dc6dcef..0841a98a1 100644 --- a/content/ecosystem/api/toncenter/v3/accounts/address-book.mdx +++ b/content/ecosystem/api/toncenter/v3/accounts/address-book.mdx @@ -1,4 +1,17 @@ --- -openapi: get /api/v3/addressBook +title: Address Book +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: Query address book --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v3/accounts/get-account-states.mdx b/content/ecosystem/api/toncenter/v3/accounts/get-account-states.mdx index 4dc7f4198..421ef1a8c 100644 --- a/content/ecosystem/api/toncenter/v3/accounts/get-account-states.mdx +++ b/content/ecosystem/api/toncenter/v3/accounts/get-account-states.mdx @@ -1,4 +1,17 @@ --- -openapi: get /api/v3/accountStates +title: Get Account States +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: Query account states --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v3/accounts/get-wallet-states.mdx b/content/ecosystem/api/toncenter/v3/accounts/get-wallet-states.mdx index 8d3c5edff..3ae04d9a6 100644 --- a/content/ecosystem/api/toncenter/v3/accounts/get-wallet-states.mdx +++ b/content/ecosystem/api/toncenter/v3/accounts/get-wallet-states.mdx @@ -1,4 +1,17 @@ --- -openapi: get /api/v3/walletStates +title: Get Wallet States +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: Query wallet information --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v3/accounts/metadata.mdx b/content/ecosystem/api/toncenter/v3/accounts/metadata.mdx index 9e5e70b3e..b456c8feb 100644 --- a/content/ecosystem/api/toncenter/v3/accounts/metadata.mdx +++ b/content/ecosystem/api/toncenter/v3/accounts/metadata.mdx @@ -1,4 +1,17 @@ --- -openapi: get /api/v3/metadata +title: Metadata +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: Query address metadata --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v3/actions-and-traces/get-actions.mdx b/content/ecosystem/api/toncenter/v3/actions-and-traces/get-actions.mdx index 0b240caad..b7f50d832 100644 --- a/content/ecosystem/api/toncenter/v3/actions-and-traces/get-actions.mdx +++ b/content/ecosystem/api/toncenter/v3/actions-and-traces/get-actions.mdx @@ -1,4 +1,17 @@ --- -openapi: get /api/v3/actions +title: Get Actions +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: Get actions by specified filter. --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v3/actions-and-traces/get-pending-actions.mdx b/content/ecosystem/api/toncenter/v3/actions-and-traces/get-pending-actions.mdx index 3b0085c4a..ae4957d11 100644 --- a/content/ecosystem/api/toncenter/v3/actions-and-traces/get-pending-actions.mdx +++ b/content/ecosystem/api/toncenter/v3/actions-and-traces/get-pending-actions.mdx @@ -1,4 +1,17 @@ --- -openapi: get /api/v3/pendingActions +title: Get Pending Actions +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: Get actions by specified filter. --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v3/actions-and-traces/get-pending-traces.mdx b/content/ecosystem/api/toncenter/v3/actions-and-traces/get-pending-traces.mdx index 8f8689a74..bf19b1b2b 100644 --- a/content/ecosystem/api/toncenter/v3/actions-and-traces/get-pending-traces.mdx +++ b/content/ecosystem/api/toncenter/v3/actions-and-traces/get-pending-traces.mdx @@ -1,4 +1,17 @@ --- -openapi: get /api/v3/pendingTraces +title: Get Pending Traces +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: Get traces by specified filter. --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v3/actions-and-traces/get-traces.mdx b/content/ecosystem/api/toncenter/v3/actions-and-traces/get-traces.mdx index 03bd23b64..087416b3f 100644 --- a/content/ecosystem/api/toncenter/v3/actions-and-traces/get-traces.mdx +++ b/content/ecosystem/api/toncenter/v3/actions-and-traces/get-traces.mdx @@ -1,4 +1,17 @@ --- -openapi: get /api/v3/traces +title: Get Traces +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: Get traces by specified filter. --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v3/api-v2/estimate-fee.mdx b/content/ecosystem/api/toncenter/v3/api-v2/estimate-fee.mdx new file mode 100644 index 000000000..1be7c529c --- /dev/null +++ b/content/ecosystem/api/toncenter/v3/api-v2/estimate-fee.mdx @@ -0,0 +1,19 @@ +--- +title: Estimate Fee +full: true +noindex: true +_openapi: + method: POST + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: >- + Estimate fees required for query processing. Fields body, init-code + and init-data accepted in serialized format (b64-encoded). +--- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v3/api-v2/get-address-information.mdx b/content/ecosystem/api/toncenter/v3/api-v2/get-address-information.mdx new file mode 100644 index 000000000..ea9d3cc19 --- /dev/null +++ b/content/ecosystem/api/toncenter/v3/api-v2/get-address-information.mdx @@ -0,0 +1,17 @@ +--- +title: Get Address Information +full: true +noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: Get smart contract information. +--- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v3/api-v2/get-wallet-information.mdx b/content/ecosystem/api/toncenter/v3/api-v2/get-wallet-information.mdx new file mode 100644 index 000000000..7940493db --- /dev/null +++ b/content/ecosystem/api/toncenter/v3/api-v2/get-wallet-information.mdx @@ -0,0 +1,21 @@ +--- +title: Get Wallet Information +full: true +noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: >- + Get wallet smart contract information. The following wallets are + supported: `v1r1`, `v1r2`, `v1r3`, `v2r1`, `v2r2`, `v3r1`, `v3r2`, + `v4r1`, `v4r2`, `v5beta`, `v5r1`. In case the account is not a wallet + error code 409 is returned. +--- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v3/api-v2/meta.json b/content/ecosystem/api/toncenter/v3/api-v2/meta.json new file mode 100644 index 000000000..de3ddf3aa --- /dev/null +++ b/content/ecosystem/api/toncenter/v3/api-v2/meta.json @@ -0,0 +1,8 @@ +{ + "$schema": "../../../../../../meta-schema.json", + "title": "Legacy (v2)", + "defaultOpen": true, + "pages": [ + "..." + ] +} diff --git a/content/ecosystem/api/toncenter/v3/api-v2/run-get-method.mdx b/content/ecosystem/api/toncenter/v3/api-v2/run-get-method.mdx new file mode 100644 index 000000000..cfa436313 --- /dev/null +++ b/content/ecosystem/api/toncenter/v3/api-v2/run-get-method.mdx @@ -0,0 +1,51 @@ +--- +title: Run Get-Method +full: true +noindex: true +_openapi: + method: POST + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: >- + Run get method of smart contract. Stack supports only `num`, `cell` + and `slice` types: + + ``` + + [ + + { + + "type": "num", + + "value": "0x12a" + + }, + + { + + "type": "cell", + + "value": "te6..." // base64 encoded boc with cell + + }, + + { + + "type": "slice", + + "value": "te6..." // base64 encoded boc with slice + + } + + ] + + ``` +--- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v3/api-v2/send-message.mdx b/content/ecosystem/api/toncenter/v3/api-v2/send-message.mdx new file mode 100644 index 000000000..d51b1eeb0 --- /dev/null +++ b/content/ecosystem/api/toncenter/v3/api-v2/send-message.mdx @@ -0,0 +1,17 @@ +--- +title: Send Message +full: true +noindex: true +_openapi: + method: POST + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: Send an external message to the TON network. +--- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v3/apiv2/estimate-fee.mdx b/content/ecosystem/api/toncenter/v3/apiv2/estimate-fee.mdx deleted file mode 100644 index ff6e0598c..000000000 --- a/content/ecosystem/api/toncenter/v3/apiv2/estimate-fee.mdx +++ /dev/null @@ -1,4 +0,0 @@ ---- -openapi: post /api/v3/estimateFee -noindex: true ---- diff --git a/content/ecosystem/api/toncenter/v3/apiv2/get-address-information.mdx b/content/ecosystem/api/toncenter/v3/apiv2/get-address-information.mdx deleted file mode 100644 index 095734acf..000000000 --- a/content/ecosystem/api/toncenter/v3/apiv2/get-address-information.mdx +++ /dev/null @@ -1,4 +0,0 @@ ---- -openapi: get /api/v3/addressInformation -noindex: true ---- diff --git a/content/ecosystem/api/toncenter/v3/apiv2/get-wallet-information.mdx b/content/ecosystem/api/toncenter/v3/apiv2/get-wallet-information.mdx deleted file mode 100644 index 32c8d604b..000000000 --- a/content/ecosystem/api/toncenter/v3/apiv2/get-wallet-information.mdx +++ /dev/null @@ -1,4 +0,0 @@ ---- -openapi: get /api/v3/walletInformation -noindex: true ---- diff --git a/content/ecosystem/api/toncenter/v3/apiv2/run-get-method.mdx b/content/ecosystem/api/toncenter/v3/apiv2/run-get-method.mdx deleted file mode 100644 index d8e712b4e..000000000 --- a/content/ecosystem/api/toncenter/v3/apiv2/run-get-method.mdx +++ /dev/null @@ -1,4 +0,0 @@ ---- -openapi: post /api/v3/runGetMethod -noindex: true ---- diff --git a/content/ecosystem/api/toncenter/v3/apiv2/send-message.mdx b/content/ecosystem/api/toncenter/v3/apiv2/send-message.mdx deleted file mode 100644 index 922340810..000000000 --- a/content/ecosystem/api/toncenter/v3/apiv2/send-message.mdx +++ /dev/null @@ -1,4 +0,0 @@ ---- -openapi: post /api/v3/message -noindex: true ---- diff --git a/content/ecosystem/api/toncenter/v3/blockchain-data/get-adjacent-transactions.mdx b/content/ecosystem/api/toncenter/v3/blockchain-data/get-adjacent-transactions.mdx index a88daadfc..b86d3c911 100644 --- a/content/ecosystem/api/toncenter/v3/blockchain-data/get-adjacent-transactions.mdx +++ b/content/ecosystem/api/toncenter/v3/blockchain-data/get-adjacent-transactions.mdx @@ -1,4 +1,17 @@ --- -openapi: get /api/v3/adjacentTransactions +title: Get Adjacent Transactions +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: Get parent and/or children for specified transaction. --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v3/blockchain-data/get-blocks.mdx b/content/ecosystem/api/toncenter/v3/blockchain-data/get-blocks.mdx index 092297c8c..40cac4152 100644 --- a/content/ecosystem/api/toncenter/v3/blockchain-data/get-blocks.mdx +++ b/content/ecosystem/api/toncenter/v3/blockchain-data/get-blocks.mdx @@ -1,4 +1,17 @@ --- -openapi: get /api/v3/blocks +title: Get blocks +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: Returns blocks by specified filters. --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v3/blockchain-data/get-masterchain-block-shard-state-1.mdx b/content/ecosystem/api/toncenter/v3/blockchain-data/get-masterchain-block-shard-state-1.mdx deleted file mode 100644 index 883a134eb..000000000 --- a/content/ecosystem/api/toncenter/v3/blockchain-data/get-masterchain-block-shard-state-1.mdx +++ /dev/null @@ -1,4 +0,0 @@ ---- -openapi: get /api/v3/masterchainBlockShards -noindex: true ---- diff --git a/content/ecosystem/api/toncenter/v3/blockchain-data/get-masterchain-block-shard-state.mdx b/content/ecosystem/api/toncenter/v3/blockchain-data/get-masterchain-block-shard-state.mdx index 9853f23c8..70eb71996 100644 --- a/content/ecosystem/api/toncenter/v3/blockchain-data/get-masterchain-block-shard-state.mdx +++ b/content/ecosystem/api/toncenter/v3/blockchain-data/get-masterchain-block-shard-state.mdx @@ -1,4 +1,19 @@ --- -openapi: get /api/v3/masterchainBlockShardState +title: Get masterchain block shard state +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: >- + Returns all workchain blocks, that appeared after previous masterchain + block. --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v3/blockchain-data/get-masterchain-info.mdx b/content/ecosystem/api/toncenter/v3/blockchain-data/get-masterchain-info.mdx index 6afe115a5..14e7f5a0b 100644 --- a/content/ecosystem/api/toncenter/v3/blockchain-data/get-masterchain-info.mdx +++ b/content/ecosystem/api/toncenter/v3/blockchain-data/get-masterchain-info.mdx @@ -1,4 +1,17 @@ --- -openapi: get /api/v3/masterchainInfo +title: Get Masterchain Info +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: Get first and last indexed block --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v3/blockchain-data/get-messages.mdx b/content/ecosystem/api/toncenter/v3/blockchain-data/get-messages.mdx index 3ec897c6c..52700b0d3 100644 --- a/content/ecosystem/api/toncenter/v3/blockchain-data/get-messages.mdx +++ b/content/ecosystem/api/toncenter/v3/blockchain-data/get-messages.mdx @@ -1,4 +1,17 @@ --- -openapi: get /api/v3/messages +title: Get messages +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: Get messages by specified filters. --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v3/blockchain-data/get-pending-transactions.mdx b/content/ecosystem/api/toncenter/v3/blockchain-data/get-pending-transactions.mdx index 402c9a516..ff55fedec 100644 --- a/content/ecosystem/api/toncenter/v3/blockchain-data/get-pending-transactions.mdx +++ b/content/ecosystem/api/toncenter/v3/blockchain-data/get-pending-transactions.mdx @@ -1,4 +1,17 @@ --- -openapi: get /api/v3/pendingTransactions +title: Get pending transactions +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: Get pending transactions by specified filter. --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v3/blockchain-data/get-transactions-by-masterchain-block.mdx b/content/ecosystem/api/toncenter/v3/blockchain-data/get-transactions-by-masterchain-block.mdx index f3b2632eb..886969b1d 100644 --- a/content/ecosystem/api/toncenter/v3/blockchain-data/get-transactions-by-masterchain-block.mdx +++ b/content/ecosystem/api/toncenter/v3/blockchain-data/get-transactions-by-masterchain-block.mdx @@ -1,4 +1,17 @@ --- -openapi: get /api/v3/transactionsByMasterchainBlock +title: Get transactions by Masterchain block +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: Returns transactions from masterchain block and from all shards. --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v3/blockchain-data/get-transactions-by-message.mdx b/content/ecosystem/api/toncenter/v3/blockchain-data/get-transactions-by-message.mdx index 78a23dd02..ea45babe4 100644 --- a/content/ecosystem/api/toncenter/v3/blockchain-data/get-transactions-by-message.mdx +++ b/content/ecosystem/api/toncenter/v3/blockchain-data/get-transactions-by-message.mdx @@ -1,4 +1,19 @@ --- -openapi: get /api/v3/transactionsByMessage +title: Get transactions by message +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: >- + Get transactions whose inbound/outbound message has the specified + hash. \ --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v3/blockchain-data/get-transactions.mdx b/content/ecosystem/api/toncenter/v3/blockchain-data/get-transactions.mdx index b74fc26d8..ceb582e7c 100644 --- a/content/ecosystem/api/toncenter/v3/blockchain-data/get-transactions.mdx +++ b/content/ecosystem/api/toncenter/v3/blockchain-data/get-transactions.mdx @@ -1,4 +1,17 @@ --- -openapi: get /api/v3/transactions +title: Get transactions +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: Get transactions by specified filter. --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v3/dns/get-dns-records.mdx b/content/ecosystem/api/toncenter/v3/dns/get-dns-records.mdx index e0f019d63..84f46dfb3 100644 --- a/content/ecosystem/api/toncenter/v3/dns/get-dns-records.mdx +++ b/content/ecosystem/api/toncenter/v3/dns/get-dns-records.mdx @@ -1,4 +1,19 @@ --- -openapi: get /api/v3/dns/records +title: Get DNS Records +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: >- + Query DNS records by specified filters. Currently .ton and .t.me DNS + are supported. --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v3/dns/meta.json b/content/ecosystem/api/toncenter/v3/dns/meta.json new file mode 100644 index 000000000..8fc199080 --- /dev/null +++ b/content/ecosystem/api/toncenter/v3/dns/meta.json @@ -0,0 +1,8 @@ +{ + "$schema": "../../../../../../meta-schema.json", + "title": "DNS", + "defaultOpen": true, + "pages": [ + "..." + ] +} diff --git a/content/ecosystem/api/toncenter/v3/jettons/get-jetton-burns.mdx b/content/ecosystem/api/toncenter/v3/jettons/get-jetton-burns.mdx index 05f1b90e9..db4f3bbfc 100644 --- a/content/ecosystem/api/toncenter/v3/jettons/get-jetton-burns.mdx +++ b/content/ecosystem/api/toncenter/v3/jettons/get-jetton-burns.mdx @@ -1,4 +1,17 @@ --- -openapi: get /api/v3/jetton/burns +title: Get Jetton Burns +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: Get Jetton burns by specified filters --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v3/jettons/get-jetton-masters.mdx b/content/ecosystem/api/toncenter/v3/jettons/get-jetton-masters.mdx index 8ccc1f85f..9d180e7b5 100644 --- a/content/ecosystem/api/toncenter/v3/jettons/get-jetton-masters.mdx +++ b/content/ecosystem/api/toncenter/v3/jettons/get-jetton-masters.mdx @@ -1,4 +1,17 @@ --- -openapi: get /api/v3/jetton/masters +title: Get Jetton Masters +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: Get Jetton masters by specified filters --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v3/jettons/get-jetton-transfers.mdx b/content/ecosystem/api/toncenter/v3/jettons/get-jetton-transfers.mdx index 96e9b36d0..9c48c6322 100644 --- a/content/ecosystem/api/toncenter/v3/jettons/get-jetton-transfers.mdx +++ b/content/ecosystem/api/toncenter/v3/jettons/get-jetton-transfers.mdx @@ -1,4 +1,17 @@ --- -openapi: get /api/v3/jetton/transfers +title: Get Jetton Transfers +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: Get Jetton transfers by specified filters --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v3/jettons/get-jetton-wallets.mdx b/content/ecosystem/api/toncenter/v3/jettons/get-jetton-wallets.mdx index e4ba986e4..3d99cd2c5 100644 --- a/content/ecosystem/api/toncenter/v3/jettons/get-jetton-wallets.mdx +++ b/content/ecosystem/api/toncenter/v3/jettons/get-jetton-wallets.mdx @@ -1,4 +1,17 @@ --- -openapi: get /api/v3/jetton/wallets +title: Get Jetton Wallets +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: Get Jetton wallets by specified filters --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v3/multisig/get-multisig-orders.mdx b/content/ecosystem/api/toncenter/v3/multisig/get-multisig-orders.mdx index 462553209..ecb0bd5e6 100644 --- a/content/ecosystem/api/toncenter/v3/multisig/get-multisig-orders.mdx +++ b/content/ecosystem/api/toncenter/v3/multisig/get-multisig-orders.mdx @@ -1,4 +1,17 @@ --- -openapi: get /api/v3/multisig/orders +title: Get Multisig Orders +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: Get multisig orders by specified filters --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v3/multisig/get-multisig-wallets.mdx b/content/ecosystem/api/toncenter/v3/multisig/get-multisig-wallets.mdx index e9a891014..df5b7b4e2 100644 --- a/content/ecosystem/api/toncenter/v3/multisig/get-multisig-wallets.mdx +++ b/content/ecosystem/api/toncenter/v3/multisig/get-multisig-wallets.mdx @@ -1,4 +1,17 @@ --- -openapi: get /api/v3/multisig/wallets +title: Get Multisig Wallets +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: Get multisig contracts by specified filters with associated orders --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v3/nfts/get-nft-collections.mdx b/content/ecosystem/api/toncenter/v3/nfts/get-nft-collections.mdx index 63d2bc76f..4ff6bc041 100644 --- a/content/ecosystem/api/toncenter/v3/nfts/get-nft-collections.mdx +++ b/content/ecosystem/api/toncenter/v3/nfts/get-nft-collections.mdx @@ -1,4 +1,17 @@ --- -openapi: get /api/v3/nft/collections +title: Get NFT collections +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: Get NFT collections by specified filters --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v3/nfts/get-nft-items.mdx b/content/ecosystem/api/toncenter/v3/nfts/get-nft-items.mdx index dad4c7363..6701d2477 100644 --- a/content/ecosystem/api/toncenter/v3/nfts/get-nft-items.mdx +++ b/content/ecosystem/api/toncenter/v3/nfts/get-nft-items.mdx @@ -1,4 +1,17 @@ --- -openapi: get /api/v3/nft/items +title: Get NFT items +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: Get NFT items by specified filters --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v3/nfts/get-nft-transfers.mdx b/content/ecosystem/api/toncenter/v3/nfts/get-nft-transfers.mdx index 702c3d71b..8e60a5431 100644 --- a/content/ecosystem/api/toncenter/v3/nfts/get-nft-transfers.mdx +++ b/content/ecosystem/api/toncenter/v3/nfts/get-nft-transfers.mdx @@ -1,4 +1,17 @@ --- -openapi: get /api/v3/nft/transfers +title: Get NFT Transfers +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: Get transfers of NFT items by specified filters --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v3/nfts/meta.json b/content/ecosystem/api/toncenter/v3/nfts/meta.json new file mode 100644 index 000000000..bcf8b25a0 --- /dev/null +++ b/content/ecosystem/api/toncenter/v3/nfts/meta.json @@ -0,0 +1,8 @@ +{ + "$schema": "../../../../../../meta-schema.json", + "title": "NFTs", + "defaultOpen": true, + "pages": [ + "..." + ] +} diff --git a/content/ecosystem/api/toncenter/v3/overview.mdx b/content/ecosystem/api/toncenter/v3/overview.mdx index 5f19dd45b..895288989 100644 --- a/content/ecosystem/api/toncenter/v3/overview.mdx +++ b/content/ecosystem/api/toncenter/v3/overview.mdx @@ -62,11 +62,11 @@ It reads raw data from a node's RocksDB storage, parses and decodes it, and stor | Vesting | [`GET /vesting`](/ecosystem/api/toncenter/v3/vesting/get-vesting-contracts) | Get Vesting Contracts | | Stats | [`GET /topAccountsByBalance`](/ecosystem/api/toncenter/v3/stats/get-top-accounts-by-balance) | Get Top Accounts By Balance | | Utils | [`GET /decode`](/ecosystem/api/toncenter/v3/utils/decode-opcodes-and-bodies) | Decode Opcodes and Bodies | -| Legacy (v2) | [`GET /addressInformation`](/ecosystem/api/toncenter/v3/apiv2/get-address-information) | Get Address Information | -| Legacy (v2) | [`POST /estimateFee`](/ecosystem/api/toncenter/v3/apiv2/estimate-fee) | Estimate Fee | -| Legacy (v2) | [`POST /message`](/ecosystem/api/toncenter/v3/apiv2/send-message) | Send Message | -| Legacy (v2) | [`POST /runGetMethod`](/ecosystem/api/toncenter/v3/apiv2/run-get-method) | Run Get-Method | -| Legacy (v2) | [`GET /walletInformation`](/ecosystem/api/toncenter/v3/apiv2/get-wallet-information) | Get Wallet Information | +| Legacy (v2) | [`GET /addressInformation`](/ecosystem/api/toncenter/v3/api-v2/get-address-information) | Get Address Information | +| Legacy (v2) | [`POST /estimateFee`](/ecosystem/api/toncenter/v3/api-v2/estimate-fee) | Estimate Fee | +| Legacy (v2) | [`POST /message`](/ecosystem/api/toncenter/v3/api-v2/send-message) | Send Message | +| Legacy (v2) | [`POST /runGetMethod`](/ecosystem/api/toncenter/v3/api-v2/run-get-method) | Run Get-Method | +| Legacy (v2) | [`GET /walletInformation`](/ecosystem/api/toncenter/v3/api-v2/get-wallet-information) | Get Wallet Information | {/* END_AUTO_GENERATED: API_V3_ENDPOINTS */} ## How to access the API diff --git a/content/ecosystem/api/toncenter/v3/stats/get-top-accounts-by-balance.mdx b/content/ecosystem/api/toncenter/v3/stats/get-top-accounts-by-balance.mdx index 372f8f7ee..b398ba71c 100644 --- a/content/ecosystem/api/toncenter/v3/stats/get-top-accounts-by-balance.mdx +++ b/content/ecosystem/api/toncenter/v3/stats/get-top-accounts-by-balance.mdx @@ -1,4 +1,17 @@ --- -openapi: get /api/v3/topAccountsByBalance +title: Get Top Accounts By Balance +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: Get list of accounts sorted descending by balance. --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v3/utils/decode-opcodes-and-bodies-1.mdx b/content/ecosystem/api/toncenter/v3/utils/decode-opcodes-and-bodies-1.mdx deleted file mode 100644 index c57b4ba7a..000000000 --- a/content/ecosystem/api/toncenter/v3/utils/decode-opcodes-and-bodies-1.mdx +++ /dev/null @@ -1,4 +0,0 @@ ---- -openapi: post /api/v3/decode -noindex: true ---- diff --git a/content/ecosystem/api/toncenter/v3/utils/decode-opcodes-and-bodies.mdx b/content/ecosystem/api/toncenter/v3/utils/decode-opcodes-and-bodies.mdx index 698d2a586..9ce2c1e1a 100644 --- a/content/ecosystem/api/toncenter/v3/utils/decode-opcodes-and-bodies.mdx +++ b/content/ecosystem/api/toncenter/v3/utils/decode-opcodes-and-bodies.mdx @@ -1,4 +1,21 @@ --- -openapi: get /api/v3/decode +title: Decode Opcodes and Bodies +full: true noindex: true +_openapi: + method: POST + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: >- + Decode opcodes and message bodies. Opcodes can be in hex (with or + without 0x prefix) or decimal format. Bodies should be in base64 or + hex format. Use POST method for long parameters that may be truncated + in GET requests. --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/api/toncenter/v3/vesting/get-vesting-contracts.mdx b/content/ecosystem/api/toncenter/v3/vesting/get-vesting-contracts.mdx index bb080eb23..a5ddd8597 100644 --- a/content/ecosystem/api/toncenter/v3/vesting/get-vesting-contracts.mdx +++ b/content/ecosystem/api/toncenter/v3/vesting/get-vesting-contracts.mdx @@ -1,4 +1,17 @@ --- -openapi: get /api/v3/vesting +title: Get Vesting Contracts +full: true noindex: true +_openapi: + method: GET + webhook: false + toc: [] + structuredData: + headings: [] + contents: + - content: Get vesting contracts by specified filters --- + +{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */} + + diff --git a/content/ecosystem/appkit/meta.json b/content/ecosystem/appkit/meta.json new file mode 100644 index 000000000..f276e8747 --- /dev/null +++ b/content/ecosystem/appkit/meta.json @@ -0,0 +1,13 @@ +{ + "$schema": "../../../meta-schema.json", + "title": "AppKit", + "pages": [ + "overview", + "init", + "toncoin", + "jettons", + "nfts", + "swap", + "stake" + ] +} diff --git a/content/ecosystem/explorers/meta.json b/content/ecosystem/explorers/meta.json new file mode 100644 index 000000000..08cfc25aa --- /dev/null +++ b/content/ecosystem/explorers/meta.json @@ -0,0 +1,8 @@ +{ + "$schema": "../../../meta-schema.json", + "title": "Explorers", + "pages": [ + "overview", + "tonviewer" + ] +} diff --git a/content/ecosystem/meta.json b/content/ecosystem/meta.json new file mode 100644 index 000000000..8c7eb90b0 --- /dev/null +++ b/content/ecosystem/meta.json @@ -0,0 +1,23 @@ +{ + "$schema": "../../meta-schema.json", + "title": "Ecosystem", + "pages": [ + "ai", + "wallet-apps", + "explorers", + "sdks", + "api", + "subsecond", + "status", + "analytics", + "oracles", + "bridges", + "ton-connect", + "appkit", + "walletkit", + "ton-pay", + "tma", + "nodes", + "staking" + ] +} diff --git a/content/ecosystem/nodes/cpp/meta.json b/content/ecosystem/nodes/cpp/meta.json new file mode 100644 index 000000000..81585299b --- /dev/null +++ b/content/ecosystem/nodes/cpp/meta.json @@ -0,0 +1,12 @@ +{ + "$schema": "../../../../meta-schema.json", + "title": "C++ node", + "pages": [ + "setup-mytonctrl", + "run-validator", + "run-archive-liteserver", + "integrating-with-prometheus", + "setup-mylocalton", + "mytonctrl" + ] +} diff --git a/content/ecosystem/nodes/cpp/mytonctrl/meta.json b/content/ecosystem/nodes/cpp/mytonctrl/meta.json new file mode 100644 index 000000000..dd7d1c0c1 --- /dev/null +++ b/content/ecosystem/nodes/cpp/mytonctrl/meta.json @@ -0,0 +1,19 @@ +{ + "$schema": "../../../../../meta-schema.json", + "title": "MyTonCtrl reference", + "pages": [ + "overview", + "core", + "installer", + "wallet", + "validator", + "collator", + "pools", + "liquid-staking", + "custom-overlays", + "utilities", + "alerting", + "backups", + "btc-teleport" + ] +} diff --git a/content/ecosystem/nodes/cpp/run-archive-liteserver.mdx b/content/ecosystem/nodes/cpp/run-archive-liteserver.mdx index 076c8702d..df4c2dd5b 100644 --- a/content/ecosystem/nodes/cpp/run-archive-liteserver.mdx +++ b/content/ecosystem/nodes/cpp/run-archive-liteserver.mdx @@ -76,12 +76,12 @@ If the result is `4096`, the `-o ashift=12` parameter must be used during pool c Create a ZFS pool named `data`. Use `-o ashift=12` for 4K blocks (standard for most NVMe drives): - ```bash Single drive + ```bash title="Single drive" # Replace with the device identifier (e.g., /dev/nvme1n1) sudo zpool create -o ashift=12 data ``` - ```bash Multiple drives (Stripe) + ```bash title="Multiple drives (Stripe)" # Combine multiple disks to increase capacity and performance sudo zpool create -o ashift=12 data ``` @@ -284,11 +284,11 @@ wget https://raw.githubusercontent.com/ton-blockchain/mytonctrl/master/scripts/i Run the installer from the operator account with `sudo` so it can create system users and services: - ```bash Mainnet + ```bash title="Mainnet" sudo -v && nohup sudo bash install.sh -m liteserver -n mainnet --archive > mytonctrl_installation.log 2>&1 & ``` - ```bash Testnet + ```bash title="Testnet" sudo -v && nohup sudo bash install.sh -m liteserver -n testnet --archive > mytonctrl_installation.log 2>&1 & ``` diff --git a/content/ecosystem/nodes/cpp/run-validator.mdx b/content/ecosystem/nodes/cpp/run-validator.mdx index d4615b604..03cd6627c 100644 --- a/content/ecosystem/nodes/cpp/run-validator.mdx +++ b/content/ecosystem/nodes/cpp/run-validator.mdx @@ -272,11 +272,11 @@ wget https://raw.githubusercontent.com/ton-blockchain/mytonctrl/master/scripts/i Run the validator installation. Installation takes approximately 20 minutes: - ```shell Mainnet + ```shell title="Mainnet" sudo bash install.sh -m single-nominator -n mainnet ``` - ```shell Testnet + ```shell title="Testnet" sudo bash install.sh -m single-nominator -n testnet ``` @@ -641,7 +641,7 @@ Send a withdrawal request, a message with `w` comment from `owner` wallet to the > Insert the single nominator pool address to `SINGLE_NOMINATOR_ADDRESS` and send this message from the owner's wallet. - ```js Not runnable + ```js title="Not runnable" import { Address, beginCell, @@ -709,13 +709,13 @@ Retrieve `min_stake` and `max_stake` from [Validation API](https://elections.ton For example: -```json Not runnable +```json title="Not runnable" "cycle_id" : 1764052744, "min_stake": 701812111528562, // ~ 701 812 TON "max_stake": 2008570202020000, // ~ 2 008 570 TON ``` -```json Not runnable +```json title="Not runnable" "cycle_id" : 1764052745, "min_stake": 674810775114391, // ~ 674 811 TON "max_stake": 2024432325343173, // ~ 2 024 432 TON @@ -731,7 +731,7 @@ To cover the approximate expected stake for odd and even cycles, choose the maxi For example: -```text Not runnable +```text title="Not runnable" // largest within 701 812 TON and 674 811 TON avg_min_stake = 701812 @@ -747,13 +747,13 @@ avg_max_stake = 2024432 Effective stake for two cycles is a value between the doubled maximum and the minimum average stakes: -```text Not runnable +```text title="Not runnable" avg_min_stake * 2 <= effective_stake <= avg_max_stake * 2 ``` For example: -```text Not runnable +```text title="Not runnable" // twice the average minimum stake min_expected_effective_stake = 1403624 @@ -763,7 +763,7 @@ max_expected_effective_stake = 4048864 Then, the effective stake is approximately: -```text Not runnable +```text title="Not runnable" 1403624 TON <= effective_stake <= 4048864 TON ``` diff --git a/content/ecosystem/nodes/meta.json b/content/ecosystem/nodes/meta.json new file mode 100644 index 000000000..45eadb785 --- /dev/null +++ b/content/ecosystem/nodes/meta.json @@ -0,0 +1,10 @@ +{ + "$schema": "../../../meta-schema.json", + "defaultOpen": true, + "title": "Blockchain nodes", + "pages": [ + "overview", + "cpp", + "rust" + ] +} diff --git a/content/ecosystem/nodes/rust/meta.json b/content/ecosystem/nodes/rust/meta.json new file mode 100644 index 000000000..f4267256a --- /dev/null +++ b/content/ecosystem/nodes/rust/meta.json @@ -0,0 +1,15 @@ +{ + "$schema": "../../../../meta-schema.json", + "title": "Rust node", + "pages": [ + "quick-start", + "architecture", + "global-config", + "logs-config", + "node-config", + "metrics", + "node-config-ref", + "probes", + "monitoring" + ] +} diff --git a/content/ecosystem/oracles/meta.json b/content/ecosystem/oracles/meta.json new file mode 100644 index 000000000..e1bcb5b4b --- /dev/null +++ b/content/ecosystem/oracles/meta.json @@ -0,0 +1,9 @@ +{ + "$schema": "../../../meta-schema.json", + "title": "Oracles", + "pages": [ + "overview", + "redstone", + "pyth" + ] +} diff --git a/content/ecosystem/staking/meta.json b/content/ecosystem/staking/meta.json new file mode 100644 index 000000000..4fdc9fe97 --- /dev/null +++ b/content/ecosystem/staking/meta.json @@ -0,0 +1,11 @@ +{ + "$schema": "../../../meta-schema.json", + "title": "Staking", + "pages": [ + "overview", + "stake-calculation", + "liquid-staking", + "single-nominator", + "nominator-pools" + ] +} diff --git a/content/ecosystem/tma/analytics/meta.json b/content/ecosystem/tma/analytics/meta.json new file mode 100644 index 000000000..f953daf5c --- /dev/null +++ b/content/ecosystem/tma/analytics/meta.json @@ -0,0 +1,14 @@ +{ + "$schema": "../../../../meta-schema.json", + "title": "Analytics", + "pages": [ + "analytics", + "supported-events", + "preparation", + "install-via-script", + "install-via-npm", + "api-endpoints", + "managing-integration", + "faq" + ] +} diff --git a/content/ecosystem/tma/create-mini-app.mdx b/content/ecosystem/tma/create-mini-app.mdx index 4ca60e3b2..15fcca182 100644 --- a/content/ecosystem/tma/create-mini-app.mdx +++ b/content/ecosystem/tma/create-mini-app.mdx @@ -10,7 +10,7 @@ allowing you to customize the content based on your specific requirements. To run the tool, use one of the following scripts depending on your package manager. -```bash npm icon="npm" +```bash title="npm" icon="npm" npx @telegram-apps/telegram-apps-tools@latest ``` diff --git a/content/ecosystem/tma/meta.json b/content/ecosystem/tma/meta.json new file mode 100644 index 000000000..d280085f2 --- /dev/null +++ b/content/ecosystem/tma/meta.json @@ -0,0 +1,10 @@ +{ + "$schema": "../../../meta-schema.json", + "title": "TMA: Telegram Mini Apps", + "pages": [ + "overview", + "create-mini-app", + "telegram-ui", + "analytics" + ] +} diff --git a/content/ecosystem/tma/telegram-ui/meta.json b/content/ecosystem/tma/telegram-ui/meta.json new file mode 100644 index 000000000..60876742b --- /dev/null +++ b/content/ecosystem/tma/telegram-ui/meta.json @@ -0,0 +1,10 @@ +{ + "$schema": "../../../../meta-schema.json", + "title": "Telegram UI", + "pages": [ + "overview", + "getting-started", + "platform-and-palette", + "reference/avatar" + ] +} diff --git a/content/ecosystem/ton-connect/meta.json b/content/ecosystem/ton-connect/meta.json new file mode 100644 index 000000000..87bea25ab --- /dev/null +++ b/content/ecosystem/ton-connect/meta.json @@ -0,0 +1,12 @@ +{ + "$schema": "../../../meta-schema.json", + "title": "TON Connect", + "pages": [ + "overview", + "wallet-connect", + "dapp", + "wallet", + "manifest", + "message-lookup" + ] +} diff --git a/content/ecosystem/ton-pay/meta.json b/content/ecosystem/ton-pay/meta.json new file mode 100644 index 000000000..6ab95ce6f --- /dev/null +++ b/content/ecosystem/ton-pay/meta.json @@ -0,0 +1,13 @@ +{ + "$schema": "../../../meta-schema.json", + "title": "TON Pay", + "pages": [ + "overview", + "quick-start", + "on-ramp", + "payment-integration", + "ui-integration", + "webhooks", + "api-reference" + ] +} diff --git a/content/ecosystem/ton-pay/payment-integration/meta.json b/content/ecosystem/ton-pay/payment-integration/meta.json new file mode 100644 index 000000000..3e653c98d --- /dev/null +++ b/content/ecosystem/ton-pay/payment-integration/meta.json @@ -0,0 +1,10 @@ +{ + "$schema": "../../../../meta-schema.json", + "title": "Payment integration", + "pages": [ + "transfer", + "payments-react", + "payments-tonconnect", + "status-info" + ] +} diff --git a/content/ecosystem/ton-pay/ui-integration/button-js.mdx b/content/ecosystem/ton-pay/ui-integration/button-js.mdx index fea7b92b7..573edfdeb 100644 --- a/content/ecosystem/ton-pay/ui-integration/button-js.mdx +++ b/content/ecosystem/ton-pay/ui-integration/button-js.mdx @@ -319,19 +319,19 @@ Combine the snippets in this section into one HTML page. ### Examples - ```html Default blue button + ```html title="Default blue button" ``` - ```html Gradient button + ```html title="Gradient button" ``` - ```html Custom colors + ```html title="Custom colors" ``` - ```html Custom size + ```html title="Custom size" ``` diff --git a/content/ecosystem/ton-pay/ui-integration/button-react.mdx b/content/ecosystem/ton-pay/ui-integration/button-react.mdx index ef1f1fd52..6825fc6a5 100644 --- a/content/ecosystem/ton-pay/ui-integration/button-react.mdx +++ b/content/ecosystem/ton-pay/ui-integration/button-react.mdx @@ -266,7 +266,7 @@ All props are optional except `handlePay`. [Use `useTonPay`](/ecosystem/ton-pay/ui-integration/button-react#option-1:-using-usetonpay-hook-recommended) for a complete example. - ```tsx Long variant (default) + ```tsx title="Long variant (default)" - ```tsx Default preset + ```tsx title="Default preset" ?amount=&text= ``` @@ -74,50 +74,50 @@ ton://transfer/
?amount=&text= #### TON transfer to address -```bash scheme -ton://transfer/
+```bash title="scheme +ton"://transfer/
``` -```bash example -ton://transfer/UQDYzZmfsrGzhObKJUw4gzdeIxEai3jAFbiGKGwxvxHinf4K +```bash title="example +ton"://transfer/UQDYzZmfsrGzhObKJUw4gzdeIxEai3jAFbiGKGwxvxHinf4K ``` #### TON transfer with amount -```bash scheme -ton://transfer/
?amount= +```bash title="scheme +ton"://transfer/
?amount= ``` -```bash example -ton://transfer/UQDYzZmfsrGzhObKJUw4gzdeIxEai3jAFbiGKGwxvxHinf4K?amount=5000000 +```bash title="example +ton"://transfer/UQDYzZmfsrGzhObKJUw4gzdeIxEai3jAFbiGKGwxvxHinf4K?amount=5000000 ``` #### TON transfer with text comment -```bash scheme -ton://transfer/
?text= +```bash title="scheme +ton"://transfer/
?text= ``` -```bash example -ton://transfer/UQDYzZmfsrGzhObKJUw4gzdeIxEai3jAFbiGKGwxvxHinf4K?text=hello +```bash title="example +ton"://transfer/UQDYzZmfsrGzhObKJUw4gzdeIxEai3jAFbiGKGwxvxHinf4K?text=hello ``` #### TON Transfer with amount and text comment -```bash scheme -ton://transfer/
?amount=&text= +```bash title="scheme +ton"://transfer/
?amount=&text= ``` -```bash example -ton://transfer/UQDYzZmfsrGzhObKJUw4gzdeIxEai3jAFbiGKGwxvxHinf4K?amount=5000000&text=hello +```bash title="example +ton"://transfer/UQDYzZmfsrGzhObKJUw4gzdeIxEai3jAFbiGKGwxvxHinf4K?amount=5000000&text=hello ``` ### Transfer with expiry timestamp Opens the Send screen with an expiry timestamp for the transaction. -```bash Scheme with timestamp +```bash title="Scheme with" timestamp ton://transfer/
?amount=&text=&exp= ``` @@ -132,11 +132,11 @@ The `exp` parameter, like other parameters, must be included when constructing t #### TON transfer with expiry timestamp -```bash scheme tranfser with expiry +```bash title="scheme tranfser" with expiry ton://transfer/
?amount=&text=&exp= ``` -```bash example transfer with expiry +```bash title="example transfer" with expiry ton://transfer/EQD2NmD_lH5f5u1Kj3KfGyTvhZSX0Eg6qp2a5IQUKXxOG21n?amount=100000&text=test&exp=2147483647 ``` @@ -144,8 +144,8 @@ ton://transfer/EQD2NmD_lH5f5u1Kj3KfGyTvhZSX0Eg6qp2a5IQUKXxOG21n?amount=100000&te Opens the Send screen with a jetton transfer. [Jetton](/standard/tokens/jettons/overview) is a standard for TON assets, like USDT, USDC and e.t.c. -```bash Scheme -ton://transfer/
?jetton=&amount=&text= +```bash title="Scheme +ton"://transfer/
?jetton=&amount=&text= ``` | Parameter | Description | Required | @@ -203,11 +203,11 @@ ton://transfer/
?jetton=&amount=&text= Typically, jetton decimals in amount are equal 9 and evaluation same as for Toncoin. -```bash scheme -ton://transfer/
?jetton=&amount=&text= +```bash title="scheme +ton"://transfer/
?jetton=&amount=&text= ``` -```bash example transfer 0.005 DUST +```bash title="example transfer" 0.005 DUST ton://transfer/UQDYzZmfsrGzhObKJUw4gzdeIxEai3jAFbiGKGwxvxHinf4K?jetton=EQBlqsm144Dq6SjbPI4jjZvA1hqTIP3CvHovbIfW_t-SCALE&amount=5000000&text=hello ``` @@ -215,11 +215,11 @@ ton://transfer/UQDYzZmfsrGzhObKJUw4gzdeIxEai3jAFbiGKGwxvxHinf4K?jetton=EQBlqsm14 While Toncoin requires nine decimal places and 1 Toncoin equals 1 billion ($10^9$) nanoToncoin, USDT only uses six decimal places. This means that 1 USDT unit stands for 1 million ($10^6$) microUSDT units. The `AMOUNT` below requires the microUSDT format. -```bash scheme -ton://transfer/
?jetton=&amount=&text= +```bash title="scheme +ton"://transfer/
?jetton=&amount=&text= ``` -```bash example transfer 0.005 USDT +```bash title="example transfer" 0.005 USDT ton://transfer/UQDYzZmfsrGzhObKJUw4gzdeIxEai3jAFbiGKGwxvxHinf4K?jetton=EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs&amount=5000&text=hello ``` @@ -227,8 +227,8 @@ ton://transfer/UQDYzZmfsrGzhObKJUw4gzdeIxEai3jAFbiGKGwxvxHinf4K?jetton=EQCxE6mUt Opens the emulation screen or screen with alert about blind signing transactions with amount and destination. -```bash scheme -ton://transfer/
?amount=&bin= +```bash title="scheme +ton"://transfer/
?amount=&bin= ``` | Parameter | Description | Required | @@ -237,7 +237,7 @@ ton://transfer/
?amount=&bin= | `` | The amount of TON to send, in nanotons. | optional | | `` | A URL-encoded base64 BoC which will be attached as a body to internal message. | optional | -```bash example transfer with binary data +```bash title="example transfer" with binary data ton://transfer/UQDYzZmfsrGzhObKJUw4gzdeIxEai3jAFbiGKGwxvxHinf4K?amount=5000000&bin=te6cckECBQEAARUAAUWIAMEY4jHsfgXgPZLLJhtH/oPEOBKZZb6Y4/RJaJnbXc4GDAEBnBSf8D7P51eitphXHiTNAS6WXVDOgcxIxFWf7JICcG9ooFRNCDzTZbHg0mlW6782P8huKd5wzYK3huSVDMGTrQgpqaMXaMF9SAAAACsAAwIBaGIAV+9GxkYnezSj7VSw9vtlmc5RJ5lsyyItoKd5rFDpJZUgL68IAAAAAAAAAAAAAAAAAAEDAaFfzD0Ug3czLfk9/4aAArAmxHNbYrurO/IYyD89+mJZ/XDMnkMemHy/nTsrzYDwAYIxxGPY/AvAeyWWTDaP/QeIcCUyy30xx+iS0TO2u5wMIDgEACIAAAAAUmVmI05PTmQxZ0pCUK4fW14= ``` @@ -247,16 +247,16 @@ Use wallet-specific links to create simple jetton and Toncoin transfers. The syn Example: transferring 1 USDT to `EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs`: -```bash Tonkeeper mobile link +```bash title="Tonkeeper mobile" link https://app.tonkeeper.com/transfer/saint.ton?amount=1000000&jetton=EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs ``` -```bash Tonkeeper web link +```bash title="Tonkeeper web" link https://app.tonkeeper.com/transfer/saint.ton?amount=1000000&jetton=EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs ``` -```bash MyTonWallet -https://my.tt/transfer/UQDYzZmfsrGzhObKJUw4gzdeIxEai3jAFbiGKGwxvxHinf4K?amount=1000000&jetton=EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs +```bash title="MyTonWallet +https"://my.tt/transfer/UQDYzZmfsrGzhObKJUw4gzdeIxEai3jAFbiGKGwxvxHinf4K?amount=1000000&jetton=EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs ``` Find more wallet-specific features in the documentation: @@ -276,21 +276,21 @@ To generate a transaction link, the service must obtain the account address, log #### Mainnet -```bash Tonviewer Mainnet link +```bash title="Tonviewer Mainnet" link https://tonviewer.com/transaction/ ``` -```bash Tonviewer Mainnet link example +```bash title="Tonviewer Mainnet" link example https://tonviewer.com/transaction/aee8d185a0c8f73c787bf1872ee9659ac53ce11a90b16b384856a7821eff8c29 ``` #### Testnet -```bash Tonviewer Testnet link +```bash title="Tonviewer Testnet" link https://testnet.tonviewer.com/transaction/ ``` -```bash Tonviewer Testnet short link example +```bash title="Tonviewer Testnet" short link example https://testnet.tonviewer.com/transaction/61ef8fac43edf408fcc041aa8afaec14ac2c4f68faafe6eb18c50a921697d2f6 ``` @@ -298,21 +298,21 @@ https://testnet.tonviewer.com/transaction/61ef8fac43edf408fcc041aa8afaec14ac2c4f #### Mainnet -```bash Tonscan Mainnet link +```bash title="Tonscan Mainnet" link https://tonscan.org/tx/:: ``` -```bash Tonscan Mainnet link example +```bash title="Tonscan Mainnet" link example https://tonscan.org/tx/63333243000002:rujRhaDI9zx4e_GHLullmsU84RqQsWs4SFangh7_jCk:Ef8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM0vF ``` #### Testnet -```bash Tonscan Testnet link +```bash title="Tonscan Testnet" link https://testnet.tonscan.org/tx/:: ``` -```bash Tonviewer Testnet link example +```bash title="Tonviewer Testnet" link example https://testnet.tonscan.org/tx/40988257000002:Ye-PrEPt9Aj8wEGqivrsFKwsT2j6r-brGMUKkhaX0vY:kf8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM_BP ``` @@ -320,20 +320,20 @@ https://testnet.tonscan.org/tx/40988257000002:Ye-PrEPt9Aj8wEGqivrsFKwsT2j6r-brGM #### Mainnet -```bash Toncoin Mainnet link +```bash title="Toncoin Mainnet" link https://explorer.toncoin.org/transaction?account=<=&hash= ``` -```bash Toncoin Mainnet link example +```bash title="Toncoin Mainnet" link example https://explorer.toncoin.org/transaction?account=Ef8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM0vF<=63333243000002&hash=AEE8D185A0C8F73C787BF1872EE9659AC53CE11A90B16B384856A7821EFF8C29 ``` #### Testnet -```bash Toncoin Testnet link +```bash title="Toncoin Testnet" link https://test-explorer.toncoin.org/transaction?account=<=&hash= ``` -```bash Toncoin Testnet link example +```bash title="Toncoin Testnet" link example https://test-explorer.toncoin.org/transaction?account=Ef8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM0vF<=40988257000002&hash=61EF8FAC43EDF408FCC041AA8AFAEC14AC2C4F68FAAFE6EB18C50A921697D2F6 ``` diff --git a/content/ecosystem/wallet-apps/meta.json b/content/ecosystem/wallet-apps/meta.json new file mode 100644 index 000000000..bd1a4560f --- /dev/null +++ b/content/ecosystem/wallet-apps/meta.json @@ -0,0 +1,11 @@ +{ + "$schema": "../../../meta-schema.json", + "title": "Wallet apps", + "pages": [ + "web", + "tonkeeper", + "get-coins", + "deep-links", + "addresses-workflow" + ] +} diff --git a/content/ecosystem/walletkit/android/meta.json b/content/ecosystem/walletkit/android/meta.json new file mode 100644 index 000000000..db6f55e8e --- /dev/null +++ b/content/ecosystem/walletkit/android/meta.json @@ -0,0 +1,13 @@ +{ + "$schema": "../../../meta-schema.json", + "title": "Android", + "pages": [ + "installation", + "init", + "wallets", + "data", + "events", + "transactions", + "webview" + ] +} diff --git a/content/ecosystem/walletkit/ios/meta.json b/content/ecosystem/walletkit/ios/meta.json new file mode 100644 index 000000000..5bacab285 --- /dev/null +++ b/content/ecosystem/walletkit/ios/meta.json @@ -0,0 +1,13 @@ +{ + "$schema": "../../../meta-schema.json", + "title": "iOS", + "pages": [ + "installation", + "init", + "wallets", + "data", + "transactions", + "events", + "webview" + ] +} diff --git a/content/ecosystem/walletkit/meta.json b/content/ecosystem/walletkit/meta.json new file mode 100644 index 000000000..2cd666586 --- /dev/null +++ b/content/ecosystem/walletkit/meta.json @@ -0,0 +1,14 @@ +{ + "$schema": "../../../meta-schema.json", + "title": "WalletKit", + "pages": [ + "overview", + "web", + "ios", + "android", + "---Manual implementation---", + "qa-guide", + "native-web", + "browser-extension" + ] +} diff --git a/content/ecosystem/walletkit/web/meta.json b/content/ecosystem/walletkit/web/meta.json new file mode 100644 index 000000000..55edbfe2c --- /dev/null +++ b/content/ecosystem/walletkit/web/meta.json @@ -0,0 +1,13 @@ +{ + "$schema": "../../../../meta-schema.json", + "title": "Web", + "pages": [ + "init", + "wallets", + "connections", + "events", + "toncoin", + "jettons", + "nfts" + ] +} diff --git a/content/foundations/actions/meta.json b/content/foundations/actions/meta.json new file mode 100644 index 000000000..b2f0d6b90 --- /dev/null +++ b/content/foundations/actions/meta.json @@ -0,0 +1,11 @@ +{ + "$schema": "../../../meta-schema.json", + "title": "Actions", + "pages": [ + "overview", + "send", + "reserve", + "set-code", + "change-library" + ] +} diff --git a/content/foundations/addresses/meta.json b/content/foundations/addresses/meta.json new file mode 100644 index 000000000..20a5df4b3 --- /dev/null +++ b/content/foundations/addresses/meta.json @@ -0,0 +1,10 @@ +{ + "$schema": "../../../meta-schema.json", + "title": "Addresses", + "pages": [ + "overview", + "formats", + "serialize", + "derive" + ] +} diff --git a/content/foundations/consensus/meta.json b/content/foundations/consensus/meta.json new file mode 100644 index 000000000..74f0cd2e2 --- /dev/null +++ b/content/foundations/consensus/meta.json @@ -0,0 +1,8 @@ +{ + "$schema": "../../../meta-schema.json", + "title": "Consensus", + "pages": [ + "catchain-overview", + "catchain-visualizer" + ] +} diff --git a/content/foundations/messages/meta.json b/content/foundations/messages/meta.json new file mode 100644 index 000000000..4a26a6e67 --- /dev/null +++ b/content/foundations/messages/meta.json @@ -0,0 +1,13 @@ +{ + "$schema": "../../../meta-schema.json", + "title": "Messages and transactions", + "pages": [ + "overview", + "internal", + "external-in", + "external-out", + "deploy", + "modes", + "ordinary-tx" + ] +} diff --git a/content/foundations/meta.json b/content/foundations/meta.json new file mode 100644 index 000000000..0edc56f02 --- /dev/null +++ b/content/foundations/meta.json @@ -0,0 +1,25 @@ +{ + "$schema": "../../meta-schema.json", + "title": "Blockchain foundations", + "pages": [ + "tlb", + "serialization", + "addresses", + "messages", + "actions", + "consensus", + "status", + "phases", + "fees", + "traces", + "shards", + "limits", + "config", + "web3", + "proofs", + "system", + "precompiled", + "whitepapers", + "glossary" + ] +} diff --git a/content/foundations/proofs/meta.json b/content/foundations/proofs/meta.json new file mode 100644 index 000000000..b57e9970b --- /dev/null +++ b/content/foundations/proofs/meta.json @@ -0,0 +1,8 @@ +{ + "$schema": "../../../meta-schema.json", + "title": "Merkle proofs", + "pages": [ + "overview", + "verifying-liteserver-proofs" + ] +} diff --git a/content/foundations/proofs/overview.mdx b/content/foundations/proofs/overview.mdx index 02fa82ded..0c11020a6 100644 --- a/content/foundations/proofs/overview.mdx +++ b/content/foundations/proofs/overview.mdx @@ -168,7 +168,7 @@ graph TD Let's consider a scenario where we want to prove that a particular account has a specific state. This is useful because having a state allows you to call a get-method on it or even emulate a transaction. In this particular example, we want to prove the state of a JettonMaster and then call the `get_wallet_address` method on it. This way, even if a particular JettonMaster does not support [TEP-89](https://github.com/ton-blockchain/TEPs/blob/master/text/0089-jetton-wallet-discovery.md), it is still possible to obtain the wallet address for a specific account. -The [full example](https://github.com/tact-lang/dex/blob/main/sources/contracts/vaults/proofs/block-proof.tact) is too large for this article, but let's cover some key points. +The [full example](https://github.com/tact-lang/dex-tolk/blob/main/sources/contracts/proof.tolk) is too large for this article, but let's cover some key points. This is an example of the proof composition technique described above. It is convenient because for `getRawAccountState`, the [liteserver](/ecosystem/nodes/overview) returns two items: @@ -181,11 +181,11 @@ We will save gas and improve parsing convenience by concatenating the `AccountSt ```ts const accountStateAndProof = await client.liteServer.getRawAccountState( - jettonMinterToProofStateFor, - { - target_block: blockToProofToStrId, - }, - ) + jettonMinterToProofStateFor, + { + target_block: blockToProofToStrId, + }, +) const proofs = Cell.fromBoc(Buffer.from(accountStateAndProof.proof, "hex")) diff --git a/content/foundations/proofs/verifying-liteserver-proofs.mdx b/content/foundations/proofs/verifying-liteserver-proofs.mdx index 0d25b5756..8f616faf9 100644 --- a/content/foundations/proofs/verifying-liteserver-proofs.mdx +++ b/content/foundations/proofs/verifying-liteserver-proofs.mdx @@ -38,7 +38,7 @@ The liteserver's [response](https://github.com/ton-blockchain/ton/blob/v2025.03/ After deserializing the BoC, we obtain the following cell: -```d not runnable +```d title="Not runnable" 280[0351ED3B9E728E7C548B15A5E5CE988B4A74984C3F8374F3F1A52C7B1F46C264060016] -> { 64[11EF55AAFFFFFF11] -> { 640[9BC7A98700000000040101DC65010000000100FFFFFFFF000000000000000064B6C356000023D38BA64000000023D38BA64004886D00960007028101DC64FD01DC42BEC400000003000000000000002E] -> { @@ -119,7 +119,7 @@ await client.raw_get_shard_info(master, wc=0) The liteserver response contains the `BlockIdExt` of the shard block: -```d not runnable +```d title="Not runnable" ``` @@ -149,13 +149,13 @@ The `shard_descr` BoC can be used if the liteserver is trusted. After deserializing the shard proof BoC, two root cells are obtained: -```d not runnable +```d title="Not runnable" [ 1 refs>, 1 refs>] ``` The first root is a masterchain block Merkle proof, which must be verified using the `check_block_header` function: -```d not runnable +```d title="Not runnable" 280[0351ED3B9E728E7C548B15A5E5CE988B4A74984C3F8374F3F1A52C7B1F46C264060016] -> { 64[11EF55AAFFFFFF11] -> { 640[9BC7A98700000000040101DC65010000000100FFFFFFFF000000000000000064B6C356000023D38BA64000000023D38BA64004886D00960007028101DC64FD01DC42BEC400000003000000000000002E] -> { @@ -173,7 +173,7 @@ The first root is a masterchain block Merkle proof, which must be verified using The cell -```d not runnable +```d title="Not runnable" 552[0478E0F0E601BA1161ECC1395E9A0475C4F80AADBD6C483F210E96E29CF36789E432BF3592969931CA4FBC7715494B50597F1884C0D847456029D8CF0E526E6046016F016F] -> { 560[010378E0F0E601BA1161ECC1395E9A0475C4F80AADBD6C483F210E96E29CF36789E46492304DFB6EF9149781871464AF686056A9627F882F60E3B24F8C944A75EBAF016F0014], 560[010332BF3592969931CA4FBC7715494B50597F1884C0D847456029D8CF0E526E6046DA58493CCB5DA3876129B0190F3C375E69E59C3AD9FF550BE708999DAD1F6F39016F0014] @@ -184,7 +184,7 @@ It is a Merkle update of the [ShardState](https://github.com/ton-blockchain/ton/ After verifying that the only Merkle proof cell reference `Hash_1` matches the known block hash and storing the new ShardState hash, proceed to validate the second `shard proof` cell: -```d not runnable +```d title="Not runnable" 280[0332BF3592969931CA4FBC7715494B50597F1884C0D847456029D8CF0E526E6046016F] -> { 362[9023AFE2FFFFFF1100FFFFFFFF000000000000000001DC65010000000164B6C356000023D38BA6400401DC64FD40] -> { 288[0101AFFE84CDD73951BCE07EEAAD120D00400295220D6F66F1163B5FA8668202D72B0001], @@ -304,7 +304,7 @@ The liteserver [response](https://github.com/ton-blockchain/ton/blob/v2025.03/tl After verifying the `shard_proof`, the `proof` and `state` cells must be deserialized. The `proof` cell must contain exactly two root cells: -```d not runnable +```d title="Not runnable" [ 1 refs>, 1 refs>] @@ -312,7 +312,7 @@ After verifying the `shard_proof`, the `proof` and `state` cells must be deseria The first `root` is a Merkle proof for the shard block, whose hash we have already verified and trusted. -```d not runnable +```d title="Not runnable" 280[0339E5CBCA5BF69750B5D9897872C3A0D7A3E614E521C53E4DE728FAFED38DCE27001D] -> { 64[11EF55AAFFFFFF11] -> { 640[9BC7A98700000000840102332C67000000010000000000000000000000000064B6C351000023D38B96FDC0000023D38B96FDC5D41C6E3C0007035701DC64FD01DC42BEC400000003000000000000002E] -> { @@ -351,7 +351,7 @@ Once the hash matches, the `state_cell` can be trusted. Its structure is as foll
Show cell - ```d not runnable + ```d title="Not runnable" 280[03F93FE5EDA41A6CE9ECB353FD589842BD3F5D5E73B846CB898525293FC742FD690219] -> { 362[9023AFE2FFFFFF110000000000000000000000000002332C670000000164B6C351000023D38B96FDC501DC64FD00] -> { 288[010138F8D1C6E9F798A477D13AA26CB4D6CFE1A17949AC276B2F1E0CE037A521B9BC0001], @@ -500,7 +500,7 @@ _ = { We need to store the values of `last_trans_hash` and `last_trans_lt`, as they can be used later to retrieve the account's transactions. Let's examine the entire cell containing this data. -```d not runnable +```d title="Not runnable" 320[649B46AC72E6E4D4C1293B66D58D9ED7A54902BEEFD97F5BFF7977DD85998B3D000023C564393441] -> { 288[01018282D13BF66B9ACE1FBF5D3ABD1C59CC46D61AF1D47AF1665D3013D8F9E474880008] } @@ -512,7 +512,7 @@ This is a regular cell with level 1, containing a single reference — the prune The next step is to deserialize the `state` BoC: -```d not runnable +```d title="Not runnable" 449[C006F5BC67986E06430961D9DF00433926A4CD92E597DDD8AA6043645AC20BD178222C859043259E0D9000008F1590E4D10D405786BD755300] -> { 80[FF00F4A413F4BCF2C80B] -> { 2[00] -> { @@ -584,7 +584,7 @@ Next, we query the liteserver for the list of transactions belonging to the bloc The liteserver [response](https://github.com/ton-blockchain/ton/blob/v2025.03/tl/generate/scheme/lite_api.tl#L47) includes `ids` field with the transaction list and a `proof` BoC. The first step is to deserialize the `proof`: -```d not runnable +```d title="Not runnable" 280[0351ED3B9E728E7C548B15A5E5CE988B4A74984C3F8374F3F1A52C7B1F46C264060016] -> { 64[11EF55AAFFFFFF11] -> { 288[0101F8039FE65901BE422094ED29FA05DD4A9406708D7C54EBF7F6010F2E8A9DCBB10001], @@ -723,7 +723,7 @@ The [response](https://github.com/ton-blockchain/ton/blob/v2025.03/tl/generate/s First, deserialize the `state_proof` cell: -```d not runnable +```d title="Not runnable" 280[0351ED3B9E728E7C548B15A5E5CE988B4A74984C3F8374F3F1A52C7B1F46C264060016] -> { 64[11EF55AAFFFFFF11] -> { 640[9BC7A98700000000040101DC65010000000100FFFFFFFF000000000000000064B6C356000023D38BA64000000023D38BA64004886D00960007028101DC64FD01DC42BEC400000003000000000000002E] -> { diff --git a/content/foundations/serialization/boc.mdx b/content/foundations/serialization/boc.mdx index a82012e0f..06b554e75 100644 --- a/content/foundations/serialization/boc.mdx +++ b/content/foundations/serialization/boc.mdx @@ -108,7 +108,7 @@ A final serialization of the bag of cells must include a magic number indicating Only one [serialization scheme of BoCs](https://github.com/ton-blockchain/ton/blob/24dc184a2ea67f9c47042b4104bbb4d82289fac1/crypto/tl/boc.tlb#L25) is used in TON Blockchain (there are also two outdated BoC serialization schemes in the file): -```tlb PseudoTL-B +```tlb title="Pseudo TL-B" serialized_boc#b5ee9c72 has_idx:(## 1) has_crc32c:(## 1) has_cache_bits:(## 1) flags:(## 2) { flags = 0 } size:(## 3) { size <= 4 } diff --git a/content/foundations/serialization/meta.json b/content/foundations/serialization/meta.json new file mode 100644 index 000000000..b267ffd26 --- /dev/null +++ b/content/foundations/serialization/meta.json @@ -0,0 +1,12 @@ +{ + "$schema": "../../../meta-schema.json", + "title": "Serialization", + "pages": [ + "cells", + "library", + "merkle", + "merkle-update", + "pruned", + "boc" + ] +} diff --git a/content/foundations/system.mdx b/content/foundations/system.mdx index 19176194d..ecbc44a90 100644 --- a/content/foundations/system.mdx +++ b/content/foundations/system.mdx @@ -52,7 +52,7 @@ The Elector is a special smart contract triggered by **Tick and Tock transaction - Assume the `i`-th candidate (lowest in the subset) defines the baseline. - Calculate effective stake (`true_stake`) for each `j`-th candidate (`j < i`) as: -```python not runnable +```python title="Not runnable" min(stake[i] * max_factor[j], stake[j]) ``` diff --git a/content/foundations/tlb/meta.json b/content/foundations/tlb/meta.json new file mode 100644 index 000000000..1990bd553 --- /dev/null +++ b/content/foundations/tlb/meta.json @@ -0,0 +1,12 @@ +{ + "$schema": "../../../meta-schema.json", + "title": "TL-B", + "pages": [ + "overview", + "syntax-and-semantics", + "simple-examples", + "complex-and-non-trivial-examples", + "tep-examples", + "tooling" + ] +} diff --git a/content/foundations/web3/meta.json b/content/foundations/web3/meta.json new file mode 100644 index 000000000..423ef23f1 --- /dev/null +++ b/content/foundations/web3/meta.json @@ -0,0 +1,11 @@ +{ + "$schema": "../../../meta-schema.json", + "title": "Web3 services", + "pages": [ + "overview", + "ton-dns", + "ton-storage", + "ton-proxy", + "ton-sites" + ] +} diff --git a/content/foundations/whitepapers/meta.json b/content/foundations/whitepapers/meta.json new file mode 100644 index 000000000..2a9699ba2 --- /dev/null +++ b/content/foundations/whitepapers/meta.json @@ -0,0 +1,12 @@ +{ + "$schema": "../../../meta-schema.json", + "title": "Whitepapers", + "pages": [ + "overview", + "comments", + "tvm", + "tblkch", + "ton", + "catchain" + ] +} diff --git a/content/languages/fift/meta.json b/content/languages/fift/meta.json new file mode 100644 index 000000000..5b79f25fe --- /dev/null +++ b/content/languages/fift/meta.json @@ -0,0 +1,17 @@ +{ + "$schema": "../../../meta-schema.json", + "title": "Fift", + "pages": [ + "overview", + "types", + "basic-values", + "variables", + "control", + "fift-assembler", + "fift-and-tvm-assembly", + "deep-dive", + "multisig", + "ton-config", + "whitepaper" + ] +} diff --git a/content/languages/func/meta.json b/content/languages/func/meta.json new file mode 100644 index 000000000..ca0755e5d --- /dev/null +++ b/content/languages/func/meta.json @@ -0,0 +1,27 @@ +{ + "$schema": "../../../meta-schema.json", + "title": "FunC", + "pages": [ + "overview", + "cookbook", + "changelog", + "known-issues", + "---Language---", + "comments", + "types", + "literals", + "operators", + "expressions", + "statements", + "---Program declarations---", + "declarations-overview", + "functions", + "special-functions", + "asm-functions", + "global-variables", + "compiler-directives", + "---Libraries---", + "stdlib", + "libraries" + ] +} diff --git a/content/languages/meta.json b/content/languages/meta.json new file mode 100644 index 000000000..cacee0e3f --- /dev/null +++ b/content/languages/meta.json @@ -0,0 +1,8 @@ +{ + "$schema": "../../meta-schema.json", + "title": "Legacy languages", + "pages": [ + "fift", + "func" + ] +} diff --git a/content/languages/tact.mdx b/content/languages/tact.mdx deleted file mode 100644 index ce88cf637..000000000 --- a/content/languages/tact.mdx +++ /dev/null @@ -1,186 +0,0 @@ ---- -title: "Tact language (deprecated)" -sidebarTitle: "Tact" -noindex: true ---- - - - The official smart contract language of TON Blockchain is [Tolk](/tolk/overview), and the Tact language is being **deprecated**. This page will be removed once Tolk undergoes a comprehensive security audit. - - The dedicated [Tact documentation](https://docs.tact-lang.org) site remains available and will continue to be available in the future. - - Thank you for all the support. Those who built Tact stand proud, with deep gratitude to the TON community - - -Tact is a programming language for TON Blockchain, focused on efficiency and ease of development. It is a good fit for complex smart contracts, quick onboarding and rapid prototyping. - -Developed by [TON Studio](https://tonstudio.io), powered by the community — at the start of 2025, the number of _unique code_[^1] contracts deployed on the mainnet reached almost 28 thousand, of which about 33% were written in Tact. You can view some selected projects here: [Tact in production](#tact-in-production). - -[^1]: The "unique code" means that each contract in the data sample has at least one TVM instruction that differs from the other contracts, excluding many preprocessed wallets with everything inlined — even seqno and a public key for signature verification! - -Tact has undergone a comprehensive security audit by [Trail of Bits](https://www.trailofbits.com), a leading Web3 security firm. - - - - - - - -## Features - -The most prominent and distinctive features of Tact are: - -- Familiar and user-friendly TypeScript-like syntax. -- Strong static type system with built-in [Structs], [Messages], and [maps], among others. -- First-class [maps] support, with many methods and a convenient [`foreach` statement][foreach] for traversing. -- Automatic (de)serialization of incoming messages and data structures. -- Automatic routing of [internal, external, and bounced messages][recvfun]. -- Automatic handling of message types, including [binary, text, and fallback slices][recv]. -- No boilerplate functions for [sending messages] and deploying child contracts. -- Reusable behaviors through [traits]. -- Support for low-level programming with [`asm` functions][asmfun]. -- Generation of [single-file TypeScript wrappers] for convenient interactions with compiled contracts, which include: - - Type definitions for [Structs] and [Messages] are observable in the [compilation report]. - - Corresponding `storeStructureName()` and `loadStructureName()` functions for (de)serialization. - - All global and contract-level constants. - - Bi-directional records of exit codes: from their names to numbers and vice versa. - - Opcodes of all [Messages]. - - A contract wrapper class with various helper functions for initialization, deployment, and message exchange. -- Rich [standard library][stdlib]. -- Extensive [documentation]. -- Robust [tooling](#tooling). -- ...and there's much more to come! - -[Structs]: https://docs.tact-lang.org/book/structs-and-messages#structs -[Messages]: https://docs.tact-lang.org/book/structs-and-messages#messages -[maps]: https://docs.tact-lang.org/book/maps -[foreach]: https://docs.tact-lang.org/book/statements#foreach-loop -[recv]: https://docs.tact-lang.org/book/receive/ -[recvfun]: https://docs.tact-lang.org/book/contracts/#receiver-functions -[sending messages]: https://docs.tact-lang.org/book/send/#message-sending-functions -[traits]: https://docs.tact-lang.org/book/types/#traits -[asmfun]: https://docs.tact-lang.org/book/assembly-functions/ -[single-file TypeScript wrappers]: https://docs.tact-lang.org/book/compile/#wrap -[compilation report]: https://docs.tact-lang.org/book/compile/#report -[stdlib]: https://docs.tact-lang.org/ref/ -[documentation]: https://docs.tact-lang.org/ - -## Security - -- [Security audit of Tact by the Trail of Bits (2025, PDF)](https://github.com/trailofbits/publications/blob/master/reviews/2025-01-ton-studio-tact-compiler-securityreview.pdf) - - Backup link: [PDF Report](https://github.com/tact-lang/website/blob/416073ed4056034639de257cb1e2815227f497cb/pdfs/2025-01-ton-studio-tact-compiler-securityreview.pdf) - -## Tact in production - -Some selected software and applications based on contracts written in Tact, deployed in production, and consumed by end users: - -###### Open source or source available - -- [Proof-of-capital](https://github.com/proof-of-capital/TON) - [proof-of-capital](https://proofofcapital.org/) is a market-making smart contract that protects the interests of all holders. - - See the [security audit report](https://raw.githubusercontent.com/nowarp/public-reports/master/2025-01-proof-of-capital.pdf) by [Nowarp](https://nowarp.io). - -###### Closed source - -- [Tradoor](https://tradoor.io) - Fast and social DEX on TON. - - See the [security audit report](https://www.tonbit.xyz/reports/Tradoor-Smart-Contract-Audit-Report-Summary.pdf) by TonBit. -- [PixelSwap](https://www.pixelswap.io) - First modular and upgradeable DEX on TON. - - See the [security audit report](https://github.com/trailofbits/publications/blob/master/reviews/2024-12-pixelswap-dex-securityreview.pdf) by Trail of Bits. -- [GasPump](https://gaspump.tg) - TON memecoin launchpad and trading platform. - -See [Tact in production](https://github.com/tact-lang/awesome-tact#tact-in-production-) on the Awesome Tact list. - -## Installation - -### Compiler - -The Tact compiler is distributed as an [NPM package](https://www.npmjs.com/package/@tact-lang/compiler) bundled with the [Tact standard library](https://docs.tact-lang.org/ref/). - -The recommended Node.js version is 22 or higher, while the minimum version is 18. - -Use your favorite package manager to install it into a Node.js project: - -```bash -# yarn is recommended, but not required -yarn add @tact-lang/compiler - -# you can also use npm -npm i @tact-lang/compiler@latest - -# or pnpm -pnpm add @tact-lang/compiler - -# or bun -bun add @tact-lang/compiler -``` - -Alternatively, you can install it globally as such: - -```bash -npm i -g @tact-lang/compiler -``` - -It will make the `tact` compiler available on your PATH, as well as: - -- a convenient `unboc` disassembler of a contract's code compiled into a [bag of cells](/foundations/serialization/boc) `.boc` format. -- a formatter `tact-fmt`, which can format or check the formatting of individual Tact files and directories. - -### Tooling - -###### Extensions and plugins - -- [VS Code extension](https://marketplace.visualstudio.com/items?itemName=tonstudio.vscode-tact) - powerful and feature-rich extension for Visual Studio Code (VSCode) and VSCode-based editors like VSCodium, Cursor, Windsurf, and others. - - Get it on the [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=tonstudio.vscode-tact). - - Get it on the [Open VSX Registry](https://open-vsx.org/extension/tonstudio/vscode-tact). - - Or install from the [`.vsix` files in nightly releases](https://github.com/tact-lang/tact-language-server/releases). -- [JetBrains IDEs plugin](https://plugins.jetbrains.com/plugin/27290-tact#) - provides syntax highlighting, code navigation, and more. -- [Language Server (LSP Server)](https://github.com/tact-lang/tact-language-server) - supports Sublime Text, (Neo)Vim, Helix, and other editors with LSP support. -- [tact.vim](https://github.com/tact-lang/tact.vim) - Vim 8+ plugin. -- [tact-sublime](https://github.com/tact-lang/tact-sublime) - Sublime Text 4 package. - - Get it on the [Package Control](https://packagecontrol.io/packages/Tact). - -###### Security - -- [Misti](https://github.com/nowarp/misti) - Static smart contract analyzer. -- [TON Symbolic Analyzer (TSA)](https://github.com/espritoxyz/tsa) - Static smart contract analysis tool based on symbolic execution. - -###### Utility - -- Formatter (`tact-fmt`) — The official formatter. It ships with the Tact Language Server, VS Code extension, and as a standalone binary with the compiler. You can invoke it by running `npx tact-fmt` in your Tact projects. -- BoC Disassembler (`unboc`) — Disassembler for [`.boc`](/foundations/serialization/boc) files. Ships as a standalone binary with the compiler. You can invoke it by running `npx unboc` in your Tact projects. - -### Getting started - -For a quick start, read the ["Let's start!"](https://docs.tact-lang.org/#start) mini-guide in the Tact documentation. It uses the [Blueprint](https://github.com/ton-community/blueprint) development environment for writing, testing, and deploying smart contracts on TON Blockchain. - -If you want more manual control, use [tact-template](https://github.com/tact-lang/tact-template). It's a ready-to-use template with the development environment set up, including the Tact compiler with TypeScript + Jest, a local TON emulator, AI-based editor support, and examples of how to run tests. - -```shell -git clone --depth 1 https://github.com/tact-lang/tact-template -``` - -## Community - -If you can’t find the answer in the [docs](https://docs.tact-lang.org), or you’ve tried to do some local testing and it still didn’t help, don’t hesitate to reach out to Tact’s flourishing community: - -- [`@tactlang` on Telegram](https://t.me/tactlang) - Main community chat and discussion group. -- [`@tactlang_ru` on Telegram](https://t.me/tactlang_ru) _(Russian)_ -- [`@tact_kitchen` on Telegram](https://t.me/tact_kitchen) - Channel with updates from the team. -- [`@tact_language` on X/Twitter](https://x.com/tact_language) -- [`tact-lang` organization on GitHub](https://github.com/tact-lang) -- [`@ton_studio` on Telegram](https://t.me/ton_studio) -- [`@thetonstudio` on X/Twitter](https://x.com/thetonstudio) - -## Contributing - -Contributions are welcome! To help develop the compiler, see the [contributing guide](https://github.com/tact-lang/tact/blob/main/dev-docs/CONTRIBUTING.md). diff --git a/content/meta.json b/content/meta.json index e174e1e77..42f7134db 100644 --- a/content/meta.json +++ b/content/meta.json @@ -1,8 +1,29 @@ { "$schema": "../meta-schema.json", "pages": [ + "start-here", + "get-support", + "from-ethereum", + "more-tutorials", "!old", "external:[Old documentation](https://old-docs.ton.org/)", - "..." + "---Ecosystem---", + "...ecosystem", + "---Payment processing---", + "...payments", + "---Standard contracts---", + "...standard", + "---Contract development---", + "...contract-dev", + "---Tolk language---", + "...tolk", + "---TVM: TON Virtual Machine---", + "...tvm", + "---Blockchain foundations---", + "...foundations", + "---Legacy languages---", + "...languages", + "---Contributing---", + "...contribute" ] } diff --git a/content/more-tutorials.mdx b/content/more-tutorials.mdx index 3d7e8a882..24c842cba 100644 --- a/content/more-tutorials.mdx +++ b/content/more-tutorials.mdx @@ -55,11 +55,7 @@ Introductory: - [Crypto Networks and Why They Matter](https://www.youtube.com/watch?v=2wxtiNgXBaU) -### Playlists - -Beginner-friendly: - -- [TON Development with Tact](https://www.youtube.com/watch?v=Vf3Fx7qgL6k\&list=PLQ5rEj25H3U2P5qp7nsgVtNGYxEojnnez) +{/* NOTE: ### Playlists */} {/* NOTE: ## Podcasts */} diff --git a/content/payments/meta.json b/content/payments/meta.json new file mode 100644 index 000000000..da3ca2562 --- /dev/null +++ b/content/payments/meta.json @@ -0,0 +1,9 @@ +{ + "$schema": "../../meta-schema.json", + "title": "Payment processing", + "pages": [ + "overview", + "toncoin", + "jettons" + ] +} diff --git a/content/standard/meta.json b/content/standard/meta.json new file mode 100644 index 000000000..995ccc099 --- /dev/null +++ b/content/standard/meta.json @@ -0,0 +1,9 @@ +{ + "$schema": "../../meta-schema.json", + "title": "Standard contracts", + "pages": [ + "wallets", + "tokens", + "vesting" + ] +} diff --git a/content/standard/tokens/jettons/meta.json b/content/standard/tokens/jettons/meta.json new file mode 100644 index 000000000..5ed6d0d76 --- /dev/null +++ b/content/standard/tokens/jettons/meta.json @@ -0,0 +1,18 @@ +{ + "$schema": "../../../../meta-schema.json", + "title": "Jettons", + "pages": [ + "overview", + "how-it-works", + "comparison", + "mint", + "transfer", + "burn", + "find", + "wallet-data", + "supply-data", + "mintless/overview", + "mintless/deploy", + "api" + ] +} diff --git a/content/standard/tokens/meta.json b/content/standard/tokens/meta.json new file mode 100644 index 000000000..11dc2e28c --- /dev/null +++ b/content/standard/tokens/meta.json @@ -0,0 +1,12 @@ +{ + "$schema": "../../../meta-schema.json", + "title": "Tokens", + "defaultOpen": true, + "pages": [ + "overview", + "metadata", + "airdrop", + "jettons", + "nft" + ] +} diff --git a/content/standard/tokens/nft/how-it-works.mdx b/content/standard/tokens/nft/how-it-works.mdx index ce52497a2..95ab81255 100644 --- a/content/standard/tokens/nft/how-it-works.mdx +++ b/content/standard/tokens/nft/how-it-works.mdx @@ -58,7 +58,7 @@ Transfer message body contains the following data: | `forward_amount` | `VarUInteger 16` | the amount of Toncoin to be sent to the new owner | | `forward_payload` | `Either Cell ^Cell` | optional data that should be forwarded to the new owner | -```tlb TL-B +```tlb title="TL-B" transfer#5fcc3d14 query_id:uint64 new_owner:MsgAddress response_destination:MsgAddress @@ -77,7 +77,7 @@ Ownership notification message body (`ownership_assigned`) contains the followin | `prev_owner` | `MsgAddress` | address of the previous owner of this NFT item | | `forward_payload` | `Either Cell ^Cell` | should be equal to request's `forward_payload` | -```tlb TL-B +```tlb title="TL-B" ownership_assigned query_id:uint64 prev_owner:MsgAddress forward_payload:(Either Cell ^Cell) @@ -92,7 +92,7 @@ Excess message body (`excesses`) contains the following data: | `excesses` | `uint32` | tag equal to `0xd53276db` | | `query_id` | `uint64` | should be equal to request's `query_id` | -```tlb TL-B +```tlb title="TL-B" excesses query_id:uint64 = InternalMsgBody; ``` @@ -112,7 +112,7 @@ Get static data message body contains the following data: | `get_static_data` | `uint32` | tag equal to `0x2fcb26a2` | | `query_id` | `uint64` | arbitrary request number | -```tlb TL-B +```tlb title="TL-B" get_static_data#2fcb26a2 query_id:uint64 = InternalMsgBody; ``` @@ -125,7 +125,7 @@ Report static data message body contains the following data: | `index` | `uint256` | numerical index of this NFT in the collection | | `collection` | `MsgAddress` | address of the smart contract of the collection to which this NFT belongs | -```tlb TL-B +```tlb title="TL-B" report_static_data#8b771735 query_id:uint64 index:uint256 collection:MsgAddress = InternalMsgBody; ``` diff --git a/content/standard/tokens/nft/meta.json b/content/standard/tokens/nft/meta.json new file mode 100644 index 000000000..f098325d0 --- /dev/null +++ b/content/standard/tokens/nft/meta.json @@ -0,0 +1,16 @@ +{ + "$schema": "../../../../meta-schema.json", + "title": "NFT", + "pages": [ + "overview", + "how-it-works", + "sbt", + "comparison", + "deploy", + "transfer", + "metadata", + "verify", + "api", + "nft-reference" + ] +} diff --git a/content/standard/tokens/nft/verify.mdx b/content/standard/tokens/nft/verify.mdx index efa7d80fc..33a175e12 100644 --- a/content/standard/tokens/nft/verify.mdx +++ b/content/standard/tokens/nft/verify.mdx @@ -13,7 +13,7 @@ Because the collection is the source of truth, verification goes through it: There is an [API method](/ecosystem/api/toncenter/v3/nfts/get-nft-items?playground=open) that performs this verification off-chain with a single request. Provide the addresses of the NFT item and NFT collection: -```ts TypeScript +```ts title="TypeScript" async function main() { const itemAddress = "EQD3LzasMd4GAmhIEkCQ4k6LnziTqNZ6VPtRfeZKHu0Fmkho"; const collectionAddress = "EQCOtGTvX-RNSaiUavmqNcDeblB3-TloZpvYuyGOdFnfy-1N"; @@ -42,7 +42,7 @@ main(); First, read the NFT item index. If the collection returns the same NFT item address for that index, the item belongs to the collection. -```ts TypeScript +```ts title="TypeScript" import { Address, Cell } from "@ton/ton"; async function main() { diff --git a/content/standard/wallets/highload/meta.json b/content/standard/wallets/highload/meta.json new file mode 100644 index 000000000..2b718ad02 --- /dev/null +++ b/content/standard/wallets/highload/meta.json @@ -0,0 +1,9 @@ +{ + "$schema": "../../../../meta-schema.json", + "title": "Highload wallets", + "pages": [ + "overview", + "v3", + "v2" + ] +} diff --git a/content/standard/wallets/meta.json b/content/standard/wallets/meta.json new file mode 100644 index 000000000..807755e1d --- /dev/null +++ b/content/standard/wallets/meta.json @@ -0,0 +1,21 @@ +{ + "$schema": "../../../meta-schema.json", + "title": "Wallets", + "pages": [ + "how-it-works", + "mnemonics", + "comparison", + "interact", + "gasless", + "v5", + "v5-api", + "v4", + "highload", + "lockup", + "preprocessed-v2", + "restricted", + "performance", + "sources", + "history" + ] +} diff --git a/content/standard/wallets/preprocessed-v2/meta.json b/content/standard/wallets/preprocessed-v2/meta.json new file mode 100644 index 000000000..5b6d727f7 --- /dev/null +++ b/content/standard/wallets/preprocessed-v2/meta.json @@ -0,0 +1,8 @@ +{ + "$schema": "../../../../meta-schema.json", + "title": "Preprocessed wallet v2", + "pages": [ + "interact", + "specification" + ] +} diff --git a/content/standard/wallets/v5-api.mdx b/content/standard/wallets/v5-api.mdx index 0400926de..b2aa5783f 100644 --- a/content/standard/wallets/v5-api.mdx +++ b/content/standard/wallets/v5-api.mdx @@ -1,6 +1,6 @@ --- title: "Wallet V5 interface: messages and get methods" -sidebarTitle: "Messages and get methods" +sidebarTitle: "V5: Messages and get methods" --- | Contract version | Hash | Link | diff --git a/content/standard/wallets/v5.mdx b/content/standard/wallets/v5.mdx index e532f618a..33b48e821 100644 --- a/content/standard/wallets/v5.mdx +++ b/content/standard/wallets/v5.mdx @@ -1,6 +1,6 @@ --- title: "Wallet V5" -sidebarTitle: "Overview" +sidebarTitle: "V5: Overview" --- | Contract version | Hash | Link | diff --git a/content/start-here.mdx b/content/start-here.mdx index 7b9cc7ac1..458de7fd9 100644 --- a/content/start-here.mdx +++ b/content/start-here.mdx @@ -221,7 +221,7 @@ To tell other developers how a certain type of data is stored in cells, a [TL-B] The TL-B schemas for binary representations of messages, transactions, initial contract state, and most other data structures used by the blockchain can be found in the [`block.tlb`](https://github.com/ton-blockchain/ton/blob/master/crypto/block/block.tlb) file in the [TON monorepo](https://github.com/ton-blockchain/ton). TypeScript functions for serializing and deserializing them are provided by the [`@ton/core`](https://github.com/ton-org/ton-core) and [`@ton/ton`](https://github.com/ton-org/ton) libraries. -In general, a library that converts data structures between cells and the format native to a programming language, or allows calling contract methods as native functions of the language, is called a _wrapper_ or _binding_. For example, functions that deserialize Jetton-related cell data into TypeScript objects can be found in the [`assets-sdk`](https://github.com/ton-community/assets-sdk/blob/5285cd75a97acbb15999e7dfb3b8e4ec9e98b4ed/src/jetton/types/JettonBurnMessage.ts) library. Some high-level programming languages [can generate](/languages/tact) bindings from the contract's source code. The "rule of thumb" is that production-grade code should not include low-level manipulation of binary data, and should instead rely on a library with bindings. This reduces the chance of mistakes and ensures the code has more users. With widely reused code, there are more opportunities to detect mistakes, and they are more likely to be fixed quickly. +In general, a library that converts data structures between cells and the format native to a programming language, or allows calling contract methods as native functions of the language, is called a _wrapper_ or _binding_. For example, functions that deserialize Jetton-related cell data into TypeScript objects can be found in the [`assets-sdk`](https://github.com/ton-community/assets-sdk/blob/5285cd75a97acbb15999e7dfb3b8e4ec9e98b4ed/src/jetton/types/JettonBurnMessage.ts) library. [Acton toolchain](/contract-dev/acton) can generate bindings from the Tolk contract's source code. The "rule of thumb" is that production-grade code should not include low-level manipulation of binary data, and should instead rely on a library with bindings. This reduces the chance of mistakes and ensures the code has more users. With widely reused code, there are more opportunities to detect mistakes, and they are more likely to be fixed quickly. ### Blockchain interaction diff --git a/content/tolk/features/meta.json b/content/tolk/features/meta.json new file mode 100644 index 000000000..21418611c --- /dev/null +++ b/content/tolk/features/meta.json @@ -0,0 +1,17 @@ +{ + "$schema": "../../../meta-schema.json", + "title": "Language features", + "pages": [ + "message-handling", + "contract-storage", + "contract-getters", + "contract-abi", + "message-sending", + "auto-serialization", + "lazy-loading", + "jetton-payload", + "standard-library", + "asm-functions", + "compiler-optimizations" + ] +} diff --git a/content/tolk/from-func/meta.json b/content/tolk/from-func/meta.json new file mode 100644 index 000000000..8d86e6edd --- /dev/null +++ b/content/tolk/from-func/meta.json @@ -0,0 +1,9 @@ +{ + "$schema": "../../../meta-schema.json", + "title": "Migrating from FunC", + "pages": [ + "tolk-vs-func", + "stdlib-comparison", + "converter" + ] +} diff --git a/content/tolk/meta.json b/content/tolk/meta.json new file mode 100644 index 000000000..e0aca4429 --- /dev/null +++ b/content/tolk/meta.json @@ -0,0 +1,15 @@ +{ + "$schema": "../../meta-schema.json", + "title": "Tolk language", + "pages": [ + "overview", + "basic-syntax", + "idioms-conventions", + "examples", + "types", + "syntax", + "features", + "from-func", + "changelog" + ] +} diff --git a/content/tolk/syntax/meta.json b/content/tolk/syntax/meta.json new file mode 100644 index 000000000..85b6af23d --- /dev/null +++ b/content/tolk/syntax/meta.json @@ -0,0 +1,15 @@ +{ + "$schema": "../../../meta-schema.json", + "title": "Syntax details", + "pages": [ + "variables", + "conditions-loops", + "exceptions", + "functions-methods", + "structures-fields", + "pattern-matching", + "mutability", + "operators", + "imports" + ] +} diff --git a/content/tolk/types/meta.json b/content/tolk/types/meta.json new file mode 100644 index 000000000..f2196bb3a --- /dev/null +++ b/content/tolk/types/meta.json @@ -0,0 +1,27 @@ +{ + "$schema": "../../../meta-schema.json", + "title": "Type system", + "pages": [ + "list-of-types", + "numbers", + "booleans", + "address", + "cells", + "strings", + "structures", + "aliases", + "generics", + "enums", + "nullable", + "unions", + "tensors", + "tuples", + "maps", + "callables", + "unknown", + "void-never", + "type-checks-and-casts", + "overall-tvm-stack", + "overall-serialization" + ] +} diff --git a/content/tvm/builders-and-slices.mdx b/content/tvm/builders-and-slices.mdx index c2888a81c..9cb7b1019 100644 --- a/content/tvm/builders-and-slices.mdx +++ b/content/tvm/builders-and-slices.mdx @@ -18,26 +18,26 @@ For example, serialize the following numbers to a cell: First, create an empty builder using [`NEWC`](/tvm/instructions#c8-newc): -```fift Fift +```fift title="Fift" NEWC // returns empty builder x{} ``` Then, put a number on the stack: -```fift Fift +```fift title="Fift" 1 INT // stack: x{} 1 ``` And call [`STU`](/tvm/instructions#cbcc-stu) ("STore Unsigned integer") to store integer into builder (swapping builder and value to meet `STU` input order): -```fift Fift +```fift title="Fift" SWAP // stack: 1 x{} 4 STU // stack: x{0001} ``` Then, store the other two numbers: -```fift Fift +```fift title="Fift" 2 INT // x{0001} 2 SWAP // 2 x{0001} 4 STU // x{00010010} @@ -55,14 +55,14 @@ Slice allows reading data back from a cell, field by field. For example, deseria [`CTOS`](/tvm/instructions#d0-ctos) ("Cell TO Slice") loads a `Cell` to a `Slice`. -```fift Fift +```fift title="Fift" // assume a cell with bitstring x{0001001011111111} is on the stack CTOS // x{0001001011111111} ``` Then, call [`LDU`](/tvm/instructions#d3cc-ldu) ("LoaD Unsigned integer") to read first value (`uint4`). -```fift Fift +```fift title="Fift" 4 LDU // 1 x{001011111111} ``` @@ -70,7 +70,7 @@ Then, call [`LDU`](/tvm/instructions#d3cc-ldu) ("LoaD Unsigned integer") to read Similarly, read another two numbers: -```fift Fift +```fift title="Fift" 4 LDU // 1 2 x{11111111} 8 LDI // 1 2 -1 x{} ``` diff --git a/content/tvm/continuations.mdx b/content/tvm/continuations.mdx index 47a9dbde9..ca3725bd0 100644 --- a/content/tvm/continuations.mdx +++ b/content/tvm/continuations.mdx @@ -35,7 +35,7 @@ The following rules are applied during the jump: Due to the limitation of the `Cell` type, one continuation can contain no more than 1023 bits of bitcode. To execute longer functions, we could pass `JMPREF` as a last instruction, which will continue execution of a function in a new continuation. -```fift Fift +```fift title="Fift" // some instructions <{ // next instructions that exceed the 1023-bit limit are placed in a child cell @@ -48,7 +48,7 @@ To simplify things, TVM has an _implicit jump_ mechanism, which automatically ju _Call_ is a special type of jump, which also saves `cc` to `c0`, so the callee can pass execution back to the caller. That is how [`CALLREF`](/tvm/instructions#db3c-callref) works. -```fift Fift +```fift title="Fift" 2 PUSHINT 3 PUSHINT <{ diff --git a/content/tvm/instructions.mdx b/content/tvm/instructions.mdx index 1a10692f2..3fd4ceb4a 100644 --- a/content/tvm/instructions.mdx +++ b/content/tvm/instructions.mdx @@ -35,7 +35,7 @@ The `[32(c+1)] PLDUZ` notation means a value for `c` should be chosen, the calcu Does nothing.
**Category:** Stack Basic (stack_basic)
-```fift Fift +```fift title="Fift" NOP ``` @@ -44,7 +44,7 @@ NOP Interchanges `s0` with `s[i]`, `1 <= i <= 15`.
**Category:** Stack Basic (stack_basic)
-```fift Fift +```fift title="Fift" s[i] XCHG0 ``` @@ -57,7 +57,7 @@ s[i] XCHG0 Interchanges `s[i]` with `s[j]`, `1 <= i < j <= 15`.
**Category:** Stack Basic (stack_basic)
-```fift Fift +```fift title="Fift" s[i] s[j] XCHG ``` @@ -66,7 +66,7 @@ s[i] s[j] XCHG Interchanges `s0` with `s[ii]`, `0 <= ii <= 255`.
**Category:** Stack Basic (stack_basic)
-```fift Fift +```fift title="Fift" s0 [ii] s() XCHG ``` @@ -75,7 +75,7 @@ s0 [ii] s() XCHG Interchanges `s1` with `s[i]`, `2 <= i <= 15`.
**Category:** Stack Basic (stack_basic)
-```fift Fift +```fift title="Fift" s1 s[i] XCHG ``` @@ -84,7 +84,7 @@ s1 s[i] XCHG Pushes a copy of the old `s[i]` into the stack.
**Category:** Stack Basic (stack_basic)
-```fift Fift +```fift title="Fift" s[i] PUSH ``` @@ -99,7 +99,7 @@ s[i] PUSH Pops the old `s0` value into the old `s[i]`.
**Category:** Stack Basic (stack_basic)
-```fift Fift +```fift title="Fift" s[i] POP ``` @@ -114,7 +114,7 @@ s[i] POP Equivalent to `s2 s[i] XCHG` `s1 s[j] XCHG` `s[k] XCHG0`.
**Category:** Stack Complex (stack_complex)
-```fift Fift +```fift title="Fift" s[i] s[j] s[k] XCHG3 ``` @@ -123,7 +123,7 @@ s[i] s[j] s[k] XCHG3 Equivalent to `s1 s[i] XCHG` `s[j] XCHG0`.
**Category:** Stack Complex (stack_complex)
-```fift Fift +```fift title="Fift" s[i] s[j] XCHG2 ``` @@ -132,7 +132,7 @@ s[i] s[j] XCHG2 Equivalent to `s[i] XCHG0` `s[j] PUSH`.
**Category:** Stack Complex (stack_complex)
-```fift Fift +```fift title="Fift" s[i] s[j] XCPU ``` @@ -141,7 +141,7 @@ s[i] s[j] XCPU Equivalent to `s[i] PUSH` `SWAP` `s[j] XCHG0`.
**Category:** Stack Complex (stack_complex)
-```fift Fift +```fift title="Fift" s[i] s[j-1] PUXC ``` @@ -150,7 +150,7 @@ s[i] s[j-1] PUXC Equivalent to `s[i] PUSH` `s[j+1] PUSH`.
**Category:** Stack Complex (stack_complex)
-```fift Fift +```fift title="Fift" s[i] s[j] PUSH2 ``` @@ -159,7 +159,7 @@ s[i] s[j] PUSH2 Long form of `XCHG3`.
**Category:** Stack Complex (stack_complex)
-```fift Fift +```fift title="Fift" s[i] s[j] s[k] XCHG3_l ``` @@ -168,7 +168,7 @@ s[i] s[j] s[k] XCHG3_l Equivalent to `s[i] s[j] XCHG2` `s[k] PUSH`.
**Category:** Stack Complex (stack_complex)
-```fift Fift +```fift title="Fift" s[i] s[j] s[k] XC2PU ``` @@ -177,7 +177,7 @@ s[i] s[j] s[k] XC2PU Equivalent to `s1 s[i] XCHG` `s[j] s[k-1] PUXC`.
**Category:** Stack Complex (stack_complex)
-```fift Fift +```fift title="Fift" s[i] s[j] s[k-1] XCPUXC ``` @@ -186,7 +186,7 @@ s[i] s[j] s[k-1] XCPUXC Equivalent to `s[i] XCHG0` `s[j] s[k] PUSH2`.
**Category:** Stack Complex (stack_complex)
-```fift Fift +```fift title="Fift" s[i] s[j] s[k] XCPU2 ``` @@ -195,7 +195,7 @@ s[i] s[j] s[k] XCPU2 Equivalent to `s[i] PUSH` `s2 XCHG0` `s[j] s[k] XCHG2`.
**Category:** Stack Complex (stack_complex)
-```fift Fift +```fift title="Fift" s[i] s[j-1] s[k-1] PUXC2 ``` @@ -204,7 +204,7 @@ s[i] s[j-1] s[k-1] PUXC2 Equivalent to `s[i] s[j-1] PUXC` `s[k] PUSH`.
**Category:** Stack Complex (stack_complex)
-```fift Fift +```fift title="Fift" s[i] s[j-1] s[k-1] PUXCPU ``` @@ -213,7 +213,7 @@ s[i] s[j-1] s[k-1] PUXCPU Equivalent to `s[i] PUSH` `SWAP` `s[j] s[k-1] PUXC`.
**Category:** Stack Complex (stack_complex)
-```fift Fift +```fift title="Fift" s[i] s[j-1] s[k-2] PU2XC ``` @@ -222,7 +222,7 @@ s[i] s[j-1] s[k-2] PU2XC Equivalent to `s[i] PUSH` `s[j+1] s[k+1] PUSH2`.
**Category:** Stack Complex (stack_complex)
-```fift Fift +```fift title="Fift" s[i] s[j] s[k] PUSH3 ``` @@ -231,7 +231,7 @@ s[i] s[j] s[k] PUSH3 Permutes two blocks `s[j+i+1] ... s[j+1]` and `s[j] ... s0`.
`0 <= i,j <= 15`
Equivalent to `[i+1] [j+1] REVERSE` `[j+1] 0 REVERSE` `[i+j+2] 0 REVERSE`.
**Category:** Stack Complex (stack_complex)
-```fift Fift +```fift title="Fift" [i+1] [j+1] BLKSWAP ``` @@ -248,7 +248,7 @@ Permutes two blocks `s[j+i+1] ... s[j+1]` and `s[j] ... s0`.
`0 <= i,j <= 1 Pushes a copy of the old `s[ii]` into the stack.
`0 <= ii <= 255`
**Category:** Stack Complex (stack_complex)
-```fift Fift +```fift title="Fift" [ii] s() PUSH ``` @@ -257,7 +257,7 @@ Pushes a copy of the old `s[ii]` into the stack.
`0 <= ii <= 255`
Pops the old `s0` value into the old `s[ii]`.
`0 <= ii <= 255`
**Category:** Stack Complex (stack_complex)
-```fift Fift +```fift title="Fift" [ii] s() POP ``` @@ -266,7 +266,7 @@ Pops the old `s0` value into the old `s[ii]`.
`0 <= ii <= 255`
Equivalent to `1 2 BLKSWAP` or to `s2 s1 XCHG2`.
**Category:** Stack Complex (stack_complex)
-```fift Fift +```fift title="Fift" ROT ``` @@ -275,7 +275,7 @@ ROT Equivalent to `2 1 BLKSWAP` or to `s2 s2 XCHG2`.
**Category:** Stack Complex (stack_complex)
-```fift Fift +```fift title="Fift" ROTREV -ROT ``` @@ -285,7 +285,7 @@ ROTREV Equivalent to `2 2 BLKSWAP` or to `s3 s2 XCHG2`.
**Category:** Stack Complex (stack_complex)
-```fift Fift +```fift title="Fift" SWAP2 2SWAP ``` @@ -295,7 +295,7 @@ SWAP2 Equivalent to `DROP` `DROP`.
**Category:** Stack Complex (stack_complex)
-```fift Fift +```fift title="Fift" DROP2 2DROP ``` @@ -305,7 +305,7 @@ DROP2 Equivalent to `s1 s0 PUSH2`.
**Category:** Stack Complex (stack_complex)
-```fift Fift +```fift title="Fift" DUP2 2DUP ``` @@ -315,7 +315,7 @@ DUP2 Equivalent to `s3 s2 PUSH2`.
**Category:** Stack Complex (stack_complex)
-```fift Fift +```fift title="Fift" OVER2 2OVER ``` @@ -325,7 +325,7 @@ OVER2 Reverses the order of `s[j+i+1] ... s[j]`.
**Category:** Stack Complex (stack_complex)
-```fift Fift +```fift title="Fift" [i+2] [j] REVERSE ``` @@ -334,7 +334,7 @@ Reverses the order of `s[j+i+1] ... s[j]`.
Equivalent to `DROP` performed `i` times.
**Category:** Stack Complex (stack_complex)
-```fift Fift +```fift title="Fift" [i] BLKDROP ``` @@ -343,7 +343,7 @@ Equivalent to `DROP` performed `i` times.
Equivalent to `PUSH s(j)` performed `i` times.
`1 <= i <= 15`, `0 <= j <= 15`.
**Category:** Stack Complex (stack_complex)
-```fift Fift +```fift title="Fift" [i] [j] BLKPUSH ``` @@ -352,7 +352,7 @@ Equivalent to `PUSH s(j)` performed `i` times.
`1 <= i <= 15`, `0 <= j <= 1 Pops integer `i` from the stack, then performs `s[i] PUSH`.
**Category:** Stack Complex (stack_complex)
-```fift Fift +```fift title="Fift" PICK PUSHX ``` @@ -362,7 +362,7 @@ PUSHX Pops integer `i` from the stack, then performs `1 [i] BLKSWAP`.
**Category:** Stack Complex (stack_complex)
-```fift Fift +```fift title="Fift" ROLLX ``` @@ -371,7 +371,7 @@ ROLLX Pops integer `i` from the stack, then performs `[i] 1 BLKSWAP`.
**Category:** Stack Complex (stack_complex)
-```fift Fift +```fift title="Fift" -ROLLX ROLLREVX ``` @@ -381,7 +381,7 @@ ROLLREVX Pops integers `i`,`j` from the stack, then performs `[i] [j] BLKSWAP`.
**Category:** Stack Complex (stack_complex)
-```fift Fift +```fift title="Fift" BLKSWX ``` @@ -390,7 +390,7 @@ BLKSWX Pops integers `i`,`j` from the stack, then performs `[i] [j] REVERSE`.
**Category:** Stack Complex (stack_complex)
-```fift Fift +```fift title="Fift" REVX ``` @@ -399,7 +399,7 @@ REVX Pops integer `i` from the stack, then performs `[i] BLKDROP`.
**Category:** Stack Complex (stack_complex)
-```fift Fift +```fift title="Fift" DROPX ``` @@ -408,7 +408,7 @@ DROPX Equivalent to `SWAP` `OVER` or to `s1 s1 XCPU`.
**Category:** Stack Complex (stack_complex)
-```fift Fift +```fift title="Fift" TUCK ``` @@ -417,7 +417,7 @@ TUCK Pops integer `i` from the stack, then performs `s[i] XCHG`.
**Category:** Stack Complex (stack_complex)
-```fift Fift +```fift title="Fift" XCHGX ``` @@ -426,7 +426,7 @@ XCHGX Pushes the current depth of the stack.
**Category:** Stack Complex (stack_complex)
-```fift Fift +```fift title="Fift" DEPTH ``` @@ -435,7 +435,7 @@ DEPTH Pops integer `i` from the stack, then checks whether there are at least `i` elements, generating a stack underflow exception otherwise.
**Category:** Stack Complex (stack_complex)
-```fift Fift +```fift title="Fift" CHKDEPTH ``` @@ -444,7 +444,7 @@ CHKDEPTH Pops integer `i` from the stack, then removes all but the top `i` elements.
**Category:** Stack Complex (stack_complex)
-```fift Fift +```fift title="Fift" ONLYTOPX ``` @@ -453,7 +453,7 @@ ONLYTOPX Pops integer `i` from the stack, then leaves only the bottom `i` elements. Approximately equivalent to `DEPTH` `SWAP` `SUB` `DROPX`.
**Category:** Stack Complex (stack_complex)
-```fift Fift +```fift title="Fift" ONLYX ``` @@ -462,7 +462,7 @@ ONLYX Drops `i` stack elements under the top `j` elements.
`1 <= i <= 15`, `0 <= j <= 15`
Equivalent to `[i+j] 0 REVERSE` `[i] BLKDROP` `[j] 0 REVERSE`.
**Category:** Stack Complex (stack_complex)
-```fift Fift +```fift title="Fift" [i] [j] BLKDROP2 ``` @@ -471,7 +471,7 @@ Drops `i` stack elements under the top `j` elements.
`1 <= i <= 15`, `0 <= Pushes the only value of type _Null_.
**Category:** Tuple (tuple)
-```fift Fift +```fift title="Fift" NULL PUSHNULL ``` @@ -485,7 +485,7 @@ PUSHNULL Checks whether `x` is a _Null_, and returns `-1` or `0` accordingly.
**Category:** Tuple (tuple)
-```fift Fift +```fift title="Fift" ISNULL ``` @@ -498,7 +498,7 @@ ISNULL Creates a new _Tuple_ `t=(x_1, ... ,x_n)` containing `n` values `x_1`,..., `x_n`.
`0 <= n <= 15`
**Category:** Tuple (tuple)
-```fift Fift +```fift title="Fift" [n] TUPLE ``` @@ -517,7 +517,7 @@ Creates a new _Tuple_ `t=(x_1, ... ,x_n)` containing `n` values `x_1`,..., `x_n` Returns the `k`-th element of a _Tuple_ `t`.
`0 <= k <= 15`.
**Category:** Tuple (tuple)
-```fift Fift +```fift title="Fift" [k] INDEX ``` @@ -534,7 +534,7 @@ Returns the `k`-th element of a _Tuple_ `t`.
`0 <= k <= 15`.
Unpacks a _Tuple_ `t=(x_1,...,x_n)` of length equal to `0 <= n <= 15`.
If `t` is not a _Tuple_, or if `|t| != n`, a type check exception is thrown.
**Category:** Tuple (tuple)
-```fift Fift +```fift title="Fift" [n] UNTUPLE ``` @@ -551,7 +551,7 @@ Unpacks a _Tuple_ `t=(x_1,...,x_n)` of length equal to `0 <= n <= 15`.
If ` Unpacks first `0 <= k <= 15` elements of a _Tuple_ `t`.
If `|t| **Category:** Tuple (tuple)
-```fift Fift +```fift title="Fift" [k] UNPACKFIRST ``` @@ -564,7 +564,7 @@ Unpacks first `0 <= k <= 15` elements of a _Tuple_ `t`.
If `|t| **Category:** Tuple (tuple)
-```fift Fift +```fift title="Fift" [n] EXPLODE ``` @@ -573,7 +573,7 @@ Unpacks a _Tuple_ `t=(x_1,...,x_m)` and returns its length `m`, but only if `m < Computes _Tuple_ `t'` that differs from `t` only at position `t'_{k+1}`, which is set to `x`.
`0 <= k <= 15`
If `k >= |t|`, throws a range check exception.
**Category:** Tuple (tuple)
-```fift Fift +```fift title="Fift" [k] SETINDEX ``` @@ -590,7 +590,7 @@ Computes _Tuple_ `t'` that differs from `t` only at position `t'_{k+1}`, which i Returns the `k`-th element of a _Tuple_ `t`, where `0 <= k <= 15`. In other words, returns `x_{k+1}` if `t=(x_1,...,x_n)`. If `k>=n`, or if `t` is _Null_, returns a _Null_ instead of `x`.
**Category:** Tuple (tuple)
-```fift Fift +```fift title="Fift" [k] INDEXQ ``` @@ -607,7 +607,7 @@ Returns the `k`-th element of a _Tuple_ `t`, where `0 <= k <= 15`. In other word Sets the `k`-th component of _Tuple_ `t` to `x`, where `0 <= k < 16`, and returns the resulting _Tuple_ `t'`.
If `|t| <= k`, first extends the original _Tuple_ to length `n'=k+1` by setting all new components to _Null_. If the original value of `t` is _Null_, treats it as an empty _Tuple_. If `t` is not _Null_ or _Tuple_, throws an exception. If `x` is _Null_ and either `|t| <= k` or `t` is _Null_, then always returns `t'=t` (and does not consume tuple creation gas).
**Category:** Tuple (tuple)
-```fift Fift +```fift title="Fift" [k] SETINDEXQ ``` @@ -624,7 +624,7 @@ Sets the `k`-th component of _Tuple_ `t` to `x`, where `0 <= k < 16`, and return Creates a new _Tuple_ `t` of length `n` similarly to `TUPLE`, but with `0 <= n <= 255` taken from the stack.
**Category:** Tuple (tuple)
-```fift Fift +```fift title="Fift" TUPLEVAR ``` @@ -633,7 +633,7 @@ TUPLEVAR Similar to `k INDEX`, but with `0 <= k <= 254` taken from the stack.
**Category:** Tuple (tuple)
-```fift Fift +```fift title="Fift" INDEXVAR ``` @@ -642,7 +642,7 @@ INDEXVAR Similar to `n UNTUPLE`, but with `0 <= n <= 255` taken from the stack.
**Category:** Tuple (tuple)
-```fift Fift +```fift title="Fift" UNTUPLEVAR ``` @@ -651,7 +651,7 @@ UNTUPLEVAR Similar to `n UNPACKFIRST`, but with `0 <= n <= 255` taken from the stack.
**Category:** Tuple (tuple)
-```fift Fift +```fift title="Fift" UNPACKFIRSTVAR ``` @@ -660,7 +660,7 @@ UNPACKFIRSTVAR Similar to `n EXPLODE`, but with `0 <= n <= 255` taken from the stack.
**Category:** Tuple (tuple)
-```fift Fift +```fift title="Fift" EXPLODEVAR ``` @@ -669,7 +669,7 @@ EXPLODEVAR Similar to `k SETINDEX`, but with `0 <= k <= 254` taken from the stack.
**Category:** Tuple (tuple)
-```fift Fift +```fift title="Fift" SETINDEXVAR ``` @@ -678,7 +678,7 @@ SETINDEXVAR Similar to `n INDEXQ`, but with `0 <= k <= 254` taken from the stack.
**Category:** Tuple (tuple)
-```fift Fift +```fift title="Fift" INDEXVARQ ``` @@ -687,7 +687,7 @@ INDEXVARQ Similar to `k SETINDEXQ`, but with `0 <= k <= 254` taken from the stack.
**Category:** Tuple (tuple)
-```fift Fift +```fift title="Fift" SETINDEXVARQ ``` @@ -696,7 +696,7 @@ SETINDEXVARQ Returns the length of a _Tuple_.
**Category:** Tuple (tuple)
-```fift Fift +```fift title="Fift" TLEN ``` @@ -705,7 +705,7 @@ TLEN Similar to `TLEN`, but returns `-1` if `t` is not a _Tuple_.
**Category:** Tuple (tuple)
-```fift Fift +```fift title="Fift" QTLEN ``` @@ -714,7 +714,7 @@ QTLEN Returns `-1` or `0` depending on whether `t` is a _Tuple_.
**Category:** Tuple (tuple)
-```fift Fift +```fift title="Fift" ISTUPLE ``` @@ -723,7 +723,7 @@ ISTUPLE Returns the last element of a non-empty _Tuple_ `t`.
**Category:** Tuple (tuple)
-```fift Fift +```fift title="Fift" LAST ``` @@ -732,7 +732,7 @@ LAST Appends a value `x` to a _Tuple_ `t=(x_1,...,x_n)`, but only if the resulting _Tuple_ `t'=(x_1,...,x_n,x)` is of length at most 255. Otherwise throws a type check exception.
**Category:** Tuple (tuple)
-```fift Fift +```fift title="Fift" TPUSH COMMA ``` @@ -742,7 +742,7 @@ COMMA Detaches the last element `x=x_n` from a non-empty _Tuple_ `t=(x_1,...,x_n)`, and returns both the resulting _Tuple_ `t'=(x_1,...,x_{n-1})` and the original last element `x`.
**Category:** Tuple (tuple)
-```fift Fift +```fift title="Fift" TPOP ``` @@ -751,7 +751,7 @@ TPOP Pushes a _Null_ under the topmost _Integer_ `x`, but only if `x!=0`.
**Category:** Tuple (tuple)
-```fift Fift +```fift title="Fift" NULLSWAPIF ``` @@ -760,7 +760,7 @@ NULLSWAPIF Pushes a _Null_ under the topmost _Integer_ `x`, but only if `x=0`. May be used for stack alignment after quiet primitives such as `PLDUXQ`.
**Category:** Tuple (tuple)
-```fift Fift +```fift title="Fift" NULLSWAPIFNOT ``` @@ -769,7 +769,7 @@ NULLSWAPIFNOT Pushes a _Null_ under the second stack entry from the top, but only if the topmost _Integer_ `y` is non-zero.
**Category:** Tuple (tuple)
-```fift Fift +```fift title="Fift" NULLROTRIF ``` @@ -778,7 +778,7 @@ NULLROTRIF Pushes a _Null_ under the second stack entry from the top, but only if the topmost _Integer_ `y` is zero. May be used for stack alignment after quiet primitives such as `LDUXQ`.
**Category:** Tuple (tuple)
-```fift Fift +```fift title="Fift" NULLROTRIFNOT ``` @@ -787,7 +787,7 @@ NULLROTRIFNOT Pushes two nulls under the topmost _Integer_ `x`, but only if `x!=0`.
Equivalent to `NULLSWAPIF` `NULLSWAPIF`.
**Category:** Tuple (tuple)
-```fift Fift +```fift title="Fift" NULLSWAPIF2 ``` @@ -796,7 +796,7 @@ NULLSWAPIF2 Pushes two nulls under the topmost _Integer_ `x`, but only if `x=0`.
Equivalent to `NULLSWAPIFNOT` `NULLSWAPIFNOT`.
**Category:** Tuple (tuple)
-```fift Fift +```fift title="Fift" NULLSWAPIFNOT2 ``` @@ -805,7 +805,7 @@ NULLSWAPIFNOT2 Pushes two nulls under the second stack entry from the top, but only if the topmost _Integer_ `y` is non-zero.
Equivalent to `NULLROTRIF` `NULLROTRIF`.
**Category:** Tuple (tuple)
-```fift Fift +```fift title="Fift" NULLROTRIF2 ``` @@ -814,7 +814,7 @@ NULLROTRIF2 Pushes two nulls under the second stack entry from the top, but only if the topmost _Integer_ `y` is zero.
Equivalent to `NULLROTRIFNOT` `NULLROTRIFNOT`.
**Category:** Tuple (tuple)
-```fift Fift +```fift title="Fift" NULLROTRIFNOT2 ``` @@ -823,7 +823,7 @@ NULLROTRIFNOT2 Recovers `x=(t_{i+1})_{j+1}` for `0 <= i,j <= 3`.
Equivalent to `[i] INDEX` `[j] INDEX`.
**Category:** Tuple (tuple)
-```fift Fift +```fift title="Fift" [i] [j] INDEX2 ``` @@ -838,7 +838,7 @@ Recovers `x=(t_{i+1})_{j+1}` for `0 <= i,j <= 3`.
Equivalent to `[i] INDEX` Recovers `x=t_{i+1}_{j+1}_{k+1}`.
`0 <= i,j,k <= 3`
Equivalent to `[i] [j] INDEX2` `[k] INDEX`.
**Category:** Tuple (tuple)
-```fift Fift +```fift title="Fift" [i] [j] [k] INDEX3 ``` @@ -853,7 +853,7 @@ Recovers `x=t_{i+1}_{j+1}_{k+1}`.
`0 <= i,j,k <= 3`
Equivalent to `[i] Pushes integer `x` into the stack. `-5 <= x <= 10`.
Here `i` equals four lower-order bits of `x` (`i=x mod 16`).
**Category:** Const Int (const_int)
-```fift Fift +```fift title="Fift" [x] PUSHINT [x] INT ``` @@ -870,7 +870,7 @@ Pushes integer `x` into the stack. `-5 <= x <= 10`.
Here `i` equals four lo Pushes integer `xx`. `-128 <= xx <= 127`.
**Category:** Const Int (const_int)
-```fift Fift +```fift title="Fift" [xx] PUSHINT [xx] INT ``` @@ -880,7 +880,7 @@ Pushes integer `xx`. `-128 <= xx <= 127`.
Pushes integer `xxxx`. `-2^15 <= xx < 2^15`.
**Category:** Const Int (const_int)
-```fift Fift +```fift title="Fift" [xxxx] PUSHINT [xxxx] INT ``` @@ -890,7 +890,7 @@ Pushes integer `xxxx`. `-2^15 <= xx < 2^15`.
Pushes integer `xxx`.
_Details:_ 5-bit `0 <= l <= 30` determines the length `n=8l+19` of signed big-endian integer `xxx`.
The total length of this instruction is `l+4` bytes or `n+13=8l+32` bits.
**Category:** Const Int (const_int)
-```fift Fift +```fift title="Fift" [xxx] PUSHINT [xxx] INT ``` @@ -900,7 +900,7 @@ Pushes integer `xxx`.
_Details:_ 5-bit `0 <= l <= 30` determines the length (Quietly) pushes `2^(xx+1)` for `0 <= xx <= 255`.
`2^256` is a `NaN`.
**Category:** Const Int (const_int)
-```fift Fift +```fift title="Fift" [xx+1] PUSHPOW2 ``` @@ -909,7 +909,7 @@ Pushes integer `xxx`.
_Details:_ 5-bit `0 <= l <= 30` determines the length Pushes a `NaN`.
**Category:** Const Int (const_int)
-```fift Fift +```fift title="Fift" PUSHNAN ``` @@ -918,7 +918,7 @@ PUSHNAN Pushes `2^(xx+1)-1` for `0 <= xx <= 255`.
**Category:** Const Int (const_int)
-```fift Fift +```fift title="Fift" [xx+1] PUSHPOW2DEC ``` @@ -927,7 +927,7 @@ Pushes `2^(xx+1)-1` for `0 <= xx <= 255`.
Pushes `-2^(xx+1)` for `0 <= xx <= 255`.
**Category:** Const Int (const_int)
-```fift Fift +```fift title="Fift" [xx+1] PUSHNEGPOW2 ``` @@ -936,7 +936,7 @@ Pushes `-2^(xx+1)` for `0 <= xx <= 255`.
Pushes the reference `ref` into the stack.
_Details:_ Pushes the first reference of `cc.code` into the stack as a _Cell_ (and removes this reference from the current continuation).
**Category:** Const Data (const_data)
-```fift Fift +```fift title="Fift" [ref] PUSHREF ``` @@ -945,7 +945,7 @@ Pushes the reference `ref` into the stack.
_Details:_ Pushes the first refe Similar to `PUSHREF`, but converts the cell into a _Slice_.
**Category:** Const Data (const_data)
-```fift Fift +```fift title="Fift" [ref] PUSHREFSLICE ``` @@ -954,7 +954,7 @@ Similar to `PUSHREF`, but converts the cell into a _Slice_.
Similar to `PUSHREFSLICE`, but makes a simple ordinary _Continuation_ out of the cell.
**Category:** Const Data (const_data)
-```fift Fift +```fift title="Fift" [ref] PUSHREFCONT ``` @@ -963,7 +963,7 @@ Similar to `PUSHREFSLICE`, but makes a simple ordinary _Continuation_ out of the Pushes the slice `slice` into the stack.
_Details:_ Pushes the (prefix) subslice of `cc.code` consisting of its first `8x+4` bits and no references (i.e., essentially a bitstring), where `0 <= x <= 15`.
A completion tag is assumed, meaning that all trailing zeroes and the last binary one (if present) are removed from this bitstring.
If the original bitstring consists only of zeroes, an empty slice will be pushed.
**Category:** Const Data (const_data)
-```fift Fift +```fift title="Fift" [slice] PUSHSLICE [slice] SLICE ``` @@ -973,7 +973,7 @@ Pushes the slice `slice` into the stack.
_Details:_ Pushes the (prefix) sub Pushes the slice `slice` into the stack.
_Details:_ Pushes the (prefix) subslice of `cc.code` consisting of its first `1 <= r+1 <= 4` references and up to first `8xx+1` bits of data, with `0 <= xx <= 31`.
A completion tag is also assumed.
**Category:** Const Data (const_data)
-```fift Fift +```fift title="Fift" [slice] PUSHSLICE [slice] SLICE ``` @@ -983,7 +983,7 @@ Pushes the slice `slice` into the stack.
_Details:_ Pushes the (prefix) sub Pushes the slice `slice` into the stack.
_Details:_ Pushes the subslice of `cc.code` consisting of `0 <= r <= 4` references and up to `8xx+6` bits of data, with `0 <= xx <= 127`.
A completion tag is assumed.
**Category:** Const Data (const_data)
-```fift Fift +```fift title="Fift" [slice] PUSHSLICE [slice] SLICE ``` @@ -993,7 +993,7 @@ Pushes the slice `slice` into the stack.
_Details:_ Pushes the subslice of Pushes a continuation made from `builder`.
_Details:_ Pushes the simple ordinary continuation `cccc` made from the first `0 <= r <= 3` references and the first `0 <= xx <= 127` bytes of `cc.code`.
**Category:** Const Data (const_data)
-```fift Fift +```fift title="Fift" [builder] PUSHCONT [builder] CONT ``` @@ -1003,7 +1003,7 @@ Pushes a continuation made from `builder`.
_Details:_ Pushes the simple ord Pushes a continuation made from `builder`.
_Details:_ Pushes an `x`-byte continuation for `0 <= x <= 15`.
**Category:** Const Data (const_data)
-```fift Fift +```fift title="Fift" [builder] PUSHCONT [builder] CONT ``` @@ -1013,7 +1013,7 @@ Pushes a continuation made from `builder`.
_Details:_ Pushes an `x`-byte co
**Category:** Arithm Basic (arithm_basic)
-```fift Fift +```fift title="Fift" ADD ``` @@ -1022,7 +1022,7 @@ ADD
**Category:** Arithm Basic (arithm_basic)
-```fift Fift +```fift title="Fift" SUB ``` @@ -1031,7 +1031,7 @@ SUB Equivalent to `SWAP` `SUB`.
**Category:** Arithm Basic (arithm_basic)
-```fift Fift +```fift title="Fift" SUBR ``` @@ -1040,7 +1040,7 @@ SUBR Equivalent to `-1 MULCONST` or to `ZERO SUBR`.
Notice that it triggers an integer overflow exception if `x=-2^256`.
**Category:** Arithm Basic (arithm_basic)
-```fift Fift +```fift title="Fift" NEGATE ``` @@ -1049,7 +1049,7 @@ NEGATE Equivalent to `1 ADDCONST`.
**Category:** Arithm Basic (arithm_basic)
-```fift Fift +```fift title="Fift" INC ``` @@ -1058,7 +1058,7 @@ INC Equivalent to `-1 ADDCONST`.
**Category:** Arithm Basic (arithm_basic)
-```fift Fift +```fift title="Fift" DEC ``` @@ -1067,7 +1067,7 @@ DEC `-128 <= cc <= 127`.
**Category:** Arithm Basic (arithm_basic)
-```fift Fift +```fift title="Fift" [cc] ADDCONST [cc] ADDINT [-cc] SUBCONST @@ -1079,7 +1079,7 @@ DEC `-128 <= cc <= 127`.
**Category:** Arithm Basic (arithm_basic)
-```fift Fift +```fift title="Fift" [cc] MULCONST [cc] MULINT ``` @@ -1089,7 +1089,7 @@ DEC
**Category:** Arithm Basic (arithm_basic)
-```fift Fift +```fift title="Fift" MUL ``` @@ -1098,7 +1098,7 @@ MUL
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" ADDDIVMOD ``` @@ -1107,7 +1107,7 @@ ADDDIVMOD
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" ADDDIVMODR ``` @@ -1116,7 +1116,7 @@ ADDDIVMODR
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" ADDDIVMODC ``` @@ -1125,7 +1125,7 @@ ADDDIVMODC `q=floor(x/y)`, `r=x-y*q`
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" DIV ``` @@ -1134,7 +1134,7 @@ DIV `q'=round(x/y)`, `r'=x-y*q'`
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" DIVR ``` @@ -1143,7 +1143,7 @@ DIVR `q''=ceil(x/y)`, `r''=x-y*q''`
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" DIVC ``` @@ -1152,7 +1152,7 @@ DIVC
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" MOD ``` @@ -1161,7 +1161,7 @@ MOD
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" MODR ``` @@ -1170,7 +1170,7 @@ MODR
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" MODC ``` @@ -1179,7 +1179,7 @@ MODC
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" DIVMOD ``` @@ -1188,7 +1188,7 @@ DIVMOD
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" DIVMODR ``` @@ -1197,7 +1197,7 @@ DIVMODR
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" DIVMODC ``` @@ -1206,7 +1206,7 @@ DIVMODC
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" ADDRSHIFTMOD ``` @@ -1215,7 +1215,7 @@ ADDRSHIFTMOD
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" ADDRSHIFTMODR ``` @@ -1224,7 +1224,7 @@ ADDRSHIFTMODR
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" ADDRSHIFTMODC ``` @@ -1233,7 +1233,7 @@ ADDRSHIFTMODC
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" RSHIFTR ``` @@ -1242,7 +1242,7 @@ RSHIFTR
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" RSHIFTC ``` @@ -1251,7 +1251,7 @@ RSHIFTC
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" MODPOW2 ``` @@ -1260,7 +1260,7 @@ MODPOW2
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" MODPOW2R ``` @@ -1269,7 +1269,7 @@ MODPOW2R
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" MODPOW2C ``` @@ -1278,7 +1278,7 @@ MODPOW2C
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" RSHIFTMOD ``` @@ -1287,7 +1287,7 @@ RSHIFTMOD
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" RSHIFTMODR ``` @@ -1296,7 +1296,7 @@ RSHIFTMODR
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" RSHIFTMODC ``` @@ -1305,7 +1305,7 @@ RSHIFTMODC
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" [tt+1] ADDRSHIFT#MOD ``` @@ -1314,7 +1314,7 @@ RSHIFTMODC
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" [tt+1] ADDRSHIFTR#MOD ``` @@ -1323,7 +1323,7 @@ RSHIFTMODC
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" [tt+1] ADDRSHIFTC#MOD ``` @@ -1332,7 +1332,7 @@ RSHIFTMODC
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" [tt+1] RSHIFTR# ``` @@ -1341,7 +1341,7 @@ RSHIFTMODC
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" [tt+1] RSHIFTC# ``` @@ -1350,7 +1350,7 @@ RSHIFTMODC
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" [tt+1] MODPOW2# ``` @@ -1359,7 +1359,7 @@ RSHIFTMODC
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" [tt+1] MODPOW2R# ``` @@ -1368,7 +1368,7 @@ RSHIFTMODC
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" [tt+1] MODPOW2C# ``` @@ -1377,7 +1377,7 @@ RSHIFTMODC
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" [tt+1] RSHIFT#MOD ``` @@ -1386,7 +1386,7 @@ RSHIFTMODC
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" [tt+1] RSHIFTR#MOD ``` @@ -1395,7 +1395,7 @@ RSHIFTMODC
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" [tt+1] RSHIFTC#MOD ``` @@ -1404,7 +1404,7 @@ RSHIFTMODC
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" MULADDDIVMOD ``` @@ -1413,7 +1413,7 @@ MULADDDIVMOD
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" MULADDDIVMODR ``` @@ -1422,7 +1422,7 @@ MULADDDIVMODR
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" MULADDDIVMODC ``` @@ -1431,7 +1431,7 @@ MULADDDIVMODC `q=floor(x*y/z)`
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" MULDIV ``` @@ -1440,7 +1440,7 @@ MULDIV `q'=round(x*y/z)`
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" MULDIVR ``` @@ -1449,7 +1449,7 @@ MULDIVR `q'=ceil(x*y/z)`
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" MULDIVC ``` @@ -1458,7 +1458,7 @@ MULDIVC
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" MULMOD ``` @@ -1467,7 +1467,7 @@ MULMOD
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" MULMODR ``` @@ -1476,7 +1476,7 @@ MULMODR
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" MULMODC ``` @@ -1485,7 +1485,7 @@ MULMODC `q=floor(x*y/z)`, `r=x*y-z*q`
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" MULDIVMOD ``` @@ -1494,7 +1494,7 @@ MULDIVMOD `q=round(x*y/z)`, `r=x*y-z*q`
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" MULDIVMODR ``` @@ -1503,7 +1503,7 @@ MULDIVMODR `q=ceil(x*y/z)`, `r=x*y-z*q`
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" MULDIVMODC ``` @@ -1512,7 +1512,7 @@ MULDIVMODC
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" MULADDRSHIFTMOD ``` @@ -1521,7 +1521,7 @@ MULADDRSHIFTMOD
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" MULADDRSHIFTRMOD ``` @@ -1530,7 +1530,7 @@ MULADDRSHIFTRMOD
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" MULADDRSHIFTCMOD ``` @@ -1539,7 +1539,7 @@ MULADDRSHIFTCMOD `0 <= z <= 256`
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" MULRSHIFT ``` @@ -1548,7 +1548,7 @@ MULRSHIFT `0 <= z <= 256`
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" MULRSHIFTR ``` @@ -1557,7 +1557,7 @@ MULRSHIFTR `0 <= z <= 256`
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" MULRSHIFTC ``` @@ -1566,7 +1566,7 @@ MULRSHIFTC
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" MULMODPOW2_VAR ``` @@ -1575,7 +1575,7 @@ MULMODPOW2_VAR
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" MULMODPOW2R_VAR ``` @@ -1584,7 +1584,7 @@ MULMODPOW2R_VAR
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" MULMODPOW2C_VAR ``` @@ -1593,7 +1593,7 @@ MULMODPOW2C_VAR
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" MULRSHIFTMOD_VAR ``` @@ -1602,7 +1602,7 @@ MULRSHIFTMOD_VAR
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" MULRSHIFTRMOD_VAR ``` @@ -1611,7 +1611,7 @@ MULRSHIFTRMOD_VAR
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" MULRSHIFTCMOD_VAR ``` @@ -1620,7 +1620,7 @@ MULRSHIFTCMOD_VAR
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" [tt+1] MULADDRSHIFT#MOD ``` @@ -1629,7 +1629,7 @@ MULRSHIFTCMOD_VAR
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" [tt+1] MULADDRSHIFTR#MOD ``` @@ -1638,7 +1638,7 @@ MULRSHIFTCMOD_VAR
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" [tt+1] MULADDRSHIFTC#MOD ``` @@ -1647,7 +1647,7 @@ MULRSHIFTCMOD_VAR
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" [tt+1] MULRSHIFT# ``` @@ -1656,7 +1656,7 @@ MULRSHIFTCMOD_VAR
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" [tt+1] MULRSHIFTR# ``` @@ -1665,7 +1665,7 @@ MULRSHIFTCMOD_VAR
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" [tt+1] MULRSHIFTC# ``` @@ -1674,7 +1674,7 @@ MULRSHIFTCMOD_VAR
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" [tt+1] MULMODPOW2# ``` @@ -1683,7 +1683,7 @@ MULRSHIFTCMOD_VAR
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" [tt+1] MULMODPOW2R# ``` @@ -1692,7 +1692,7 @@ MULRSHIFTCMOD_VAR
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" [tt+1] MULMODPOW2C# ``` @@ -1701,7 +1701,7 @@ MULRSHIFTCMOD_VAR
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" MULRSHIFT#MOD ``` @@ -1710,7 +1710,7 @@ MULRSHIFT#MOD
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" MULRSHIFTR#MOD ``` @@ -1719,7 +1719,7 @@ MULRSHIFTR#MOD
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" MULRSHIFTC#MOD ``` @@ -1728,7 +1728,7 @@ MULRSHIFTC#MOD
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" LSHIFTADDDIVMOD ``` @@ -1737,7 +1737,7 @@ LSHIFTADDDIVMOD
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" LSHIFTADDDIVMODR ``` @@ -1746,7 +1746,7 @@ LSHIFTADDDIVMODR
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" LSHIFTADDDIVMODC ``` @@ -1755,7 +1755,7 @@ LSHIFTADDDIVMODC `0 <= z <= 256`
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" LSHIFTDIV ``` @@ -1764,7 +1764,7 @@ LSHIFTDIV `0 <= z <= 256`
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" LSHIFTDIVR ``` @@ -1773,7 +1773,7 @@ LSHIFTDIVR `0 <= z <= 256`
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" LSHIFTDIVC ``` @@ -1782,7 +1782,7 @@ LSHIFTDIVC
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" LSHIFTMOD ``` @@ -1791,7 +1791,7 @@ LSHIFTMOD
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" LSHIFTMODR ``` @@ -1800,7 +1800,7 @@ LSHIFTMODR
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" LSHIFTMODC ``` @@ -1809,7 +1809,7 @@ LSHIFTMODC
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" LSHIFTDIVMOD ``` @@ -1818,7 +1818,7 @@ LSHIFTDIVMOD
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" LSHIFTDIVMODR ``` @@ -1827,7 +1827,7 @@ LSHIFTDIVMODR
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" LSHIFTDIVMODC ``` @@ -1836,7 +1836,7 @@ LSHIFTDIVMODC
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" [tt+1] LSHIFT#ADDDIVMOD ``` @@ -1845,7 +1845,7 @@ LSHIFTDIVMODC
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" [tt+1] LSHIFT#ADDDIVMODR ``` @@ -1854,7 +1854,7 @@ LSHIFTDIVMODC
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" [tt+1] LSHIFT#ADDDIVMODC ``` @@ -1863,7 +1863,7 @@ LSHIFTDIVMODC
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" [tt+1] LSHIFT#DIV ``` @@ -1872,7 +1872,7 @@ LSHIFTDIVMODC
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" [tt+1] LSHIFT#DIVR ``` @@ -1881,7 +1881,7 @@ LSHIFTDIVMODC
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" [tt+1] LSHIFT#DIVC ``` @@ -1890,7 +1890,7 @@ LSHIFTDIVMODC
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" [tt+1] LSHIFT#MOD ``` @@ -1899,7 +1899,7 @@ LSHIFTDIVMODC
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" [tt+1] LSHIFT#MODR ``` @@ -1908,7 +1908,7 @@ LSHIFTDIVMODC
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" [tt+1] LSHIFT#MODC ``` @@ -1917,7 +1917,7 @@ LSHIFTDIVMODC
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" [tt+1] LSHIFT#DIVMOD ``` @@ -1926,7 +1926,7 @@ LSHIFTDIVMODC
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" [tt+1] LSHIFT#DIVMODR ``` @@ -1935,7 +1935,7 @@ LSHIFTDIVMODC
**Category:** Arithm Div (arithm_div)
-```fift Fift +```fift title="Fift" [tt+1] LSHIFT#DIVMODC ``` @@ -1944,7 +1944,7 @@ LSHIFTDIVMODC `0 <= cc <= 255`
**Category:** Arithm Logical (arithm_logical)
-```fift Fift +```fift title="Fift" [cc+1] LSHIFT# ``` @@ -1953,7 +1953,7 @@ LSHIFTDIVMODC `0 <= cc <= 255`
**Category:** Arithm Logical (arithm_logical)
-```fift Fift +```fift title="Fift" [cc+1] RSHIFT# ``` @@ -1962,7 +1962,7 @@ LSHIFTDIVMODC `0 <= y <= 1023`
**Category:** Arithm Logical (arithm_logical)
-```fift Fift +```fift title="Fift" LSHIFT ``` @@ -1971,7 +1971,7 @@ LSHIFT `0 <= y <= 1023`
**Category:** Arithm Logical (arithm_logical)
-```fift Fift +```fift title="Fift" RSHIFT ``` @@ -1980,7 +1980,7 @@ RSHIFT `0 <= y <= 1023`
Equivalent to `ONE` `SWAP` `LSHIFT`.
**Category:** Arithm Logical (arithm_logical)
-```fift Fift +```fift title="Fift" POW2 ``` @@ -1989,7 +1989,7 @@ POW2 Bitwise and of two signed integers `x` and `y`, sign-extended to infinity.
**Category:** Arithm Logical (arithm_logical)
-```fift Fift +```fift title="Fift" AND ``` @@ -1998,7 +1998,7 @@ AND Bitwise or of two integers.
**Category:** Arithm Logical (arithm_logical)
-```fift Fift +```fift title="Fift" OR ``` @@ -2007,7 +2007,7 @@ OR Bitwise xor of two integers.
**Category:** Arithm Logical (arithm_logical)
-```fift Fift +```fift title="Fift" XOR ``` @@ -2016,7 +2016,7 @@ XOR Bitwise not of an integer.
**Category:** Arithm Logical (arithm_logical)
-```fift Fift +```fift title="Fift" NOT ``` @@ -2025,7 +2025,7 @@ NOT Checks whether `x` is a `cc+1`-bit signed integer for `0 <= cc <= 255` (i.e., whether `-2^cc <= x < 2^cc`).
If not, either triggers an integer overflow exception, or replaces `x` with a `NaN` (quiet version).
**Category:** Arithm Logical (arithm_logical)
-```fift Fift +```fift title="Fift" [cc+1] FITS ``` @@ -2038,7 +2038,7 @@ Checks whether `x` is a `cc+1`-bit signed integer for `0 <= cc <= 255` (i.e., wh Checks whether `x` is a `cc+1`-bit unsigned integer for `0 <= cc <= 255` (i.e., whether `0 <= x < 2^(cc+1)`).
**Category:** Arithm Logical (arithm_logical)
-```fift Fift +```fift title="Fift" [cc+1] UFITS ``` @@ -2051,7 +2051,7 @@ Checks whether `x` is a `cc+1`-bit unsigned integer for `0 <= cc <= 255` (i.e., Checks whether `x` is a `c`-bit signed integer for `0 <= c <= 1023`.
**Category:** Arithm Logical (arithm_logical)
-```fift Fift +```fift title="Fift" FITSX ``` @@ -2060,7 +2060,7 @@ FITSX Checks whether `x` is a `c`-bit unsigned integer for `0 <= c <= 1023`.
**Category:** Arithm Logical (arithm_logical)
-```fift Fift +```fift title="Fift" UFITSX ``` @@ -2069,7 +2069,7 @@ UFITSX Computes smallest `c >= 0` such that `x` fits into a `c`-bit signed integer (`-2^(c-1) <= c < 2^(c-1)`).
**Category:** Arithm Logical (arithm_logical)
-```fift Fift +```fift title="Fift" BITSIZE ``` @@ -2078,7 +2078,7 @@ BITSIZE Computes smallest `c >= 0` such that `x` fits into a `c`-bit unsigned integer (`0 <= x < 2^c`), or throws a range check exception.
**Category:** Arithm Logical (arithm_logical)
-```fift Fift +```fift title="Fift" UBITSIZE ``` @@ -2087,7 +2087,7 @@ UBITSIZE Computes the minimum of two integers `x` and `y`.
**Category:** Arithm Logical (arithm_logical)
-```fift Fift +```fift title="Fift" MIN ``` @@ -2096,7 +2096,7 @@ MIN Computes the maximum of two integers `x` and `y`.
**Category:** Arithm Logical (arithm_logical)
-```fift Fift +```fift title="Fift" MAX ``` @@ -2105,7 +2105,7 @@ MAX Sorts two integers. Quiet version of this operation returns two `NaN`s if any of the arguments are `NaN`s.
**Category:** Arithm Logical (arithm_logical)
-```fift Fift +```fift title="Fift" MINMAX INTSORT2 ``` @@ -2115,7 +2115,7 @@ INTSORT2 Computes the absolute value of an integer `x`.
**Category:** Arithm Logical (arithm_logical)
-```fift Fift +```fift title="Fift" ABS ``` @@ -2124,7 +2124,7 @@ ABS
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QADD ``` @@ -2133,7 +2133,7 @@ QADD
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QSUB ``` @@ -2142,7 +2142,7 @@ QSUB
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QSUBR ``` @@ -2151,7 +2151,7 @@ QSUBR
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QNEGATE ``` @@ -2160,7 +2160,7 @@ QNEGATE
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QINC ``` @@ -2169,7 +2169,7 @@ QINC
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QDEC ``` @@ -2178,7 +2178,7 @@ QDEC
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QMUL ``` @@ -2187,7 +2187,7 @@ QMUL
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QADDDIVMOD ``` @@ -2196,7 +2196,7 @@ QADDDIVMOD
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QADDDIVMODR ``` @@ -2205,7 +2205,7 @@ QADDDIVMODR
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QADDDIVMODC ``` @@ -2214,7 +2214,7 @@ QADDDIVMODC Division returns `NaN` if `y=0`.
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QDIV ``` @@ -2223,7 +2223,7 @@ QDIV
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QDIVR ``` @@ -2232,7 +2232,7 @@ QDIVR
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QDIVC ``` @@ -2241,7 +2241,7 @@ QDIVC
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QMOD ``` @@ -2250,7 +2250,7 @@ QMOD
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QMODR ``` @@ -2259,7 +2259,7 @@ QMODR
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QMODC ``` @@ -2268,7 +2268,7 @@ QMODC
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QDIVMOD ``` @@ -2277,7 +2277,7 @@ QDIVMOD
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QDIVMODR ``` @@ -2286,7 +2286,7 @@ QDIVMODR
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QDIVMODC ``` @@ -2295,7 +2295,7 @@ QDIVMODC
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QADDRSHIFTMOD ``` @@ -2304,7 +2304,7 @@ QADDRSHIFTMOD
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QADDRSHIFTMODR ``` @@ -2313,7 +2313,7 @@ QADDRSHIFTMODR
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QADDRSHIFTMODC ``` @@ -2322,7 +2322,7 @@ QADDRSHIFTMODC
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QRSHIFTR ``` @@ -2331,7 +2331,7 @@ QRSHIFTR
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QRSHIFTC ``` @@ -2340,7 +2340,7 @@ QRSHIFTC
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QMODPOW2 ``` @@ -2349,7 +2349,7 @@ QMODPOW2
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QMODPOW2R ``` @@ -2358,7 +2358,7 @@ QMODPOW2R
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QMODPOW2C ``` @@ -2367,7 +2367,7 @@ QMODPOW2C
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QRSHIFTMOD ``` @@ -2376,7 +2376,7 @@ QRSHIFTMOD
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QRSHIFTMODR ``` @@ -2385,7 +2385,7 @@ QRSHIFTMODR
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QRSHIFTMODC ``` @@ -2394,7 +2394,7 @@ QRSHIFTMODC
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" [tt+1] QADDRSHIFT#MOD ``` @@ -2403,7 +2403,7 @@ QRSHIFTMODC
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" [tt+1] QADDRSHIFTR#MOD ``` @@ -2412,7 +2412,7 @@ QRSHIFTMODC
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" [tt+1] QADDRSHIFTC#MOD ``` @@ -2421,7 +2421,7 @@ QRSHIFTMODC
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" [tt+1] QRSHIFTR# ``` @@ -2430,7 +2430,7 @@ QRSHIFTMODC
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" [tt+1] QRSHIFTC# ``` @@ -2439,7 +2439,7 @@ QRSHIFTMODC
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" [tt+1] QMODPOW2# ``` @@ -2448,7 +2448,7 @@ QRSHIFTMODC
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" [tt+1] QMODPOW2R# ``` @@ -2457,7 +2457,7 @@ QRSHIFTMODC
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" [tt+1] QMODPOW2C# ``` @@ -2466,7 +2466,7 @@ QRSHIFTMODC
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" [tt+1] QRSHIFT#MOD ``` @@ -2475,7 +2475,7 @@ QRSHIFTMODC
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" [tt+1] QRSHIFTR#MOD ``` @@ -2484,7 +2484,7 @@ QRSHIFTMODC
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" [tt+1] QRSHIFTC#MOD ``` @@ -2493,7 +2493,7 @@ QRSHIFTMODC
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QMULADDDIVMOD ``` @@ -2502,7 +2502,7 @@ QMULADDDIVMOD
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QMULADDDIVMODR ``` @@ -2511,7 +2511,7 @@ QMULADDDIVMODR
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QMULADDDIVMODC ``` @@ -2520,7 +2520,7 @@ QMULADDDIVMODC `q=floor(x*y/z)`
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QMULDIV ``` @@ -2529,7 +2529,7 @@ QMULDIV
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QMULDIVR ``` @@ -2538,7 +2538,7 @@ QMULDIVR `q'=ceil(x*y/z)`
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QMULDIVC ``` @@ -2547,7 +2547,7 @@ QMULDIVC
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QMULMOD ``` @@ -2556,7 +2556,7 @@ QMULMOD
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QMULMODR ``` @@ -2565,7 +2565,7 @@ QMULMODR
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QMULMODC ``` @@ -2574,7 +2574,7 @@ QMULMODC
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QMULDIVMOD ``` @@ -2583,7 +2583,7 @@ QMULDIVMOD `q=round(x*y/z)`, `r=x*y-z*q`
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QMULDIVMODR ``` @@ -2592,7 +2592,7 @@ QMULDIVMODR `q=ceil(x*y/z)`, `r=x*y-z*q`
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QMULDIVMODC ``` @@ -2601,7 +2601,7 @@ QMULDIVMODC
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QMULADDRSHIFTMOD ``` @@ -2610,7 +2610,7 @@ QMULADDRSHIFTMOD
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QMULADDRSHIFTRMOD ``` @@ -2619,7 +2619,7 @@ QMULADDRSHIFTRMOD
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QMULADDRSHIFTCMOD ``` @@ -2628,7 +2628,7 @@ QMULADDRSHIFTCMOD `0 <= z <= 256`
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QMULRSHIFT ``` @@ -2637,7 +2637,7 @@ QMULRSHIFT `0 <= z <= 256`
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QMULRSHIFTR ``` @@ -2646,7 +2646,7 @@ QMULRSHIFTR `0 <= z <= 256`
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QMULRSHIFTC ``` @@ -2655,7 +2655,7 @@ QMULRSHIFTC
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QMULMODPOW2_VAR ``` @@ -2664,7 +2664,7 @@ QMULMODPOW2_VAR
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QMULMODPOW2R_VAR ``` @@ -2673,7 +2673,7 @@ QMULMODPOW2R_VAR
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QMULMODPOW2C_VAR ``` @@ -2682,7 +2682,7 @@ QMULMODPOW2C_VAR
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QMULRSHIFTMOD_VAR ``` @@ -2691,7 +2691,7 @@ QMULRSHIFTMOD_VAR
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QMULRSHIFTRMOD_VAR ``` @@ -2700,7 +2700,7 @@ QMULRSHIFTRMOD_VAR
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QMULRSHIFTCMOD_VAR ``` @@ -2709,7 +2709,7 @@ QMULRSHIFTCMOD_VAR
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" [tt+1] QMULADDRSHIFT#MOD ``` @@ -2718,7 +2718,7 @@ QMULRSHIFTCMOD_VAR
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" [tt+1] QMULADDRSHIFTR#MOD ``` @@ -2727,7 +2727,7 @@ QMULRSHIFTCMOD_VAR
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" [tt+1] QMULADDRSHIFTC#MOD ``` @@ -2736,7 +2736,7 @@ QMULRSHIFTCMOD_VAR
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" [tt+1] QMULRSHIFT# ``` @@ -2745,7 +2745,7 @@ QMULRSHIFTCMOD_VAR
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" [tt+1] QMULRSHIFTR# ``` @@ -2754,7 +2754,7 @@ QMULRSHIFTCMOD_VAR
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" [tt+1] QMULRSHIFTC# ``` @@ -2763,7 +2763,7 @@ QMULRSHIFTCMOD_VAR
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" [tt+1] QMULMODPOW2# ``` @@ -2772,7 +2772,7 @@ QMULRSHIFTCMOD_VAR
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" [tt+1] QMULMODPOW2R# ``` @@ -2781,7 +2781,7 @@ QMULRSHIFTCMOD_VAR
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" [tt+1] QMULMODPOW2C# ``` @@ -2790,7 +2790,7 @@ QMULRSHIFTCMOD_VAR
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QMULRSHIFT#MOD ``` @@ -2799,7 +2799,7 @@ QMULRSHIFT#MOD
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QMULRSHIFTR#MOD ``` @@ -2808,7 +2808,7 @@ QMULRSHIFTR#MOD
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QMULRSHIFTC#MOD ``` @@ -2817,7 +2817,7 @@ QMULRSHIFTC#MOD
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QLSHIFTADDDIVMOD ``` @@ -2826,7 +2826,7 @@ QLSHIFTADDDIVMOD
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QLSHIFTADDDIVMODR ``` @@ -2835,7 +2835,7 @@ QLSHIFTADDDIVMODR
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QLSHIFTADDDIVMODC ``` @@ -2844,7 +2844,7 @@ QLSHIFTADDDIVMODC `0 <= z <= 256`
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QLSHIFTDIV ``` @@ -2853,7 +2853,7 @@ QLSHIFTDIV `0 <= z <= 256`
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QLSHIFTDIVR ``` @@ -2862,7 +2862,7 @@ QLSHIFTDIVR `0 <= z <= 256`
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QLSHIFTDIVC ``` @@ -2871,7 +2871,7 @@ QLSHIFTDIVC
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QLSHIFTMOD ``` @@ -2880,7 +2880,7 @@ QLSHIFTMOD
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QLSHIFTMODR ``` @@ -2889,7 +2889,7 @@ QLSHIFTMODR
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QLSHIFTMODC ``` @@ -2898,7 +2898,7 @@ QLSHIFTMODC
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QLSHIFTDIVMOD ``` @@ -2907,7 +2907,7 @@ QLSHIFTDIVMOD
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QLSHIFTDIVMODR ``` @@ -2916,7 +2916,7 @@ QLSHIFTDIVMODR
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QLSHIFTDIVMODC ``` @@ -2925,7 +2925,7 @@ QLSHIFTDIVMODC
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" [tt+1] QLSHIFT#ADDDIVMOD ``` @@ -2934,7 +2934,7 @@ QLSHIFTDIVMODC
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" [tt+1] QLSHIFT#ADDDIVMODR ``` @@ -2943,7 +2943,7 @@ QLSHIFTDIVMODC
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" [tt+1] QLSHIFT#ADDDIVMODC ``` @@ -2952,7 +2952,7 @@ QLSHIFTDIVMODC
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" [tt+1] QLSHIFT#DIV ``` @@ -2961,7 +2961,7 @@ QLSHIFTDIVMODC
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" [tt+1] QLSHIFT#DIVR ``` @@ -2970,7 +2970,7 @@ QLSHIFTDIVMODC
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" [tt+1] QLSHIFT#DIVC ``` @@ -2979,7 +2979,7 @@ QLSHIFTDIVMODC
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" [tt+1] QLSHIFT#MOD ``` @@ -2988,7 +2988,7 @@ QLSHIFTDIVMODC
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" [tt+1] QLSHIFT#MODR ``` @@ -2997,7 +2997,7 @@ QLSHIFTDIVMODC
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" [tt+1] QLSHIFT#MODC ``` @@ -3006,7 +3006,7 @@ QLSHIFTDIVMODC
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" [tt+1] QLSHIFT#DIVMOD ``` @@ -3015,7 +3015,7 @@ QLSHIFTDIVMODC
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" [tt+1] QLSHIFT#DIVMODR ``` @@ -3024,7 +3024,7 @@ QLSHIFTDIVMODC
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" [tt+1] QLSHIFT#DIVMODC ``` @@ -3033,7 +3033,7 @@ QLSHIFTDIVMODC `0 <= cc <= 255`
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" [cc+1] QLSHIFT# ``` @@ -3042,7 +3042,7 @@ QLSHIFTDIVMODC `0 <= cc <= 255`
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" [cc+1] QRSHIFT# ``` @@ -3051,7 +3051,7 @@ QLSHIFTDIVMODC
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QLSHIFT ``` @@ -3060,7 +3060,7 @@ QLSHIFT
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QRSHIFT ``` @@ -3069,7 +3069,7 @@ QRSHIFT
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QPOW2 ``` @@ -3078,7 +3078,7 @@ QPOW2
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QAND ``` @@ -3087,7 +3087,7 @@ QAND
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QOR ``` @@ -3096,7 +3096,7 @@ QOR
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QXOR ``` @@ -3105,7 +3105,7 @@ QXOR
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QNOT ``` @@ -3114,7 +3114,7 @@ QNOT Replaces `x` with a `NaN` if x is not a `cc+1`-bit signed integer, leaves it intact otherwise.
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" [cc+1] QFITS ``` @@ -3123,7 +3123,7 @@ Replaces `x` with a `NaN` if x is not a `cc+1`-bit signed integer, leaves it int Replaces `x` with a `NaN` if x is not a `cc+1`-bit unsigned integer, leaves it intact otherwise.
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" [cc+1] QUFITS ``` @@ -3132,7 +3132,7 @@ Replaces `x` with a `NaN` if x is not a `cc+1`-bit unsigned integer, leaves it i Replaces `x` with a `NaN` if x is not a c-bit signed integer, leaves it intact otherwise.
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QFITSX ``` @@ -3141,7 +3141,7 @@ QFITSX Replaces `x` with a `NaN` if x is not a c-bit unsigned integer, leaves it intact otherwise.
**Category:** Arithm Quiet (arithm_quiet)
-```fift Fift +```fift title="Fift" QUFITSX ``` @@ -3150,7 +3150,7 @@ QUFITSX Computes the sign of an integer `x`:
`-1` if `x<0`, `0` if `x=0`, `1` if `x>0`.
**Category:** Compare Int (compare_int)
-```fift Fift +```fift title="Fift" SGN ``` @@ -3159,7 +3159,7 @@ SGN Returns `-1` if `x **Category:** Compare Int (compare_int)
-```fift Fift +```fift title="Fift" LESS ``` @@ -3168,7 +3168,7 @@ LESS Returns `-1` if `x=y`, `0` otherwise.
**Category:** Compare Int (compare_int)
-```fift Fift +```fift title="Fift" EQUAL ``` @@ -3177,7 +3177,7 @@ EQUAL
**Category:** Compare Int (compare_int)
-```fift Fift +```fift title="Fift" LEQ ``` @@ -3186,7 +3186,7 @@ LEQ
**Category:** Compare Int (compare_int)
-```fift Fift +```fift title="Fift" GREATER ``` @@ -3195,7 +3195,7 @@ GREATER Equivalent to `EQUAL` `NOT`.
**Category:** Compare Int (compare_int)
-```fift Fift +```fift title="Fift" NEQ ``` @@ -3204,7 +3204,7 @@ NEQ Equivalent to `LESS` `NOT`.
**Category:** Compare Int (compare_int)
-```fift Fift +```fift title="Fift" GEQ ``` @@ -3213,7 +3213,7 @@ GEQ Computes the sign of `x-y`:
`-1` if `xy`.
No integer overflow can occur here unless `x` or `y` is a `NaN`.
**Category:** Compare Int (compare_int)
-```fift Fift +```fift title="Fift" CMP ``` @@ -3222,7 +3222,7 @@ CMP Returns `-1` if `x=yy`, `0` otherwise.
`-2^7 <= yy < 2^7`.
**Category:** Compare Int (compare_int)
-```fift Fift +```fift title="Fift" [yy] EQINT ``` @@ -3235,7 +3235,7 @@ Returns `-1` if `x=yy`, `0` otherwise.
`-2^7 <= yy < 2^7`.
Returns `-1` if `x`-2^7 <= yy < 2^7`.
**Category:** Compare Int (compare_int)
-```fift Fift +```fift title="Fift" [yy] LESSINT [yy-1] LEQINT ``` @@ -3251,7 +3251,7 @@ Returns `-1` if `x`-2^7 <= yy < 2^7`.
Returns `-1` if `x>yy`, `0` otherwise.
`-2^7 <= yy < 2^7`.
**Category:** Compare Int (compare_int)
-```fift Fift +```fift title="Fift" [yy] GTINT [yy+1] GEQINT ``` @@ -3267,7 +3267,7 @@ Returns `-1` if `x>yy`, `0` otherwise.
`-2^7 <= yy < 2^7`.
Returns `-1` if `x!=yy`, `0` otherwise.
`-2^7 <= yy < 2^7`.
**Category:** Compare Int (compare_int)
-```fift Fift +```fift title="Fift" [yy] NEQINT ``` @@ -3276,7 +3276,7 @@ Returns `-1` if `x!=yy`, `0` otherwise.
`-2^7 <= yy < 2^7`.
Checks whether `x` is a `NaN`.
**Category:** Compare Int (compare_int)
-```fift Fift +```fift title="Fift" ISNAN ``` @@ -3285,7 +3285,7 @@ ISNAN Throws an arithmetic overflow exception if `x` is a `NaN`.
**Category:** Compare Int (compare_int)
-```fift Fift +```fift title="Fift" CHKNAN ``` @@ -3294,7 +3294,7 @@ CHKNAN Checks whether a _Slice_ `s` is empty (i.e., contains no bits of data and no cell references).
**Category:** Compare Other (compare_other)
-```fift Fift +```fift title="Fift" SEMPTY ``` @@ -3303,7 +3303,7 @@ SEMPTY Checks whether _Slice_ `s` has no bits of data.
**Category:** Compare Other (compare_other)
-```fift Fift +```fift title="Fift" SDEMPTY ``` @@ -3312,7 +3312,7 @@ SDEMPTY Checks whether _Slice_ `s` has no references.
**Category:** Compare Other (compare_other)
-```fift Fift +```fift title="Fift" SREMPTY ``` @@ -3321,7 +3321,7 @@ SREMPTY Checks whether the first bit of _Slice_ `s` is a one.
**Category:** Compare Other (compare_other)
-```fift Fift +```fift title="Fift" SDFIRST ``` @@ -3330,7 +3330,7 @@ SDFIRST Compares the data of `s` lexicographically with the data of `s'`, returning `-1`, 0, or 1 depending on the result.
**Category:** Compare Other (compare_other)
-```fift Fift +```fift title="Fift" SDLEXCMP ``` @@ -3339,7 +3339,7 @@ SDLEXCMP Checks whether the data parts of `s` and `s'` coincide, equivalent to `SDLEXCMP` `ISZERO`.
**Category:** Compare Other (compare_other)
-```fift Fift +```fift title="Fift" SDEQ ``` @@ -3348,7 +3348,7 @@ SDEQ Checks whether `s` is a prefix of `s'`.
**Category:** Compare Other (compare_other)
-```fift Fift +```fift title="Fift" SDPFX ``` @@ -3357,7 +3357,7 @@ SDPFX Checks whether `s'` is a prefix of `s`, equivalent to `SWAP` `SDPFX`.
**Category:** Compare Other (compare_other)
-```fift Fift +```fift title="Fift" SDPFXREV ``` @@ -3366,7 +3366,7 @@ SDPFXREV Checks whether `s` is a proper prefix of `s'` (i.e., a prefix distinct from `s'`).
**Category:** Compare Other (compare_other)
-```fift Fift +```fift title="Fift" SDPPFX ``` @@ -3375,7 +3375,7 @@ SDPPFX Checks whether `s'` is a proper prefix of `s`.
**Category:** Compare Other (compare_other)
-```fift Fift +```fift title="Fift" SDPPFXREV ``` @@ -3384,7 +3384,7 @@ SDPPFXREV Checks whether `s` is a suffix of `s'`.
**Category:** Compare Other (compare_other)
-```fift Fift +```fift title="Fift" SDSFX ``` @@ -3393,7 +3393,7 @@ SDSFX Checks whether `s'` is a suffix of `s`.
**Category:** Compare Other (compare_other)
-```fift Fift +```fift title="Fift" SDSFXREV ``` @@ -3402,7 +3402,7 @@ SDSFXREV Checks whether `s` is a proper suffix of `s'`.
**Category:** Compare Other (compare_other)
-```fift Fift +```fift title="Fift" SDPSFX ``` @@ -3411,7 +3411,7 @@ SDPSFX Checks whether `s'` is a proper suffix of `s`.
**Category:** Compare Other (compare_other)
-```fift Fift +```fift title="Fift" SDPSFXREV ``` @@ -3420,7 +3420,7 @@ SDPSFXREV Returns the number of leading zeroes in `s`.
**Category:** Compare Other (compare_other)
-```fift Fift +```fift title="Fift" SDCNTLEAD0 ``` @@ -3429,7 +3429,7 @@ SDCNTLEAD0 Returns the number of leading ones in `s`.
**Category:** Compare Other (compare_other)
-```fift Fift +```fift title="Fift" SDCNTLEAD1 ``` @@ -3438,7 +3438,7 @@ SDCNTLEAD1 Returns the number of trailing zeroes in `s`.
**Category:** Compare Other (compare_other)
-```fift Fift +```fift title="Fift" SDCNTTRAIL0 ``` @@ -3447,7 +3447,7 @@ SDCNTTRAIL0 Returns the number of trailing ones in `s`.
**Category:** Compare Other (compare_other)
-```fift Fift +```fift title="Fift" SDCNTTRAIL1 ``` @@ -3456,7 +3456,7 @@ SDCNTTRAIL1 Creates a new empty _Builder_.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" NEWC ``` @@ -3465,7 +3465,7 @@ NEWC Converts a _Builder_ into an ordinary _Cell_.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" ENDC ``` @@ -3474,7 +3474,7 @@ ENDC Stores a signed `cc+1`-bit integer `x` into _Builder_ `b` for `0 <= cc <= 255`, throws a range check exception if `x` does not fit into `cc+1` bits.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" [cc+1] STI ``` @@ -3483,7 +3483,7 @@ Stores a signed `cc+1`-bit integer `x` into _Builder_ `b` for `0 <= cc <= 255`, Stores an unsigned `cc+1`-bit integer `x` into _Builder_ `b`. In all other respects it is similar to `STI`.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" [cc+1] STU ``` @@ -3492,7 +3492,7 @@ Stores an unsigned `cc+1`-bit integer `x` into _Builder_ `b`. In all other respe Stores a reference to _Cell_ `c` into _Builder_ `b`.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" STREF ``` @@ -3501,7 +3501,7 @@ STREF Equivalent to `ENDC` `SWAP` `STREF`.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" STBREFR ENDCST ``` @@ -3511,7 +3511,7 @@ ENDCST Stores _Slice_ `s` into _Builder_ `b`.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" STSLICE ``` @@ -3524,7 +3524,7 @@ STSLICE Stores a signed `l`-bit integer `x` into `b` for `0 <= l <= 257`.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" STIX ``` @@ -3533,7 +3533,7 @@ STIX Stores an unsigned `l`-bit integer `x` into `b` for `0 <= l <= 256`.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" STUX ``` @@ -3542,7 +3542,7 @@ STUX Similar to `STIX`, but with arguments in a different order.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" STIXR ``` @@ -3551,7 +3551,7 @@ STIXR Similar to `STUX`, but with arguments in a different order.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" STUXR ``` @@ -3560,7 +3560,7 @@ STUXR A quiet version of `STIX`. If there is no space in `b`, sets `b'=b` and `f=-1`.
If `x` does not fit into `l` bits, sets `b'=b` and `f=1`.
If the operation succeeds, `b'` is the new _Builder_ and `f=0`.
However, `0 <= l <= 257`, with a range check exception if this is not so.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" STIXQ ``` @@ -3569,7 +3569,7 @@ STIXQ A quiet version of `STUX`.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" STUXQ ``` @@ -3578,7 +3578,7 @@ STUXQ A quiet version of `STIXR`.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" STIXRQ ``` @@ -3587,7 +3587,7 @@ STIXRQ A quiet version of `STUXR`.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" STUXRQ ``` @@ -3596,7 +3596,7 @@ STUXRQ A longer version of `[cc+1] STI`.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" [cc+1] STI_l ``` @@ -3605,7 +3605,7 @@ A longer version of `[cc+1] STI`.
A longer version of `[cc+1] STU`.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" [cc+1] STU_l ``` @@ -3614,7 +3614,7 @@ A longer version of `[cc+1] STU`.
Equivalent to `SWAP` `[cc+1] STI`.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" [cc+1] STIR ``` @@ -3623,7 +3623,7 @@ Equivalent to `SWAP` `[cc+1] STI`.
Equivalent to `SWAP` `[cc+1] STU`.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" [cc+1] STUR ``` @@ -3632,7 +3632,7 @@ Equivalent to `SWAP` `[cc+1] STU`.
A quiet version of `STI`.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" [cc+1] STIQ ``` @@ -3641,7 +3641,7 @@ A quiet version of `STI`.
A quiet version of `STU`.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" [cc+1] STUQ ``` @@ -3650,7 +3650,7 @@ A quiet version of `STU`.
A quiet version of `STIR`.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" [cc+1] STIRQ ``` @@ -3659,7 +3659,7 @@ A quiet version of `STIR`.
A quiet version of `STUR`.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" [cc+1] STURQ ``` @@ -3668,7 +3668,7 @@ A quiet version of `STUR`.
A longer version of `STREF`.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" STREF_l ``` @@ -3677,7 +3677,7 @@ STREF_l Equivalent to `SWAP` `STBREFR`.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" STBREF ``` @@ -3686,7 +3686,7 @@ STBREF A longer version of `STSLICE`.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" STSLICE_l ``` @@ -3695,7 +3695,7 @@ STSLICE_l Appends all data from _Builder_ `b'` to _Builder_ `b`.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" STB ``` @@ -3704,7 +3704,7 @@ STB Equivalent to `SWAP` `STREF`.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" STREFR ``` @@ -3713,7 +3713,7 @@ STREFR A longer encoding of `STBREFR`.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" STBREFR_l ``` @@ -3722,7 +3722,7 @@ STBREFR_l Equivalent to `SWAP` `STSLICE`.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" STSLICER ``` @@ -3731,7 +3731,7 @@ STSLICER Concatenates two builders.
Equivalent to `SWAP` `STB`.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" STBR BCONCAT ``` @@ -3741,7 +3741,7 @@ BCONCAT Quiet version of `STREF`.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" STREFQ ``` @@ -3750,7 +3750,7 @@ STREFQ Quiet version of `STBREF`.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" STBREFQ ``` @@ -3759,7 +3759,7 @@ STBREFQ Quiet version of `STSLICE`.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" STSLICEQ ``` @@ -3768,7 +3768,7 @@ STSLICEQ Quiet version of `STB`.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" STBQ ``` @@ -3777,7 +3777,7 @@ STBQ Quiet version of `STREFR`.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" STREFRQ ``` @@ -3786,7 +3786,7 @@ STREFRQ Quiet version of `STBREFR`.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" STBREFRQ ``` @@ -3795,7 +3795,7 @@ STBREFRQ Quiet version of `STSLICER`.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" STSLICERQ ``` @@ -3804,7 +3804,7 @@ STSLICERQ Quiet version of `STBR`.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" STBRQ BCONCATQ ``` @@ -3814,7 +3814,7 @@ BCONCATQ Equivalent to `PUSHREF` `STREFR`.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" [ref] STREFCONST ``` @@ -3823,7 +3823,7 @@ Equivalent to `PUSHREF` `STREFR`.
Equivalent to `STREFCONST` `STREFCONST`.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" [ref] [ref] STREF2CONST ``` @@ -3832,7 +3832,7 @@ Equivalent to `STREFCONST` `STREFCONST`.
If `x!=0`, creates a _special_ or _exotic_ cell from _Builder_ `b`.
The type of the exotic cell must be stored in the first 8 bits of `b`.
If `x=0`, it is equivalent to `ENDC`. Otherwise some validity checks on the data and references of `b` are performed before creating the exotic cell.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" ENDXC ``` @@ -3841,7 +3841,7 @@ ENDXC Stores a little-endian signed 32-bit integer.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" STILE4 ``` @@ -3850,7 +3850,7 @@ STILE4 Stores a little-endian unsigned 32-bit integer.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" STULE4 ``` @@ -3859,7 +3859,7 @@ STULE4 Stores a little-endian signed 64-bit integer.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" STILE8 ``` @@ -3868,7 +3868,7 @@ STILE8 Stores a little-endian unsigned 64-bit integer.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" STULE8 ``` @@ -3877,7 +3877,7 @@ STULE8 Returns the depth of _Builder_ `b`. If no cell references are stored in `b`, then `x=0`; otherwise `x` is one plus the maximum of depths of cells referred to from `b`.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" BDEPTH ``` @@ -3886,7 +3886,7 @@ BDEPTH Returns the number of data bits already stored in _Builder_ `b`.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" BBITS ``` @@ -3895,7 +3895,7 @@ BBITS Returns the number of cell references already stored in `b`.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" BREFS ``` @@ -3904,7 +3904,7 @@ BREFS Returns the numbers of both data bits and cell references in `b`.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" BBITREFS ``` @@ -3913,7 +3913,7 @@ BBITREFS Returns the number of data bits that can still be stored in `b`.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" BREMBITS ``` @@ -3922,7 +3922,7 @@ BREMBITS Returns the number of references that can still be stored in `b`.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" BREMREFS ``` @@ -3931,7 +3931,7 @@ BREMREFS Returns the numbers of both data bits and references that can still be stored in `b`.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" BREMBITREFS ``` @@ -3940,7 +3940,7 @@ BREMBITREFS Checks whether `cc+1` bits can be stored into `b`, where `0 <= cc <= 255`.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" [cc+1] BCHKBITS# ``` @@ -3949,7 +3949,7 @@ Checks whether `cc+1` bits can be stored into `b`, where `0 <= cc <= 255`.
Checks whether `x` bits can be stored into `b`, `0 <= x <= 1023`. If there is no space for `x` more bits in `b`, or if `x` is not within the range `0...1023`, throws an exception.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" BCHKBITS ``` @@ -3958,7 +3958,7 @@ BCHKBITS Checks whether `y` references can be stored into `b`, `0 <= y <= 7`.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" BCHKREFS ``` @@ -3967,7 +3967,7 @@ BCHKREFS Checks whether `x` bits and `y` references can be stored into `b`, `0 <= x <= 1023`, `0 <= y <= 7`.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" BCHKBITREFS ``` @@ -3976,7 +3976,7 @@ BCHKBITREFS Checks whether `cc+1` bits can be stored into `b`, where `0 <= cc <= 255`.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" [cc+1] BCHKBITSQ# ``` @@ -3985,7 +3985,7 @@ Checks whether `cc+1` bits can be stored into `b`, where `0 <= cc <= 255`.
Checks whether `x` bits can be stored into `b`, `0 <= x <= 1023`.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" BCHKBITSQ ``` @@ -3994,7 +3994,7 @@ BCHKBITSQ Checks whether `y` references can be stored into `b`, `0 <= y <= 7`.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" BCHKREFSQ ``` @@ -4003,7 +4003,7 @@ BCHKREFSQ Checks whether `x` bits and `y` references can be stored into `b`, `0 <= x <= 1023`, `0 <= y <= 7`.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" BCHKBITREFSQ ``` @@ -4012,7 +4012,7 @@ BCHKBITREFSQ Stores `n` binary zeroes into _Builder_ `b`.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" STZEROES ``` @@ -4021,7 +4021,7 @@ STZEROES Stores `n` binary ones into _Builder_ `b`.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" STONES ``` @@ -4030,7 +4030,7 @@ STONES Stores `n` binary `x`es (`0 <= x <= 1`) into _Builder_ `b`.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" STSAME ``` @@ -4039,7 +4039,7 @@ STSAME Same as `ENDC CTOS`, but without gas cost for cell creation and loading.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" BTOS ``` @@ -4048,7 +4048,7 @@ BTOS Stores a constant subslice `sss`.
_Details:_ `sss` consists of `0 <= x <= 3` references and up to `8y+2` data bits, with `0 <= y <= 7`. Completion bit is assumed.
Note that the assembler can replace `STSLICECONST` with `PUSHSLICE` `STSLICER` if the slice is too big.
**Category:** Cell Build (cell_build)
-```fift Fift +```fift title="Fift" [slice] STSLICECONST ``` @@ -4063,7 +4063,7 @@ Stores a constant subslice `sss`.
_Details:_ `sss` consists of `0 <= x <= 3 Converts a _Cell_ into a _Slice_. Notice that `c` must be either an ordinary cell, or an exotic cell which is automatically _loaded_ to yield an ordinary cell `c'`, converted into a _Slice_ afterwards.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" CTOS ``` @@ -4072,7 +4072,7 @@ CTOS Removes a _Slice_ `s` from the stack, and throws an exception if it is not empty.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" ENDS ``` @@ -4081,7 +4081,7 @@ ENDS Loads (i.e., parses) a signed `cc+1`-bit integer `x` from _Slice_ `s`, and returns the remainder of `s` as `s'`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" [cc+1] LDI ``` @@ -4090,7 +4090,7 @@ Loads (i.e., parses) a signed `cc+1`-bit integer `x` from _Slice_ `s`, and retur Loads an unsigned `cc+1`-bit integer `x` from _Slice_ `s`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" [cc+1] LDU ``` @@ -4099,7 +4099,7 @@ Loads an unsigned `cc+1`-bit integer `x` from _Slice_ `s`.
Loads a cell reference `c` from `s`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" LDREF ``` @@ -4108,7 +4108,7 @@ LDREF Equivalent to `LDREF` `SWAP` `CTOS`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" LDREFRTOS ``` @@ -4117,7 +4117,7 @@ LDREFRTOS Cuts the next `cc+1` bits of `s` into a separate _Slice_ `s''`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" [cc+1] LDSLICE ``` @@ -4126,7 +4126,7 @@ Cuts the next `cc+1` bits of `s` into a separate _Slice_ `s''`.
Loads a signed `l`-bit (`0 <= l <= 257`) integer `x` from _Slice_ `s`, and returns the remainder of `s` as `s'`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" LDIX ``` @@ -4135,7 +4135,7 @@ LDIX Loads an unsigned `l`-bit integer `x` from (the first `l` bits of) `s`, with `0 <= l <= 256`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" LDUX ``` @@ -4144,7 +4144,7 @@ LDUX Preloads a signed `l`-bit integer from _Slice_ `s`, for `0 <= l <= 257`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" PLDIX ``` @@ -4153,7 +4153,7 @@ PLDIX Preloads an unsigned `l`-bit integer from `s`, for `0 <= l <= 256`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" PLDUX ``` @@ -4162,7 +4162,7 @@ PLDUX Quiet version of `LDIX`: loads a signed `l`-bit integer from `s` similarly to `LDIX`, but returns a success flag, equal to `-1` on success or to `0` on failure (if `s` does not have `l` bits), instead of throwing a cell underflow exception.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" LDIXQ ``` @@ -4171,7 +4171,7 @@ LDIXQ Quiet version of `LDUX`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" LDUXQ ``` @@ -4180,7 +4180,7 @@ LDUXQ Quiet version of `PLDIX`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" PLDIXQ ``` @@ -4189,7 +4189,7 @@ PLDIXQ Quiet version of `PLDUX`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" PLDUXQ ``` @@ -4198,7 +4198,7 @@ PLDUXQ A longer encoding for `LDI`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" [cc+1] LDI_l ``` @@ -4207,7 +4207,7 @@ A longer encoding for `LDI`.
A longer encoding for `LDU`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" [cc+1] LDU_l ``` @@ -4216,7 +4216,7 @@ A longer encoding for `LDU`.
Preloads a signed `cc+1`-bit integer from _Slice_ `s`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" [cc+1] PLDI ``` @@ -4225,7 +4225,7 @@ Preloads a signed `cc+1`-bit integer from _Slice_ `s`.
Preloads an unsigned `cc+1`-bit integer from `s`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" [cc+1] PLDU ``` @@ -4234,7 +4234,7 @@ Preloads an unsigned `cc+1`-bit integer from `s`.
A quiet version of `LDI`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" [cc+1] LDIQ ``` @@ -4243,7 +4243,7 @@ A quiet version of `LDI`.
A quiet version of `LDU`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" [cc+1] LDUQ ``` @@ -4252,7 +4252,7 @@ A quiet version of `LDU`.
A quiet version of `PLDI`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" [cc+1] PLDIQ ``` @@ -4261,7 +4261,7 @@ A quiet version of `PLDI`.
A quiet version of `PLDU`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" [cc+1] PLDUQ ``` @@ -4270,7 +4270,7 @@ A quiet version of `PLDU`.
Preloads the first `32(c+1)` bits of _Slice_ `s` into an unsigned integer `x`, for `0 <= c <= 7`. If `s` is shorter than necessary, missing bits are assumed to be zero. This operation is intended to be used along with `IFBITJMP` and similar instructions.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" [32(c+1)] PLDUZ ``` @@ -4279,7 +4279,7 @@ Preloads the first `32(c+1)` bits of _Slice_ `s` into an unsigned integer `x`, f Loads the first `0 <= l <= 1023` bits from _Slice_ `s` into a separate _Slice_ `s''`, returning the remainder of `s` as `s'`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" LDSLICEX ``` @@ -4288,7 +4288,7 @@ LDSLICEX Returns the first `0 <= l <= 1023` bits of `s` as `s''`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" PLDSLICEX ``` @@ -4297,7 +4297,7 @@ PLDSLICEX A quiet version of `LDSLICEX`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" LDSLICEXQ ``` @@ -4306,7 +4306,7 @@ LDSLICEXQ A quiet version of `LDSLICEXQ`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" PLDSLICEXQ ``` @@ -4315,7 +4315,7 @@ PLDSLICEXQ A longer encoding for `LDSLICE`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" [cc+1] LDSLICE_l ``` @@ -4324,7 +4324,7 @@ A longer encoding for `LDSLICE`.
Returns the first `0 < cc+1 <= 256` bits of `s` as `s''`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" [cc+1] PLDSLICE ``` @@ -4333,7 +4333,7 @@ Returns the first `0 < cc+1 <= 256` bits of `s` as `s''`.
A quiet version of `LDSLICE`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" [cc+1] LDSLICEQ ``` @@ -4342,7 +4342,7 @@ A quiet version of `LDSLICE`.
A quiet version of `PLDSLICE`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" [cc+1] PLDSLICEQ ``` @@ -4351,7 +4351,7 @@ A quiet version of `PLDSLICE`.
Returns the first `0 <= l <= 1023` bits of `s`. It is equivalent to `PLDSLICEX`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" SDCUTFIRST ``` @@ -4360,7 +4360,7 @@ SDCUTFIRST Returns all but the first `0 <= l <= 1023` bits of `s`. It is equivalent to `LDSLICEX` `NIP`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" SDSKIPFIRST ``` @@ -4369,7 +4369,7 @@ SDSKIPFIRST Returns the last `0 <= l <= 1023` bits of `s`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" SDCUTLAST ``` @@ -4378,7 +4378,7 @@ SDCUTLAST Returns all but the last `0 <= l <= 1023` bits of `s`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" SDSKIPLAST ``` @@ -4387,7 +4387,7 @@ SDSKIPLAST Returns `0 <= l' <= 1023` bits of `s` starting from offset `0 <= l <= 1023`, thus extracting a bit substring out of the data of `s`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" SDSUBSTR ``` @@ -4396,7 +4396,7 @@ SDSUBSTR Checks whether `s` begins with (the data bits of) `s'`, and removes `s'` from `s` on success. On failure throws a cell deserialization exception. Primitive `SDPFXREV` can be considered a quiet version of `SDBEGINSX`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" SDBEGINSX ``` @@ -4405,7 +4405,7 @@ SDBEGINSX A quiet version of `SDBEGINSX`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" SDBEGINSXQ ``` @@ -4414,7 +4414,7 @@ SDBEGINSXQ Checks whether `s` begins with constant bitstring `sss` of length `8x+3` (with continuation bit assumed), where `0 <= x <= 127`, and removes `sss` from `s` on success.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" [slice] SDBEGINS ``` @@ -4423,7 +4423,7 @@ Checks whether `s` begins with constant bitstring `sss` of length `8x+3` (with c A quiet version of `SDBEGINS`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" [slice] SDBEGINSQ ``` @@ -4432,7 +4432,7 @@ A quiet version of `SDBEGINS`.
Returns the first `0 <= l <= 1023` bits and first `0 <= r <= 4` references of `s`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" SCUTFIRST ``` @@ -4441,7 +4441,7 @@ SCUTFIRST Returns all but the first `l` bits of `s` and `r` references of `s`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" SSKIPFIRST ``` @@ -4450,7 +4450,7 @@ SSKIPFIRST Returns the last `0 <= l <= 1023` data bits and last `0 <= r <= 4` references of `s`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" SCUTLAST ``` @@ -4459,7 +4459,7 @@ SCUTLAST Returns all but the last `l` bits of `s` and `r` references of `s`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" SSKIPLAST ``` @@ -4468,7 +4468,7 @@ SSKIPLAST Returns `0 <= l' <= 1023` bits and `0 <= r' <= 4` references from _Slice_ `s`, after skipping the first `0 <= l <= 1023` bits and first `0 <= r <= 4` references.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" SUBSLICE ``` @@ -4477,7 +4477,7 @@ SUBSLICE Splits the first `0 <= l <= 1023` data bits and first `0 <= r <= 4` references from `s` into `s'`, returning the remainder of `s` as `s''`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" SPLIT ``` @@ -4486,7 +4486,7 @@ SPLIT A quiet version of `SPLIT`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" SPLITQ ``` @@ -4495,7 +4495,7 @@ SPLITQ Transforms an ordinary or exotic cell into a _Slice_, as if it were an ordinary cell. A flag is returned indicating whether `c` is exotic. If that be the case, its type can later be deserialized from the first eight bits of `s`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" XCTOS ``` @@ -4504,7 +4504,7 @@ XCTOS Loads an exotic cell `c` and returns an ordinary cell `c'`. If `c` is already ordinary, does nothing. If `c` cannot be loaded, throws an exception.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" XLOAD ``` @@ -4513,7 +4513,7 @@ XLOAD Loads an exotic cell `c` and returns an ordinary cell `c'`. If `c` is already ordinary, does nothing. If `c` cannot be loaded, returns 0.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" XLOADQ ``` @@ -4522,7 +4522,7 @@ XLOADQ Checks whether there are at least `l` data bits in _Slice_ `s`. If this is not the case, throws a cell deserialisation (i.e., cell underflow) exception.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" SCHKBITS ``` @@ -4531,7 +4531,7 @@ SCHKBITS Checks whether there are at least `r` references in _Slice_ `s`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" SCHKREFS ``` @@ -4540,7 +4540,7 @@ SCHKREFS Checks whether there are at least `l` data bits and `r` references in _Slice_ `s`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" SCHKBITREFS ``` @@ -4549,7 +4549,7 @@ SCHKBITREFS Checks whether there are at least `l` data bits in _Slice_ `s`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" SCHKBITSQ ``` @@ -4558,7 +4558,7 @@ SCHKBITSQ Checks whether there are at least `r` references in _Slice_ `s`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" SCHKREFSQ ``` @@ -4567,7 +4567,7 @@ SCHKREFSQ Checks whether there are at least `l` data bits and `r` references in _Slice_ `s`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" SCHKBITREFSQ ``` @@ -4576,7 +4576,7 @@ SCHKBITREFSQ Returns the `n`-th cell reference of _Slice_ `s` for `0 <= n <= 3`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" PLDREFVAR ``` @@ -4585,7 +4585,7 @@ PLDREFVAR Returns the number of data bits in _Slice_ `s`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" SBITS ``` @@ -4594,7 +4594,7 @@ SBITS Returns the number of references in _Slice_ `s`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" SREFS ``` @@ -4603,7 +4603,7 @@ SREFS Returns both the number of data bits and the number of references in `s`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" SBITREFS ``` @@ -4612,7 +4612,7 @@ SBITREFS Returns the `n`-th cell reference of _Slice_ `s`, where `0 <= n <= 3`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" [n] PLDREFIDX ``` @@ -4625,7 +4625,7 @@ Returns the `n`-th cell reference of _Slice_ `s`, where `0 <= n <= 3`.
Loads a little-endian signed 32-bit integer.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" LDILE4 ``` @@ -4634,7 +4634,7 @@ LDILE4 Loads a little-endian unsigned 32-bit integer.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" LDULE4 ``` @@ -4643,7 +4643,7 @@ LDULE4 Loads a little-endian signed 64-bit integer.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" LDILE8 ``` @@ -4652,7 +4652,7 @@ LDILE8 Loads a little-endian unsigned 64-bit integer.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" LDULE8 ``` @@ -4661,7 +4661,7 @@ LDULE8 Preloads a little-endian signed 32-bit integer.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" PLDILE4 ``` @@ -4670,7 +4670,7 @@ PLDILE4 Preloads a little-endian unsigned 32-bit integer.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" PLDULE4 ``` @@ -4679,7 +4679,7 @@ PLDULE4 Preloads a little-endian signed 64-bit integer.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" PLDILE8 ``` @@ -4688,7 +4688,7 @@ PLDILE8 Preloads a little-endian unsigned 64-bit integer.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" PLDULE8 ``` @@ -4697,7 +4697,7 @@ PLDULE8 Quietly loads a little-endian signed 32-bit integer.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" LDILE4Q ``` @@ -4706,7 +4706,7 @@ LDILE4Q Quietly loads a little-endian unsigned 32-bit integer.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" LDULE4Q ``` @@ -4715,7 +4715,7 @@ LDULE4Q Quietly loads a little-endian signed 64-bit integer.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" LDILE8Q ``` @@ -4724,7 +4724,7 @@ LDILE8Q Quietly loads a little-endian unsigned 64-bit integer.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" LDULE8Q ``` @@ -4733,7 +4733,7 @@ LDULE8Q Quietly preloads a little-endian signed 32-bit integer.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" PLDILE4Q ``` @@ -4742,7 +4742,7 @@ PLDILE4Q Quietly preloads a little-endian unsigned 32-bit integer.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" PLDULE4Q ``` @@ -4751,7 +4751,7 @@ PLDULE4Q Quietly preloads a little-endian signed 64-bit integer.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" PLDILE8Q ``` @@ -4760,7 +4760,7 @@ PLDILE8Q Quietly preloads a little-endian unsigned 64-bit integer.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" PLDULE8Q ``` @@ -4769,7 +4769,7 @@ PLDULE8Q Returns the count `n` of leading zero bits in `s`, and removes these bits from `s`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" LDZEROES ``` @@ -4778,7 +4778,7 @@ LDZEROES Returns the count `n` of leading one bits in `s`, and removes these bits from `s`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" LDONES ``` @@ -4787,7 +4787,7 @@ LDONES Returns the count `n` of leading bits equal to `0 <= x <= 1` in `s`, and removes these bits from `s`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" LDSAME ``` @@ -4796,7 +4796,7 @@ LDSAME Returns the depth of _Slice_ `s`. If `s` has no references, then `x=0`; otherwise `x` is one plus the maximum of depths of cells referred to from `s`.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" SDEPTH ``` @@ -4805,7 +4805,7 @@ SDEPTH Returns the depth of _Cell_ `c`. If `c` has no references, then `x=0`; otherwise `x` is one plus the maximum of depths of cells referred to from `c`. If `c` is a _Null_ instead of a _Cell_, returns zero.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" CDEPTH ``` @@ -4814,7 +4814,7 @@ CDEPTH Returns level of the cell.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" CLEVEL ``` @@ -4823,7 +4823,7 @@ CLEVEL Returns level mask of the cell.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" CLEVELMASK ``` @@ -4832,7 +4832,7 @@ CLEVELMASK Returns `i`th hash of the cell.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" [i] CHASHI ``` @@ -4841,7 +4841,7 @@ Returns `i`th hash of the cell.
Returns `i`th depth of the cell.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" [i] CDEPTHI ``` @@ -4850,7 +4850,7 @@ Returns `i`th depth of the cell.
Returns `i`th hash of the cell.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" CHASHIX ``` @@ -4859,7 +4859,7 @@ CHASHIX Returns `i`th depth of the cell.
**Category:** Cell Parse (cell_parse)
-```fift Fift +```fift title="Fift" CDEPTHIX ``` @@ -4868,7 +4868,7 @@ CDEPTHIX _Calls_, or _executes_, continuation `c`.
**Category:** Cont Basic (cont_basic)
-```fift Fift +```fift title="Fift" EXECUTE CALLX ``` @@ -4878,7 +4878,7 @@ CALLX _Jumps_, or transfers control, to continuation `c`.
The remainder of the previous current continuation `cc` is discarded.
**Category:** Cont Basic (cont_basic)
-```fift Fift +```fift title="Fift" JMPX ``` @@ -4887,7 +4887,7 @@ JMPX _Calls_ continuation `c` with `p` parameters and expecting `r` return values
`0 <= p <= 15`, `0 <= r <= 15`
**Category:** Cont Basic (cont_basic)
-```fift Fift +```fift title="Fift" [p] [r] CALLXARGS ``` @@ -4896,7 +4896,7 @@ _Calls_ continuation `c` with `p` parameters and expecting `r` return values
**Category:** Cont Basic (cont_basic)
-```fift Fift +```fift title="Fift" [p] -1 CALLXARGS ``` @@ -4905,7 +4905,7 @@ _Calls_ continuation `c` with `0 <= p <= 15` parameters, expecting an arbitrary _Jumps_ to continuation `c`, passing only the top `0 <= p <= 15` values from the current stack to it (the remainder of the current stack is discarded).
**Category:** Cont Basic (cont_basic)
-```fift Fift +```fift title="Fift" [p] JMPXARGS ``` @@ -4914,7 +4914,7 @@ _Jumps_ to continuation `c`, passing only the top `0 <= p <= 15` values from the _Returns_ to `c0`, with `0 <= r <= 15` return values taken from the current stack.
**Category:** Cont Basic (cont_basic)
-```fift Fift +```fift title="Fift" [r] RETARGS ``` @@ -4923,7 +4923,7 @@ _Returns_ to `c0`, with `0 <= r <= 15` return values taken from the current stac _Returns_ to the continuation at `c0`. The remainder of the current continuation `cc` is discarded.
Approximately equivalent to `c0 PUSHCTR` `JMPX`.
**Category:** Cont Basic (cont_basic)
-```fift Fift +```fift title="Fift" RET RETTRUE ``` @@ -4933,7 +4933,7 @@ RETTRUE _Returns_ to the continuation at `c1`.
Approximately equivalent to `c1 PUSHCTR` `JMPX`.
**Category:** Cont Basic (cont_basic)
-```fift Fift +```fift title="Fift" RETALT RETFALSE ``` @@ -4943,7 +4943,7 @@ RETFALSE Performs `RETTRUE` if integer `f!=0`, or `RETFALSE` if `f=0`.
**Category:** Cont Basic (cont_basic)
-```fift Fift +```fift title="Fift" BRANCH RETBOOL ``` @@ -4953,7 +4953,7 @@ RETBOOL _Call with current continuation_, transfers control to `c`, pushing the old value of `cc` into `c`'s stack (instead of discarding it or writing it into new `c0`).
**Category:** Cont Basic (cont_basic)
-```fift Fift +```fift title="Fift" CALLCC ``` @@ -4962,7 +4962,7 @@ CALLCC Similar to `CALLCC`, but the remainder of the current continuation (the old value of `cc`) is converted into a _Slice_ before pushing it into the stack of `c`.
**Category:** Cont Basic (cont_basic)
-```fift Fift +```fift title="Fift" JMPXDATA ``` @@ -4971,7 +4971,7 @@ JMPXDATA Similar to `CALLXARGS`, but pushes the old value of `cc` (along with the top `0 <= p <= 15` values from the original stack) into the stack of newly-invoked continuation `c`, setting `cc.nargs` to `-1 <= r <= 14`.
**Category:** Cont Basic (cont_basic)
-```fift Fift +```fift title="Fift" [p] [r] CALLCCARGS ``` @@ -4980,7 +4980,7 @@ Similar to `CALLXARGS`, but pushes the old value of `cc` (along with the top `0 Similar to `CALLXARGS`, but takes `-1 <= p,r <= 254` from the stack. The next three operations also take `p` and `r` from the stack, both in the range `-1...254`.
**Category:** Cont Basic (cont_basic)
-```fift Fift +```fift title="Fift" CALLXVARARGS ``` @@ -4989,7 +4989,7 @@ CALLXVARARGS Similar to `RETARGS`.
**Category:** Cont Basic (cont_basic)
-```fift Fift +```fift title="Fift" RETVARARGS ``` @@ -4998,7 +4998,7 @@ RETVARARGS Similar to `JMPXARGS`.
**Category:** Cont Basic (cont_basic)
-```fift Fift +```fift title="Fift" JMPXVARARGS ``` @@ -5007,7 +5007,7 @@ JMPXVARARGS Similar to `CALLCCARGS`.
**Category:** Cont Basic (cont_basic)
-```fift Fift +```fift title="Fift" CALLCCVARARGS ``` @@ -5016,7 +5016,7 @@ CALLCCVARARGS Equivalent to `PUSHREFCONT` `CALLX`.
**Category:** Cont Basic (cont_basic)
-```fift Fift +```fift title="Fift" [ref] CALLREF ``` @@ -5025,7 +5025,7 @@ Equivalent to `PUSHREFCONT` `CALLX`.
Equivalent to `PUSHREFCONT` `JMPX`.
**Category:** Cont Basic (cont_basic)
-```fift Fift +```fift title="Fift" [ref] JMPREF ``` @@ -5034,7 +5034,7 @@ Equivalent to `PUSHREFCONT` `JMPX`.
Equivalent to `PUSHREFCONT` `JMPXDATA`.
**Category:** Cont Basic (cont_basic)
-```fift Fift +```fift title="Fift" [ref] JMPREFDATA ``` @@ -5043,7 +5043,7 @@ Equivalent to `PUSHREFCONT` `JMPXDATA`.
Equivalent to `c0 PUSHCTR` `JMPXDATA`. In this way, the remainder of the current continuation is converted into a _Slice_ and returned to the caller.
**Category:** Cont Basic (cont_basic)
-```fift Fift +```fift title="Fift" RETDATA ``` @@ -5052,7 +5052,7 @@ RETDATA Runs child VM with code `code` and stack `x_1...x_n`. Returns the resulting stack `x'_1...x'_m` and exitcode. Other arguments and return values are enabled by flags.

Flags operate similarly to `RUNVMX` in Fift:
- `+1`: sets `c3` to code.
- `+2`: pushes an implicit `0` before executing the code.
- `+4`: takes persistent data `c4` from the stack and returns its final value.
- `+8`: takes the gas limit `g_l` from the stack and returns the consumed gas `g_c`.
- `+16`: takes `c7` (smart contract context) from the stack.
- `+32`: returns the final value of `c5` (actions).
- `+64`: pops the hard gas limit `g_m` enabled by `ACCEPT` from the stack.
- `+128`: enables "isolated gas consumption", meaning the child VM maintains a separate set of visited cells and a `chksgn` counter.
- `+256`: pops an integer `r` and ensures exactly `r` values are returned from the top of the stack:
- If `RUNVM` call succeeds and `r` is set, it returns `r` elements. If `r` is not set, it returns all available elements.
- If `RUNVM` is successful but lacks elements on the stack, meaning the stack depth is less than `r`, it is treated as an exception in the child VM. The `exit_code` is set to `-3`, and `exit_arg` is set to `0`, so `0` is returned as the only stack element.
- If `RUNVM` fails with an exception, only one element is returned, `exit_arg`, which should not be confused with `exit_code`.
- In the case of running out of gas, `exit_code` is set to `-14`, and `exit_arg` contains the amount of gas.

Gas cost:
- 66 gas;
- 1 gas for each stack element passed to the child VM (the first 32 elements are free);
- 1 gas for each stack element returned from the child VM (the first 32 elements are free).
**Category:** Cont Basic (cont_basic)
-```fift Fift +```fift title="Fift" flags RUNVM ``` @@ -5061,7 +5061,7 @@ flags RUNVM Runs child VM with code `code` and stack `x_1...x_n`. Returns the resulting stack `x'_1...x'_m` and exitcode. Other arguments and return values are enabled by flags.

Flags operate similarly to `RUNVMX` in Fift:
- `+1`: sets `c3` to code.
- `+2`: pushes an implicit `0` before executing the code.
- `+4`: takes persistent data `c4` from the stack and returns its final value.
- `+8`: takes the gas limit `g_l` from the stack and returns the consumed gas `g_c`.
- `+16`: takes `c7` (smart contract context) from the stack.
- `+32`: returns the final value of `c5` (actions).
- `+64`: pops the hard gas limit `g_m` enabled by `ACCEPT` from the stack.
- `+128`: enables "isolated gas consumption", meaning the child VM maintains a separate set of visited cells and a `chksgn` counter.
- `+256`: pops an integer `r` and ensures exactly `r` values are returned from the top of the stack:
- If `RUNVM` call succeeds and `r` is set, it returns `r` elements. If `r` is not set, it returns all available elements.
- If `RUNVM` is successful but lacks elements on the stack, meaning the stack depth is less than `r`, it is treated as an exception in the child VM. The `exit_code` is set to `-3`, and `exit_arg` is set to `0`, so `0` is returned as the only stack element.
- If `RUNVM` fails with an exception, only one element is returned, `exit_arg`, which should not be confused with `exit_code`.
- In the case of running out of gas, `exit_code` is set to `-14`, and `exit_arg` contains the amount of gas.

Gas cost:
- 66 gas;
- 1 gas for each stack element passed to the child VM (the first 32 elements are free);
- 1 gas for each stack element returned from the child VM (the first 32 elements are free).
**Category:** Cont Basic (cont_basic)
-```fift Fift +```fift title="Fift" RUNVMX ``` @@ -5070,7 +5070,7 @@ RUNVMX Performs a `RET`, but only if integer `f` is non-zero. If `f` is a `NaN`, throws an integer overflow exception.
**Category:** Cont Conditional (cont_conditional)
-```fift Fift +```fift title="Fift" IFRET IFNOT: ``` @@ -5080,7 +5080,7 @@ IFNOT: Performs a `RET`, but only if integer `f` is zero.
**Category:** Cont Conditional (cont_conditional)
-```fift Fift +```fift title="Fift" IFNOTRET IF: ``` @@ -5090,7 +5090,7 @@ IF: Performs `EXECUTE` for `c` (i.e., _executes_ `c`), but only if integer `f` is non-zero. Otherwise simply discards both values.
**Category:** Cont Conditional (cont_conditional)
-```fift Fift +```fift title="Fift" IF ``` @@ -5099,7 +5099,7 @@ IF Executes continuation `c`, but only if integer `f` is zero. Otherwise simply discards both values.
**Category:** Cont Conditional (cont_conditional)
-```fift Fift +```fift title="Fift" IFNOT ``` @@ -5108,7 +5108,7 @@ IFNOT Jumps to `c` (similarly to `JMPX`), but only if `f` is non-zero.
**Category:** Cont Conditional (cont_conditional)
-```fift Fift +```fift title="Fift" IFJMP ``` @@ -5117,7 +5117,7 @@ IFJMP Jumps to `c` (similarly to `JMPX`), but only if `f` is zero.
**Category:** Cont Conditional (cont_conditional)
-```fift Fift +```fift title="Fift" IFNOTJMP ``` @@ -5126,7 +5126,7 @@ IFNOTJMP If integer `f` is non-zero, executes `c`, otherwise executes `c'`. Equivalent to `CONDSELCHK` `EXECUTE`.
**Category:** Cont Conditional (cont_conditional)
-```fift Fift +```fift title="Fift" IFELSE ``` @@ -5135,7 +5135,7 @@ IFELSE Equivalent to `PUSHREFCONT` `IF`, with the optimization that the cell reference is not actually loaded into a _Slice_ and then converted into an ordinary _Continuation_ if `f=0`.
Gas consumption of this primitive depends on whether `f=0` and whether the reference was loaded before.
Similar remarks apply other primitives that accept a continuation as a reference.
**Category:** Cont Conditional (cont_conditional)
-```fift Fift +```fift title="Fift" [ref] IFREF ``` @@ -5144,7 +5144,7 @@ Equivalent to `PUSHREFCONT` `IF`, with the optimization that the cell reference Equivalent to `PUSHREFCONT` `IFNOT`.
**Category:** Cont Conditional (cont_conditional)
-```fift Fift +```fift title="Fift" [ref] IFNOTREF ``` @@ -5153,7 +5153,7 @@ Equivalent to `PUSHREFCONT` `IFNOT`.
Equivalent to `PUSHREFCONT` `IFJMP`.
**Category:** Cont Conditional (cont_conditional)
-```fift Fift +```fift title="Fift" [ref] IFJMPREF ``` @@ -5162,7 +5162,7 @@ Equivalent to `PUSHREFCONT` `IFJMP`.
Equivalent to `PUSHREFCONT` `IFNOTJMP`.
**Category:** Cont Conditional (cont_conditional)
-```fift Fift +```fift title="Fift" [ref] IFNOTJMPREF ``` @@ -5171,7 +5171,7 @@ Equivalent to `PUSHREFCONT` `IFNOTJMP`.
If integer `f` is non-zero, returns `x`, otherwise returns `y`. Notice that no type checks are performed on `x` and `y`; as such, it is more like a conditional stack operation. Roughly equivalent to `ROT` `ISZERO` `INC` `ROLLX` `NIP`.
**Category:** Cont Conditional (cont_conditional)
-```fift Fift +```fift title="Fift" CONDSEL ``` @@ -5180,7 +5180,7 @@ CONDSEL Same as `CONDSEL`, but first checks whether `x` and `y` have the same type.
**Category:** Cont Conditional (cont_conditional)
-```fift Fift +```fift title="Fift" CONDSELCHK ``` @@ -5189,7 +5189,7 @@ CONDSELCHK Performs `RETALT` if integer `f!=0`.
**Category:** Cont Conditional (cont_conditional)
-```fift Fift +```fift title="Fift" IFRETALT ``` @@ -5198,7 +5198,7 @@ IFRETALT Performs `RETALT` if integer `f=0`.
**Category:** Cont Conditional (cont_conditional)
-```fift Fift +```fift title="Fift" IFNOTRETALT ``` @@ -5207,7 +5207,7 @@ IFNOTRETALT Equivalent to `PUSHREFCONT` `SWAP` `IFELSE`, with the optimization that the cell reference is not actually loaded into a _Slice_ and then converted into an ordinary _Continuation_ if `f=0`. Similar remarks apply to the next two primitives: cells are converted into continuations only when necessary.
**Category:** Cont Conditional (cont_conditional)
-```fift Fift +```fift title="Fift" [ref] IFREFELSE ``` @@ -5216,7 +5216,7 @@ Equivalent to `PUSHREFCONT` `SWAP` `IFELSE`, with the optimization that the cell Equivalent to `PUSHREFCONT` `IFELSE`.
**Category:** Cont Conditional (cont_conditional)
-```fift Fift +```fift title="Fift" [ref] IFELSEREF ``` @@ -5225,7 +5225,7 @@ Equivalent to `PUSHREFCONT` `IFELSE`.
Equivalent to `PUSHREFCONT` `PUSHREFCONT` `IFELSE`.
**Category:** Cont Conditional (cont_conditional)
-```fift Fift +```fift title="Fift" [ref] [ref] IFREFELSEREF ``` @@ -5234,7 +5234,7 @@ Equivalent to `PUSHREFCONT` `PUSHREFCONT` `IFELSE`.
Checks whether bit `0 <= n <= 31` is set in integer `x`, and if so, performs `JMPX` to continuation `c`. Value `x` is left in the stack.
**Category:** Cont Conditional (cont_conditional)
-```fift Fift +```fift title="Fift" [n] IFBITJMP ``` @@ -5243,7 +5243,7 @@ Checks whether bit `0 <= n <= 31` is set in integer `x`, and if so, performs `JM Jumps to `c` if bit `0 <= n <= 31` is not set in integer `x`.
**Category:** Cont Conditional (cont_conditional)
-```fift Fift +```fift title="Fift" [n] IFNBITJMP ``` @@ -5252,7 +5252,7 @@ Jumps to `c` if bit `0 <= n <= 31` is not set in integer `x`.
Performs a `JMPREF` if bit `0 <= n <= 31` is set in integer `x`.
**Category:** Cont Conditional (cont_conditional)
-```fift Fift +```fift title="Fift" [ref] [n] IFBITJMPREF ``` @@ -5261,7 +5261,7 @@ Performs a `JMPREF` if bit `0 <= n <= 31` is set in integer `x`.
Performs a `JMPREF` if bit `0 <= n <= 31` is not set in integer `x`.
**Category:** Cont Conditional (cont_conditional)
-```fift Fift +```fift title="Fift" [ref] [n] IFNBITJMPREF ``` @@ -5270,7 +5270,7 @@ Performs a `JMPREF` if bit `0 <= n <= 31` is not set in integer `x`.
Executes continuation `c` `n` times, if integer `n` is non-negative. If `n>=2^31` or `n<-2^31`, generates a range check exception.
Notice that a `RET` inside the code of `c` works as a `continue`, not as a `break`. One should use either alternative (experimental) loops or alternative `RETALT` (along with a `SETEXITALT` before the loop) to `break` out of a loop.
**Category:** Cont Loops (cont_loops)
-```fift Fift +```fift title="Fift" REPEAT ``` @@ -5279,7 +5279,7 @@ REPEAT Similar to `REPEAT`, but it is applied to the current continuation `cc`.
**Category:** Cont Loops (cont_loops)
-```fift Fift +```fift title="Fift" REPEATEND REPEAT: ``` @@ -5289,7 +5289,7 @@ REPEAT: Executes continuation `c`, then pops an integer `x` from the resulting stack. If `x` is zero, performs another iteration of this loop. The actual implementation of this primitive involves an extraordinary continuation `ec_until` with its arguments set to the body of the loop (continuation `c`) and the original current continuation `cc`. This extraordinary continuation is then saved into the savelist of `c` as `c.c0` and the modified `c` is then executed. The other loop primitives are implemented similarly with the aid of suitable extraordinary continuations.
**Category:** Cont Loops (cont_loops)
-```fift Fift +```fift title="Fift" UNTIL ``` @@ -5298,7 +5298,7 @@ UNTIL Similar to `UNTIL`, but executes the current continuation `cc` in a loop. When the loop exit condition is satisfied, performs a `RET`.
**Category:** Cont Loops (cont_loops)
-```fift Fift +```fift title="Fift" UNTILEND UNTIL: ``` @@ -5308,7 +5308,7 @@ UNTIL: Executes `c'` and pops an integer `x` from the resulting stack. If `x` is zero, exists the loop and transfers control to the original `cc`. If `x` is non-zero, executes `c`, and then begins a new iteration.
**Category:** Cont Loops (cont_loops)
-```fift Fift +```fift title="Fift" WHILE ``` @@ -5317,7 +5317,7 @@ WHILE Similar to `WHILE`, but uses the current continuation `cc` as the loop body.
**Category:** Cont Loops (cont_loops)
-```fift Fift +```fift title="Fift" WHILEEND ``` @@ -5326,7 +5326,7 @@ WHILEEND Similar to `REPEAT`, but executes `c` infinitely many times. A `RET` only begins a new iteration of the infinite loop, which can be exited only by an exception, or a `RETALT` (or an explicit `JMPX`).
**Category:** Cont Loops (cont_loops)
-```fift Fift +```fift title="Fift" AGAIN ``` @@ -5335,7 +5335,7 @@ AGAIN Similar to `AGAIN`, but performed with respect to the current continuation `cc`.
**Category:** Cont Loops (cont_loops)
-```fift Fift +```fift title="Fift" AGAINEND AGAIN: ``` @@ -5345,7 +5345,7 @@ AGAIN: Similar to `REPEAT`, but also sets `c1` to the original `cc` after saving the old value of `c1` into the savelist of the original `cc`. In this way `RETALT` could be used to break out of the loop body.
**Category:** Cont Loops (cont_loops)
-```fift Fift +```fift title="Fift" REPEATBRK ``` @@ -5354,7 +5354,7 @@ REPEATBRK Similar to `REPEATEND`, but also sets `c1` to the original `c0` after saving the old value of `c1` into the savelist of the original `c0`. Equivalent to `SAMEALTSAVE` `REPEATEND`.
**Category:** Cont Loops (cont_loops)
-```fift Fift +```fift title="Fift" REPEATENDBRK ``` @@ -5363,7 +5363,7 @@ REPEATENDBRK Similar to `UNTIL`, but also modifies `c1` in the same way as `REPEATBRK`.
**Category:** Cont Loops (cont_loops)
-```fift Fift +```fift title="Fift" UNTILBRK ``` @@ -5372,7 +5372,7 @@ UNTILBRK Equivalent to `SAMEALTSAVE` `UNTILEND`.
**Category:** Cont Loops (cont_loops)
-```fift Fift +```fift title="Fift" UNTILENDBRK UNTILBRK: ``` @@ -5382,7 +5382,7 @@ UNTILBRK: Similar to `WHILE`, but also modifies `c1` in the same way as `REPEATBRK`.
**Category:** Cont Loops (cont_loops)
-```fift Fift +```fift title="Fift" WHILEBRK ``` @@ -5391,7 +5391,7 @@ WHILEBRK Equivalent to `SAMEALTSAVE` `WHILEEND`.
**Category:** Cont Loops (cont_loops)
-```fift Fift +```fift title="Fift" WHILEENDBRK ``` @@ -5400,7 +5400,7 @@ WHILEENDBRK Similar to `AGAIN`, but also modifies `c1` in the same way as `REPEATBRK`.
**Category:** Cont Loops (cont_loops)
-```fift Fift +```fift title="Fift" AGAINBRK ``` @@ -5409,7 +5409,7 @@ AGAINBRK Equivalent to `SAMEALTSAVE` `AGAINEND`.
**Category:** Cont Loops (cont_loops)
-```fift Fift +```fift title="Fift" AGAINENDBRK AGAINBRK: ``` @@ -5419,7 +5419,7 @@ AGAINBRK: Pushes `0 <= r <= 15` values `x_1...x_r` into the stack of (a copy of) the continuation `c`, starting with `x_1`. When `n` is 15 (-1 in Fift notation), does nothing with `c.nargs`. For `0 <= n <= 14`, sets `c.nargs` to the final size of the stack of `c'` plus `n`. In other words, transforms `c` into a _closure_ or a _partially applied function_, with `0 <= n <= 14` arguments missing.
**Category:** Cont Stack (cont_stack)
-```fift Fift +```fift title="Fift" [r] [n] SETCONTARGS ``` @@ -5434,7 +5434,7 @@ Pushes `0 <= r <= 15` values `x_1...x_r` into the stack of (a copy of) the conti Leaves only the top `0 <= p <= 15` values in the current stack (somewhat similarly to `ONLYTOPX`), with all the unused bottom values not discarded, but saved into continuation `c0` in the same way as `SETCONTARGS` does.
**Category:** Cont Stack (cont_stack)
-```fift Fift +```fift title="Fift" [p] RETURNARGS ``` @@ -5443,7 +5443,7 @@ Leaves only the top `0 <= p <= 15` values in the current stack (somewhat similar Similar to `RETURNARGS`, but with Integer `0 <= p <= 255` taken from the stack.
**Category:** Cont Stack (cont_stack)
-```fift Fift +```fift title="Fift" RETURNVARARGS ``` @@ -5452,7 +5452,7 @@ RETURNVARARGS Similar to `SETCONTARGS`, but with `0 <= r <= 255` and `-1 <= n <= 255` taken from the stack.
**Category:** Cont Stack (cont_stack)
-```fift Fift +```fift title="Fift" SETCONTVARARGS ``` @@ -5461,7 +5461,7 @@ SETCONTVARARGS `-1 <= n <= 255`
If `n=-1`, this operation does nothing (`c'=c`).
Otherwise its action is similar to `[n] SETNUMARGS`, but with `n` taken from the stack.
**Category:** Cont Stack (cont_stack)
-```fift Fift +```fift title="Fift" SETNUMVARARGS ``` @@ -5470,7 +5470,7 @@ SETNUMVARARGS Transforms a _Slice_ `s` into a simple ordinary continuation `c`, with `c.code=s` and an empty stack and savelist.
**Category:** Cont Create (cont_create)
-```fift Fift +```fift title="Fift" BLESS ``` @@ -5479,7 +5479,7 @@ BLESS Equivalent to `ROT` `BLESS` `ROTREV` `SETCONTVARARGS`.
**Category:** Cont Create (cont_create)
-```fift Fift +```fift title="Fift" BLESSVARARGS ``` @@ -5488,7 +5488,7 @@ BLESSVARARGS `0 <= r <= 15`, `-1 <= n <= 14`
Equivalent to `BLESS` `[r] [n] SETCONTARGS`.
The value of `n` is represented inside the instruction by the 4-bit integer `n mod 16`.
**Category:** Cont Create (cont_create)
-```fift Fift +```fift title="Fift" [r] [n] BLESSARGS ``` @@ -5501,7 +5501,7 @@ BLESSVARARGS Pushes the current value of control register `c(i)`. If the control register is not supported in the current codepage, or if it does not have a value, an exception is triggered.
**Category:** Cont Registers (cont_registers)
-```fift Fift +```fift title="Fift" c[i] PUSHCTR c[i] PUSH ``` @@ -5515,7 +5515,7 @@ c[i] PUSH Pops a value `x` from the stack and stores it into control register `c(i)`, if supported in the current codepage. Notice that if a control register accepts only values of a specific type, a type-checking exception may occur.
**Category:** Cont Registers (cont_registers)
-```fift Fift +```fift title="Fift" c[i] POPCTR c[i] POP ``` @@ -5529,7 +5529,7 @@ c[i] POP Stores `x` into the savelist of continuation `c` as `c(i)`, and returns the resulting continuation `c'`. Almost all operations with continuations may be expressed in terms of `SETCONTCTR`, `POPCTR`, and `PUSHCTR`.
**Category:** Cont Registers (cont_registers)
-```fift Fift +```fift title="Fift" c[i] SETCONT c[i] SETCONTCTR ``` @@ -5539,7 +5539,7 @@ c[i] SETCONTCTR Equivalent to `c0 PUSHCTR` `c[i] SETCONTCTR` `c0 POPCTR`.
**Category:** Cont Registers (cont_registers)
-```fift Fift +```fift title="Fift" c[i] SETRETCTR ``` @@ -5548,7 +5548,7 @@ c[i] SETRETCTR Equivalent to `c1 PUSHCTR` `c[i] SETCONTCTR` `c1 POPCTR`.
**Category:** Cont Registers (cont_registers)
-```fift Fift +```fift title="Fift" c[i] SETALTCTR ``` @@ -5557,7 +5557,7 @@ c[i] SETALTCTR Similar to `c[i] POPCTR`, but also saves the old value of `c[i]` into continuation `c0`.
Equivalent (up to exceptions) to `c[i] SAVECTR` `c[i] POPCTR`.
**Category:** Cont Registers (cont_registers)
-```fift Fift +```fift title="Fift" c[i] POPSAVE c[i] POPCTRSAVE ``` @@ -5567,7 +5567,7 @@ c[i] POPCTRSAVE Saves the current value of `c(i)` into the savelist of continuation `c0`. If an entry for `c[i]` is already present in the savelist of `c0`, nothing is done. Equivalent to `c[i] PUSHCTR` `c[i] SETRETCTR`.
**Category:** Cont Registers (cont_registers)
-```fift Fift +```fift title="Fift" c[i] SAVE c[i] SAVECTR ``` @@ -5577,7 +5577,7 @@ c[i] SAVECTR Similar to `c[i] SAVE`, but saves the current value of `c[i]` into the savelist of `c1`, not `c0`.
**Category:** Cont Registers (cont_registers)
-```fift Fift +```fift title="Fift" c[i] SAVEALT c[i] SAVEALTCTR ``` @@ -5587,7 +5587,7 @@ c[i] SAVEALTCTR Equivalent to `c[i] SAVE` `c[i] SAVEALT`.
**Category:** Cont Registers (cont_registers)
-```fift Fift +```fift title="Fift" c[i] SAVEBOTH c[i] SAVEBOTHCTR ``` @@ -5597,7 +5597,7 @@ c[i] SAVEBOTHCTR Similar to `c[i] PUSHCTR`, but with `i`, `0 <= i <= 255`, taken from the stack.
Notice that this primitive is one of the few ''exotic'' primitives, which are not polymorphic like stack manipulation primitives, and at the same time do not have well-defined types of parameters and return values, because the type of `x` depends on `i`.
**Category:** Cont Registers (cont_registers)
-```fift Fift +```fift title="Fift" PUSHCTRX ``` @@ -5606,7 +5606,7 @@ PUSHCTRX Similar to `c[i] POPCTR`, but with `0 <= i <= 255` from the stack.
**Category:** Cont Registers (cont_registers)
-```fift Fift +```fift title="Fift" POPCTRX ``` @@ -5615,7 +5615,7 @@ POPCTRX Similar to `c[i] SETCONTCTR`, but with `0 <= i <= 255` from the stack.
**Category:** Cont Registers (cont_registers)
-```fift Fift +```fift title="Fift" SETCONTCTRX ``` @@ -5624,7 +5624,7 @@ SETCONTCTRX Takes continuation, performs the equivalent of `c[i] PUSHCTR SWAP c[i] SETCONTCNR` for each `i` that is set in `mask` (mask is in `0..255`).
**Category:** Cont Registers (cont_registers)
-```fift Fift +```fift title="Fift" SETCONTCTRMANY SETCONTMANY ``` @@ -5634,7 +5634,7 @@ SETCONTMANY Takes continuation, performs the equivalent of `c[i] PUSHCTR SWAP c[i] SETCONTCNR` for each `i` that is set in `mask` (mask is in `0..255`).
**Category:** Cont Registers (cont_registers)
-```fift Fift +```fift title="Fift" SETCONTCTRMANYX SETCONTMANYX ``` @@ -5644,7 +5644,7 @@ SETCONTMANYX Computes the composition `compose0(c, c')`, which has the meaning of ''perform `c`, and, if successful, perform `c'`'' (if `c` is a boolean circuit) or simply ''perform `c`, then `c'`''. Equivalent to `SWAP` `c0 SETCONT`.
**Category:** Cont Registers (cont_registers)
-```fift Fift +```fift title="Fift" COMPOS BOOLAND ``` @@ -5654,7 +5654,7 @@ BOOLAND Computes the alternative composition `compose1(c, c')`, which has the meaning of ''perform `c`, and, if not successful, perform `c'`'' (if `c` is a boolean circuit). Equivalent to `SWAP` `c1 SETCONT`.
**Category:** Cont Registers (cont_registers)
-```fift Fift +```fift title="Fift" COMPOSALT BOOLOR ``` @@ -5664,7 +5664,7 @@ BOOLOR Computes composition `compose1(compose0(c, c'), c')`, which has the meaning of ''compute boolean circuit `c`, then compute `c'`, regardless of the result of `c`''.
**Category:** Cont Registers (cont_registers)
-```fift Fift +```fift title="Fift" COMPOSBOTH ``` @@ -5673,7 +5673,7 @@ COMPOSBOTH Sets `c0` to `compose0(c, c0)`. In other words, `c` will be executed before exiting current subroutine.
**Category:** Cont Registers (cont_registers)
-```fift Fift +```fift title="Fift" ATEXIT ``` @@ -5682,7 +5682,7 @@ ATEXIT Sets `c1` to `compose1(c, c1)`. In other words, `c` will be executed before exiting current subroutine by its alternative return path.
**Category:** Cont Registers (cont_registers)
-```fift Fift +```fift title="Fift" ATEXITALT ``` @@ -5691,7 +5691,7 @@ ATEXITALT Sets `c1` to `compose1(compose0(c, c0), c1)`,
In this way, a subsequent `RETALT` will first execute `c`, then transfer control to the original `c0`. This can be used, for instance, to exit from nested loops.
**Category:** Cont Registers (cont_registers)
-```fift Fift +```fift title="Fift" SETEXITALT ``` @@ -5700,7 +5700,7 @@ SETEXITALT Computes `compose0(c, c0)`.
**Category:** Cont Registers (cont_registers)
-```fift Fift +```fift title="Fift" THENRET ``` @@ -5709,7 +5709,7 @@ THENRET Computes `compose0(c, c1)`
**Category:** Cont Registers (cont_registers)
-```fift Fift +```fift title="Fift" THENRETALT ``` @@ -5718,7 +5718,7 @@ THENRETALT Interchanges `c0` and `c1`.
**Category:** Cont Registers (cont_registers)
-```fift Fift +```fift title="Fift" INVERT ``` @@ -5727,7 +5727,7 @@ INVERT Performs `cc:=compose1(compose0(c, compose0(-1 PUSHINT, cc)), compose0(0 PUSHINT, cc))`. If `c` represents a boolean circuit, the net effect is to evaluate it and push either `-1` or `0` into the stack before continuing.
**Category:** Cont Registers (cont_registers)
-```fift Fift +```fift title="Fift" BOOLEVAL ``` @@ -5736,7 +5736,7 @@ BOOLEVAL Sets `c1` to `c0`. Equivalent to `c0 PUSHCTR` `c1 POPCTR`.
**Category:** Cont Registers (cont_registers)
-```fift Fift +```fift title="Fift" SAMEALT ``` @@ -5745,7 +5745,7 @@ SAMEALT Sets `c1` to `c0`, but first saves the old value of `c1` into the savelist of `c0`.
Equivalent to `c1 SAVE` `SAMEALT`.
**Category:** Cont Registers (cont_registers)
-```fift Fift +```fift title="Fift" SAMEALTSAVE ``` @@ -5754,7 +5754,7 @@ SAMEALTSAVE Calls the continuation in `c3`, pushing integer `0 <= nn <= 255` into its stack as an argument.
Approximately equivalent to `[nn] PUSHINT` `c3 PUSHCTR` `EXECUTE`.
**Category:** Cont Dict (cont_dict)
-```fift Fift +```fift title="Fift" [nn] CALL [nn] CALLDICT ``` @@ -5764,7 +5764,7 @@ Calls the continuation in `c3`, pushing integer `0 <= nn <= 255` into its stack For `0 <= n < 2^14`, an encoding of `[n] CALL` for larger values of `n`.
**Category:** Cont Dict (cont_dict)
-```fift Fift +```fift title="Fift" [n] CALL [n] CALLDICT ``` @@ -5774,7 +5774,7 @@ For `0 <= n < 2^14`, an encoding of `[n] CALL` for larger values of `n`.
Jumps to the continuation in `c3`, pushing integer `0 <= n < 2^14` as its argument.
Approximately equivalent to `n PUSHINT` `c3 PUSHCTR` `JMPX`.
**Category:** Cont Dict (cont_dict)
-```fift Fift +```fift title="Fift" [n] JMP ``` @@ -5783,7 +5783,7 @@ Jumps to the continuation in `c3`, pushing integer `0 <= n < 2^14` as its argume Equivalent to `n PUSHINT` `c3 PUSHCTR`, for `0 <= n < 2^14`.
In this way, `[n] CALL` is approximately equivalent to `[n] PREPARE` `EXECUTE`, and `[n] JMP` is approximately equivalent to `[n] PREPARE` `JMPX`.
One might use, for instance, `CALLXARGS` or `CALLCC` instead of `EXECUTE` here.
**Category:** Cont Dict (cont_dict)
-```fift Fift +```fift title="Fift" [n] PREPARE [n] PREPAREDICT ``` @@ -5793,7 +5793,7 @@ Equivalent to `n PUSHINT` `c3 PUSHCTR`, for `0 <= n < 2^14`.
In this way, ` Throws exception `0 <= n <= 63` with parameter zero.
In other words, it transfers control to the continuation in `c2`, pushing `0` and `n` into its stack, and discarding the old stack altogether.
**Category:** Exceptions (exceptions)
-```fift Fift +```fift title="Fift" [n] THROW ``` @@ -5802,7 +5802,7 @@ Throws exception `0 <= n <= 63` with parameter zero.
In other words, it tra Throws exception `0 <= n <= 63` with parameter zero only if integer `f!=0`.
**Category:** Exceptions (exceptions)
-```fift Fift +```fift title="Fift" [n] THROWIF ``` @@ -5811,7 +5811,7 @@ Throws exception `0 <= n <= 63` with parameter zero only if integer `f!=0`.
**Category:** Exceptions (exceptions)
-```fift Fift +```fift title="Fift" [n] THROWIFNOT ``` @@ -5820,7 +5820,7 @@ Throws exception `0 <= n <= 63` with parameter zero only if integer `f=0`.
For `0 <= n < 2^11`, an encoding of `[n] THROW` for larger values of `n`.
**Category:** Exceptions (exceptions)
-```fift Fift +```fift title="Fift" [n] THROW ``` @@ -5829,7 +5829,7 @@ For `0 <= n < 2^11`, an encoding of `[n] THROW` for larger values of `n`.
Throws exception `0 <= n < 2^11` with parameter `x`, by copying `x` and `n` into the stack of `c2` and transferring control to `c2`.
**Category:** Exceptions (exceptions)
-```fift Fift +```fift title="Fift" [n] THROWARG ``` @@ -5838,7 +5838,7 @@ Throws exception `0 <= n < 2^11` with parameter `x`, by copying `x` and `n` int For `0 <= n < 2^11`, an encoding of `[n] THROWIF` for larger values of `n`.
**Category:** Exceptions (exceptions)
-```fift Fift +```fift title="Fift" [n] THROWIF ``` @@ -5847,7 +5847,7 @@ For `0 <= n < 2^11`, an encoding of `[n] THROWIF` for larger values of `n`.
**Category:** Exceptions (exceptions)
-```fift Fift +```fift title="Fift" [n] THROWARGIF ``` @@ -5856,7 +5856,7 @@ Throws exception `0 <= nn < 2^11` with parameter `x` only if integer `f!=0`.
**Category:** Exceptions (exceptions)
-```fift Fift +```fift title="Fift" [n] THROWIFNOT ``` @@ -5865,7 +5865,7 @@ For `0 <= n < 2^11`, an encoding of `[n] THROWIFNOT` for larger values of `n`. **Category:** Exceptions (exceptions)
-```fift Fift +```fift title="Fift" [n] THROWARGIFNOT ``` @@ -5874,7 +5874,7 @@ Throws exception `0 <= n < 2^11` with parameter `x` only if integer `f=0`.
Throws exception `0 <= n < 2^16` with parameter zero.
Approximately equivalent to `ZERO` `SWAP` `THROWARGANY`.
**Category:** Exceptions (exceptions)
-```fift Fift +```fift title="Fift" THROWANY ``` @@ -5883,7 +5883,7 @@ THROWANY Throws exception `0 <= n < 2^16` with parameter `x`, transferring control to the continuation in `c2`.
Approximately equivalent to `c2 PUSHCTR` `2 JMPXARGS`.
**Category:** Exceptions (exceptions)
-```fift Fift +```fift title="Fift" THROWARGANY ``` @@ -5892,7 +5892,7 @@ THROWARGANY Throws exception `0 <= n < 2^16` with parameter zero only if `f!=0`.
**Category:** Exceptions (exceptions)
-```fift Fift +```fift title="Fift" THROWANYIF ``` @@ -5901,7 +5901,7 @@ THROWANYIF Throws exception `0 <= n<2^16` with parameter `x` only if `f!=0`.
**Category:** Exceptions (exceptions)
-```fift Fift +```fift title="Fift" THROWARGANYIF ``` @@ -5910,7 +5910,7 @@ THROWARGANYIF Throws exception `0 <= n<2^16` with parameter zero only if `f=0`.
**Category:** Exceptions (exceptions)
-```fift Fift +```fift title="Fift" THROWANYIFNOT ``` @@ -5919,7 +5919,7 @@ THROWANYIFNOT Throws exception `0 <= n<2^16` with parameter `x` only if `f=0`.
**Category:** Exceptions (exceptions)
-```fift Fift +```fift title="Fift" THROWARGANYIFNOT ``` @@ -5928,7 +5928,7 @@ THROWARGANYIFNOT Sets `c2` to `c'`, first saving the old value of `c2` both into the savelist of `c'` and into the savelist of the current continuation, which is stored into `c.c0` and `c'.c0`. Then runs `c` similarly to `EXECUTE`. If `c` does not throw any exceptions, the original value of `c2` is automatically restored on return from `c`. If an exception occurs, the execution is transferred to `c'`, but the original value of `c2` is restored in the process, so that `c'` can re-throw the exception by `THROWANY` if it cannot handle it by itself.
**Category:** Exceptions (exceptions)
-```fift Fift +```fift title="Fift" TRY ``` @@ -5937,7 +5937,7 @@ TRY Similar to `TRY`, but with `[p] [r] CALLXARGS` internally used instead of `EXECUTE`.
In this way, all but the top `0 <= p <= 15` stack elements will be saved into current continuation's stack, and then restored upon return from either `c` or `c'`, with the top `0 <= r <= 15` values of the resulting stack of `c` or `c'` copied as return values.
**Category:** Exceptions (exceptions)
-```fift Fift +```fift title="Fift" [p] [r] TRYARGS ``` @@ -5946,7 +5946,7 @@ Similar to `TRY`, but with `[p] [r] CALLXARGS` internally used instead of `EXECU Stores dictionary `D` into _Builder_ `b`, returning the resulting _Builder_ `b'`.
In other words, if `D` is a cell, performs `STONE` and `STREF`; if `D` is _Null_, performs `NIP` and `STZERO`; otherwise throws a type checking exception.
**Category:** Dict Serial (dict_serial)
-```fift Fift +```fift title="Fift" STDICT STOPTREF ``` @@ -5956,7 +5956,7 @@ STOPTREF Equivalent to `LDDICT` `NIP`.
**Category:** Dict Serial (dict_serial)
-```fift Fift +```fift title="Fift" SKIPDICT SKIPOPTREF ``` @@ -5966,7 +5966,7 @@ SKIPOPTREF Loads (parses) a (_Slice_-represented) dictionary `s'` from _Slice_ `s`, and returns the remainder of `s` as `s''`.
This is a ''split function'' for all `HashmapE(n,X)` dictionary types.
**Category:** Dict Serial (dict_serial)
-```fift Fift +```fift title="Fift" LDDICTS ``` @@ -5975,7 +5975,7 @@ LDDICTS Preloads a (_Slice_-represented) dictionary `s'` from _Slice_ `s`.
Approximately equivalent to `LDDICTS` `DROP`.
**Category:** Dict Serial (dict_serial)
-```fift Fift +```fift title="Fift" PLDDICTS ``` @@ -5984,7 +5984,7 @@ PLDDICTS Loads (parses) a dictionary `D` from _Slice_ `s`, and returns the remainder of `s` as `s'`. May be applied to dictionaries or to values of arbitrary `(^Y)?` types.
**Category:** Dict Serial (dict_serial)
-```fift Fift +```fift title="Fift" LDDICT LDOPTREF ``` @@ -5994,7 +5994,7 @@ LDOPTREF Preloads a dictionary `D` from _Slice_ `s`.
Approximately equivalent to `LDDICT` `DROP`.
**Category:** Dict Serial (dict_serial)
-```fift Fift +```fift title="Fift" PLDDICT PLDOPTREF ``` @@ -6004,7 +6004,7 @@ PLDOPTREF A quiet version of `LDDICT`.
**Category:** Dict Serial (dict_serial)
-```fift Fift +```fift title="Fift" LDDICTQ ``` @@ -6013,7 +6013,7 @@ LDDICTQ A quiet version of `PLDDICT`.
**Category:** Dict Serial (dict_serial)
-```fift Fift +```fift title="Fift" PLDDICTQ ``` @@ -6022,7 +6022,7 @@ PLDDICTQ Looks up key `k` (represented by a _Slice_, the first `0 <= n <= 1023` data bits of which are used as a key) in dictionary `D` of type `HashmapE(n,X)` with `n`-bit keys.
On success, returns the value found as a _Slice_ `x`.
**Category:** Dict Get (dict_get)
-```fift Fift +```fift title="Fift" DICTGET ``` @@ -6031,7 +6031,7 @@ DICTGET Similar to `DICTGET`, but with a `LDREF` `ENDS` applied to `x` on success.
This operation is useful for dictionaries of type `HashmapE(n,^Y)`.
**Category:** Dict Get (dict_get)
-```fift Fift +```fift title="Fift" DICTGETREF ``` @@ -6040,7 +6040,7 @@ DICTGETREF Similar to `DICTGET`, but with a signed (big-endian) `n`-bit _Integer_ `i` as a key. If `i` does not fit into `n` bits, returns `0`. If `i` is a `NaN`, throws an integer overflow exception.
**Category:** Dict Get (dict_get)
-```fift Fift +```fift title="Fift" DICTIGET ``` @@ -6049,7 +6049,7 @@ DICTIGET Combines `DICTIGET` with `DICTGETREF`: it uses signed `n`-bit _Integer_ `i` as a key and returns a _Cell_ instead of a _Slice_ on success.
**Category:** Dict Get (dict_get)
-```fift Fift +```fift title="Fift" DICTIGETREF ``` @@ -6058,7 +6058,7 @@ DICTIGETREF Similar to `DICTIGET`, but with _unsigned_ (big-endian) `n`-bit _Integer_ `i` used as a key.
**Category:** Dict Get (dict_get)
-```fift Fift +```fift title="Fift" DICTUGET ``` @@ -6067,7 +6067,7 @@ DICTUGET Similar to `DICTIGETREF`, but with an unsigned `n`-bit _Integer_ key `i`.
**Category:** Dict Get (dict_get)
-```fift Fift +```fift title="Fift" DICTUGETREF ``` @@ -6076,7 +6076,7 @@ DICTUGETREF Sets the value associated with `n`-bit key `k` (represented by a _Slice_ as in `DICTGET`) in dictionary `D` (also represented by a _Slice_) to value `x` (again a _Slice_), and returns the resulting dictionary as `D'`.
**Category:** Dict Set (dict_set)
-```fift Fift +```fift title="Fift" DICTSET ``` @@ -6085,7 +6085,7 @@ DICTSET Similar to `DICTSET`, but with the value set to a reference to _Cell_ `c`.
**Category:** Dict Set (dict_set)
-```fift Fift +```fift title="Fift" DICTSETREF ``` @@ -6094,7 +6094,7 @@ DICTSETREF Similar to `DICTSET`, but with the key represented by a (big-endian) signed `n`-bit integer `i`. If `i` does not fit into `n` bits, a range check exception is generated.
**Category:** Dict Set (dict_set)
-```fift Fift +```fift title="Fift" DICTISET ``` @@ -6103,7 +6103,7 @@ DICTISET Similar to `DICTSETREF`, but with the key a signed `n`-bit integer as in `DICTISET`.
**Category:** Dict Set (dict_set)
-```fift Fift +```fift title="Fift" DICTISETREF ``` @@ -6112,7 +6112,7 @@ DICTISETREF Similar to `DICTISET`, but with `i` an _unsigned_ `n`-bit integer.
**Category:** Dict Set (dict_set)
-```fift Fift +```fift title="Fift" DICTUSET ``` @@ -6121,7 +6121,7 @@ DICTUSET Similar to `DICTISETREF`, but with `i` unsigned.
**Category:** Dict Set (dict_set)
-```fift Fift +```fift title="Fift" DICTUSETREF ``` @@ -6130,7 +6130,7 @@ DICTUSETREF Combines `DICTSET` with `DICTGET`: it sets the value corresponding to key `k` to `x`, but also returns the old value `y` associated with the key in question, if present.
**Category:** Dict Set (dict_set)
-```fift Fift +```fift title="Fift" DICTSETGET ``` @@ -6139,7 +6139,7 @@ DICTSETGET Combines `DICTSETREF` with `DICTGETREF` similarly to `DICTSETGET`.
**Category:** Dict Set (dict_set)
-```fift Fift +```fift title="Fift" DICTSETGETREF ``` @@ -6148,7 +6148,7 @@ DICTSETGETREF `DICTISETGET`, but with `i` a signed `n`-bit integer.
**Category:** Dict Set (dict_set)
-```fift Fift +```fift title="Fift" DICTISETGET ``` @@ -6157,7 +6157,7 @@ DICTISETGET `DICTISETGETREF`, but with `i` a signed `n`-bit integer.
**Category:** Dict Set (dict_set)
-```fift Fift +```fift title="Fift" DICTISETGETREF ``` @@ -6166,7 +6166,7 @@ DICTISETGETREF `DICTISETGET`, but with `i` an unsigned `n`-bit integer.
**Category:** Dict Set (dict_set)
-```fift Fift +```fift title="Fift" DICTUSETGET ``` @@ -6175,7 +6175,7 @@ DICTUSETGET `DICTISETGETREF`, but with `i` an unsigned `n`-bit integer.
**Category:** Dict Set (dict_set)
-```fift Fift +```fift title="Fift" DICTUSETGETREF ``` @@ -6184,7 +6184,7 @@ DICTUSETGETREF A _Replace_ operation, which is similar to `DICTSET`, but sets the value of key `k` in dictionary `D` to `x` only if the key `k` was already present in `D`.
**Category:** Dict Set (dict_set)
-```fift Fift +```fift title="Fift" DICTREPLACE ``` @@ -6193,7 +6193,7 @@ DICTREPLACE A _Replace_ counterpart of `DICTSETREF`.
**Category:** Dict Set (dict_set)
-```fift Fift +```fift title="Fift" DICTREPLACEREF ``` @@ -6202,7 +6202,7 @@ DICTREPLACEREF `DICTREPLACE`, but with `i` a signed `n`-bit integer.
**Category:** Dict Set (dict_set)
-```fift Fift +```fift title="Fift" DICTIREPLACE ``` @@ -6211,7 +6211,7 @@ DICTIREPLACE `DICTREPLACEREF`, but with `i` a signed `n`-bit integer.
**Category:** Dict Set (dict_set)
-```fift Fift +```fift title="Fift" DICTIREPLACEREF ``` @@ -6220,7 +6220,7 @@ DICTIREPLACEREF `DICTREPLACE`, but with `i` an unsigned `n`-bit integer.
**Category:** Dict Set (dict_set)
-```fift Fift +```fift title="Fift" DICTUREPLACE ``` @@ -6229,7 +6229,7 @@ DICTUREPLACE `DICTREPLACEREF`, but with `i` an unsigned `n`-bit integer.
**Category:** Dict Set (dict_set)
-```fift Fift +```fift title="Fift" DICTUREPLACEREF ``` @@ -6238,7 +6238,7 @@ DICTUREPLACEREF A _Replace_ counterpart of `DICTSETGET`: on success, also returns the old value associated with the key in question.
**Category:** Dict Set (dict_set)
-```fift Fift +```fift title="Fift" DICTREPLACEGET ``` @@ -6247,7 +6247,7 @@ DICTREPLACEGET A _Replace_ counterpart of `DICTSETGETREF`.
**Category:** Dict Set (dict_set)
-```fift Fift +```fift title="Fift" DICTREPLACEGETREF ``` @@ -6256,7 +6256,7 @@ DICTREPLACEGETREF `DICTREPLACEGET`, but with `i` a signed `n`-bit integer.
**Category:** Dict Set (dict_set)
-```fift Fift +```fift title="Fift" DICTIREPLACEGET ``` @@ -6265,7 +6265,7 @@ DICTIREPLACEGET `DICTREPLACEGETREF`, but with `i` a signed `n`-bit integer.
**Category:** Dict Set (dict_set)
-```fift Fift +```fift title="Fift" DICTIREPLACEGETREF ``` @@ -6274,7 +6274,7 @@ DICTIREPLACEGETREF `DICTREPLACEGET`, but with `i` an unsigned `n`-bit integer.
**Category:** Dict Set (dict_set)
-```fift Fift +```fift title="Fift" DICTUREPLACEGET ``` @@ -6283,7 +6283,7 @@ DICTUREPLACEGET `DICTREPLACEGETREF`, but with `i` an unsigned `n`-bit integer.
**Category:** Dict Set (dict_set)
-```fift Fift +```fift title="Fift" DICTUREPLACEGETREF ``` @@ -6292,7 +6292,7 @@ DICTUREPLACEGETREF An _Add_ counterpart of `DICTSET`: sets the value associated with key `k` in dictionary `D` to `x`, but only if it is not already present in `D`.
**Category:** Dict Set (dict_set)
-```fift Fift +```fift title="Fift" DICTADD ``` @@ -6301,7 +6301,7 @@ DICTADD An _Add_ counterpart of `DICTSETREF`.
**Category:** Dict Set (dict_set)
-```fift Fift +```fift title="Fift" DICTADDREF ``` @@ -6310,7 +6310,7 @@ DICTADDREF `DICTADD`, but with `i` a signed `n`-bit integer.
**Category:** Dict Set (dict_set)
-```fift Fift +```fift title="Fift" DICTIADD ``` @@ -6319,7 +6319,7 @@ DICTIADD `DICTADDREF`, but with `i` a signed `n`-bit integer.
**Category:** Dict Set (dict_set)
-```fift Fift +```fift title="Fift" DICTIADDREF ``` @@ -6328,7 +6328,7 @@ DICTIADDREF `DICTADD`, but with `i` an unsigned `n`-bit integer.
**Category:** Dict Set (dict_set)
-```fift Fift +```fift title="Fift" DICTUADD ``` @@ -6337,7 +6337,7 @@ DICTUADD `DICTADDREF`, but with `i` an unsigned `n`-bit integer.
**Category:** Dict Set (dict_set)
-```fift Fift +```fift title="Fift" DICTUADDREF ``` @@ -6346,7 +6346,7 @@ DICTUADDREF An _Add_ counterpart of `DICTSETGET`: sets the value associated with key `k` in dictionary `D` to `x`, but only if key `k` is not already present in `D`. Otherwise, just returns the old value `y` without changing the dictionary.
**Category:** Dict Set (dict_set)
-```fift Fift +```fift title="Fift" DICTADDGET ``` @@ -6355,7 +6355,7 @@ DICTADDGET An _Add_ counterpart of `DICTSETGETREF`.
**Category:** Dict Set (dict_set)
-```fift Fift +```fift title="Fift" DICTADDGETREF ``` @@ -6364,7 +6364,7 @@ DICTADDGETREF `DICTADDGET`, but with `i` a signed `n`-bit integer.
**Category:** Dict Set (dict_set)
-```fift Fift +```fift title="Fift" DICTIADDGET ``` @@ -6373,7 +6373,7 @@ DICTIADDGET `DICTADDGETREF`, but with `i` a signed `n`-bit integer.
**Category:** Dict Set (dict_set)
-```fift Fift +```fift title="Fift" DICTIADDGETREF ``` @@ -6382,7 +6382,7 @@ DICTIADDGETREF `DICTADDGET`, but with `i` an unsigned `n`-bit integer.
**Category:** Dict Set (dict_set)
-```fift Fift +```fift title="Fift" DICTUADDGET ``` @@ -6391,7 +6391,7 @@ DICTUADDGET `DICTADDGETREF`, but with `i` an unsigned `n`-bit integer.
**Category:** Dict Set (dict_set)
-```fift Fift +```fift title="Fift" DICTUADDGETREF ``` @@ -6400,7 +6400,7 @@ DICTUADDGETREF
**Category:** Dict Set Builder (dict_set_builder)
-```fift Fift +```fift title="Fift" DICTSETB ``` @@ -6409,7 +6409,7 @@ DICTSETB
**Category:** Dict Set Builder (dict_set_builder)
-```fift Fift +```fift title="Fift" DICTISETB ``` @@ -6418,7 +6418,7 @@ DICTISETB
**Category:** Dict Set Builder (dict_set_builder)
-```fift Fift +```fift title="Fift" DICTUSETB ``` @@ -6427,7 +6427,7 @@ DICTUSETB
**Category:** Dict Set Builder (dict_set_builder)
-```fift Fift +```fift title="Fift" DICTSETGETB ``` @@ -6436,7 +6436,7 @@ DICTSETGETB
**Category:** Dict Set Builder (dict_set_builder)
-```fift Fift +```fift title="Fift" DICTISETGETB ``` @@ -6445,7 +6445,7 @@ DICTISETGETB
**Category:** Dict Set Builder (dict_set_builder)
-```fift Fift +```fift title="Fift" DICTUSETGETB ``` @@ -6454,7 +6454,7 @@ DICTUSETGETB
**Category:** Dict Set Builder (dict_set_builder)
-```fift Fift +```fift title="Fift" DICTREPLACEB ``` @@ -6463,7 +6463,7 @@ DICTREPLACEB
**Category:** Dict Set Builder (dict_set_builder)
-```fift Fift +```fift title="Fift" DICTIREPLACEB ``` @@ -6472,7 +6472,7 @@ DICTIREPLACEB
**Category:** Dict Set Builder (dict_set_builder)
-```fift Fift +```fift title="Fift" DICTUREPLACEB ``` @@ -6481,7 +6481,7 @@ DICTUREPLACEB
**Category:** Dict Set Builder (dict_set_builder)
-```fift Fift +```fift title="Fift" DICTREPLACEGETB ``` @@ -6490,7 +6490,7 @@ DICTREPLACEGETB
**Category:** Dict Set Builder (dict_set_builder)
-```fift Fift +```fift title="Fift" DICTIREPLACEGETB ``` @@ -6499,7 +6499,7 @@ DICTIREPLACEGETB
**Category:** Dict Set Builder (dict_set_builder)
-```fift Fift +```fift title="Fift" DICTUREPLACEGETB ``` @@ -6508,7 +6508,7 @@ DICTUREPLACEGETB
**Category:** Dict Set Builder (dict_set_builder)
-```fift Fift +```fift title="Fift" DICTADDB ``` @@ -6517,7 +6517,7 @@ DICTADDB
**Category:** Dict Set Builder (dict_set_builder)
-```fift Fift +```fift title="Fift" DICTIADDB ``` @@ -6526,7 +6526,7 @@ DICTIADDB
**Category:** Dict Set Builder (dict_set_builder)
-```fift Fift +```fift title="Fift" DICTUADDB ``` @@ -6535,7 +6535,7 @@ DICTUADDB
**Category:** Dict Set Builder (dict_set_builder)
-```fift Fift +```fift title="Fift" DICTADDGETB ``` @@ -6544,7 +6544,7 @@ DICTADDGETB
**Category:** Dict Set Builder (dict_set_builder)
-```fift Fift +```fift title="Fift" DICTIADDGETB ``` @@ -6553,7 +6553,7 @@ DICTIADDGETB
**Category:** Dict Set Builder (dict_set_builder)
-```fift Fift +```fift title="Fift" DICTUADDGETB ``` @@ -6562,7 +6562,7 @@ DICTUADDGETB Deletes `n`-bit key, represented by a _Slice_ `k`, from dictionary `D`. If the key is present, returns the modified dictionary `D'` and the success flag `-1`. Otherwise, returns the original dictionary `D` and `0`.
**Category:** Dict Delete (dict_delete)
-```fift Fift +```fift title="Fift" DICTDEL ``` @@ -6571,7 +6571,7 @@ DICTDEL A version of `DICTDEL` with the key represented by a signed `n`-bit _Integer_ `i`. If `i` does not fit into `n` bits, simply returns `D` `0` (''key not found, dictionary unmodified'').
**Category:** Dict Delete (dict_delete)
-```fift Fift +```fift title="Fift" DICTIDEL ``` @@ -6580,7 +6580,7 @@ DICTIDEL Similar to `DICTIDEL`, but with `i` an unsigned `n`-bit integer.
**Category:** Dict Delete (dict_delete)
-```fift Fift +```fift title="Fift" DICTUDEL ``` @@ -6589,7 +6589,7 @@ DICTUDEL Deletes `n`-bit key, represented by a _Slice_ `k`, from dictionary `D`. If the key is present, returns the modified dictionary `D'`, the original value `x` associated with the key `k` (represented by a _Slice_), and the success flag `-1`. Otherwise, returns the original dictionary `D` and `0`.
**Category:** Dict Delete (dict_delete)
-```fift Fift +```fift title="Fift" DICTDELGET ``` @@ -6598,7 +6598,7 @@ DICTDELGET Similar to `DICTDELGET`, but with `LDREF` `ENDS` applied to `x` on success, so that the value returned `c` is a _Cell_.
**Category:** Dict Delete (dict_delete)
-```fift Fift +```fift title="Fift" DICTDELGETREF ``` @@ -6607,7 +6607,7 @@ DICTDELGETREF `DICTDELGET`, but with `i` a signed `n`-bit integer.
**Category:** Dict Delete (dict_delete)
-```fift Fift +```fift title="Fift" DICTIDELGET ``` @@ -6616,7 +6616,7 @@ DICTIDELGET `DICTDELGETREF`, but with `i` a signed `n`-bit integer.
**Category:** Dict Delete (dict_delete)
-```fift Fift +```fift title="Fift" DICTIDELGETREF ``` @@ -6625,7 +6625,7 @@ DICTIDELGETREF `DICTDELGET`, but with `i` an unsigned `n`-bit integer.
**Category:** Dict Delete (dict_delete)
-```fift Fift +```fift title="Fift" DICTUDELGET ``` @@ -6634,7 +6634,7 @@ DICTUDELGET `DICTDELGETREF`, but with `i` an unsigned `n`-bit integer.
**Category:** Dict Delete (dict_delete)
-```fift Fift +```fift title="Fift" DICTUDELGETREF ``` @@ -6643,7 +6643,7 @@ DICTUDELGETREF A variant of `DICTGETREF` that returns _Null_ instead of the value `c^?` if the key `k` is absent from dictionary `D`.
**Category:** Dict Mayberef (dict_mayberef)
-```fift Fift +```fift title="Fift" DICTGETOPTREF ``` @@ -6652,7 +6652,7 @@ DICTGETOPTREF `DICTGETOPTREF`, but with `i` a signed `n`-bit integer. If the key `i` is out of range, also returns _Null_.
**Category:** Dict Mayberef (dict_mayberef)
-```fift Fift +```fift title="Fift" DICTIGETOPTREF ``` @@ -6661,7 +6661,7 @@ DICTIGETOPTREF `DICTGETOPTREF`, but with `i` an unsigned `n`-bit integer. If the key `i` is out of range, also returns _Null_.
**Category:** Dict Mayberef (dict_mayberef)
-```fift Fift +```fift title="Fift" DICTUGETOPTREF ``` @@ -6670,7 +6670,7 @@ DICTUGETOPTREF A variant of both `DICTGETOPTREF` and `DICTSETGETREF` that sets the value corresponding to key `k` in dictionary `D` to `c^?` (if `c^?` is _Null_, then the key is deleted instead), and returns the old value `~c^?` (if the key `k` was absent before, returns _Null_ instead).
**Category:** Dict Mayberef (dict_mayberef)
-```fift Fift +```fift title="Fift" DICTSETGETOPTREF ``` @@ -6679,7 +6679,7 @@ DICTSETGETOPTREF Similar to primitive `DICTSETGETOPTREF`, but using signed `n`-bit _Integer_ `i` as a key. If `i` does not fit into `n` bits, throws a range checking exception.
**Category:** Dict Mayberef (dict_mayberef)
-```fift Fift +```fift title="Fift" DICTISETGETOPTREF ``` @@ -6688,7 +6688,7 @@ DICTISETGETOPTREF Similar to primitive `DICTSETGETOPTREF`, but using unsigned `n`-bit _Integer_ `i` as a key.
**Category:** Dict Mayberef (dict_mayberef)
-```fift Fift +```fift title="Fift" DICTUSETGETOPTREF ``` @@ -6697,7 +6697,7 @@ DICTUSETGETOPTREF
**Category:** Dict Prefix (dict_prefix)
-```fift Fift +```fift title="Fift" PFXDICTSET ``` @@ -6706,7 +6706,7 @@ PFXDICTSET
**Category:** Dict Prefix (dict_prefix)
-```fift Fift +```fift title="Fift" PFXDICTREPLACE ``` @@ -6715,7 +6715,7 @@ PFXDICTREPLACE
**Category:** Dict Prefix (dict_prefix)
-```fift Fift +```fift title="Fift" PFXDICTADD ``` @@ -6724,7 +6724,7 @@ PFXDICTADD
**Category:** Dict Prefix (dict_prefix)
-```fift Fift +```fift title="Fift" PFXDICTDEL ``` @@ -6733,7 +6733,7 @@ PFXDICTDEL Computes the minimal key `k'` in dictionary `D` that is lexicographically greater than `k`, and returns `k'` (represented by a _Slice_) along with associated value `x'` (also represented by a _Slice_).
**Category:** Dict Next (dict_next)
-```fift Fift +```fift title="Fift" DICTGETNEXT ``` @@ -6742,7 +6742,7 @@ DICTGETNEXT Similar to `DICTGETNEXT`, but computes the minimal key `k'` that is lexicographically greater than or equal to `k`.
**Category:** Dict Next (dict_next)
-```fift Fift +```fift title="Fift" DICTGETNEXTEQ ``` @@ -6751,7 +6751,7 @@ DICTGETNEXTEQ Similar to `DICTGETNEXT`, but computes the maximal key `k'` lexicographically smaller than `k`.
**Category:** Dict Next (dict_next)
-```fift Fift +```fift title="Fift" DICTGETPREV ``` @@ -6760,7 +6760,7 @@ DICTGETPREV Similar to `DICTGETPREV`, but computes the maximal key `k'` lexicographically smaller than or equal to `k`.
**Category:** Dict Next (dict_next)
-```fift Fift +```fift title="Fift" DICTGETPREVEQ ``` @@ -6769,7 +6769,7 @@ DICTGETPREVEQ Similar to `DICTGETNEXT`, but interprets all keys in dictionary `D` as big-endian signed `n`-bit integers, and computes the minimal key `i'` that is larger than _Integer_ `i` (which does not necessarily fit into `n` bits).
**Category:** Dict Next (dict_next)
-```fift Fift +```fift title="Fift" DICTIGETNEXT ``` @@ -6778,7 +6778,7 @@ DICTIGETNEXT Similar to `DICTGETNEXTEQ`, but interprets keys as signed `n`-bit integers.
**Category:** Dict Next (dict_next)
-```fift Fift +```fift title="Fift" DICTIGETNEXTEQ ``` @@ -6787,7 +6787,7 @@ DICTIGETNEXTEQ Similar to `DICTGETPREV`, but interprets keys as signed `n`-bit integers.
**Category:** Dict Next (dict_next)
-```fift Fift +```fift title="Fift" DICTIGETPREV ``` @@ -6796,7 +6796,7 @@ DICTIGETPREV Similar to `DICTGETPREVEQ`, but interprets keys as signed `n`-bit integers.
**Category:** Dict Next (dict_next)
-```fift Fift +```fift title="Fift" DICTIGETPREVEQ ``` @@ -6805,7 +6805,7 @@ DICTIGETPREVEQ Similar to `DICTGETNEXT`, but interprets all keys in dictionary `D` as big-endian unsigned `n`-bit integers, and computes the minimal key `i'` that is larger than _Integer_ `i` (which does not necessarily fit into `n` bits, and is not necessarily non-negative).
**Category:** Dict Next (dict_next)
-```fift Fift +```fift title="Fift" DICTUGETNEXT ``` @@ -6814,7 +6814,7 @@ DICTUGETNEXT Similar to `DICTGETNEXTEQ`, but interprets keys as unsigned `n`-bit integers.
**Category:** Dict Next (dict_next)
-```fift Fift +```fift title="Fift" DICTUGETNEXTEQ ``` @@ -6823,7 +6823,7 @@ DICTUGETNEXTEQ Similar to `DICTGETPREV`, but interprets keys as unsigned `n`-bit integers.
**Category:** Dict Next (dict_next)
-```fift Fift +```fift title="Fift" DICTUGETPREV ``` @@ -6832,7 +6832,7 @@ DICTUGETPREV Similar to `DICTGETPREVEQ`, but interprets keys a unsigned `n`-bit integers.
**Category:** Dict Next (dict_next)
-```fift Fift +```fift title="Fift" DICTUGETPREVEQ ``` @@ -6841,7 +6841,7 @@ DICTUGETPREVEQ Computes the minimal key `k` (represented by a _Slice_ with `n` data bits) in dictionary `D`, and returns `k` along with the associated value `x`.
**Category:** Dict Min (dict_min)
-```fift Fift +```fift title="Fift" DICTMIN ``` @@ -6850,7 +6850,7 @@ DICTMIN Similar to `DICTMIN`, but returns the only reference in the value as a _Cell_ `c`.
**Category:** Dict Min (dict_min)
-```fift Fift +```fift title="Fift" DICTMINREF ``` @@ -6859,7 +6859,7 @@ DICTMINREF Similar to `DICTMIN`, but computes the minimal key `i` under the assumption that all keys are big-endian signed `n`-bit integers. Notice that the key and value returned may differ from those computed by `DICTMIN` and `DICTUMIN`.
**Category:** Dict Min (dict_min)
-```fift Fift +```fift title="Fift" DICTIMIN ``` @@ -6868,7 +6868,7 @@ DICTIMIN Similar to `DICTIMIN`, but returns the only reference in the value.
**Category:** Dict Min (dict_min)
-```fift Fift +```fift title="Fift" DICTIMINREF ``` @@ -6877,7 +6877,7 @@ DICTIMINREF Similar to `DICTMIN`, but returns the key as an unsigned `n`-bit _Integer_ `i`.
**Category:** Dict Min (dict_min)
-```fift Fift +```fift title="Fift" DICTUMIN ``` @@ -6886,7 +6886,7 @@ DICTUMIN Similar to `DICTUMIN`, but returns the only reference in the value.
**Category:** Dict Min (dict_min)
-```fift Fift +```fift title="Fift" DICTUMINREF ``` @@ -6895,7 +6895,7 @@ DICTUMINREF Computes the maximal key `k` (represented by a _Slice_ with `n` data bits) in dictionary `D`, and returns `k` along with the associated value `x`.
**Category:** Dict Min (dict_min)
-```fift Fift +```fift title="Fift" DICTMAX ``` @@ -6904,7 +6904,7 @@ DICTMAX Similar to `DICTMAX`, but returns the only reference in the value.
**Category:** Dict Min (dict_min)
-```fift Fift +```fift title="Fift" DICTMAXREF ``` @@ -6913,7 +6913,7 @@ DICTMAXREF Similar to `DICTMAX`, but computes the maximal key `i` under the assumption that all keys are big-endian signed `n`-bit integers. Notice that the key and value returned may differ from those computed by `DICTMAX` and `DICTUMAX`.
**Category:** Dict Min (dict_min)
-```fift Fift +```fift title="Fift" DICTIMAX ``` @@ -6922,7 +6922,7 @@ DICTIMAX Similar to `DICTIMAX`, but returns the only reference in the value.
**Category:** Dict Min (dict_min)
-```fift Fift +```fift title="Fift" DICTIMAXREF ``` @@ -6931,7 +6931,7 @@ DICTIMAXREF Similar to `DICTMAX`, but returns the key as an unsigned `n`-bit _Integer_ `i`.
**Category:** Dict Min (dict_min)
-```fift Fift +```fift title="Fift" DICTUMAX ``` @@ -6940,7 +6940,7 @@ DICTUMAX Similar to `DICTUMAX`, but returns the only reference in the value.
**Category:** Dict Min (dict_min)
-```fift Fift +```fift title="Fift" DICTUMAXREF ``` @@ -6949,7 +6949,7 @@ DICTUMAXREF Computes the minimal key `k` (represented by a _Slice_ with `n` data bits) in dictionary `D`, removes `k` from the dictionary, and returns `k` along with the associated value `x` and the modified dictionary `D'`.
**Category:** Dict Min (dict_min)
-```fift Fift +```fift title="Fift" DICTREMMIN ``` @@ -6958,7 +6958,7 @@ DICTREMMIN Similar to `DICTREMMIN`, but returns the only reference in the value as a _Cell_ `c`.
**Category:** Dict Min (dict_min)
-```fift Fift +```fift title="Fift" DICTREMMINREF ``` @@ -6967,7 +6967,7 @@ DICTREMMINREF Similar to `DICTREMMIN`, but computes the minimal key `i` under the assumption that all keys are big-endian signed `n`-bit integers. Notice that the key and value returned may differ from those computed by `DICTREMMIN` and `DICTUREMMIN`.
**Category:** Dict Min (dict_min)
-```fift Fift +```fift title="Fift" DICTIREMMIN ``` @@ -6976,7 +6976,7 @@ DICTIREMMIN Similar to `DICTIREMMIN`, but returns the only reference in the value.
**Category:** Dict Min (dict_min)
-```fift Fift +```fift title="Fift" DICTIREMMINREF ``` @@ -6985,7 +6985,7 @@ DICTIREMMINREF Similar to `DICTREMMIN`, but returns the key as an unsigned `n`-bit _Integer_ `i`.
**Category:** Dict Min (dict_min)
-```fift Fift +```fift title="Fift" DICTUREMMIN ``` @@ -6994,7 +6994,7 @@ DICTUREMMIN Similar to `DICTUREMMIN`, but returns the only reference in the value.
**Category:** Dict Min (dict_min)
-```fift Fift +```fift title="Fift" DICTUREMMINREF ``` @@ -7003,7 +7003,7 @@ DICTUREMMINREF Computes the maximal key `k` (represented by a _Slice_ with `n` data bits) in dictionary `D`, removes `k` from the dictionary, and returns `k` along with the associated value `x` and the modified dictionary `D'`.
**Category:** Dict Min (dict_min)
-```fift Fift +```fift title="Fift" DICTREMMAX ``` @@ -7012,7 +7012,7 @@ DICTREMMAX Similar to `DICTREMMAX`, but returns the only reference in the value as a _Cell_ `c`.
**Category:** Dict Min (dict_min)
-```fift Fift +```fift title="Fift" DICTREMMAXREF ``` @@ -7021,7 +7021,7 @@ DICTREMMAXREF Similar to `DICTREMMAX`, but computes the minimal key `i` under the assumption that all keys are big-endian signed `n`-bit integers. Notice that the key and value returned may differ from those computed by `DICTREMMAX` and `DICTUREMMAX`.
**Category:** Dict Min (dict_min)
-```fift Fift +```fift title="Fift" DICTIREMMAX ``` @@ -7030,7 +7030,7 @@ DICTIREMMAX Similar to `DICTIREMMAX`, but returns the only reference in the value.
**Category:** Dict Min (dict_min)
-```fift Fift +```fift title="Fift" DICTIREMMAXREF ``` @@ -7039,7 +7039,7 @@ DICTIREMMAXREF Similar to `DICTREMMAX`, but returns the key as an unsigned `n`-bit _Integer_ `i`.
**Category:** Dict Min (dict_min)
-```fift Fift +```fift title="Fift" DICTUREMMAX ``` @@ -7048,7 +7048,7 @@ DICTUREMMAX Similar to `DICTUREMMAX`, but returns the only reference in the value.
**Category:** Dict Min (dict_min)
-```fift Fift +```fift title="Fift" DICTUREMMAXREF ``` @@ -7057,7 +7057,7 @@ DICTUREMMAXREF Similar to `DICTIGET`, but with `x` `BLESS`ed into a continuation with a subsequent `JMPX` to it on success. On failure, does nothing. This is useful for implementing `switch`/`case` constructions.
**Category:** Dict Special (dict_special)
-```fift Fift +```fift title="Fift" DICTIGETJMP ``` @@ -7066,7 +7066,7 @@ DICTIGETJMP Similar to `DICTIGETJMP`, but performs `DICTUGET` instead of `DICTIGET`.
**Category:** Dict Special (dict_special)
-```fift Fift +```fift title="Fift" DICTUGETJMP ``` @@ -7075,7 +7075,7 @@ DICTUGETJMP Similar to `DICTIGETJMP`, but with `EXECUTE` instead of `JMPX`.
**Category:** Dict Special (dict_special)
-```fift Fift +```fift title="Fift" DICTIGETEXEC ``` @@ -7084,7 +7084,7 @@ DICTIGETEXEC Similar to `DICTUGETJMP`, but with `EXECUTE` instead of `JMPX`.
**Category:** Dict Special (dict_special)
-```fift Fift +```fift title="Fift" DICTUGETEXEC ``` @@ -7093,7 +7093,7 @@ DICTUGETEXEC Pushes a non-empty constant dictionary `D` (as a `Cell^?`) along with its key length `0 <= n <= 1023`, stored as a part of the instruction. The dictionary itself is created from the first of remaining references of the current continuation. In this way, the complete `DICTPUSHCONST` instruction can be obtained by first serializing `xF4A4_`, then the non-empty dictionary itself (one `1` bit and a cell reference), and then the unsigned 10-bit integer `n` (as if by a `STU 10` instruction). An empty dictionary can be pushed by a `NEWDICT` primitive instead.
**Category:** Dict Special (dict_special)
-```fift Fift +```fift title="Fift" [ref] [n] DICTPUSHCONST ``` @@ -7102,7 +7102,7 @@ Pushes a non-empty constant dictionary `D` (as a `Cell^?`) along with its key le Looks up the unique prefix of _Slice_ `s` present in the prefix code dictionary represented by `Cell^?` `D` and `0 <= n <= 1023`. If found, the prefix of `s` is returned as `s'`, and the corresponding value (also a _Slice_) as `x`. The remainder of `s` is returned as a _Slice_ `s''`. If no prefix of `s` is a key in prefix code dictionary `D`, returns the unchanged `s` and a zero flag to indicate failure.
**Category:** Dict Special (dict_special)
-```fift Fift +```fift title="Fift" PFXDICTGETQ ``` @@ -7111,7 +7111,7 @@ PFXDICTGETQ Similar to `PFXDICTGET`, but throws a cell deserialization failure exception on failure.
**Category:** Dict Special (dict_special)
-```fift Fift +```fift title="Fift" PFXDICTGET ``` @@ -7120,7 +7120,7 @@ PFXDICTGET Similar to `PFXDICTGETQ`, but on success `BLESS`es the value `x` into a _Continuation_ and transfers control to it as if by a `JMPX`. On failure, returns `s` unchanged and continues execution.
**Category:** Dict Special (dict_special)
-```fift Fift +```fift title="Fift" PFXDICTGETJMP ``` @@ -7129,7 +7129,7 @@ PFXDICTGETJMP Similar to `PFXDICTGETJMP`, but `EXEC`utes the continuation found instead of jumping to it. On failure, throws a cell deserialization exception.
**Category:** Dict Special (dict_special)
-```fift Fift +```fift title="Fift" PFXDICTGETEXEC ``` @@ -7138,7 +7138,7 @@ PFXDICTGETEXEC Combines `[n] DICTPUSHCONST` for `0 <= n <= 1023` with `PFXDICTGETJMP`.
**Category:** Dict Special (dict_special)
-```fift Fift +```fift title="Fift" [ref] [n] PFXDICTCONSTGETJMP [ref] [n] PFXDICTSWITCH ``` @@ -7148,7 +7148,7 @@ Combines `[n] DICTPUSHCONST` for `0 <= n <= 1023` with `PFXDICTGETJMP`.
A variant of `DICTIGETJMP` that returns index `i` on failure.
**Category:** Dict Special (dict_special)
-```fift Fift +```fift title="Fift" DICTIGETJMPZ ``` @@ -7157,7 +7157,7 @@ DICTIGETJMPZ A variant of `DICTUGETJMP` that returns index `i` on failure.
**Category:** Dict Special (dict_special)
-```fift Fift +```fift title="Fift" DICTUGETJMPZ ``` @@ -7166,7 +7166,7 @@ DICTUGETJMPZ A variant of `DICTIGETEXEC` that returns index `i` on failure.
**Category:** Dict Special (dict_special)
-```fift Fift +```fift title="Fift" DICTIGETEXECZ ``` @@ -7175,7 +7175,7 @@ DICTIGETEXECZ A variant of `DICTUGETEXEC` that returns index `i` on failure.
**Category:** Dict Special (dict_special)
-```fift Fift +```fift title="Fift" DICTUGETEXECZ ``` @@ -7184,7 +7184,7 @@ DICTUGETEXECZ Constructs a subdictionary consisting of all keys beginning with prefix `k` (represented by a _Slice_, the first `0 <= l <= n <= 1023` data bits of which are used as a key) of length `l` in dictionary `D` of type `HashmapE(n,X)` with `n`-bit keys. On success, returns the new subdictionary of the same type `HashmapE(n,X)` as a _Slice_ `D'`.
**Category:** Dict Sub (dict_sub)
-```fift Fift +```fift title="Fift" SUBDICTGET ``` @@ -7193,7 +7193,7 @@ SUBDICTGET Variant of `SUBDICTGET` with the prefix represented by a signed big-endian `l`-bit _Integer_ `x`, where necessarily `l <= 257`.
**Category:** Dict Sub (dict_sub)
-```fift Fift +```fift title="Fift" SUBDICTIGET ``` @@ -7202,7 +7202,7 @@ SUBDICTIGET Variant of `SUBDICTGET` with the prefix represented by an unsigned big-endian `l`-bit _Integer_ `x`, where necessarily `l <= 256`.
**Category:** Dict Sub (dict_sub)
-```fift Fift +```fift title="Fift" SUBDICTUGET ``` @@ -7211,7 +7211,7 @@ SUBDICTUGET Similar to `SUBDICTGET`, but removes the common prefix `k` from all keys of the new dictionary `D'`, which becomes of type `HashmapE(n-l,X)`.
**Category:** Dict Sub (dict_sub)
-```fift Fift +```fift title="Fift" SUBDICTRPGET ``` @@ -7220,7 +7220,7 @@ SUBDICTRPGET Variant of `SUBDICTRPGET` with the prefix represented by a signed big-endian `l`-bit _Integer_ `x`, where necessarily `l <= 257`.
**Category:** Dict Sub (dict_sub)
-```fift Fift +```fift title="Fift" SUBDICTIRPGET ``` @@ -7229,7 +7229,7 @@ SUBDICTIRPGET Variant of `SUBDICTRPGET` with the prefix represented by an unsigned big-endian `l`-bit _Integer_ `x`, where necessarily `l <= 256`.
**Category:** Dict Sub (dict_sub)
-```fift Fift +```fift title="Fift" SUBDICTURPGET ``` @@ -7238,7 +7238,7 @@ SUBDICTURPGET Sets current gas limit `g_l` to its maximal allowed value `g_m`, and resets the gas credit `g_c` to zero, decreasing the value of `g_r` by `g_c` in the process.
In other words, the current smart contract agrees to buy some gas to finish the current transaction. This action is required to process external messages, which bring no value (hence no gas) with themselves.
**Category:** App Gas (app_gas)
-```fift Fift +```fift title="Fift" ACCEPT ``` @@ -7247,7 +7247,7 @@ ACCEPT Sets current gas limit `g_l` to the minimum of `g` and `g_m`, and resets the gas credit `g_c` to zero. If the gas consumed so far (including the present instruction) exceeds the resulting value of `g_l`, an (unhandled) out of gas exception is thrown before setting new gas limits. Notice that `SETGASLIMIT` with an argument `g >= 2^63-1` is equivalent to `ACCEPT`.
**Category:** App Gas (app_gas)
-```fift Fift +```fift title="Fift" SETGASLIMIT ``` @@ -7256,7 +7256,7 @@ SETGASLIMIT Returns gas consumed by VM so far (including this instruction).
**Category:** App Gas (app_gas)
-```fift Fift +```fift title="Fift" GASCONSUMED ``` @@ -7265,7 +7265,7 @@ GASCONSUMED Commits the current state of registers `c4` (''persistent data'') and `c5` (''actions'') so that the current execution is considered ''successful'' with the saved values even if an exception is thrown later.
**Category:** App Gas (app_gas)
-```fift Fift +```fift title="Fift" COMMIT ``` @@ -7274,7 +7274,7 @@ COMMIT Generates a new pseudo-random unsigned 256-bit _Integer_ `x`. The algorithm is as follows: if `r` is the old value of the random seed, considered as a 32-byte array (by constructing the big-endian representation of an unsigned 256-bit integer), then its `sha512(r)` is computed; the first 32 bytes of this hash are stored as the new value `r'` of the random seed, and the remaining 32 bytes are returned as the next random value `x`.
**Category:** App Rnd (app_rnd)
-```fift Fift +```fift title="Fift" RANDU256 ``` @@ -7283,7 +7283,7 @@ RANDU256 Generates a new pseudo-random integer `z` in the range `0...y-1` (or `y...-1`, if `y<0`). More precisely, an unsigned random value `x` is generated as in `RAND256U`; then `z:=floor(x*y/2^256)` is computed.
Equivalent to `RANDU256` `256 MULRSHIFT`.
**Category:** App Rnd (app_rnd)
-```fift Fift +```fift title="Fift" RAND ``` @@ -7292,7 +7292,7 @@ RAND Sets the random seed to unsigned 256-bit _Integer_ `x`.
**Category:** App Rnd (app_rnd)
-```fift Fift +```fift title="Fift" SETRAND ``` @@ -7301,7 +7301,7 @@ SETRAND Mixes unsigned 256-bit _Integer_ `x` into the random seed `r` by setting the random seed to `Sha` of the concatenation of two 32-byte strings: the first with the big-endian representation of the old seed `r`, and the second with the big-endian representation of `x`.
**Category:** App Rnd (app_rnd)
-```fift Fift +```fift title="Fift" ADDRAND RANDOMIZE ``` @@ -7311,7 +7311,7 @@ RANDOMIZE Returns the `i`-th parameter from the _Tuple_ provided at `c7` for `0 <= i <= 15`. Equivalent to `c7 PUSHCTR` `FIRST` `[i] INDEX`.
If one of these internal operations fails, throws an appropriate type checking or range checking exception.
**Category:** App Config (app_config)
-```fift Fift +```fift title="Fift" [i] GETPARAM ``` @@ -7348,7 +7348,7 @@ Returns the `i`-th parameter from the _Tuple_ provided at `c7` for `0 <= i <= 15 Returns the global configuration dictionary along with its key length (32).
Equivalent to `CONFIGROOT` `32 PUSHINT`.
**Category:** App Config (app_config)
-```fift Fift +```fift title="Fift" CONFIGDICT ``` @@ -7357,7 +7357,7 @@ CONFIGDICT Returns the value of the global configuration parameter with integer index `i` as a _Cell_ `c`, and a flag to indicate success.
Equivalent to `CONFIGDICT` `DICTIGETREF`.
**Category:** App Config (app_config)
-```fift Fift +```fift title="Fift" CONFIGPARAM ``` @@ -7366,7 +7366,7 @@ CONFIGPARAM Returns the value of the global configuration parameter with integer index `i` as a _Maybe Cell_ `c^?`.
Equivalent to `CONFIGDICT` `DICTIGETOPTREF`.
**Category:** App Config (app_config)
-```fift Fift +```fift title="Fift" CONFIGOPTPARAM ``` @@ -7375,7 +7375,7 @@ CONFIGOPTPARAM Retrives `last_mc_blocks` part of PrevBlocksInfo from c7 (parameter 13).
**Category:** App Config (app_config)
-```fift Fift +```fift title="Fift" PREVMCBLOCKS ``` @@ -7384,7 +7384,7 @@ PREVMCBLOCKS Retrives `prev_key_block` part of PrevBlocksInfo from c7 (parameter 13).
**Category:** App Config (app_config)
-```fift Fift +```fift title="Fift" PREVKEYBLOCK ``` @@ -7393,7 +7393,7 @@ PREVKEYBLOCK Retrives `last_mc_blocks_divisible_by_100` part of PrevBlocksInfo from c7 (parameter 13).
**Category:** App Config (app_config)
-```fift Fift +```fift title="Fift" PREVMCBLOCKS_100 ``` @@ -7402,7 +7402,7 @@ PREVMCBLOCKS_100 Retrieves `global_id` from 19 network config.
**Category:** App Config (app_config)
-```fift Fift +```fift title="Fift" GLOBALID ``` @@ -7411,7 +7411,7 @@ GLOBALID Calculates gas fee
**Category:** App Config (app_config)
-```fift Fift +```fift title="Fift" GETGASFEE ``` @@ -7420,7 +7420,7 @@ GETGASFEE Calculates storage fees (only current StoragePrices entry is used).
**Category:** App Config (app_config)
-```fift Fift +```fift title="Fift" GETSTORAGEFEE ``` @@ -7429,7 +7429,7 @@ GETSTORAGEFEE Calculates forward fee.
**Category:** App Config (app_config)
-```fift Fift +```fift title="Fift" GETFORWARDFEE ``` @@ -7438,7 +7438,7 @@ GETFORWARDFEE Returns gas usage for the current contract if it is precompiled, `null` otherwise.
**Category:** App Config (app_config)
-```fift Fift +```fift title="Fift" GETPRECOMPILEDGAS ``` @@ -7447,7 +7447,7 @@ GETPRECOMPILEDGAS Calculate `(fwd_fee * 2^16) / (2^16 - first_frac)`. Can be used to get the original `fwd_fee` of the message.
**Category:** App Config (app_config)
-```fift Fift +```fift title="Fift" GETORIGINALFWDFEE ``` @@ -7456,7 +7456,7 @@ GETORIGINALFWDFEE Same as `GETGASFEE`, but without flat price (just `(gas_used * price) / 2^16)`.
**Category:** App Config (app_config)
-```fift Fift +```fift title="Fift" GETGASFEESIMPLE ``` @@ -7465,7 +7465,7 @@ GETGASFEESIMPLE Same as `GETFORWARDFEE`, but without lump price (just (`bits*bit_price + cells*cell_price) / 2^16`).
**Category:** App Config (app_config)
-```fift Fift +```fift title="Fift" GETFORWARDFEESIMPLE ``` @@ -7474,7 +7474,7 @@ GETFORWARDFEESIMPLE Returns the `k`-th global variable for `0 <= k < 255`.
Equivalent to `c7 PUSHCTR` `SWAP` `INDEXVARQ`.
**Category:** App Global (app_global)
-```fift Fift +```fift title="Fift" GETGLOBVAR ``` @@ -7483,7 +7483,7 @@ GETGLOBVAR Returns the `k`-th global variable for `1 <= k <= 31`.
Equivalent to `c7 PUSHCTR` `[k] INDEXQ`.
**Category:** App Global (app_global)
-```fift Fift +```fift title="Fift" [k] GETGLOB ``` @@ -7492,7 +7492,7 @@ Returns the `k`-th global variable for `1 <= k <= 31`.
Equivalent to `c7 PU Assigns `x` to the `k`-th global variable for `0 <= k < 255`.
Equivalent to `c7 PUSHCTR` `ROTREV` `SETINDEXVARQ` `c7 POPCTR`.
**Category:** App Global (app_global)
-```fift Fift +```fift title="Fift" SETGLOBVAR ``` @@ -7501,7 +7501,7 @@ SETGLOBVAR Assigns `x` to the `k`-th global variable for `1 <= k <= 31`.
Equivalent to `c7 PUSHCTR` `SWAP` `k SETINDEXQ` `c7 POPCTR`.
**Category:** App Global (app_global)
-```fift Fift +```fift title="Fift" [k] SETGLOB ``` @@ -7510,7 +7510,7 @@ Assigns `x` to the `k`-th global variable for `1 <= k <= 31`.
Equivalent to Takes id of the extra currency (integer in range `0..2^32-1`), returns the amount of this extra currency on the account balance. The first `5` executions of `GETEXTRABALANCE` consume at most `26 + 200` gas each. The subsequent executions incur the full gas cost of `26` (normal instruction cost) plus gas for loading cells (up to `3300` if the dictionary has maximum depth).
**Category:** App Global (app_global)
-```fift Fift +```fift title="Fift" GETEXTRABALANCE ``` @@ -7519,7 +7519,7 @@ GETEXTRABALANCE Returns the `i`-th parameter from the _Tuple_ provided at `c7` for `0 <= i <= 255`. Equivalent to `c7 PUSHCTR` `FIRST` `[i] INDEX`.
If one of these internal operations fails, throws an appropriate type checking or range checking exception.
**Category:** App Config (app_config)
-```fift Fift +```fift title="Fift" [i] GETPARAMLONG ``` @@ -7528,7 +7528,7 @@ Returns the `i`-th parameter from the _Tuple_ provided at `c7` for `0 <= i <= 25 Equivalent to `INMSGPARAMS` `i INDEX`
**Category:** App Config (app_config)
-```fift Fift +```fift title="Fift" [i] INMSGPARAM ``` @@ -7559,7 +7559,7 @@ Equivalent to `INMSGPARAMS` `i INDEX`
Computes the representation hash of a _Cell_ `c` and returns it as a 256-bit unsigned integer `x`. Useful for signing and checking signatures of arbitrary entities represented by a tree of cells.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" HASHCU ``` @@ -7568,7 +7568,7 @@ HASHCU Computes the hash of a _Slice_ `s` and returns it as a 256-bit unsigned integer `x`. The result is the same as if an ordinary cell containing only data and references from `s` had been created and its hash computed by `HASHCU`.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" HASHSU ``` @@ -7577,7 +7577,7 @@ HASHSU Computes `Sha` of the data bits of _Slice_ `s`. If the bit length of `s` is not divisible by eight, throws a cell underflow exception. The hash value is returned as a 256-bit unsigned integer `x`.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" SHA256U ``` @@ -7586,7 +7586,7 @@ SHA256U Calculates and returns hash of the concatenation of slices (or builders) `s_1...s_n`.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" HASHEXT_SHA256 ``` @@ -7595,7 +7595,7 @@ HASHEXT_SHA256 Calculates and returns hash of the concatenation of slices (or builders) `s_1...s_n`.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" HASHEXT_SHA512 ``` @@ -7604,7 +7604,7 @@ HASHEXT_SHA512 Calculates and returns hash of the concatenation of slices (or builders) `s_1...s_n`.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" HASHEXT_BLAKE2B ``` @@ -7613,7 +7613,7 @@ HASHEXT_BLAKE2B Calculates and returns hash of the concatenation of slices (or builders) `s_1...s_n`.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" HASHEXT_KECCAK256 ``` @@ -7622,7 +7622,7 @@ HASHEXT_KECCAK256 Calculates and returns hash of the concatenation of slices (or builders) `s_1...s_n`.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" HASHEXT_KECCAK512 ``` @@ -7631,7 +7631,7 @@ HASHEXT_KECCAK512 Calculates and returns hash of the concatenation of slices (or builders) `s_1...s_n`.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" HASHEXTR_SHA256 ``` @@ -7640,7 +7640,7 @@ HASHEXTR_SHA256 Calculates and returns hash of the concatenation of slices (or builders) `s_1...s_n`.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" HASHEXTR_SHA512 ``` @@ -7649,7 +7649,7 @@ HASHEXTR_SHA512 Calculates and returns hash of the concatenation of slices (or builders) `s_1...s_n`.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" HASHEXTR_BLAKE2B ``` @@ -7658,7 +7658,7 @@ HASHEXTR_BLAKE2B Calculates and returns hash of the concatenation of slices (or builders) `s_1...s_n`.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" HASHEXTR_KECCAK256 ``` @@ -7667,7 +7667,7 @@ HASHEXTR_KECCAK256 Calculates and returns hash of the concatenation of slices (or builders) `s_1...s_n`.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" HASHEXTR_KECCAK512 ``` @@ -7676,7 +7676,7 @@ HASHEXTR_KECCAK512 Calculates hash of the concatenation of slices (or builders) `s_1...s_n`. Appends the resulting hash to a builder `b`.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" HASHEXTA_SHA256 ``` @@ -7685,7 +7685,7 @@ HASHEXTA_SHA256 Calculates hash of the concatenation of slices (or builders) `s_1...s_n`. Appends the resulting hash to a builder `b`.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" HASHEXTA_SHA512 ``` @@ -7694,7 +7694,7 @@ HASHEXTA_SHA512 Calculates hash of the concatenation of slices (or builders) `s_1...s_n`. Appends the resulting hash to a builder `b`.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" HASHEXTA_BLAKE2B ``` @@ -7703,7 +7703,7 @@ HASHEXTA_BLAKE2B Calculates hash of the concatenation of slices (or builders) `s_1...s_n`. Appends the resulting hash to a builder `b`.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" HASHEXTA_KECCAK256 ``` @@ -7712,7 +7712,7 @@ HASHEXTA_KECCAK256 Calculates hash of the concatenation of slices (or builders) `s_1...s_n`. Appends the resulting hash to a builder `b`.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" HASHEXTA_KECCAK512 ``` @@ -7721,7 +7721,7 @@ HASHEXTA_KECCAK512 Calculates hash of the concatenation of slices (or builders) `s_1...s_n`. Appends the resulting hash to a builder `b`.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" HASHEXTAR_SHA256 ``` @@ -7730,7 +7730,7 @@ HASHEXTAR_SHA256 Calculates hash of the concatenation of slices (or builders) `s_1...s_n`. Appends the resulting hash to a builder `b`.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" HASHEXTAR_SHA512 ``` @@ -7739,7 +7739,7 @@ HASHEXTAR_SHA512 Calculates hash of the concatenation of slices (or builders) `s_1...s_n`. Appends the resulting hash to a builder `b`.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" HASHEXTAR_BLAKE2B ``` @@ -7748,7 +7748,7 @@ HASHEXTAR_BLAKE2B Calculates hash of the concatenation of slices (or builders) `s_1...s_n`. Appends the resulting hash to a builder `b`.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" HASHEXTAR_KECCAK256 ``` @@ -7757,7 +7757,7 @@ HASHEXTAR_KECCAK256 Calculates hash of the concatenation of slices (or builders) `s_1...s_n`. Appends the resulting hash to a builder `b`.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" HASHEXTAR_KECCAK512 ``` @@ -7766,7 +7766,7 @@ HASHEXTAR_KECCAK512 Checks the Ed25519-signature `s` of a hash `h` (a 256-bit unsigned integer, usually computed as the hash of some data) using public key `k` (also represented by a 256-bit unsigned integer).
The signature `s` must be a _Slice_ containing at least 512 data bits; only the first 512 bits are used. The result is `-1` if the signature is valid, `0` otherwise.
Notice that `CHKSIGNU` is equivalent to `ROT` `NEWC` `256 STU` `ENDC` `ROTREV` `CHKSIGNS`, i.e., to `CHKSIGNS` with the first argument `d` set to 256-bit _Slice_ containing `h`. Therefore, if `h` is computed as the hash of some data, these data are hashed _twice_, the second hashing occurring inside `CHKSIGNS`.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" CHKSIGNU ``` @@ -7775,7 +7775,7 @@ CHKSIGNU Checks whether `s` is a valid Ed25519-signature of the data portion of _Slice_ `d` using public key `k`, similarly to `CHKSIGNU`. If the bit length of _Slice_ `d` is not divisible by eight, throws a cell underflow exception. The verification of Ed25519 signatures is the standard one, with `Sha` used to reduce `d` to the 256-bit number that is actually signed.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" CHKSIGNS ``` @@ -7784,7 +7784,7 @@ CHKSIGNS Recovers the public key from a secp256k1 signature, identical to Bitcoin/Ethereum operations. Takes a 32-byte hash as `uint256 hash` and a 65-byte signature as `uint8 v`, `uint256 r`, and `uint256 s`. In TON, the `v` value is strictly 0 or 1; no extra flags or extended values are supported. If the public key cannot be recovered, the instruction returns `0`. On success, it returns the recovered 65-byte public key as `uint8 h`, `uint256 x1`, and `uint256 x2`, followed by `-1`.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" ECRECOVER ``` @@ -7793,7 +7793,7 @@ ECRECOVER performs [`secp256k1_xonly_pubkey_tweak_add`](https://github.com/bitcoin-core/secp256k1/blob/master/include/secp256k1_extrakeys.h#L120). `key` and `tweak` are 256-bit unsigned integers. 65-byte public key is returned as `uint8 f`, `uint256 x, y` (as in `ECRECOVER`).
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" SECP256K1_XONLY_PUBKEY_TWEAK_ADD ``` @@ -7802,7 +7802,7 @@ SECP256K1_XONLY_PUBKEY_TWEAK_ADD Checks seck256r1-signature `sig` of a number `h` (a 256-bit unsigned integer, usually computed as the hash of some data) and public key `k`. Returns -1 on success, 0 on failure. Public key is a 33-byte slice (encoded according to Sec. 2.3.4 point 2 of [SECG SEC 1](https://www.secg.org/sec1-v2.pdf)). Signature `sig` is a 64-byte slice (two 256-bit unsigned integers `r` and `s`).
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" P256_CHKSIGNU ``` @@ -7811,7 +7811,7 @@ P256_CHKSIGNU Checks seck256r1-signature `sig` of data portion of slice `d` and public key `k`. Returns -1 on success, 0 on failure. Public key is a 33-byte slice (encoded according to Sec. 2.3.4 point 2 of [SECG SEC 1](https://www.secg.org/sec1-v2.pdf)). Signature `sig` is a 64-byte slice (two 256-bit unsigned integers `r` and `s`).
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" P256_CHKSIGNS ``` @@ -7820,7 +7820,7 @@ P256_CHKSIGNS Same as `ENDC HASHCU`, but without gas cost for cell creation.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" HASHBU ``` @@ -7829,7 +7829,7 @@ HASHBU Deterministically generates a valid point `x` from a 512-bit hash (given as two 256-bit integers).
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" RIST255_FROMHASH ``` @@ -7838,7 +7838,7 @@ RIST255_FROMHASH Checks that integer `x` is a valid representation of some curve point. Throws range_chk on error.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" RIST255_VALIDATE ``` @@ -7847,7 +7847,7 @@ RIST255_VALIDATE Addition of two points on a curve.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" RIST255_ADD ``` @@ -7856,7 +7856,7 @@ RIST255_ADD Subtraction of two points on curve.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" RIST255_SUB ``` @@ -7865,7 +7865,7 @@ RIST255_SUB Multiplies point `x` by a scalar `n`. Any `n` is valid, including negative.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" RIST255_MUL ``` @@ -7874,7 +7874,7 @@ RIST255_MUL Multiplies the generator point `g` by a scalar `n`. Any `n` is valid, including negative.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" RIST255_MULBASE ``` @@ -7883,7 +7883,7 @@ RIST255_MULBASE Pushes integer l=2^252+27742317777372353535851937790883648493, which is the order of the group.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" RIST255_PUSHL ``` @@ -7892,7 +7892,7 @@ RIST255_PUSHL Checks that integer `x` is a valid representation of some curve point. Returns -1 on success and 0 on failure.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" RIST255_QVALIDATE ``` @@ -7901,7 +7901,7 @@ RIST255_QVALIDATE Addition of two points on a curve. Returns -1 on success and 0 on failure.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" RIST255_QADD ``` @@ -7910,7 +7910,7 @@ RIST255_QADD Subtraction of two points on curve. Returns -1 on success and 0 on failure.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" RIST255_QSUB ``` @@ -7919,7 +7919,7 @@ RIST255_QSUB Multiplies point `x` by a scalar `n`. Any `n` is valid, including negative. Returns -1 on success and 0 on failure.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" RIST255_QMUL ``` @@ -7928,7 +7928,7 @@ RIST255_QMUL Multiplies the generator point `g` by a scalar `n`. Any `n` is valid, including negative.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" RIST255_QMULBASE ``` @@ -7937,7 +7937,7 @@ RIST255_QMULBASE Checks BLS signature, return true on success, false otherwise.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" BLS_VERIFY ``` @@ -7946,7 +7946,7 @@ BLS_VERIFY Aggregates signatures. `n>0`. Throw exception if `n=0` or if some `sig_i` is not a valid signature.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" BLS_AGGREGATE ``` @@ -7955,7 +7955,7 @@ BLS_AGGREGATE Checks aggregated BLS signature for keys `pk_1...pk_n` and message `msg`. Return true on success, false otherwise. Return false if `n=0`.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" BLS_FASTAGGREGATEVERIFY ``` @@ -7964,7 +7964,7 @@ BLS_FASTAGGREGATEVERIFY Checks aggregated BLS signature for key-message pairs `pk_1 msg_1...pk_n msg_n`. Return true on success, false otherwise. Return false if `n=0`.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" BLS_AGGREGATEVERIFY ``` @@ -7973,7 +7973,7 @@ BLS_AGGREGATEVERIFY Addition on G1.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" BLS_G1_ADD ``` @@ -7982,7 +7982,7 @@ BLS_G1_ADD Subtraction on G1.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" BLS_G1_SUB ``` @@ -7991,7 +7991,7 @@ BLS_G1_SUB Negation on G1.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" BLS_G1_NEG ``` @@ -8000,7 +8000,7 @@ BLS_G1_NEG Multiplies G1 point `x` by scalar `s`. Any `s` is valid, including negative.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" BLS_G1_MUL ``` @@ -8009,7 +8009,7 @@ BLS_G1_MUL Calculates `x_1*s_1+...+x_n*s_n` for G1 points `x_i` and scalars `s_i`. Returns zero point if `n=0`. Any `s_i` is valid, including negative.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" BLS_G1_MULTIEXP ``` @@ -8018,7 +8018,7 @@ BLS_G1_MULTIEXP Pushes zero point in G1.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" BLS_G1_ZERO ``` @@ -8027,7 +8027,7 @@ BLS_G1_ZERO Converts FP element `f` to a G1 point.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" BLS_MAP_TO_G1 ``` @@ -8036,7 +8036,7 @@ BLS_MAP_TO_G1 Checks that slice `x` represents a valid element of G1.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" BLS_G1_INGROUP ``` @@ -8045,7 +8045,7 @@ BLS_G1_INGROUP Checks that G1 point `x` is equal to zero.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" BLS_G1_ISZERO ``` @@ -8054,7 +8054,7 @@ BLS_G1_ISZERO Addition on G2.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" BLS_G2_ADD ``` @@ -8063,7 +8063,7 @@ BLS_G2_ADD Subtraction on G2.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" BLS_G2_SUB ``` @@ -8072,7 +8072,7 @@ BLS_G2_SUB Negation on G2.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" BLS_G2_NEG ``` @@ -8081,7 +8081,7 @@ BLS_G2_NEG Multiplies G2 point `x` by scalar `s`. Any `s` is valid, including negative.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" BLS_G2_MUL ``` @@ -8090,7 +8090,7 @@ BLS_G2_MUL Calculates `x_1*s_1+...+x_n*s_n` for G2 points `x_i` and scalars `s_i`. Returns zero point if `n=0`. Any `s_i` is valid, including negative.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" BLS_G2_MULTIEXP ``` @@ -8099,7 +8099,7 @@ BLS_G2_MULTIEXP Pushes zero point in G2.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" BLS_G2_ZERO ``` @@ -8108,7 +8108,7 @@ BLS_G2_ZERO Converts FP2 element `f` to a G2 point.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" BLS_MAP_TO_G2 ``` @@ -8117,7 +8117,7 @@ BLS_MAP_TO_G2 Checks that slice `x` represents a valid element of G2.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" BLS_G2_INGROUP ``` @@ -8126,7 +8126,7 @@ BLS_G2_INGROUP Checks that G2 point `x` is equal to zero.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" BLS_G2_ISZERO ``` @@ -8135,7 +8135,7 @@ BLS_G2_ISZERO Given G1 points `x_i` and G2 points `y_i`, calculates and multiply pairings of `x_i,y_i`. Returns true if the result is the multiplicative identity in FP12, false otherwise. Returns false if `n=0`.
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" BLS_PAIRING ``` @@ -8144,7 +8144,7 @@ BLS_PAIRING Pushes the order of G1 and G2 (approx. `2^255`).
**Category:** App Crypto (app_crypto)
-```fift Fift +```fift title="Fift" BLS_PUSHR ``` @@ -8153,7 +8153,7 @@ BLS_PUSHR Recursively computes the count of distinct cells `x`, data bits `y`, and cell references `z` in the dag rooted at _Cell_ `c`, effectively returning the total storage used by this dag taking into account the identification of equal cells. The values of `x`, `y`, and `z` are computed by a depth-first traversal of this dag, with a hash table of visited cell hashes used to prevent visits of already-visited cells. The total count of visited cells `x` cannot exceed non-negative _Integer_ `n`; otherwise the computation is aborted before visiting the `(n+1)`-st cell and a zero is returned to indicate failure. If `c` is _Null_, returns `x=y=z=0`.
**Category:** App Misc (app_misc)
-```fift Fift +```fift title="Fift" CDATASIZEQ ``` @@ -8162,7 +8162,7 @@ CDATASIZEQ A non-quiet version of `CDATASIZEQ` that throws a cell overflow exception (8) on failure.
**Category:** App Misc (app_misc)
-```fift Fift +```fift title="Fift" CDATASIZE ``` @@ -8171,7 +8171,7 @@ CDATASIZE Similar to `CDATASIZEQ`, but accepting a _Slice_ `s` instead of a _Cell_. The returned value of `x` does not take into account the cell that contains the slice `s` itself; however, the data bits and the cell references of `s` are accounted for in `y` and `z`.
**Category:** App Misc (app_misc)
-```fift Fift +```fift title="Fift" SDATASIZEQ ``` @@ -8180,7 +8180,7 @@ SDATASIZEQ A non-quiet version of `SDATASIZEQ` that throws a cell overflow exception (8) on failure.
**Category:** App Misc (app_misc)
-```fift Fift +```fift title="Fift" SDATASIZE ``` @@ -8189,7 +8189,7 @@ SDATASIZE Loads (deserializes) a `Gram` or `VarUInteger 16` amount from _Slice_ `s`, and returns the amount as _Integer_ `x` along with the remainder `s'` of `s`. The expected serialization of `x` consists of a 4-bit unsigned big-endian integer `l`, followed by an `8l`-bit unsigned big-endian representation of `x`.
The net effect is approximately equivalent to `4 LDU` `SWAP` `3 LSHIFT#` `LDUX`.
**Category:** App Currency (app_currency)
-```fift Fift +```fift title="Fift" LDGRAMS LDVARUINT16 ``` @@ -8199,7 +8199,7 @@ LDVARUINT16 Similar to `LDVARUINT16`, but loads a _signed_ _Integer_ `x`.
Approximately equivalent to `4 LDU` `SWAP` `3 LSHIFT#` `LDIX`.
**Category:** App Currency (app_currency)
-```fift Fift +```fift title="Fift" LDVARINT16 ``` @@ -8208,7 +8208,7 @@ LDVARINT16 Stores (serializes) an _Integer_ `x` in the range `0...2^120-1` into _Builder_ `b`, and returns the resulting _Builder_ `b'`. The serialization of `x` consists of a 4-bit unsigned big-endian integer `l`, which is the smallest integer `l>=0`, such that `x<2^(8l)`, followed by an `8l`-bit unsigned big-endian representation of `x`. If `x` does not belong to the supported range, a range check exception is thrown.
**Category:** App Currency (app_currency)
-```fift Fift +```fift title="Fift" STGRAMS STVARUINT16 ``` @@ -8218,7 +8218,7 @@ STVARUINT16 Similar to `STVARUINT16`, but serializes a _signed_ _Integer_ `x` in the range `-2^119...2^119-1`.
**Category:** App Currency (app_currency)
-```fift Fift +```fift title="Fift" STVARINT16 ``` @@ -8227,7 +8227,7 @@ STVARINT16 Loads (deserializes) a `VarUInteger 32` amount from _Slice_ `s`, and returns the amount as _Integer_ `x` along with the remainder `s'` of `s`. The expected serialization of `x` consists of a 5-bit unsigned big-endian integer `l`, followed by an `8l`-bit unsigned big-endian representation of `x`.
The net effect is approximately equivalent to `4 LDU` `SWAP` `3 LSHIFT#` `LDUX`.
**Category:** App Currency (app_currency)
-```fift Fift +```fift title="Fift" LDVARUINT32 ``` @@ -8236,7 +8236,7 @@ LDVARUINT32 Similar to `LDVARUINT32`, but loads a _signed_ _Integer_ `x`.
Approximately equivalent to `5 LDU` `SWAP` `3 LSHIFT#` `LDIX`.
**Category:** App Currency (app_currency)
-```fift Fift +```fift title="Fift" LDVARINT32 ``` @@ -8245,7 +8245,7 @@ LDVARINT32 Stores (serializes) an _Integer_ `x` in the range `0...2^248-1` into _Builder_ `b`, and returns the resulting _Builder_ `b'`. The serialization of `x` consists of a 5-bit unsigned big-endian integer `l`, which is the smallest integer `l>=0`, such that `x<2^(8l)`, followed by an `8l`-bit unsigned big-endian representation of `x`. If `x` does not belong to the supported range, a range check exception is thrown.
**Category:** App Currency (app_currency)
-```fift Fift +```fift title="Fift" STVARUINT32 ``` @@ -8254,7 +8254,7 @@ STVARUINT32 Similar to `STVARUINT32`, but serializes a _signed_ _Integer_ `x` in the range `-2^247...2^247-1`.
**Category:** App Currency (app_currency)
-```fift Fift +```fift title="Fift" STVARINT32 ``` @@ -8263,7 +8263,7 @@ STVARINT32 Loads from _Slice_ `s` the only prefix that is a valid `MsgAddress`, and returns both this prefix `s'` and the remainder `s''` of `s` as slices.
**Category:** App Addr (app_addr)
-```fift Fift +```fift title="Fift" LDMSGADDR ``` @@ -8272,7 +8272,7 @@ LDMSGADDR A quiet version of `LDMSGADDR`: on success, pushes an extra `-1`; on failure, pushes the original `s` and a zero.
**Category:** App Addr (app_addr)
-```fift Fift +```fift title="Fift" LDMSGADDRQ ``` @@ -8281,7 +8281,7 @@ LDMSGADDRQ Decomposes _Slice_ `s` containing a valid `MsgAddress` into a _Tuple_ `t` with separate fields of this `MsgAddress`. If `s` is not a valid `MsgAddress`, a cell deserialization exception is thrown.
**Category:** App Addr (app_addr)
-```fift Fift +```fift title="Fift" PARSEMSGADDR ``` @@ -8290,7 +8290,7 @@ PARSEMSGADDR A quiet version of `PARSEMSGADDR`: returns a zero on error instead of throwing an exception.
**Category:** App Addr (app_addr)
-```fift Fift +```fift title="Fift" PARSEMSGADDRQ ``` @@ -8299,7 +8299,7 @@ PARSEMSGADDRQ Parses _Slice_ `s` containing a valid `MsgAddressInt` (usually a `msg_addr_std`), applies rewriting from the `anycast` (if present) to the same-length prefix of the address, and returns both the workchain `x` and the 256-bit address `y` as integers. If the address is not 256-bit, or if `s` is not a valid serialization of `MsgAddressInt`, throws a cell deserialization exception.
**Category:** App Addr (app_addr)
-```fift Fift +```fift title="Fift" REWRITESTDADDR ``` @@ -8308,7 +8308,7 @@ REWRITESTDADDR A quiet version of primitive `REWRITESTDADDR`.
**Category:** App Addr (app_addr)
-```fift Fift +```fift title="Fift" REWRITESTDADDRQ ``` @@ -8317,7 +8317,7 @@ REWRITESTDADDRQ `msg_addr_var` not allowed since TVM v10, so it behaves like `REWRITESTDADDR`, but returns account id in `Slice`, not `Integer`: parses address `s` into workchain `x` and account id `s`.
**Category:** App Addr (app_addr)
-```fift Fift +```fift title="Fift" REWRITEVARADDR ``` @@ -8326,7 +8326,7 @@ REWRITEVARADDR A quiet version of primitive `REWRITEVARADDR`.
**Category:** App Addr (app_addr)
-```fift Fift +```fift title="Fift" REWRITEVARADDRQ ``` @@ -8335,7 +8335,7 @@ REWRITEVARADDRQ Loads `addr_std$10`, if address is not `addr_std`, throws an error 9 (`cannot load a MsgAddressInt`).
**Category:** App Addr (app_addr)
-```fift Fift +```fift title="Fift" LDSTDADDR ``` @@ -8344,7 +8344,7 @@ LDSTDADDR A quiet version of primitive `LDSTDADDR`.
**Category:** App Addr (app_addr)
-```fift Fift +```fift title="Fift" LDSTDADDRQ ``` @@ -8353,7 +8353,7 @@ LDSTDADDRQ Loads `addr_std$10` or `addr_none$00`, if address is `addr_none$00` pushes a Null, if address is not `addr_std` or `addr_none`, throws an error 9 (`cannot load a MsgAddressInt`).
**Category:** App Addr (app_addr)
-```fift Fift +```fift title="Fift" LDOPTSTDADDR ``` @@ -8362,7 +8362,7 @@ LDOPTSTDADDR A quiet version of primitive `LDOPTSTDADDR`.
**Category:** App Addr (app_addr)
-```fift Fift +```fift title="Fift" LDOPTSTDADDRQ ``` @@ -8371,7 +8371,7 @@ LDOPTSTDADDRQ Stores `addr_std$10`, if address is not `addr_std`, throws an error 9 (`cannot load a MsgAddressInt`).
**Category:** App Addr (app_addr)
-```fift Fift +```fift title="Fift" STSTDADDR ``` @@ -8380,7 +8380,7 @@ STSTDADDR A quiet version of primitive `STSTDADDR`.
**Category:** App Addr (app_addr)
-```fift Fift +```fift title="Fift" STSTDADDRQ ``` @@ -8389,7 +8389,7 @@ STSTDADDRQ stores `addr_std$10` or Null. Null is stored as `addr_none$00`, if address is not `addr_std`, throws an error 9 (`cannot load a MsgAddressInt`).
**Category:** App Addr (app_addr)
-```fift Fift +```fift title="Fift" STOPTSTDADDR ``` @@ -8398,7 +8398,7 @@ STOPTSTDADDR A quiet version of primitive `STOPTSTDADDR`.
**Category:** App Addr (app_addr)
-```fift Fift +```fift title="Fift" STOPTSTDADDRQ ``` @@ -8407,7 +8407,7 @@ STOPTSTDADDRQ Sends a raw message contained in _Cell `c`_, which should contain a correctly serialized object `Message X`, with the only exception that the source address is allowed to have dummy value `addr_none` (to be automatically replaced with the current smart-contract address), and `ihr_fee`, `fwd_fee`, `created_lt` and `created_at` fields can have arbitrary values (to be rewritten with correct values during the action phase of the current transaction). Integer parameter `x` contains the flags. Currently `x=0` is used for ordinary messages; `x=128` is used for messages that are to carry all the remaining balance of the current smart contract (instead of the value originally indicated in the message); `x=64` is used for messages that carry all the remaining value of the inbound message in addition to the value initially indicated in the new message (if bit 0 is not set, the gas fees are deducted from this amount); `x'=x+1` means that the sender wants to pay transfer fees separately; `x'=x+2` means that any errors arising while processing this message during the action phase should be ignored. Finally, `x'=x+32` means that the current account must be destroyed if its resulting balance is zero. This flag is usually employed together with `+128`.
**Category:** App Actions (app_actions)
-```fift Fift +```fift title="Fift" SENDRAWMSG ``` @@ -8416,7 +8416,7 @@ SENDRAWMSG Creates an output action which would reserve exactly `x` nanograms (if `y=0`), at most `x` nanograms (if `y=2`), or all but `x` nanograms (if `y=1` or `y=3`), from the remaining balance of the account. It is roughly equivalent to creating an outbound message carrying `x` nanograms (or `b-x` nanograms, where `b` is the remaining balance) to oneself, so that the subsequent output actions would not be able to spend more money than the remainder. Bit `+2` in `y` means that the external action does not fail if the specified amount cannot be reserved; instead, all remaining balance is reserved. Bit `+8` in `y` means `x:=-x` before performing any further actions. Bit `+4` in `y` means that `x` is increased by the original balance of the current account (before the compute phase), including all extra currencies, before performing any other checks and actions. Currently `x` must be a non-negative integer, and `y` must be in the range `0...15`.
**Category:** App Actions (app_actions)
-```fift Fift +```fift title="Fift" RAWRESERVE ``` @@ -8425,7 +8425,7 @@ RAWRESERVE Similar to `RAWRESERVE`, but also accepts a dictionary `D` (represented by a _Cell_ or _Null_) with extra currencies. In this way currencies other than Grams can be reserved.
**Category:** App Actions (app_actions)
-```fift Fift +```fift title="Fift" RAWRESERVEX ``` @@ -8434,7 +8434,7 @@ RAWRESERVEX Creates an output action that would change this smart contract code to that given by _Cell_ `c`. Notice that this change will take effect only after the successful termination of the current run of the smart contract.
**Category:** App Actions (app_actions)
-```fift Fift +```fift title="Fift" SETCODE ``` @@ -8443,7 +8443,7 @@ SETCODE Creates an output action that would modify the collection of this smart contract libraries by adding or removing library with code given in _Cell_ `c`. If `x=0`, the library is actually removed if it was previously present in the collection (if not, this action does nothing). If `x=1`, the library is added as a private library, and if `x=2`, the library is added as a public library (and becomes available to all smart contracts if the current smart contract resides in the masterchain); if the library was present in the collection before, its public/private status is changed according to `x`. Values of `x` other than `0...2` are invalid.
**Category:** App Actions (app_actions)
-```fift Fift +```fift title="Fift" SETLIBCODE ``` @@ -8452,7 +8452,7 @@ SETLIBCODE Creates an output action similarly to `SETLIBCODE`, but instead of the library code accepts its hash as an unsigned 256-bit integer `h`. If `x!=0` and the library with hash `h` is absent from the library collection of this smart contract, this output action will fail.
**Category:** App Actions (app_actions)
-```fift Fift +```fift title="Fift" CHANGELIB ``` @@ -8461,7 +8461,7 @@ CHANGELIB Creates an output action and returns a fee for creating a message. Mode has the same effect as in the case of `SENDRAWMSG`. Additionally `+1024` means - do not create an action, only estimate fee. Other modes affect the fee calculation as follows: `+64` substitutes the entire balance of the incoming message as an outcoming value (slightly inaccurate, gas expenses that cannot be estimated before the computation is completed are not taken into account), `+128` substitutes the value of the entire balance of the contract before the start of the computation phase (slightly inaccurate, since gas expenses that cannot be estimated before the completion of the computation phase are not taken into account).
**Category:** App Actions (app_actions)
-```fift Fift +```fift title="Fift" SENDMSG ``` @@ -8470,7 +8470,7 @@ SENDMSG
**Category:** Debug (debug)
-```fift Fift +```fift title="Fift" {i*16+j} DEBUG ``` @@ -8487,7 +8487,7 @@ SENDMSG `0 <= n < 16`. Length of `ssss` is `n+1` bytes.
`{string}` is a [string literal](https://github.com/Piterden/TON-docs/blob/master/Fift.%20A%20Brief%20Introduction.md#user-content-29-string-literals).
`DEBUGSTR`: `ssss` is the given string.
`DEBUGSTRI`: `ssss` is one-byte integer `0 <= x <= 255` followed by the given string.
**Category:** Debug (debug)
-```fift Fift +```fift title="Fift" {string} DEBUGSTR {string} {x} DEBUGSTRI ``` @@ -8497,7 +8497,7 @@ SENDMSG Selects TVM codepage `0 <= nn < 240`. If the codepage is not supported, throws an invalid opcode exception.
**Category:** Codepage (codepage)
-```fift Fift +```fift title="Fift" [nn] SETCP ``` @@ -8510,7 +8510,7 @@ Selects TVM codepage `0 <= nn < 240`. If the codepage is not supported, throws a Selects TVM codepage `z-16` for `1 <= z <= 15`. Negative codepages `-13...-1` are reserved for restricted versions of TVM needed to validate runs of TVM in other codepages. Negative codepage `-14` is reserved for experimental codepages, not necessarily compatible between different TVM implementations, and should be disabled in the production versions of TVM.
**Category:** Codepage (codepage)
-```fift Fift +```fift title="Fift" [z-16] SETCP ``` @@ -8519,7 +8519,7 @@ Selects TVM codepage `z-16` for `1 <= z <= 15`. Negative codepages `-13...-1` ar Selects codepage `c` with `-2^15 <= c < 2^15` passed in the top of the stack.
**Category:** Codepage (codepage)
-```fift Fift +```fift title="Fift" SETCPX ``` diff --git a/content/tvm/meta.json b/content/tvm/meta.json new file mode 100644 index 000000000..912f7466e --- /dev/null +++ b/content/tvm/meta.json @@ -0,0 +1,16 @@ +{ + "$schema": "../../meta-schema.json", + "title": "TVM: TON Virtual Machine", + "pages": [ + "overview", + "tools", + "instructions", + "builders-and-slices", + "continuations", + "registers", + "gas", + "initialization", + "exit-codes", + "get-method" + ] +} diff --git a/content/tvm/overview.mdx b/content/tvm/overview.mdx index 5f391d89d..b704a0f35 100644 --- a/content/tvm/overview.mdx +++ b/content/tvm/overview.mdx @@ -64,7 +64,7 @@ When an account with this code gets an internal message, TVM stack [is initializ In `Current stack` comments, we represent stack at that moment of execution, keeping its top to the right (e.g., `s2 s1 s0`, where `s0` is the top of the stack). -```fift Fift +```fift title="Fift" <{ // Current stack: msg_body selector diff --git a/content/tvm/registers.mdx b/content/tvm/registers.mdx index edeee52f4..53db7570f 100644 --- a/content/tvm/registers.mdx +++ b/content/tvm/registers.mdx @@ -41,7 +41,7 @@ Invoked by [`CALLDICT`](/tvm/instructions#f0nn-calldict) instruction with a func Fift-ASM assembler constructs following function selector ([`Asm.fif`:1624](https://github.com/ton-blockchain/ton/blob/4ebd7412c52248360464c2df5f434c8aaa3edfe1/crypto/fift/lib/Asm.fif#L1624)): -```fift Fift +```fift title=Fift" SETCP0 <{ // a dictionary which maps 19-bit function id (integer) => function code (slice) diff --git a/content/tvm/tools/meta.json b/content/tvm/tools/meta.json new file mode 100644 index 000000000..84e747585 --- /dev/null +++ b/content/tvm/tools/meta.json @@ -0,0 +1,10 @@ +{ + "$schema": "../../../meta-schema.json", + "title": "Tools", + "pages": [ + "txtracer", + "retracer", + "tvm-explorer", + "ton-decompiler" + ] +} diff --git a/docs.json b/docs.json index db8d202b0..53c9fd212 100644 --- a/docs.json +++ b/docs.json @@ -516,9 +516,9 @@ { "group": "Testing", "pages": [ - "contract-dev/testing/overview", - "contract-dev/testing/style-guide", - "contract-dev/testing/reference" + "contract-dev/blueprint/testing/overview", + "contract-dev/blueprint/testing/style-guide", + "contract-dev/blueprint/testing/reference" ] }, "contract-dev/blueprint/debug", @@ -794,8 +794,7 @@ "languages/func/changelog", "languages/func/known-issues" ] - }, - "languages/tact" + } ] }, { @@ -1285,6 +1284,11 @@ "destination": "https://docs.tact-lang.org", "permanent": true }, + { + "source": "/languages/tact", + "destination": "https://docs.tact-lang.org", + "permanent": true + }, { "source": "/v3/documentation/dapps/dapps-overview", "destination": "/", @@ -1735,19 +1739,34 @@ "destination": "/foundations/fees", "permanent": true }, + { + "source": "/contract-dev/testing/overview", + "destination": "/contract-dev/blueprint/testing/overview", + "permanent": true + }, + { + "source": "/contract-dev/testing/style-guide", + "destination": "/contract-dev/blueprint/testing/style-guide", + "permanent": true + }, + { + "source": "/contract-dev/testing/reference", + "destination": "/contract-dev/blueprint/testing/reference", + "permanent": true + }, { "source": "/guidelines/testing", - "destination": "/contract-dev/testing/overview", + "destination": "/contract-dev/blueprint/testing/overview", "permanent": true }, { "source": "/v3/guidelines/smart-contracts/testing/overview", - "destination": "/contract-dev/testing/overview", + "destination": "/contract-dev/blueprint/testing/overview", "permanent": true }, { "source": "/v3/guidelines/smart-contracts/testing/tonstarter", - "destination": "/contract-dev/testing/overview", + "destination": "/contract-dev/blueprint/testing/overview", "permanent": true }, { @@ -1757,7 +1776,7 @@ }, { "source": "/v3/guidelines/smart-contracts/testing/writing-test-examples", - "destination": "/contract-dev/testing/overview", + "destination": "/contract-dev/blueprint/testing/overview", "permanent": true }, { diff --git a/extra.css b/extra.css index a1c8fbe4c..64d4f787c 100644 --- a/extra.css +++ b/extra.css @@ -6,14 +6,6 @@ span.method-nav-pill { /* or 3rem */ } -/* Prevent word breaks in inline code items in tables */ -td>code, -td>em>code, -td>strong>code, -td>a>code { - white-space: nowrap; -} - /* Make links not bold */ .link { font-weight: 400; @@ -25,53 +17,29 @@ td>a>code { padding-bottom: 3px; } -.link>code { +.link > code { border-bottom-left-radius: 0; border-bottom-right-radius: 0; text-decoration: none; } -/* Fix Mermaid's Sankey diagrams for both themes */ - -svg[aria-roledescription="sankey"]>g.links>g.link { - mix-blend-mode: normal !important; -} - -/* A style to hide scrollbar for Chrome, Safari and Opera */ -.no-scrollbar::-webkit-scrollbar { - display: none; -} - -/* A class to hide scrollbar for IE, Edge and Firefox */ -.no-scrollbar { - /* IE and Edge */ - -ms-overflow-style: none; - /* Firefox */ - scrollbar-width: none; -} - /* Sticky table headers */ table { overflow: unset !important; } -thead>tr>th { +thead > tr > th { position: sticky; top: 0; background: rgb(var(--background-light)); } -html.dark thead>tr>th { +html.dark thead > tr > th { background: rgb(var(--background-dark)); } -/* Tabular numbers for better alignment in tables */ -table { - font-variant-numeric: tabular-nums; -} - /* Reduction of bottom margins for code blocks as last items of - - ); } @@ -1366,10 +1394,10 @@ export const TvmInstructionTable = () => { const [spec, setSpec] = useState(null); const [error, setError] = useState(null); const [loading, setLoading] = useState(true); - const [search, setSearch] = useState(""); - const [category, setCategory] = useState("All"); - const [subcategory, setSubcategory] = useState("All"); - const [sortMode, setSortMode] = useState("opcode"); + const [search, setSearch] = useState(''); + const [category, setCategory] = useState('All'); + const [subcategory, setSubcategory] = useState('All'); + const [sortMode, setSortMode] = useState('opcode'); const [expanded, setExpanded] = useState({}); const [copied, setCopied] = useState({}); const [activeAnchorId, setActiveAnchorId] = useState(null); @@ -1380,13 +1408,28 @@ export const TvmInstructionTable = () => { const tableStyles = useMemo( () => ` .tvm-instruction-app { - --tvm-border: var(--mint-border-color, rgb(var(--gray-400) / 0.24)); - --tvm-border-strong: rgb(var(--gray-400) / 0.32); - --tvm-surface: var(--mint-surface-elevated, rgb(var(--background-light))); - --tvm-surface-secondary: rgb(var(--gray-50) / 0.65); - --tvm-text-primary: var(--mint-text-primary, rgb(var(--gray-800))); - --tvm-text-secondary: var(--mint-text-secondary, rgb(var(--gray-600) / 0.85)); - --tvm-text-muted: var(--mint-text-tertiary, rgb(var(--gray-400) / 0.68)); + --gray-50: 249 250 251; + --gray-100: 243 244 246; + --gray-200: 229 231 235; + --gray-300: 209 213 219; + --gray-400: 156 163 175; + --gray-600: 75 85 99; + --gray-700: 55 65 81; + --gray-800: 31 41 55; + --gray-900: 17 24 39; + --gray-950: 9 14 26; + --primary: 0 152 234; + --primary-light: 92 196 247; + --primary-dark: 0 116 182; + --background-light: 255 255 255; + + --tvm-border: var(--color-fd-border); + --tvm-border-strong: rgb(var(--color-fd-border) / 0.32); + --tvm-surface: var(--color-fd-background); + --tvm-surface-secondary: var(--color-fd-card); + --tvm-text-primary: var(--color-fd-foreground); + --tvm-text-secondary: var(--color-fd-muted-foreground); + --tvm-text-muted: var(--color-fd-muted-foreground); --tvm-accent: rgb(var(--primary)); --tvm-accent-soft: rgb(var(--primary) / 0.16); --tvm-accent-strong: rgb(var(--primary-light)); @@ -1403,29 +1446,44 @@ export const TvmInstructionTable = () => { --tvm-stack-conditional-bg: rgb(var(--primary-dark) / 0.22); --tvm-stack-conditional-text: var(--tvm-accent-subtle); --tvm-stack-conditional-border: rgb(var(--primary-dark) / 0.32); - --tvm-stack-label: var(--mint-text-tertiary, rgb(var(--gray-600) / 0.65)); + --tvm-stack-label: rgb(var(--gray-600) / 0.65); --tvm-pill-muted-bg: rgb(var(--gray-400) / 0.12); - --tvm-row-padding-y: 0.85rem; - --tvm-row-padding-x: 1rem; + --tvm-row-padding-y: 0.5rem; + --tvm-row-padding-x: 0.75rem; --tvm-chip-padding-y: 0.2rem; --tvm-chip-padding-x: 0.6rem; --tvm-control-height: 2.75rem; color: var(--tvm-text-primary); - background: var(--tvm-surface); - border: 1px solid var(--tvm-border); - border-radius: 14px; - padding: 1.5rem; - box-shadow: 0 24px 60px -40px rgb(var(--gray-900) / 0.9); + background: transparent; + border: none; + border-radius: 0; + padding: 0; + box-shadow: none; } :where(.dark) .tvm-instruction-app { + --gray-50: 24 24 27; + --gray-100: 244 244 245; + --gray-200: 63 63 70; + --gray-300: 82 82 91; + --gray-400: 161 161 170; + --gray-600: 212 212 216; + --gray-700: 228 228 231; + --gray-800: 39 39 42; + --gray-900: 24 24 27; + --gray-950: 14 14 16; + --primary: 92 196 247; + --primary-light: 140 210 252; + --primary-dark: 0 152 234; + --background-light: 14 14 16; + --tvm-border: rgb(var(--gray-800) / 0.65); --tvm-border-strong: rgb(var(--gray-600) / 0.85); --tvm-surface: rgb(var(--gray-950)); --tvm-surface-secondary: rgb(var(--gray-900) / 0.85); --tvm-text-primary: rgb(var(--gray-100)); - --tvm-text-secondary: rgb(var(--gray-300)); - --tvm-text-muted: rgb(var(--gray-400) / 0.9); + --tvm-text-secondary: rgb(var(--gray-400)); + --tvm-text-muted: rgb(var(--gray-400) / 0.7); --tvm-accent: rgb(var(--primary-light)); --tvm-accent-soft: rgb(var(--primary) / 0.22); --tvm-accent-strong: rgb(var(--primary)); @@ -1438,21 +1496,20 @@ export const TvmInstructionTable = () => { --tvm-stack-const-bg: rgb(var(--primary-dark) / 0.4); --tvm-stack-const-text: rgb(var(--primary-light)); --tvm-stack-array-bg: rgb(var(--primary) / 0.25); - --tvm-stack-array-text: rgb(var(--gray-50)); + --tvm-stack-array-text: var(--tvm-text-primary); --tvm-stack-conditional-bg: rgb(var(--primary-dark) / 0.38); --tvm-stack-conditional-text: rgb(var(--primary-light)); --tvm-stack-conditional-border: rgb(var(--primary) / 0.5); --tvm-stack-label: rgb(var(--gray-400) / 0.85); --tvm-pill-muted-bg: rgb(var(--gray-800) / 0.85); - box-shadow: 0 24px 80px -60px rgb(0 0 0 / 0.65); color-scheme: dark; } .tvm-instruction-toolbar { display: flex; flex-direction: column; - gap: 1rem; - margin-bottom: 1.25rem; + gap: 0.75rem; + margin-bottom: 0.85rem; } .tvm-toolbar-search { @@ -1549,6 +1606,30 @@ export const TvmInstructionTable = () => { min-height: var(--tvm-control-height); } +.tvm-field select { + cursor: pointer; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + padding-right: 2rem; +} + +.tvm-select { + position: relative; + display: block; +} + +.tvm-select-chevron { + position: absolute; + top: 50%; + right: 8px; + transform: translateY(-50%); + width: 14px; + height: 14px; + color: var(--tvm-text-muted); + pointer-events: none; +} + .tvm-field--search { min-width: min(260px, 100%); } @@ -1563,6 +1644,11 @@ export const TvmInstructionTable = () => { padding-left: 2.2rem; } +.tvm-field--search input::placeholder { + color: var(--tvm-text-secondary); + opacity: 1; +} + .tvm-search-icon { position: absolute; left: 0.75rem; @@ -1654,7 +1740,7 @@ export const TvmInstructionTable = () => { } .tvm-instruction-meta { - margin-bottom: 1rem; + margin-bottom: 0.65rem; font-size: 0.85rem; color: var(--tvm-text-secondary); display: flex; @@ -1739,10 +1825,10 @@ export const TvmInstructionTable = () => { } .tvm-spec-grid-container { - border: 1px solid var(--tvm-border); + border: 1px solid rgb(var(--gray-400) / 0.14); border-radius: 12px; background: var(--tvm-surface-secondary); - box-shadow: inset 0 1px 0 rgb(var(--gray-400) / 0.08); + overflow: hidden; } .tvm-spec-grid-scroll { @@ -1760,51 +1846,57 @@ export const TvmInstructionTable = () => { .tvm-spec-header, .tvm-spec-row { - --tvm-grid-template: 60px 110px 260px minmax(320px, 2fr); + --tvm-grid-template: 110px 260px minmax(320px, 2fr); display: grid; grid-template-columns: var(--tvm-grid-template); - min-width: 860px; + min-width: 700px; } .tvm-spec-header { - background: rgb(var(--gray-400) / 0.12); + background: rgb(var(--gray-400) / 0.06); text-transform: uppercase; letter-spacing: 0.08em; - font-size: 0.7rem; - color: var(--tvm-text-secondary); + font-size: 0.68rem; + color: var(--tvm-text-muted); } :where(.dark) .tvm-instruction-app .tvm-spec-header { - background: rgb(var(--gray-800) / 0.65); + background: rgb(var(--gray-800) / 0.35); color: var(--tvm-text-muted); } .tvm-spec-header > div { - padding: calc(var(--tvm-row-padding-y) - 0.1rem) var(--tvm-row-padding-x); - font-weight: 600; + padding: 0.4rem var(--tvm-row-padding-x); + font-weight: 500; +} + +.tvm-spec-header > div:first-child { + text-align: center; } .tvm-spec-row { - border-top: 1px solid var(--tvm-border); + border-top: 1px solid rgb(var(--gray-400) / 0.12); transition: background 0.2s ease-in-out; cursor: pointer; align-items: center; } -.tvm-spec-row:hover { - background: rgb(var(--primary) / 0.08); -} +@media (hover: hover) { + .tvm-spec-row:not(.tvm-spec-row--detail):hover { + background: rgb(var(--primary) / 0.04); + } -.tvm-spec-row.is-expanded { - background: rgb(var(--primary) / 0.12); + :where(.dark) .tvm-instruction-app .tvm-spec-row:not(.tvm-spec-row--detail):hover { + background: rgb(var(--primary) / 0.1); + } } -:where(.dark) .tvm-instruction-app .tvm-spec-row:hover { - background: rgb(var(--primary) / 0.18); +.tvm-spec-row.is-expanded { + background: rgb(var(--primary) / 0.06); } :where(.dark) .tvm-instruction-app .tvm-spec-row.is-expanded { - background: rgb(var(--primary) / 0.26); + background: rgb(var(--primary) / 0.14); } .tvm-spec-row.is-anchor-target { @@ -1826,7 +1918,7 @@ export const TvmInstructionTable = () => { padding: var(--tvm-row-padding-y) var(--tvm-row-padding-x); display: flex; flex-direction: column; - gap: 0.35rem; + gap: 0.5rem; min-width: 0; color: var(--tvm-text-primary); } @@ -1836,58 +1928,60 @@ export const TvmInstructionTable = () => { } .tvm-spec-cell--opcode { - font-family: 'JetBrains Mono', 'Menlo', 'Monaco', monospace; + font-family: monospace; font-size: 0.85rem; justify-content: center; align-items: center; + overflow: hidden; } -.tvm-spec-cell--anchor { - justify-content: center; - align-items: center; +.tvm-spec-cell--opcode code { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + max-width: 100%; } .tvm-spec-cell--name { gap: 0.4rem; -} - -.tvm-name-line { - position: relative; + overflow: hidden; } .tvm-copy-link { display: inline-flex; align-items: center; justify-content: center; - width: 22px; - height: 22px; - border-radius: 6px; - border: 1px solid var(--tvm-border); - background: var(--tvm-surface-secondary); - color: var(--tvm-text-secondary); + width: 1em; + height: 1em; + border-radius: 4px; + border: none; + background: transparent; + color: var(--tvm-text-muted); cursor: pointer; + transition: color 0.15s ease-in-out; + flex-shrink: 0; + font-size: 1.15rem; } .tvm-copy-link:hover { - border-color: var(--tvm-border-strong); + color: var(--tvm-accent-strong); } .tvm-copy-link svg { - width: 14px; - height: 14px; + width: 1em; + height: 1em; } .tvm-copy-link.is-copied { - border-color: var(--tvm-accent-strong); - background: var(--tvm-accent-soft); + opacity: 1; color: var(--tvm-accent-strong); } .tvm-name-line { display: flex; - align-items: baseline; + align-items: center; flex-wrap: wrap; - gap: 0.5rem; + gap: 0.3rem; } .tvm-row-indicator { @@ -1923,15 +2017,19 @@ export const TvmInstructionTable = () => { } .tvm-mnemonic { - font-family: 'JetBrains Mono', 'Menlo', 'Monaco', monospace; + font-family: monospace; font-size: 1rem; font-weight: 600; color: var(--tvm-text-primary); - white-space: pre; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + min-width: 0; + max-width: 100%; } .tvm-spec-cell--gas { - font-family: 'JetBrains Mono', 'Menlo', 'Monaco', monospace; + font-family: monospace; font-size: 0.85rem; justify-content: center; color: var(--tvm-text-secondary); @@ -1948,11 +2046,17 @@ export const TvmInstructionTable = () => { .tvm-description { font-size: 0.92rem; line-height: 1.45; - color: var(--tvm-text-secondary); + color: var(--tvm-text-muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; + overflow-wrap: anywhere; +} + +.tvm-description code { + white-space: normal; + overflow-wrap: anywhere; } .tvm-description-meta { @@ -1961,23 +2065,31 @@ export const TvmInstructionTable = () => { gap: 0.35rem; } +.tvm-opcode-chip { + display: none; +} + .tvm-category-pill { display: inline-flex; align-items: center; - padding: 0.2rem 0.55rem; - border-radius: 999px; + padding: 0.5rem; + border-radius: 16px; background: var(--tvm-accent-soft); color: var(--tvm-accent-subtle); - font-size: 0.72rem; + font-size: 0.75rem; + font-weight: 600; + line-height: 1; letter-spacing: 0.03em; } .tvm-inline-badge { display: inline-flex; align-items: center; - padding: 0.18rem 0.45rem; - border-radius: 999px; - font-size: 0.7rem; + padding: 0.5rem; + border-radius: 16px; + font-size: 0.65rem; + font-weight: 600; + line-height: 1; letter-spacing: 0.05em; text-transform: uppercase; background: var(--tvm-accent-soft); @@ -1992,7 +2104,7 @@ export const TvmInstructionTable = () => { .tvm-fift { font-size: 0.78rem; color: var(--tvm-text-secondary); - font-family: 'JetBrains Mono', 'Menlo', 'Monaco', monospace; + font-family: monospace; } .tvm-operands { @@ -2009,8 +2121,11 @@ export const TvmInstructionTable = () => { border: 1px solid var(--tvm-border); background: var(--tvm-pill-muted-bg); font-size: 0.72rem; - font-family: 'JetBrains Mono', 'Menlo', 'Monaco', monospace; - color: var(--tvm-text-secondary); + font-family: monospace; + color: var(--tvm-text-muted); + max-width: 100%; + white-space: normal; + overflow-wrap: anywhere; } .tvm-stack-columns { @@ -2057,8 +2172,11 @@ export const TvmInstructionTable = () => { padding: 0.18rem 0.45rem; border-radius: 6px; font-size: 0.75rem; - font-family: 'JetBrains Mono', 'Menlo', 'Monaco', monospace; + font-family: monospace; width: fit-content; + max-width: 100%; + white-space: normal; + overflow-wrap: anywhere; } .tvm-instruction-app.is-density-compact .tvm-stack-pill { @@ -2103,7 +2221,7 @@ export const TvmInstructionTable = () => { .tvm-stack-footnote { display: inline-block; - font-family: 'JetBrains Mono', 'Menlo', 'Monaco', monospace; + font-family: monospace; font-size: 0.75rem; background: rgb(var(--gray-200) / 0.12); border: 1px solid var(--tvm-border); @@ -2172,16 +2290,10 @@ export const TvmInstructionTable = () => { } .tvm-detail-panel { - background: var(--tvm-surface); - border: 1px solid var(--tvm-border); - border-radius: 14px; - padding: 1rem 1.15rem 1.25rem; - box-shadow: 0 18px 40px -30px rgb(var(--gray-900) / 0.7); -} - -.tvm-detail-panel.is-anchor-target { - border-color: var(--tvm-accent-strong); - box-shadow: 0 0 0 2px var(--tvm-accent-soft), 0 18px 40px -30px rgb(var(--gray-900) / 0.7); + padding: 0.5rem 0.5rem; + border: none; + border-radius: 0; + box-shadow: none; } .tvm-detail-header { @@ -2195,7 +2307,7 @@ export const TvmInstructionTable = () => { .tvm-detail-header-main { display: flex; - align-items: baseline; + align-items: center; gap: 0.45rem; flex-wrap: wrap; } @@ -2262,7 +2374,7 @@ export const TvmInstructionTable = () => { } .tvm-register-token { - font-family: 'JetBrains Mono', 'Menlo', 'Monaco', monospace; + font-family: monospace; font-size: 0.82rem; color: var(--tvm-text-primary); } @@ -2329,10 +2441,11 @@ export const TvmInstructionTable = () => { .tvm-detail-code { display: block; - font-family: 'JetBrains Mono', 'Menlo', 'Monaco', monospace; + font-family: monospace; font-size: 0.78rem; line-height: 1.45; white-space: pre-wrap; + overflow-wrap: anywhere; background: rgb(var(--gray-200) / 0.08); border: 1px solid var(--tvm-border); border-radius: 8px; @@ -2342,6 +2455,10 @@ export const TvmInstructionTable = () => { max-width: 100%; } +:where(.dark) .tvm-instruction-app .tvm-detail-code { + background: rgb(var(--gray-900) / 0.6); +} + .tvm-detail-code--inline { display: block; padding: 0.5rem 0.6rem; @@ -2366,7 +2483,7 @@ export const TvmInstructionTable = () => { flex-direction: column; gap: 0.5rem; background: var(--tvm-surface-secondary); - border: 1px solid rgb(var(--gray-400) / 0.3); + border: 1px solid var(--tvm-border); border-radius: 12px; padding: 0.85rem 0.95rem; } @@ -2396,7 +2513,7 @@ export const TvmInstructionTable = () => { flex-direction: column; gap: 0.55rem; background: var(--tvm-surface-secondary); - border: 1px solid rgb(var(--gray-400) / 0.3); + border: 1px solid var(--tvm-border); border-radius: 12px; padding: 0.85rem 0.95rem; margin-bottom: 0.9rem; @@ -2413,8 +2530,8 @@ export const TvmInstructionTable = () => { } .tvm-operands-item { - background: var(--tvm-surface); - border: 1px solid rgb(var(--gray-400) / 0.25); + background: var(--tvm-surface-secondary); + border: 1px solid var(--tvm-border); border-radius: 10px; padding: 0.65rem 0.75rem; display: flex; @@ -2509,7 +2626,7 @@ export const TvmInstructionTable = () => { } .tvm-modal-subtitle code { - font-family: 'JetBrains Mono', 'Menlo', 'Monaco', monospace; + font-family: monospace; font-size: 0.82rem; padding: 0.1rem 0.3rem; border-radius: 0.4rem; @@ -2531,7 +2648,7 @@ export const TvmInstructionTable = () => { border-radius: 10px; padding: 0.85rem 0.95rem; background: rgb(var(--gray-200) / 0.16); - font-family: 'JetBrains Mono', 'Menlo', 'Monaco', monospace; + font-family: monospace; font-size: 0.82rem; line-height: 1.55; overflow: auto; @@ -2544,6 +2661,40 @@ export const TvmInstructionTable = () => { background: rgb(var(--gray-900) / 0.7); } +@media (min-width: 901px) { + .tvm-spec-row:not(.tvm-spec-row--detail) { + position: relative; + } + + .tvm-spec-row:not(.tvm-spec-row--detail) .tvm-row-indicator { + position: absolute; + right: var(--tvm-row-padding-x); + top: 50%; + transform: translateY(-50%); + margin-left: 0; + } + + .tvm-spec-row:not(.tvm-spec-row--detail) .tvm-row-indicator.is-expanded { + transform: translateY(-50%) rotate(180deg); + } + + .tvm-spec-row:not(.tvm-spec-row--detail) .tvm-spec-cell--description { + padding-right: calc(var(--tvm-row-padding-x) + 28px); + } +} + +@media (max-width: 1024px) { + .tvm-instruction-app { + padding: 0; + } + + .tvm-spec-header, + .tvm-spec-row { + --tvm-grid-template: 95px 220px minmax(280px, 2fr); + min-width: 620px; + } +} + @media (max-width: 1040px) { .tvm-instruction-toolbar { flex-direction: column; @@ -2567,29 +2718,51 @@ export const TvmInstructionTable = () => { .tvm-spec-row, .tvm-spec-row--detail { - --tvm-grid-template: 48px minmax(0, 1fr); + --tvm-grid-template: minmax(0, 1fr); grid-template-columns: var(--tvm-grid-template); min-width: 0; align-items: start; } - .tvm-spec-row .tvm-spec-cell--anchor { - grid-row: span 2; + .tvm-spec-row:not(.tvm-spec-row--detail) { + padding: 0.5rem 0; } .tvm-spec-row .tvm-spec-cell--opcode { - grid-row: 1; - grid-column: 2 / -1; - justify-content: flex-start; - align-items: baseline; + display: none; } .tvm-spec-row .tvm-spec-cell--name { - grid-column: 2 / -1; + grid-column: 1 / -1; + gap: 1rem; + } + + .tvm-name-line { + gap: 0.6rem; + } + + .tvm-opcode-chip { + display: inline-flex; + align-items: center; + font-family: monospace; + font-size: 0.72rem; + font-weight: 600; + padding: 0 0.5rem; + border-radius: 6px; + background: var(--tvm-pill-muted-bg); + color: var(--tvm-text-secondary); + letter-spacing: 0.02em; + flex-shrink: 0; } .tvm-spec-row .tvm-spec-cell--description { grid-column: 1 / -1; + gap: 1rem; + padding-bottom: 0.85rem; + } + + .tvm-spec-cell--full { + padding: 0; } } @@ -2602,6 +2775,12 @@ export const TvmInstructionTable = () => { flex-direction: column; } + .tvm-detail-main, + .tvm-detail-side { + flex: 1 1 auto; + width: 100%; + } + .tvm-detail-section { margin-bottom: 0.8rem; } @@ -2673,7 +2852,7 @@ export const TvmInstructionTable = () => { } .tvm-control-flow-value { - font-family: 'JetBrains Mono', 'Menlo', 'Monaco', monospace; + font-family: monospace; font-size: 0.85rem; color: var(--tvm-text-primary); } @@ -2761,7 +2940,7 @@ export const TvmInstructionTable = () => { display: flex; align-items: center; gap: 0.25rem; - font-family: 'JetBrains Mono', 'Menlo', 'Monaco', monospace; + font-family: monospace; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; @@ -2809,7 +2988,7 @@ export const TvmInstructionTable = () => { } .tvm-control-flow-node-value { - font-family: 'JetBrains Mono', 'Menlo', 'Monaco', monospace; + font-family: monospace; font-size: 0.66rem; color: var(--tvm-text-primary); } @@ -2867,8 +3046,6 @@ export const TvmInstructionTable = () => { white-space: pre-wrap; } - - .tvm-alias-list { list-style: none; margin: 0; @@ -2896,14 +3073,14 @@ export const TvmInstructionTable = () => { } .tvm-alias-headline code { - font-family: 'JetBrains Mono', 'Menlo', 'Monaco', monospace; + font-family: monospace; font-size: 0.85rem; color: var(--tvm-text-primary); } .tvm-alias-meta { font-size: 0.75rem; - color: var(--tvm-text-secondary); + color: var(--tvm-text-muted); } .tvm-alias-description { @@ -2925,12 +3102,12 @@ export const TvmInstructionTable = () => { padding: 0.18rem 0.45rem; border-radius: 6px; background: var(--tvm-pill-muted-bg); - color: var(--tvm-text-secondary); + color: var(--tvm-text-muted); font-size: 0.72rem; } .tvm-alias-pill code { - font-family: 'JetBrains Mono', 'Menlo', 'Monaco', monospace; + font-family: monospace; } .tvm-loading-row, @@ -2947,20 +3124,12 @@ export const TvmInstructionTable = () => { color: var(--tvm-accent-strong); } -@media (max-width: 1024px) { - .tvm-instruction-app { - padding: 1.1rem; - } - - .tvm-spec-header, - .tvm-spec-row { - --tvm-grid-template: 48px 95px 220px minmax(280px, 2fr); - min-width: 720px; - } -} - @media (max-width: 768px) { - .tvm-field { + .tvm-field, + .tvm-toolbar-filters .tvm-field, + .tvm-field--sort, + .tvm-field--category, + .tvm-field--subcategory { width: 100%; min-width: 0; } @@ -2989,7 +3158,7 @@ export const TvmInstructionTable = () => { } } `, - [] + [], ); const searchTokens = useMemo(() => createSearchTokens(search), [search]); @@ -3012,7 +3181,7 @@ export const TvmInstructionTable = () => { } } catch (cause) { if (!cancelled) { - setError(cause instanceof Error ? cause.message : "Unknown error"); + setError(cause instanceof Error ? cause.message : 'Unknown error'); } } finally { if (!cancelled) { @@ -3033,25 +3202,25 @@ export const TvmInstructionTable = () => { }, [spec]); useEffect(() => { - if (typeof window === "undefined") return; + if (typeof window === 'undefined') return; try { const raw = window.localStorage.getItem(PERSIST_KEY); if (!raw) return; const prefs = JSON.parse(raw); - if (prefs && typeof prefs === "object") { - if (typeof prefs.search === "string") setSearch(prefs.search); + if (prefs && typeof prefs === 'object') { + if (typeof prefs.search === 'string') setSearch(prefs.search); if ( - typeof prefs.category === "string" && - (prefs.category === "All" || CATEGORY_GROUP_KEYS.has(prefs.category)) + typeof prefs.category === 'string' && + (prefs.category === 'All' || CATEGORY_GROUP_KEYS.has(prefs.category)) ) { setCategory(prefs.category); } - if (typeof prefs.subcategory === "string") { + if (typeof prefs.subcategory === 'string') { setSubcategory(prefs.subcategory); } if ( - typeof prefs.sortMode === "string" && - ["opcode", "name", "category", "since"].includes(prefs.sortMode) + typeof prefs.sortMode === 'string' && + ['opcode', 'name', 'category', 'since'].includes(prefs.sortMode) ) { setSortMode(prefs.sortMode); } @@ -3062,7 +3231,7 @@ export const TvmInstructionTable = () => { }, []); useEffect(() => { - if (typeof window === "undefined") return; + if (typeof window === 'undefined') return; try { const payload = JSON.stringify({ search, @@ -3077,34 +3246,30 @@ export const TvmInstructionTable = () => { }, [search, category, subcategory, sortMode]); useEffect(() => { - if (typeof window === "undefined") return; + if (typeof window === 'undefined') return; const handler = (event) => { - if (event.defaultPrevented || event.key !== "/") return; + if (event.defaultPrevented || event.key !== '/') return; if (event.altKey || event.ctrlKey || event.metaKey) return; const active = document.activeElement; if (active) { - const tagName = active.tagName ? active.tagName.toLowerCase() : ""; - if ( - tagName === "input" || - tagName === "textarea" || - active.isContentEditable - ) { + const tagName = active.tagName ? active.tagName.toLowerCase() : ''; + if (tagName === 'input' || tagName === 'textarea' || active.isContentEditable) { return; } } event.preventDefault(); - if (searchInputRef.current && typeof searchInputRef.current.focus === "function") { + if (searchInputRef.current && typeof searchInputRef.current.focus === 'function') { searchInputRef.current.focus(); } }; - window.addEventListener("keydown", handler); - return () => window.removeEventListener("keydown", handler); + window.addEventListener('keydown', handler); + return () => window.removeEventListener('keydown', handler); }, []); useEffect(() => { - if (typeof window === "undefined") return; + if (typeof window === 'undefined') return; const syncHash = () => { - const hash = window.location.hash ? window.location.hash.slice(1) : ""; + const hash = window.location.hash ? window.location.hash.slice(1) : ''; if (!hash) { setActiveAnchorId(null); return; @@ -3116,8 +3281,8 @@ export const TvmInstructionTable = () => { } }; syncHash(); - window.addEventListener("hashchange", syncHash); - return () => window.removeEventListener("hashchange", syncHash); + window.addEventListener('hashchange', syncHash); + return () => window.removeEventListener('hashchange', syncHash); }, []); const instructions = useMemo(() => { @@ -3134,106 +3299,92 @@ export const TvmInstructionTable = () => { aliasByMnemonic.set(alias.alias_of, list); }); - return (Array.isArray(spec.instructions) ? spec.instructions : []).map( - (raw, idx) => { - const doc = raw.doc || {}; - const bytecode = raw.bytecode || {}; - const valueFlow = raw.value_flow || {}; - const inputs = Array.isArray(valueFlow.inputs?.stack) - ? valueFlow.inputs.stack - : []; - const outputs = Array.isArray(valueFlow.outputs?.stack) - ? valueFlow.outputs.stack - : []; - const registersIn = Array.isArray(valueFlow.inputs?.registers) - ? valueFlow.inputs.registers - : []; - const registersOut = Array.isArray(valueFlow.outputs?.registers) - ? valueFlow.outputs.registers - : []; + return (Array.isArray(spec.instructions) ? spec.instructions : []).map((raw, idx) => { + const doc = raw.doc || {}; + const bytecode = raw.bytecode || {}; + const valueFlow = raw.value_flow || {}; + const inputs = Array.isArray(valueFlow.inputs?.stack) ? valueFlow.inputs.stack : []; + const outputs = Array.isArray(valueFlow.outputs?.stack) ? valueFlow.outputs.stack : []; + const registersIn = Array.isArray(valueFlow.inputs?.registers) + ? valueFlow.inputs.registers + : []; + const registersOut = Array.isArray(valueFlow.outputs?.registers) + ? valueFlow.outputs.registers + : []; - const categoryKeyRaw = doc.category || "uncategorized"; - const categoryGroup = resolveCategoryGroup(categoryKeyRaw); - const categoryGroupKey = categoryGroup.key; - const categoryGroupLabel = categoryGroup.label; - const rawCategoryLabel = humanizeCategoryKey(categoryKeyRaw); - const descriptionMissing = !doc.description; - const stackDocMissing = !doc.stack; - const gasMissing = !doc.gas; - const tlbMissing = !bytecode.tlb; - const inputsMissing = !Array.isArray(valueFlow.inputs?.stack); - const outputsMissing = !Array.isArray(valueFlow.outputs?.stack); - const implementationRefs = extractImplementationRefs(raw.implementation); - const implementationMissing = implementationRefs.length === 0; - const controlFlowMissing = - !raw.control_flow || !Array.isArray(raw.control_flow.branches); - - const opcode = bytecode.prefix || ""; - const anchorId = buildAnchorId({ opcode, mnemonic: raw.mnemonic }); + const categoryKeyRaw = doc.category || 'uncategorized'; + const categoryGroup = resolveCategoryGroup(categoryKeyRaw); + const categoryGroupKey = categoryGroup.key; + const categoryGroupLabel = categoryGroup.label; + const rawCategoryLabel = humanizeCategoryKey(categoryKeyRaw); + const descriptionMissing = !doc.description; + const stackDocMissing = !doc.stack; + const gasMissing = !doc.gas; + const tlbMissing = !bytecode.tlb; + const inputsMissing = !Array.isArray(valueFlow.inputs?.stack); + const outputsMissing = !Array.isArray(valueFlow.outputs?.stack); + const implementationRefs = extractImplementationRefs(raw.implementation); + const implementationMissing = implementationRefs.length === 0; + const controlFlowMissing = !raw.control_flow || !Array.isArray(raw.control_flow.branches); + + const opcode = bytecode.prefix || ''; + const anchorId = buildAnchorId({ opcode, mnemonic: raw.mnemonic }); - return { - uid: `${raw.mnemonic}__${opcode || 'nop'}__${idx}`, - mnemonic: raw.mnemonic, - since: typeof raw.since_version === "number" ? raw.since_version : 0, - anchorId, - categoryKey: categoryGroupKey, - categoryLabel: categoryGroupLabel, - rawCategoryKey: categoryKeyRaw, - rawCategoryLabel, - description: doc.description || "", - descriptionHtml: typeof doc.description_html === "string" - ? doc.description_html - : "", - fift: doc.fift || "", - fiftExamples: Array.isArray(doc.fift_examples) - ? doc.fift_examples - .map((example) => - example && typeof example === "object" - ? { - description: - typeof example.description === "string" - ? example.description - : "", - fift: - typeof example.fift === "string" ? example.fift : "", - } - : null - ) - .filter((example) => - example && (example.description || example.fift) - ) - : [], - gas: doc.gas || "", - gasDisplay: formatGasDisplay(doc.gas), - stackDoc: doc.stack || "", - opcode, - tlb: bytecode.tlb || "", - operands: Array.isArray(bytecode.operands) ? bytecode.operands : [], - valueFlow: { - inputs, - outputs, - }, - registers: { - inputs: registersIn, - outputs: registersOut, - }, - controlFlow: raw.control_flow || null, - implementationRefs, - rawSpec: raw, - aliases: aliasByMnemonic.get(raw.mnemonic) || [], - missing: { - description: descriptionMissing, - gas: gasMissing, - tlb: tlbMissing, - stackDoc: stackDocMissing, - inputs: inputsMissing, - outputs: outputsMissing, - implementation: implementationMissing, - controlFlow: controlFlowMissing, - }, - }; - } - ); + return { + uid: `${raw.mnemonic}__${opcode || 'nop'}__${idx}`, + mnemonic: raw.mnemonic, + since: typeof raw.since_version === 'number' ? raw.since_version : 0, + anchorId, + categoryKey: categoryGroupKey, + categoryLabel: categoryGroupLabel, + rawCategoryKey: categoryKeyRaw, + rawCategoryLabel, + description: doc.description || '', + descriptionHtml: typeof doc.description_html === 'string' ? doc.description_html : '', + fift: doc.fift || '', + fiftExamples: Array.isArray(doc.fift_examples) + ? doc.fift_examples + .map((example) => + example && typeof example === 'object' + ? { + description: + typeof example.description === 'string' ? example.description : '', + fift: typeof example.fift === 'string' ? example.fift : '', + } + : null, + ) + .filter((example) => example && (example.description || example.fift)) + : [], + gas: doc.gas || '', + gasDisplay: formatGasDisplay(doc.gas), + stackDoc: doc.stack || '', + opcode, + tlb: bytecode.tlb || '', + operands: Array.isArray(bytecode.operands) ? bytecode.operands : [], + valueFlow: { + inputs, + outputs, + }, + registers: { + inputs: registersIn, + outputs: registersOut, + }, + controlFlow: raw.control_flow || null, + implementationRefs, + rawSpec: raw, + aliases: aliasByMnemonic.get(raw.mnemonic) || [], + missing: { + description: descriptionMissing, + gas: gasMissing, + tlb: tlbMissing, + stackDoc: stackDocMissing, + inputs: inputsMissing, + outputs: outputsMissing, + implementation: implementationMissing, + controlFlow: controlFlowMissing, + }, + }; + }); }, [spec]); const anchorInstruction = useMemo(() => { @@ -3254,16 +3405,16 @@ export const TvmInstructionTable = () => { useEffect(() => { if (!anchorInstruction) return; - if (typeof document === "undefined" || typeof window === "undefined") return; + if (typeof document === 'undefined' || typeof window === 'undefined') return; if (!anchorInstruction.anchorId) return; const frame = - typeof window.requestAnimationFrame === "function" + typeof window.requestAnimationFrame === 'function' ? window.requestAnimationFrame.bind(window) : (cb) => setTimeout(cb, 0); frame(() => { const element = document.getElementById(anchorInstruction.anchorId); - if (element && typeof element.scrollIntoView === "function") { - element.scrollIntoView({ behavior: "smooth", block: "start" }); + if (element && typeof element.scrollIntoView === 'function') { + element.scrollIntoView({ behavior: 'smooth', block: 'start' }); } }); }, [anchorInstruction]); @@ -3273,7 +3424,7 @@ export const TvmInstructionTable = () => { instructions.forEach((item) => { if (!item || !item.categoryKey) return; const groupKey = item.categoryKey; - const rawKey = item.rawCategoryKey || "uncategorized"; + const rawKey = item.rawCategoryKey || 'uncategorized'; const label = item.rawCategoryLabel || humanizeCategoryKey(rawKey); if (!groups.has(groupKey)) { groups.set(groupKey, new Map()); @@ -3294,9 +3445,7 @@ export const TvmInstructionTable = () => { }); const normalized = new Map(); groups.forEach((entries, key) => { - const list = Array.from(entries.values()).sort((a, b) => - a.label.localeCompare(b.label) - ); + const list = Array.from(entries.values()).sort((a, b) => a.label.localeCompare(b.label)); normalized.set(key, list); }); return normalized; @@ -3304,50 +3453,45 @@ export const TvmInstructionTable = () => { const categoryOptions = useMemo(() => { const present = new Set(subcategoryMap.keys()); - const ordered = CATEGORY_GROUPS.filter((group) => present.has(group.key)).map( - (group) => ({ value: group.key, label: group.label }) - ); - return [ - { value: "All", label: "All categories" }, - ...ordered, - ]; + const ordered = CATEGORY_GROUPS.filter((group) => present.has(group.key)).map((group) => ({ + value: group.key, + label: group.label, + })); + return [{ value: 'All', label: 'All categories' }, ...ordered]; }, [subcategoryMap]); const currentSubcategoryOptions = useMemo(() => { - if (category === "All") return []; + if (category === 'All') return []; return subcategoryMap.get(category) || []; }, [subcategoryMap, category]); - const showSubcategorySelect = - category !== "All" && currentSubcategoryOptions.length > 1; + const showSubcategorySelect = category !== 'All' && currentSubcategoryOptions.length > 1; useEffect(() => { - if (category === "All") return; - const hasSelection = categoryOptions.some( - (option) => option.value === category - ); + if (category === 'All') return; + const hasSelection = categoryOptions.some((option) => option.value === category); if (!hasSelection) { - setCategory("All"); + setCategory('All'); } }, [categoryOptions, category]); useEffect(() => { - if (category === "All") { - if (subcategory !== "All") { - setSubcategory("All"); + if (category === 'All') { + if (subcategory !== 'All') { + setSubcategory('All'); } return; } const options = currentSubcategoryOptions; if (!options || options.length <= 1) { - if (subcategory !== "All") { - setSubcategory("All"); + if (subcategory !== 'All') { + setSubcategory('All'); } return; } const hasSubcategory = options.some((option) => option.value === subcategory); if (!hasSubcategory) { - setSubcategory("All"); + setSubcategory('All'); } }, [category, subcategory, currentSubcategoryOptions]); @@ -3355,23 +3499,13 @@ export const TvmInstructionTable = () => { const forcedUid = anchorInstruction?.uid ?? null; return instructions.filter((item) => { if (forcedUid && item.uid === forcedUid) return true; - if (category !== "All" && item.categoryKey !== category) return false; - if ( - category !== "All" && - subcategory !== "All" && - item.rawCategoryKey !== subcategory - ) { + if (category !== 'All' && item.categoryKey !== category) return false; + if (category !== 'All' && subcategory !== 'All' && item.rawCategoryKey !== subcategory) { return false; } return itemRelevanceScore(item, searchTokens) !== Infinity; }); - }, [ - instructions, - category, - subcategory, - searchTokens, - anchorInstruction, - ]); + }, [instructions, category, subcategory, searchTokens, anchorInstruction]); const sorted = useMemo(() => { const copy = filtered.slice(); @@ -3383,28 +3517,21 @@ export const TvmInstructionTable = () => { const sb = itemRelevanceScore(b, tokens); if (sa !== sb) return sa - sb; // tie-breakers - return ( - a.mnemonic.localeCompare(b.mnemonic) || - compareOpcodes(a.opcode, b.opcode) - ); + return a.mnemonic.localeCompare(b.mnemonic) || compareOpcodes(a.opcode, b.opcode); }); - } else if (sortMode !== "opcode") { + } else if (sortMode !== 'opcode') { copy.sort((a, b) => { switch (sortMode) { - case "name": + case 'name': return a.mnemonic.localeCompare(b.mnemonic); - case "category": + case 'category': return ( - a.categoryLabel.localeCompare(b.categoryLabel) || - a.opcode.localeCompare(b.opcode) + a.categoryLabel.localeCompare(b.categoryLabel) || a.opcode.localeCompare(b.opcode) ); - case "since": - return (b.since == 9999 ? -1 : b.since) - (a.since == 9999 ? -1 : a.since); + case 'since': + return (b.since == 9999 ? -1 : b.since) - (a.since == 9999 ? -1 : a.since); default: - return ( - compareOpcodes(a.opcode, b.opcode) || - a.mnemonic.localeCompare(b.mnemonic) - ); + return compareOpcodes(a.opcode, b.opcode) || a.mnemonic.localeCompare(b.mnemonic); } }); } @@ -3429,17 +3556,17 @@ export const TvmInstructionTable = () => { const hasActiveFilters = useMemo( () => searchTokens.length > 0 || - category !== "All" || - subcategory !== "All" || - sortMode !== "opcode", - [searchTokens, category, subcategory, sortMode] + category !== 'All' || + subcategory !== 'All' || + sortMode !== 'opcode', + [searchTokens, category, subcategory, sortMode], ); const handleResetFilters = useCallback(() => { - setSearch(""); - setCategory("All"); - setSubcategory("All"); - setSortMode("opcode"); + setSearch(''); + setCategory('All'); + setSubcategory('All'); + setSortMode('opcode'); }, []); const activeFilters = useMemo(() => { @@ -3447,44 +3574,42 @@ export const TvmInstructionTable = () => { const searchDisplay = search.trim(); if (searchTokens.length > 0 && searchDisplay) { chips.push({ - key: "search", + key: 'search', label: `Query: "${searchDisplay}"`, ariaLabel: `Remove search filter ${searchDisplay}`, - onRemove: () => setSearch(""), + onRemove: () => setSearch(''), }); } - if (category !== "All") { + if (category !== 'All') { const match = categoryOptions.find((option) => option.value === category); const label = match ? match.label : humanizeCategoryKey(category); chips.push({ - key: "category", + key: 'category', label: `Category: ${label}`, ariaLabel: `Remove category filter ${label}`, - onRemove: () => setCategory("All"), + onRemove: () => setCategory('All'), }); } - if (category !== "All" && subcategory !== "All") { - const match = currentSubcategoryOptions.find( - (option) => option.value === subcategory - ); + if (category !== 'All' && subcategory !== 'All') { + const match = currentSubcategoryOptions.find((option) => option.value === subcategory); const label = match ? match.label : humanizeCategoryKey(subcategory); chips.push({ - key: "subcategory", + key: 'subcategory', label: `Subcategory: ${label}`, ariaLabel: `Remove subcategory filter ${label}`, - onRemove: () => setSubcategory("All"), + onRemove: () => setSubcategory('All'), }); } - if (sortMode !== "opcode") { + if (sortMode !== 'opcode') { const sortLabels = { - since: "Newest", + since: 'Newest', }; - const label = sortLabels[sortMode] || "Opcode"; + const label = sortLabels[sortMode] || 'Opcode'; chips.push({ - key: "sort", + key: 'sort', label: `Sort: ${label}`, ariaLabel: `Remove sort override ${label}`, - onRemove: () => setSortMode("opcode"), + onRemove: () => setSortMode('opcode'), }); } return chips; @@ -3509,24 +3634,21 @@ export const TvmInstructionTable = () => { })); }, []); - const openRawJsonModal = useCallback( - (instruction) => { - if (!instruction) return; - const payload = { - mnemonic: instruction.mnemonic, - opcode: instruction.opcode, - anchorId: instruction.anchorId, - raw: instruction.rawSpec || instruction, - }; - setRawModalInstruction(payload); - setRawModalCopied(false); - if (rawModalCopyTimeoutRef.current) { - clearTimeout(rawModalCopyTimeoutRef.current); - rawModalCopyTimeoutRef.current = null; - } - }, - [] - ); + const openRawJsonModal = useCallback((instruction) => { + if (!instruction) return; + const payload = { + mnemonic: instruction.mnemonic, + opcode: instruction.opcode, + anchorId: instruction.anchorId, + raw: instruction.rawSpec || instruction, + }; + setRawModalInstruction(payload); + setRawModalCopied(false); + if (rawModalCopyTimeoutRef.current) { + clearTimeout(rawModalCopyTimeoutRef.current); + rawModalCopyTimeoutRef.current = null; + } + }, []); const closeRawJsonModal = useCallback(() => { setRawModalInstruction(null); @@ -3556,24 +3678,24 @@ export const TvmInstructionTable = () => { useEffect(() => { if (!rawModalInstruction) return; - if (typeof window === "undefined") return; + if (typeof window === 'undefined') return; const handleKeyDown = (event) => { if (event.defaultPrevented) return; - if (event.key === "Escape") { + if (event.key === 'Escape') { event.preventDefault(); closeRawJsonModal(); } }; - window.addEventListener("keydown", handleKeyDown); - return () => window.removeEventListener("keydown", handleKeyDown); + window.addEventListener('keydown', handleKeyDown); + return () => window.removeEventListener('keydown', handleKeyDown); }, [rawModalInstruction, closeRawJsonModal]); const rawModalJson = useMemo(() => { - if (!rawModalInstruction) return ""; + if (!rawModalInstruction) return ''; try { return JSON.stringify(rawModalInstruction.raw ?? null, null, 2); } catch (err) { - return "// Failed to serialize instruction"; + return '// Failed to serialize instruction'; } }, [rawModalInstruction]); @@ -3587,7 +3709,7 @@ export const TvmInstructionTable = () => { }, []); return ( -
+
@@ -3597,18 +3719,8 @@ export const TvmInstructionTable = () => {
- {/* color splash */} -