diff --git a/pages/book/_meta.js b/pages/book/_meta.js index dbda93d7..7ee8b473 100644 --- a/pages/book/_meta.js +++ b/pages/book/_meta.js @@ -8,6 +8,7 @@ export default { }, types: 'Type system overview', integers: 'Integers', + cells: 'Cells, Builders, Slices', maps: 'Maps', 'structs-and-messages': 'Structs and Messages', optionals: 'Optionals', diff --git a/pages/book/cells.mdx b/pages/book/cells.mdx new file mode 100644 index 00000000..230b8c62 --- /dev/null +++ b/pages/book/cells.mdx @@ -0,0 +1,43 @@ +# Cells, Builders, Slices + +import { Callout } from 'nextra/components' + +{/* TODO: Move the content over from drafts */} +{/* TODO: Change every link for Cell, Builder, Slice */} + +## Cells + +{/* TODO */} + +## Builders + +{/* TODO */} + +## Slices + +{/* TODO */} + +## Serialization + +{/* TODO */} + +### Serialization types + +{/* + +TODO: +1. bytes32 +2. bytes64 +3. remaining (for Slices only) + +*/} + + + Read more on serialization here: [Compatibility with FunC](/book/func#convert-serialization) + + +## Operations + +{/* TODO: showcase the construction and parsing side by side, using the Builder and a Slice */} + +{/* TODO: add a simplified parsing version via .toCell() and .fromCell() references */} diff --git a/pages/book/types.mdx b/pages/book/types.mdx index caaea1c3..9086490f 100644 --- a/pages/book/types.mdx +++ b/pages/book/types.mdx @@ -16,7 +16,7 @@ Tact supports a number of primitive data types that are tailored for smart contr * [`Int{:tact}`][ints] — all numbers in Tact are $257$-bit signed integers, but [smaller representations](/book/integers#serialization) can be used to reduce storage costs. * [`Bool{:tact}`](#booleans) — classical boolean with `true{:tact}` and `false{:tact}` values. * `Address{:tact}` — standard [smart contract address](https://docs.ton.org/learn/overviews/addresses#address-of-smart-contract) in TON Blockchain. -* `Slice{:tact}`, `Cell{:tact}`, `Builder{:tact}` — low-level primitives of TON VM. +* [`Cell{:tact}`](/book/cells#cells), [`Builder{:tact}`](/book/cells#builders), [`Slice{:tact}`](/book/cells#slices) — low-level primitives of TON VM. * `String{:tact}` — represents text strings in TON VM. * `StringBuilder{:tact}` — helper type that allows you to concatenate strings in a gas-efficient way.