package tezos-protocol-020-PsParisC

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

originate ?whitelist context ~kind ~parameters_ty ~genesis_commitment produces an address a for a smart contract rollup using the origination nonce found in context. This function also initializes the storage with a new entry indexed by a to remember the kind of the rollup at address a.

Also returns the number of allocated bytes.

raw_originate ?whitelist context ~kind ~parameters_ty ~genesis_commitment ~address is exactly originate but provides the rollup's address (address) instead of randomly generating it.

This should not be used by apply.ml, this is needed for bootstrap smart rollups only.

kind context address returns the kind of the given rollup address iff address is an existing rollup. Fails with an Sc_rollup_does_not_exist error in case the rollup does not exist.

genesis_info ctxt sc_rollup returns the level at which a sc_rollup was originated, and its genesis commitment hash.

get_metadata ctxt rollup retrieves the origination level of the rollup using Sc_rollup_commitment_repr.genesis_info and creates a Sc_rollup_metadata_repr.t. Fails with Sc_rollup_does_not_exist {rollup} if the genesis info is missing.

parameters_type ctxt rollup returns the registered type of a rollup. Returns None in case there is no registered type for the rollup.

must_exist ctxt rollup checks whether the given rollup exists in ctxt. If rollup exists, a new context is returned with gas consumed for the lookup cost. If it does not exist, an error is returned.

val set_previous_commitment_period : Raw_context.t -> int -> Raw_context.t Tezos_protocol_environment_020_PsParisC.Lwt.t

set_previous_commitment_period ctxt previous_period is expected to be called during the protocol stitching, to ensure the previous commitment period length remains available in the next protocol, in order to deal with the commitments posted during the previous protocol but not yet cemented.

previous_protocol_constants ctxt fetches from ctxt the first level of the current protocol and the previous commitment period.

Both values are bounded in size and small, so we don’t carbonate the call.

Warning: b This function requires that the previous commitment period has been correctly set with set_previous_commitment_period during the latest stitching.

OCaml

Innovation. Community. Security.