package tezos-protocol-020-PsParisC

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Smart contract rollup.

Storage from this submodule must only be accessed through the module `Sc_rollup_storage`.

Each smart contract rollup is associated to:

  • a PVM kind (provided at creation time, read-only)
  • a metadata (generated at creation time, read-only)
  • a boot sector (provided at creation time, read-only)
  • a parameters type specifying the types of parameters the rollup accepts
  • the L1 block level at which the rollup was created
  • a merkelized inbox, of which only the root hash is stored
  • a map from stakers to their newest staked commitments
  • a map from stakers to commitments
  • a map from commitments to the time (level) of their first insertion

For performance reasons we also store (per rollup):

  • the total number of active stakers;
  • the number of stakers per commitment.
  • the commitments per inbox level.

See module Sc_rollup_repr.Commitment for details.

type context = Raw_context.t
type value = int

The type of the value

Tells if the data is already defined

Retrieve the value from the storage bucket ; returns a Storage_error if the key is not set or if the deserialisation fails

Retrieves the value from the storage bucket ; returns None if the data is not initialized, or Storage_helpers.Storage_error if the deserialisation fails

Allocates the storage bucket and initializes it ; returns a Storage_errorExisting_key if the bucket exists

Updates the content of the bucket ; returns a Storage_Error Missing_key if the value does not exist

Allocates the data and initializes it with a value ; just updates it if the bucket exists

When the value is Some v, allocates the data and initializes it with v ; just updates it if the bucket exists. When the value is None, deletes the storage bucket ; does nothing if the bucket does not exist.

Delete the storage bucket ; returns a Storage_error Missing_key if the bucket does not exist

Removes the storage bucket and its contents ; does nothing if the bucket does not exist

OCaml

Innovation. Community. Security.