package tezos-protocol-alpha
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=ad9e08819871c75ba6f4530b125f7d157799398e4d77a1e6bfea9d91ff37ff55
sha512=c5dc4d40cc09bc6980fbbdb5c2e105bf4252cf9cfcb2b49660b0ebe4dc789f6709ec3b3bf2f87d81580d3eed9521eeb1c960f24d9b14eb0285aaba1f84d10a9b
doc/tezos-protocol-alpha.raw/Tezos_raw_protocol_alpha/Tx_rollup_state_storage/index.html
Module Tezos_raw_protocol_alpha.Tx_rollup_state_storage
Source
A collection of functions to manipulate the state of a transaction rollup.
Except if the contrary is explicitly stated, the functions of this module are carbonated.
val init :
Raw_context.t ->
Tx_rollup_repr.t ->
Raw_context.t Tezos_protocol_environment_alpha.Error_monad.tzresult
Tezos_protocol_environment_alpha.Lwt.t
init ctxt tx_rollup
initializes the state of tx_rollup
.
Returns the error Tx_rollup_already_exists
iff this function has already been called for tx_rollup
, which is definitely something that should not happen, because the protocol is expected to pick fresh addresses when it originates new transaction rollups (and does so by relying on the “origination nonce” derived from the hash of the operation responsible for the origination, using the same procedure as smart contracts).
Raising this error would therefore indicate a bug in the protocol.
val find :
Raw_context.t ->
Tx_rollup_repr.t ->
(Raw_context.t * Tx_rollup_state_repr.t option)
Tezos_protocol_environment_alpha.Error_monad.tzresult
Tezos_protocol_environment_alpha.Lwt.t
find ctxt tx_rollup
returns the current state of tx_rollup
. If tx_rollup
is not the address of an existing transaction rollup, None
is returned instead.
val get :
Raw_context.t ->
Tx_rollup_repr.t ->
(Raw_context.t * Tx_rollup_state_repr.t)
Tezos_protocol_environment_alpha.Error_monad.tzresult
Tezos_protocol_environment_alpha.Lwt.t
get ctxt tx_rollup
returns the current state of tx_rollup
in the context.
Returns the Tx_rollup_does_not_exist
error iff tx_rollup
is not the address of an existing transaction rollup.
val update :
Raw_context.t ->
Tx_rollup_repr.t ->
Tx_rollup_state_repr.t ->
Raw_context.t Tezos_protocol_environment_alpha.Error_monad.tzresult
Tezos_protocol_environment_alpha.Lwt.t
update ctxt tx_rollup new_state
replaces the stored state of tx_rollup
with new_state
.
val assert_exist :
Raw_context.t ->
Tx_rollup_repr.t ->
Raw_context.t Tezos_protocol_environment_alpha.Error_monad.tzresult
Tezos_protocol_environment_alpha.Lwt.t
assert_exist ctxt tx_rollup
fails with Tx_rollup_does_not_exist
when tx_rollup
is not a valid transaction rollup address.