package tezos-protocol-010-PtGRANAD
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=43723d096307603703a1a89ed1b2eb202b365f5e7824b96b0cbf813b343a6cf7
sha512=b2a637f2e965000d3d49ad85277ca24d6cb07a1a7cf2bc69d296d8b03ad78c3eaa8e21e94b9162e62c2e11649cd03bc845b2a3dafe623b91065df69d47dc8e4f
doc/tezos-protocol-010-PtGRANAD.raw/Tezos_raw_protocol_010_PtGRANAD/Script_interpreter/index.html
Module Tezos_raw_protocol_010_PtGRANAD.Script_interpreter
Source
This is the Michelson interpreter.
This module offers a way to execute either a Michelson script or a Michelson instruction.
Implementation details are documented in the .ml file.
type Tezos_protocol_environment_010_PtGRANAD.Error_monad.error +=
| Overflow of Alpha_context.Script.location * Script_typed_ir.execution_trace option
type Tezos_protocol_environment_010_PtGRANAD.Error_monad.error +=
| Runtime_contract_error : Alpha_context.Contract.t * Alpha_context.Script.expr -> Tezos_protocol_environment_010_PtGRANAD.Error_monad.error
type Tezos_protocol_environment_010_PtGRANAD.Error_monad.error +=
| Bad_contract_parameter of Alpha_context.Contract.t
type execution_result = {
ctxt : Alpha_context.context;
storage : Alpha_context.Script.expr;
lazy_storage_diff : Alpha_context.Lazy_storage.diffs option;
operations : Alpha_context.packed_internal_operation list;
}
type step_constants = {
source : Alpha_context.Contract.t;
payer : Alpha_context.Contract.t;
self : Alpha_context.Contract.t;
amount : Alpha_context.Tez.t;
chain_id : Tezos_protocol_environment_010_PtGRANAD.Chain_id.t;
}
val step :
Script_typed_ir.logger option ->
Alpha_context.context ->
step_constants ->
('a, 's, 'r, 'f) Script_typed_ir.kdescr ->
'a ->
's ->
('r * 'f * Alpha_context.context)
Tezos_protocol_environment_010_PtGRANAD.Error_monad.tzresult
Tezos_protocol_environment_010_PtGRANAD.Lwt.t
val execute :
?logger:Script_typed_ir.logger ->
Alpha_context.t ->
Script_ir_translator.unparsing_mode ->
step_constants ->
script:Alpha_context.Script.t ->
entrypoint:string ->
parameter:Alpha_context.Script.expr ->
internal:bool ->
execution_result Tezos_protocol_environment_010_PtGRANAD.Error_monad.tzresult
Tezos_protocol_environment_010_PtGRANAD.Lwt.t
val kstep :
Script_typed_ir.logger option ->
Alpha_context.context ->
step_constants ->
('a, 's, 'r, 'f) Script_typed_ir.kinstr ->
'a ->
's ->
('r * 'f * Alpha_context.context)
Tezos_protocol_environment_010_PtGRANAD.Error_monad.tzresult
Tezos_protocol_environment_010_PtGRANAD.Lwt.t
kstep logger ctxt step_constants kinstr accu stack
interprets the script represented by kinstr
under the context ctxt
. This will turn a stack whose topmost element is accu
and remaining elements stack
into a new accumulator and a new stack. This function also returns an updated context. If logger
is given, kstep
calls back its functions at specific points of the execution. The execution is parameterized by some step_constants
.
Internal interpretation loop ============================
The following types and the following functions are exposed in the interface to allow the inference of a gas model in snoop.
Strictly speaking, they should not be considered as part of the interface since they expose implementation details that may change in the future.