1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-03-09 15:40:10 +00:00

Merge branch 'testnet' into accelerator

This commit is contained in:
SpyCheese 2025-03-06 17:16:01 +03:00
commit f1bc4c40e5
115 changed files with 5797 additions and 1860 deletions

View file

@ -1,7 +1,7 @@
// Standard library for Tolk (LGPL licence).
// It contains common functions that are available out of the box, the user doesn't have to import anything.
// More specific functions are required to be imported explicitly, like "@stdlib/tvm-dicts".
tolk 0.8
tolk 0.9
/**
Tuple manipulation primitives.
@ -139,7 +139,7 @@ fun getMyOriginalBalance(): int
/// `int` — balance in nanotoncoins;
/// `cell` — a dictionary with 32-bit keys representing the balance of "extra currencies".
@pure
fun getMyOriginalBalanceWithExtraCurrencies(): [int, cell]
fun getMyOriginalBalanceWithExtraCurrencies(): [int, cell?]
asm "BALANCE";
/// Returns the logical time of the current transaction.
@ -154,7 +154,7 @@ fun getCurrentBlockLogicalTime(): int
/// Returns the value of the global configuration parameter with integer index `i` as a `cell` or `null` value.
@pure
fun getBlockchainConfigParam(x: int): cell
fun getBlockchainConfigParam(x: int): cell?
asm "CONFIGOPTPARAM";
/// Returns the persistent contract storage cell. It can be parsed or modified with slice and builder primitives later.
@ -291,7 +291,7 @@ fun calculateSliceSizeStrict(s: slice, maxCells: int): (int, int, int)
/// otherwise the returned value is one plus the maximum of depths of cells referred to from [c].
/// If [c] is a `null` instead of a cell, returns zero.
@pure
fun getCellDepth(c: cell): int
fun getCellDepth(c: cell?): int
asm "CDEPTH";
/// Returns the depth of `slice` [s].
@ -417,12 +417,12 @@ fun getLastBits(self: slice, len: int): slice
/// Loads a dictionary (TL HashMapE structure, represented as TVM cell) from a slice.
/// Returns `null` if `nothing` constructor is used.
@pure
fun loadDict(mutate self: slice): cell
fun loadDict(mutate self: slice): cell?
asm( -> 1 0) "LDDICT";
/// Preloads a dictionary (cell) from a slice.
@pure
fun preloadDict(self: slice): cell
fun preloadDict(self: slice): cell?
asm "PLDDICT";
/// Loads a dictionary as [loadDict], but returns only the remainder of the slice.
@ -433,12 +433,12 @@ fun skipDict(mutate self: slice): self
/// Loads (Maybe ^Cell) from a slice.
/// In other words, loads 1 bit: if it's true, loads the first ref, otherwise returns `null`.
@pure
fun loadMaybeRef(mutate self: slice): cell
fun loadMaybeRef(mutate self: slice): cell?
asm( -> 1 0) "LDOPTREF";
/// Preloads (Maybe ^Cell) from a slice.
@pure
fun preloadMaybeRef(self: slice): cell
fun preloadMaybeRef(self: slice): cell?
asm "PLDOPTREF";
/// Loads (Maybe ^Cell), but returns only the remainder of the slice.
@ -497,13 +497,13 @@ fun storeBool(mutate self: builder, x: bool): self
/// Stores dictionary (represented by TVM `cell` or `null`) into a builder.
/// In other words, stores a `1`-bit and a reference to [c] if [c] is not `null` and `0`-bit otherwise.
@pure
fun storeDict(mutate self: builder, c: cell): self
fun storeDict(mutate self: builder, c: cell?): self
asm(c self) "STDICT";
/// Stores (Maybe ^Cell) into a builder.
/// In other words, if cell is `null`, store '0' bit; otherwise, store '1' and a ref to [c].
@pure
fun storeMaybeRef(mutate self: builder, c: cell): self
fun storeMaybeRef(mutate self: builder, c: cell?): self
asm(c self) "STOPTREF";
/// Concatenates two builders.
@ -661,7 +661,7 @@ fun reserveToncoinsOnBalance(nanoTonCoins: int, reserveMode: int): void
/// Similar to [reserveToncoinsOnBalance], but also accepts a dictionary extraAmount (represented by a cell or null)
/// with extra currencies. In this way currencies other than Toncoin can be reserved.
fun reserveExtraCurrenciesOnBalance(nanoTonCoins: int, extraAmount: cell, reserveMode: int): void
fun reserveExtraCurrenciesOnBalance(nanoTonCoins: int, extraAmount: cell?, reserveMode: int): void
asm "RAWRESERVEX";

View file

@ -1,5 +1,5 @@
// A part of standard library for Tolk
tolk 0.8
tolk 0.9
/**
Gas and payment related primitives.

View file

@ -1,5 +1,5 @@
// A part of standard library for Tolk
tolk 0.8
tolk 0.9
/**
Lisp-style lists are nested 2-elements tuples: `(1, (2, (3, null)))` represents list `[1, 2, 3]`.
@ -14,17 +14,18 @@ fun createEmptyList(): tuple
/// Adds an element to the beginning of lisp-style list.
/// Note, that it does not mutate the list: instead, it returns a new one (it's a lisp pattern).
@pure
fun listPrepend<X>(head: X, tail: tuple): tuple
fun listPrepend<X>(head: X, tail: tuple?): tuple
asm "CONS";
/// Extracts the head and the tail of lisp-style list.
@pure
fun listSplit<X>(list: tuple): (X, tuple)
fun listSplit<X>(list: tuple): (X, tuple?)
asm "UNCONS";
/// Extracts the tail and the head of lisp-style list.
/// After extracting the last element, tuple is assigned to null.
@pure
fun listNext<X>(mutate self: tuple): X
fun listNext<X>(mutate self: tuple?): X
asm( -> 1 0) "UNCONS";
/// Returns the head of lisp-style list.
@ -34,5 +35,5 @@ fun listGetHead<X>(list: tuple): X
/// Returns the tail of lisp-style list.
@pure
fun listGetTail(list: tuple): tuple
fun listGetTail(list: tuple): tuple?
asm "CDR";

View file

@ -1,5 +1,5 @@
// A part of standard library for Tolk
tolk 0.8
tolk 0.9
/**
Dictionaries are represented as `cell` data type (cells can store anything, dicts in particular).
@ -9,288 +9,289 @@ tolk 0.8
- uDict* - dicts with unsigned integer keys
- sDict* - dicts with arbitrary slice keys
When accessing a dict element, you should not only provide a key, but provide keyLen,
since for optimization, for optimization, key length is not stored in the dictionary itself.
since for optimization, key length is not stored in the dictionary itself.
Every dictionary object (`self` parameter) can be null. TVM NULL is essentially "empty dictionary".
*/
/// Creates an empty dictionary, which is actually a null value. Equivalent to PUSHNULL
@pure
fun createEmptyDict(): cell
fun createEmptyDict(): cell?
asm "NEWDICT";
/// Checks whether a dictionary is empty.
@pure
fun dictIsEmpty(self: cell): bool
fun dictIsEmpty(self: cell?): bool
asm "DICTEMPTY";
@pure
fun iDictGet(self: cell, keyLen: int, key: int): (slice, bool)
fun iDictGet(self: cell?, keyLen: int, key: int): (slice?, bool)
asm(key self keyLen) "DICTIGET" "NULLSWAPIFNOT";
@pure
fun uDictGet(self: cell, keyLen: int, key: int): (slice, bool)
fun uDictGet(self: cell?, keyLen: int, key: int): (slice?, bool)
asm(key self keyLen) "DICTUGET" "NULLSWAPIFNOT";
@pure
fun sDictGet(self: cell, keyLen: int, key: slice): (slice, bool)
fun sDictGet(self: cell?, keyLen: int, key: slice): (slice?, bool)
asm(key self keyLen) "DICTGET" "NULLSWAPIFNOT";
@pure
fun iDictSet(mutate self: cell, keyLen: int, key: int, value: slice): void
fun iDictSet(mutate self: cell?, keyLen: int, key: int, value: slice): void
asm(value key self keyLen) "DICTISET";
@pure
fun uDictSet(mutate self: cell, keyLen: int, key: int, value: slice): void
fun uDictSet(mutate self: cell?, keyLen: int, key: int, value: slice): void
asm(value key self keyLen) "DICTUSET";
@pure
fun sDictSet(mutate self: cell, keyLen: int, key: slice, value: slice): void
fun sDictSet(mutate self: cell?, keyLen: int, key: slice, value: slice): void
asm(value key self keyLen) "DICTSET";
@pure
fun iDictSetRef(mutate self: cell, keyLen: int, key: int, value: cell): void
fun iDictSetRef(mutate self: cell?, keyLen: int, key: int, value: cell): void
asm(value key self keyLen) "DICTISETREF";
@pure
fun uDictSetRef(mutate self: cell, keyLen: int, key: int, value: cell): void
fun uDictSetRef(mutate self: cell?, keyLen: int, key: int, value: cell): void
asm(value key self keyLen) "DICTUSETREF";
@pure
fun sDictSetRef(mutate self: cell, keyLen: int, key: slice, value: cell): void
fun sDictSetRef(mutate self: cell?, keyLen: int, key: slice, value: cell): void
asm(value key self keyLen) "DICTSETREF";
@pure
fun iDictSetIfNotExists(mutate self: cell, keyLen: int, key: int, value: slice): bool
fun iDictSetIfNotExists(mutate self: cell?, keyLen: int, key: int, value: slice): bool
asm(value key self keyLen) "DICTIADD";
@pure
fun uDictSetIfNotExists(mutate self: cell, keyLen: int, key: int, value: slice): bool
fun uDictSetIfNotExists(mutate self: cell?, keyLen: int, key: int, value: slice): bool
asm(value key self keyLen) "DICTUADD";
@pure
fun iDictSetIfExists(mutate self: cell, keyLen: int, key: int, value: slice): bool
fun iDictSetIfExists(mutate self: cell?, keyLen: int, key: int, value: slice): bool
asm(value key self keyLen) "DICTIREPLACE";
@pure
fun uDictSetIfExists(mutate self: cell, keyLen: int, key: int, value: slice): bool
fun uDictSetIfExists(mutate self: cell?, keyLen: int, key: int, value: slice): bool
asm(value key self keyLen) "DICTUREPLACE";
@pure
fun iDictGetRef(self: cell, keyLen: int, key: int): (cell, bool)
fun iDictGetRef(self: cell?, keyLen: int, key: int): (cell?, bool)
asm(key self keyLen) "DICTIGETREF" "NULLSWAPIFNOT";
@pure
fun uDictGetRef(self: cell, keyLen: int, key: int): (cell, bool)
fun uDictGetRef(self: cell?, keyLen: int, key: int): (cell?, bool)
asm(key self keyLen) "DICTUGETREF" "NULLSWAPIFNOT";
@pure
fun sDictGetRef(self: cell, keyLen: int, key: slice): (cell, bool)
fun sDictGetRef(self: cell?, keyLen: int, key: slice): (cell?, bool)
asm(key self keyLen) "DICTGETREF" "NULLSWAPIFNOT";
@pure
fun iDictGetRefOrNull(self: cell, keyLen: int, key: int): cell
fun iDictGetRefOrNull(self: cell?, keyLen: int, key: int): cell?
asm(key self keyLen) "DICTIGETOPTREF";
@pure
fun uDictGetRefOrNull(self: cell, keyLen: int, key: int): cell
fun uDictGetRefOrNull(self: cell?, keyLen: int, key: int): cell?
asm(key self keyLen) "DICTUGETOPTREF";
@pure
fun sDictGetRefOrNull(self: cell, keyLen: int, key: slice): cell
fun sDictGetRefOrNull(self: cell?, keyLen: int, key: slice): cell?
asm(key self keyLen) "DICTGETOPTREF";
@pure
fun iDictDelete(mutate self: cell, keyLen: int, key: int): bool
fun iDictDelete(mutate self: cell?, keyLen: int, key: int): bool
asm(key self keyLen) "DICTIDEL";
@pure
fun uDictDelete(mutate self: cell, keyLen: int, key: int): bool
fun uDictDelete(mutate self: cell?, keyLen: int, key: int): bool
asm(key self keyLen) "DICTUDEL";
@pure
fun sDictDelete(mutate self: cell, keyLen: int, key: slice): bool
fun sDictDelete(mutate self: cell?, keyLen: int, key: slice): bool
asm(key self keyLen) "DICTDEL";
@pure
fun iDictSetAndGet(mutate self: cell, keyLen: int, key: int, value: slice): (slice, bool)
fun iDictSetAndGet(mutate self: cell?, keyLen: int, key: int, value: slice): (slice?, bool)
asm(value key self keyLen) "DICTISETGET" "NULLSWAPIFNOT";
@pure
fun uDictSetAndGet(mutate self: cell, keyLen: int, key: int, value: slice): (slice, bool)
fun uDictSetAndGet(mutate self: cell?, keyLen: int, key: int, value: slice): (slice?, bool)
asm(value key self keyLen) "DICTUSETGET" "NULLSWAPIFNOT";
@pure
fun sDictSetAndGet(mutate self: cell, keyLen: int, key: slice, value: slice): (slice, bool)
fun sDictSetAndGet(mutate self: cell?, keyLen: int, key: slice, value: slice): (slice?, bool)
asm(value key self keyLen) "DICTSETGET" "NULLSWAPIFNOT";
@pure
fun iDictSetAndGetRefOrNull(mutate self: cell, keyLen: int, key: int, value: cell): cell
fun iDictSetAndGetRefOrNull(mutate self: cell?, keyLen: int, key: int, value: cell): cell?
asm(value key self keyLen) "DICTISETGETOPTREF";
@pure
fun uDictSetAndGetRefOrNull(mutate self: cell, keyLen: int, key: int, value: cell): cell
fun uDictSetAndGetRefOrNull(mutate self: cell?, keyLen: int, key: int, value: cell): cell?
asm(value key self keyLen) "DICTUSETGETOPTREF";
@pure
fun iDictDeleteAndGet(mutate self: cell, keyLen: int, key: int): (slice, bool)
fun iDictDeleteAndGet(mutate self: cell?, keyLen: int, key: int): (slice?, bool)
asm(key self keyLen) "DICTIDELGET" "NULLSWAPIFNOT";
@pure
fun uDictDeleteAndGet(mutate self: cell, keyLen: int, key: int): (slice, bool)
fun uDictDeleteAndGet(mutate self: cell?, keyLen: int, key: int): (slice?, bool)
asm(key self keyLen) "DICTUDELGET" "NULLSWAPIFNOT";
@pure
fun sDictDeleteAndGet(mutate self: cell, keyLen: int, key: slice): (slice, bool)
fun sDictDeleteAndGet(mutate self: cell?, keyLen: int, key: slice): (slice?, bool)
asm(key self keyLen) "DICTDELGET" "NULLSWAPIFNOT";
@pure
fun iDictSetBuilder(mutate self: cell, keyLen: int, key: int, value: builder): void
fun iDictSetBuilder(mutate self: cell?, keyLen: int, key: int, value: builder): void
asm(value key self keyLen) "DICTISETB";
@pure
fun uDictSetBuilder(mutate self: cell, keyLen: int, key: int, value: builder): void
fun uDictSetBuilder(mutate self: cell?, keyLen: int, key: int, value: builder): void
asm(value key self keyLen) "DICTUSETB";
@pure
fun sDictSetBuilder(mutate self: cell, keyLen: int, key: slice, value: builder): void
fun sDictSetBuilder(mutate self: cell?, keyLen: int, key: slice, value: builder): void
asm(value key self keyLen) "DICTSETB";
@pure
fun iDictSetBuilderIfNotExists(mutate self: cell, keyLen: int, key: int, value: builder): bool
fun iDictSetBuilderIfNotExists(mutate self: cell?, keyLen: int, key: int, value: builder): bool
asm(value key self keyLen) "DICTIADDB";
@pure
fun uDictSetBuilderIfNotExists(mutate self: cell, keyLen: int, key: int, value: builder): bool
fun uDictSetBuilderIfNotExists(mutate self: cell?, keyLen: int, key: int, value: builder): bool
asm(value key self keyLen) "DICTUADDB";
@pure
fun iDictSetBuilderIfExists(mutate self: cell, keyLen: int, key: int, value: builder): bool
fun iDictSetBuilderIfExists(mutate self: cell?, keyLen: int, key: int, value: builder): bool
asm(value key self keyLen) "DICTIREPLACEB";
@pure
fun uDictSetBuilderIfExists(mutate self: cell, keyLen: int, key: int, value: builder): bool
fun uDictSetBuilderIfExists(mutate self: cell?, keyLen: int, key: int, value: builder): bool
asm(value key self keyLen) "DICTUREPLACEB";
@pure
fun iDictDeleteFirstAndGet(mutate self: cell, keyLen: int): (int, slice, bool)
fun iDictDeleteFirstAndGet(mutate self: cell?, keyLen: int): (int?, slice?, bool)
asm(-> 0 2 1 3) "DICTIREMMIN" "NULLSWAPIFNOT2";
@pure
fun uDictDeleteFirstAndGet(mutate self: cell, keyLen: int): (int, slice, bool)
fun uDictDeleteFirstAndGet(mutate self: cell?, keyLen: int): (int?, slice?, bool)
asm(-> 0 2 1 3) "DICTUREMMIN" "NULLSWAPIFNOT2";
@pure
fun sDictDeleteFirstAndGet(mutate self: cell, keyLen: int): (slice, slice, bool)
fun sDictDeleteFirstAndGet(mutate self: cell?, keyLen: int): (slice?, slice?, bool)
asm(-> 0 2 1 3) "DICTREMMIN" "NULLSWAPIFNOT2";
@pure
fun iDictDeleteLastAndGet(mutate self: cell, keyLen: int): (int, slice, bool)
fun iDictDeleteLastAndGet(mutate self: cell?, keyLen: int): (int?, slice?, bool)
asm(-> 0 2 1 3) "DICTIREMMAX" "NULLSWAPIFNOT2";
@pure
fun uDictDeleteLastAndGet(mutate self: cell, keyLen: int): (int, slice, bool)
fun uDictDeleteLastAndGet(mutate self: cell?, keyLen: int): (int?, slice?, bool)
asm(-> 0 2 1 3) "DICTUREMMAX" "NULLSWAPIFNOT2";
@pure
fun sDictDeleteLastAndGet(mutate self: cell, keyLen: int): (slice, slice, bool)
fun sDictDeleteLastAndGet(mutate self: cell?, keyLen: int): (slice?, slice?, bool)
asm(-> 0 2 1 3) "DICTREMMAX" "NULLSWAPIFNOT2";
@pure
fun iDictGetFirst(self: cell, keyLen: int): (int, slice, bool)
fun iDictGetFirst(self: cell?, keyLen: int): (int?, slice?, bool)
asm (-> 1 0 2) "DICTIMIN" "NULLSWAPIFNOT2";
@pure
fun uDictGetFirst(self: cell, keyLen: int): (int, slice, bool)
fun uDictGetFirst(self: cell?, keyLen: int): (int?, slice?, bool)
asm (-> 1 0 2) "DICTUMIN" "NULLSWAPIFNOT2";
@pure
fun sDictGetFirst(self: cell, keyLen: int): (slice, slice, bool)
fun sDictGetFirst(self: cell?, keyLen: int): (slice?, slice?, bool)
asm (-> 1 0 2) "DICTMIN" "NULLSWAPIFNOT2";
@pure
fun iDictGetFirstAsRef(self: cell, keyLen: int): (int, cell, bool)
fun iDictGetFirstAsRef(self: cell?, keyLen: int): (int?, cell?, bool)
asm (-> 1 0 2) "DICTIMINREF" "NULLSWAPIFNOT2";
@pure
fun uDictGetFirstAsRef(self: cell, keyLen: int): (int, cell, bool)
fun uDictGetFirstAsRef(self: cell?, keyLen: int): (int?, cell?, bool)
asm (-> 1 0 2) "DICTUMINREF" "NULLSWAPIFNOT2";
@pure
fun sDictGetFirstAsRef(self: cell, keyLen: int): (slice, cell, bool)
fun sDictGetFirstAsRef(self: cell?, keyLen: int): (slice?, cell?, bool)
asm (-> 1 0 2) "DICTMINREF" "NULLSWAPIFNOT2";
@pure
fun iDictGetLast(self: cell, keyLen: int): (int, slice, bool)
fun iDictGetLast(self: cell?, keyLen: int): (int?, slice?, bool)
asm (-> 1 0 2) "DICTIMAX" "NULLSWAPIFNOT2";
@pure
fun uDictGetLast(self: cell, keyLen: int): (int, slice, bool)
fun uDictGetLast(self: cell?, keyLen: int): (int?, slice?, bool)
asm (-> 1 0 2) "DICTUMAX" "NULLSWAPIFNOT2";
@pure
fun sDictGetLast(self: cell, keyLen: int): (slice, slice, bool)
fun sDictGetLast(self: cell?, keyLen: int): (slice?, slice?, bool)
asm (-> 1 0 2) "DICTMAX" "NULLSWAPIFNOT2";
@pure
fun iDictGetLastAsRef(self: cell, keyLen: int): (int, cell, bool)
fun iDictGetLastAsRef(self: cell?, keyLen: int): (int?, cell?, bool)
asm (-> 1 0 2) "DICTIMAXREF" "NULLSWAPIFNOT2";
@pure
fun uDictGetLastAsRef(self: cell, keyLen: int): (int, cell, bool)
fun uDictGetLastAsRef(self: cell?, keyLen: int): (int?, cell?, bool)
asm (-> 1 0 2) "DICTUMAXREF" "NULLSWAPIFNOT2";
@pure
fun sDictGetLastAsRef(self: cell, keyLen: int): (slice, cell, bool)
fun sDictGetLastAsRef(self: cell?, keyLen: int): (slice?, cell?, bool)
asm (-> 1 0 2) "DICTMAXREF" "NULLSWAPIFNOT2";
@pure
fun iDictGetNext(self: cell, keyLen: int, pivot: int): (int, slice, bool)
fun iDictGetNext(self: cell?, keyLen: int, pivot: int): (int?, slice?, bool)
asm(pivot self keyLen -> 1 0 2) "DICTIGETNEXT" "NULLSWAPIFNOT2";
@pure
fun uDictGetNext(self: cell, keyLen: int, pivot: int): (int, slice, bool)
fun uDictGetNext(self: cell?, keyLen: int, pivot: int): (int?, slice?, bool)
asm(pivot self keyLen -> 1 0 2) "DICTUGETNEXT" "NULLSWAPIFNOT2";
@pure
fun iDictGetNextOrEqual(self: cell, keyLen: int, pivot: int): (int, slice, bool)
fun iDictGetNextOrEqual(self: cell?, keyLen: int, pivot: int): (int?, slice?, bool)
asm(pivot self keyLen -> 1 0 2) "DICTIGETNEXTEQ" "NULLSWAPIFNOT2";
@pure
fun uDictGetNextOrEqual(self: cell, keyLen: int, pivot: int): (int, slice, bool)
fun uDictGetNextOrEqual(self: cell?, keyLen: int, pivot: int): (int?, slice?, bool)
asm(pivot self keyLen -> 1 0 2) "DICTUGETNEXTEQ" "NULLSWAPIFNOT2";
@pure
fun iDictGetPrev(self: cell, keyLen: int, pivot: int): (int, slice, bool)
fun iDictGetPrev(self: cell?, keyLen: int, pivot: int): (int?, slice?, bool)
asm(pivot self keyLen -> 1 0 2) "DICTIGETPREV" "NULLSWAPIFNOT2";
@pure
fun uDictGetPrev(self: cell, keyLen: int, pivot: int): (int, slice, bool)
fun uDictGetPrev(self: cell?, keyLen: int, pivot: int): (int?, slice?, bool)
asm(pivot self keyLen -> 1 0 2) "DICTUGETPREV" "NULLSWAPIFNOT2";
@pure
fun iDictGetPrevOrEqual(self: cell, keyLen: int, pivot: int): (int, slice, bool)
fun iDictGetPrevOrEqual(self: cell?, keyLen: int, pivot: int): (int?, slice?, bool)
asm(pivot self keyLen -> 1 0 2) "DICTIGETPREVEQ" "NULLSWAPIFNOT2";
@pure
fun uDictGetPrevOrEqual(self: cell, keyLen: int, pivot: int): (int, slice, bool)
fun uDictGetPrevOrEqual(self: cell?, keyLen: int, pivot: int): (int?, slice?, bool)
asm(pivot self keyLen -> 1 0 2) "DICTUGETPREVEQ" "NULLSWAPIFNOT2";
@ -299,13 +300,13 @@ fun uDictGetPrevOrEqual(self: cell, keyLen: int, pivot: int): (int, slice, bool)
*/
@pure
fun prefixDictGet(self: cell, keyLen: int, key: slice): (slice, slice, slice, bool)
fun prefixDictGet(self: cell?, keyLen: int, key: slice): (slice, slice?, slice?, bool)
asm(key self keyLen) "PFXDICTGETQ" "NULLSWAPIFNOT2";
@pure
fun prefixDictSet(mutate self: cell, keyLen: int, key: slice, value: slice): bool
fun prefixDictSet(mutate self: cell?, keyLen: int, key: slice, value: slice): bool
asm(value key self keyLen) "PFXDICTSET";
@pure
fun prefixDictDelete(mutate self: cell, keyLen: int, key: slice): bool
fun prefixDictDelete(mutate self: cell?, keyLen: int, key: slice): bool
asm(key self keyLen) "PFXDICTDEL";

View file

@ -1,5 +1,5 @@
// A part of standard library for Tolk
tolk 0.8
tolk 0.9
/// Usually `c3` has a continuation initialized by the whole code of the contract. It is used for function calls.
/// The primitive returns the current value of `c3`.