#rollup #tezos #smart #no-alloc #api-bindings #error-code

no-std tezos-smart-rollup-core

Low-level host function definitions & constants for Tezos Smart Rollups

4 releases

0.2.2 Nov 24, 2023
0.2.1 Jul 28, 2023
0.2.0 Jun 15, 2023
0.1.0 Apr 25, 2023

#19 in #tezos

Download history 27/week @ 2023-12-18 22/week @ 2023-12-25 32/week @ 2024-01-01 37/week @ 2024-01-08 19/week @ 2024-01-15 13/week @ 2024-01-22 23/week @ 2024-01-29 25/week @ 2024-02-05 32/week @ 2024-02-12 33/week @ 2024-02-19 47/week @ 2024-02-26 51/week @ 2024-03-04 60/week @ 2024-03-11 51/week @ 2024-03-18 52/week @ 2024-03-25 68/week @ 2024-04-01

243 downloads per month
Used in 11 crates (9 directly)

MIT license

27KB
386 lines

Core API for the virtual smart_rollup_core WASM module, exposed by Tezos Smart Rollups.

About

In order for a kernel to do useful work, it must be able to read input from users, respond with output, and update its internal state. To do so, rollups make a set of C-style host functions available to kernels, which enable:

  • reading from the inbox.
  • writing to the outbox.
  • manipulating durable storage.

This crate provides the definitions of these host functions, including linking to the smart_rollup_core WASM module. In addition, various constants (such as error codes) used when interacting with these host functions, are defined here.

Safety

This crate exposes the host functions through the SmartRollupCore trait, which is unsafe to use - as it makes no effort to provide a safe rust API. A safe API is defined in the tezos-smart-rollup-host crate, as the Runtime trait.

It's therefore recommended to use the Runtime trait directly from the tezos-smart-rollup-host crate, or alternatively directly through the tezos-smart-rollup top-level SDK crate.

Dependencies

~0–790KB
~15K SLoC