Everscale types

Status: WIP
About
A set of primitive types and utilities for the Everscale blockchain.
Heavily inspired by ton-labs-types,
but with much more emphasis on speed.
Basic usage
Get Cell from Vec<u8> representation of bytes
use Boc;
let cell: Cell = decode?;
Encode any model e.g.MerkleProof to base64 BOC representation and vice versa
use BocRepr;
let cell = create_for_cell
.build
.unwrap;
let encoded = encode_base64.unwrap;
let decoded = decode_base64?.as_ref.?:
Get specific everscale type from Cell
use BlockProof;
let proof: BlockProof = cell.?;
Same usage for virtualized cell
use DynCell;
use Block;
let virt_cell: &DynCell = cell.virtualize;
let block = virt_cell.?;
You can also use CellBuilder to create any Cell
let mut builder = new;
builder.store_bit_one?;
builder.store_u32?
builder.store_slice?;
builder.store_raw?;
// store references to another cells
builder.store_reference?;
builder.store_reference?;
let final_cell = builder.build?;
Development
How to bench
How to miri check
# Add Miri component
# Run all tests with Miri
How to fuzz
# Install fuzzer
# Run any of the fuzzer targets
Contributing
We welcome contributions to the project! If you notice any issues or errors, feel free to open an issue or submit a pull request.
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or https://opensource.org/licenses/MIT)
at your option.