Skip to content

Commit

Permalink
Merge pull request #419 from shibdev/main
Browse files Browse the repository at this point in the history
Add TVM, add store_coins to docs
  • Loading branch information
reveloper authored Nov 18, 2023
2 parents 7ac3ab2 + ab36596 commit a3eb1b0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/develop/func/stdlib.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,10 @@ Stores slice `s` into builder `b`.
```func
builder store_grams(builder b, int x) asm "STGRAMS";
```
#### store_coins
```func
builder store_coins(builder b, int x) asm "STGRAMS";
```
Stores (serializes) an integer `x` in the range `0..2^120 − 1` into 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.

It is the most common way of storing Toncoins.
Expand Down
4 changes: 4 additions & 0 deletions docs/learn/glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,10 @@ ________

**TVL** (Total Value Locked) — Тotal value locked represents the number of assets currently being staked in a specific protocol.

### TVM

**TVM** — Ton Virtual Machine, a machine behaving like a decentralized computer, it computes the state of the Ton blockchain after each new block and executes smart contracts.

___________

## V
Expand Down

0 comments on commit a3eb1b0

Please sign in to comment.