Overview

Boc

There are 3 main boc types: Builder, Cell and Slice. You can print any of them:

builder = begin_cell().store_uint(10, 20).store_ref(begin_cell().store_bit(1).end_cell())
print(builder)
print([builder, builder.end_cell()])

>>> 20[0000A0] -> {
	 1[80]
 }
>>> [<Builder 20[0000A0] -> 1 refs>, <Cell 20[0000A0] -> 1 refs>]

For data storage it's used TvmBitarray class, which is bitarray.bitarray wraper with some limitations, for example you cannot store more than 1023 bits.

Address

You can init address providing in constructor address in both raw and user-friendly form. Moreover you can provide tuple (workchain: int, hash_part: bytes).

You can convert address to string providing in to_str method is_user_friendly, is_url_safe, is_bounceable and is_test_only arguments.

Last updated