RPC.Scripts
module S : sig ... end
module type UNPARSING_MODE = sig ... end
module Traced_interpreter (Unparsing_mode : UNPARSING_MODE) : sig ... end
module Unparse_types : sig ... end
module Normalize_stack : sig ... end
val pp_instr_name :
'a 'b 'c 'd. Mavryk_protocol_001_PtAtLas.Environment.Format.formatter ->
('a, 'b, 'c, 'd) Mavryk_protocol_001_PtAtLas.Protocol.Script_typed_ir.kinstr ->
unit
val run_operation_service :
Mavryk_protocol_001_PtAtLas.Protocol.Services_registration.rpc_context ->
< version : 'a.. > ->
(Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.packed_operation
* Mavryk_protocol_environment_001_PtAtLas.Chain_id.t) ->
('b
* (Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.packed_protocol_data
* Mavryk_raw_protocol_001_PtAtLas.Apply_results.packed_operation_metadata),
Mavryk_protocol_001_PtAtLas.Environment.Error_monad.error
Mavryk_protocol_environment_001_PtAtLas.Error_monad.trace)
Stdlib.result
Lwt.t
Validate and apply the operation but skip signature checks; do not support consensus operations.
Return the unchanged operation protocol data, and the operation receipt ie. metadata containing balance updates, consumed gas, application success or failure, etc.
val simulate_operation_service :
Mavryk_protocol_001_PtAtLas.Protocol.Services_registration.rpc_context ->
< version : 'a.. > ->
(int32 option
* Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.packed_operation
* Mavryk_protocol_environment_001_PtAtLas.Chain_id.t
* int) ->
('b
* (Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.packed_protocol_data
* Mavryk_raw_protocol_001_PtAtLas.Apply_results.packed_operation_metadata),
Mavryk_protocol_001_PtAtLas.Environment.Error_monad.error
Mavryk_protocol_environment_001_PtAtLas.Error_monad.trace)
Stdlib.result
Lwt.t
type run_code_config = {
balance : Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Tez.t;
self : Mavryk_protocol_001_PtAtLas.Protocol.Contract_hash.t;
payer : Mavryk_protocol_001_PtAtLas.Environment.Signature.public_key_hash;
sender : Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Contract.t;
}
val default_balance : Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Tez.t
val run_code :
unparsing_mode:
Mavryk_protocol_001_PtAtLas.Protocol.Script_ir_unparser.unparsing_mode
option ->
gas:
Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Gas.Arith.integral
option ->
entrypoint:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Entrypoint.t ->
balance:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Tez.t option ->
other_contracts:S.other_contract_description list option ->
extra_big_maps:S.extra_big_map_description list option ->
script:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Script.expr ->
storage:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Script.expr ->
input:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Script.expr ->
amount:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Tez.t ->
chain_id:Mavryk_protocol_001_PtAtLas.Environment.Chain_id.t ->
sender:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Contract.t option ->
payer:
Mavryk_protocol_environment_001_PtAtLas.Signature.Public_key_hash.t option ->
self:Mavryk_raw_protocol_001_PtAtLas.Contract_hash.t option ->
now:Mavryk_protocol_001_PtAtLas.Protocol.Script_timestamp.t option ->
level:
Mavryk_protocol_001_PtAtLas.Protocol.Script_int.n
Mavryk_protocol_001_PtAtLas.Protocol.Script_int.num
option ->
'a Mavryk_protocol_001_PtAtLas.Environment.RPC_context.simple ->
'b ->
(Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Script.expr
* Mavryk_protocol_001_PtAtLas.Protocol.Apply_internal_results.packed_internal_operation
list
* Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Lazy_storage.diffs
option)
Mavryk_protocol_environment_001_PtAtLas.Error_monad.shell_tzresult
Mavryk_protocol_environment_001_PtAtLas.Lwt.t
val trace_code :
unparsing_mode:
Mavryk_protocol_001_PtAtLas.Protocol.Script_ir_unparser.unparsing_mode
option ->
gas:
Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Gas.Arith.integral
option ->
entrypoint:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Entrypoint.t ->
balance:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Tez.t option ->
other_contracts:S.other_contract_description list option ->
extra_big_maps:S.extra_big_map_description list option ->
script:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Script.expr ->
storage:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Script.expr ->
input:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Script.expr ->
amount:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Tez.t ->
chain_id:Mavryk_protocol_001_PtAtLas.Environment.Chain_id.t ->
sender:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Contract.t option ->
payer:
Mavryk_protocol_environment_001_PtAtLas.Signature.Public_key_hash.t option ->
self:Mavryk_raw_protocol_001_PtAtLas.Contract_hash.t option ->
now:Mavryk_protocol_001_PtAtLas.Protocol.Script_timestamp.t option ->
level:
Mavryk_protocol_001_PtAtLas.Protocol.Script_int.n
Mavryk_protocol_001_PtAtLas.Protocol.Script_int.num
option ->
'a Mavryk_protocol_001_PtAtLas.Environment.RPC_context.simple ->
'b ->
(Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Script.expr
* Mavryk_protocol_001_PtAtLas.Protocol.Apply_internal_results.packed_internal_operation
list
* Mavryk_protocol_001_PtAtLas.Protocol.Script_typed_ir.execution_trace
* Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Lazy_storage.diffs
option)
Mavryk_protocol_environment_001_PtAtLas.Error_monad.shell_tzresult
Mavryk_protocol_environment_001_PtAtLas.Lwt.t
val run_tzip4_view :
gas:
Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Gas.Arith.integral
option ->
other_contracts:S.other_contract_description list option ->
extra_big_maps:S.extra_big_map_description list option ->
contract:Mavryk_raw_protocol_001_PtAtLas.Contract_hash.t ->
entrypoint:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Entrypoint.t ->
input:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Script.expr ->
chain_id:Mavryk_protocol_001_PtAtLas.Environment.Chain_id.t ->
now:Mavryk_protocol_001_PtAtLas.Protocol.Script_timestamp.t option ->
level:
Mavryk_protocol_001_PtAtLas.Protocol.Script_int.n
Mavryk_protocol_001_PtAtLas.Protocol.Script_int.num
option ->
sender:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Contract.t option ->
payer:
Mavryk_protocol_environment_001_PtAtLas.Signature.Public_key_hash.t option ->
unparsing_mode:
Mavryk_protocol_001_PtAtLas.Protocol.Script_ir_unparser.unparsing_mode ->
'a Mavryk_protocol_001_PtAtLas.Environment.RPC_context.simple ->
'b ->
Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Script.expr
Mavryk_protocol_environment_001_PtAtLas.Error_monad.shell_tzresult
Mavryk_protocol_environment_001_PtAtLas.Lwt.t
val run_script_view :
gas:
Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Gas.Arith.integral
option ->
other_contracts:S.other_contract_description list option ->
extra_big_maps:S.extra_big_map_description list option ->
contract:Mavryk_raw_protocol_001_PtAtLas.Contract_hash.t ->
view:string ->
input:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Script.expr ->
unlimited_gas:bool ->
chain_id:Mavryk_protocol_001_PtAtLas.Environment.Chain_id.t ->
now:Mavryk_protocol_001_PtAtLas.Protocol.Script_timestamp.t option ->
level:
Mavryk_protocol_001_PtAtLas.Protocol.Script_int.n
Mavryk_protocol_001_PtAtLas.Protocol.Script_int.num
option ->
sender:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Contract.t option ->
payer:
Mavryk_protocol_environment_001_PtAtLas.Signature.Public_key_hash.t option ->
unparsing_mode:
Mavryk_protocol_001_PtAtLas.Protocol.Script_ir_unparser.unparsing_mode ->
'a Mavryk_protocol_001_PtAtLas.Environment.RPC_context.simple ->
'b ->
Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Script.expr
Mavryk_protocol_environment_001_PtAtLas.Error_monad.shell_tzresult
Mavryk_protocol_environment_001_PtAtLas.Lwt.t
run_script_view
is an helper function to call the corresponding RPC.
val run_instr :
gas:
Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Gas.Arith.integral
option ->
legacy:bool ->
input:
(Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Script.expr
* Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Script.expr)
list ->
code:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Script.expr ->
chain_id:Mavryk_protocol_001_PtAtLas.Environment.Chain_id.t ->
now:Mavryk_protocol_001_PtAtLas.Protocol.Script_timestamp.t option ->
level:
Mavryk_protocol_001_PtAtLas.Protocol.Script_int.n
Mavryk_protocol_001_PtAtLas.Protocol.Script_int.num
option ->
unparsing_mode:
Mavryk_protocol_001_PtAtLas.Protocol.Script_ir_unparser.unparsing_mode
option ->
source:
Mavryk_protocol_environment_001_PtAtLas.Signature.Public_key_hash.t option ->
sender:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Contract.t option ->
self:Mavryk_raw_protocol_001_PtAtLas.Contract_hash.t option ->
parameter:
Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Script.expr option ->
amount:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Tez.t ->
balance:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Tez.t option ->
other_contracts:S.other_contract_description list option ->
extra_big_maps:S.extra_big_map_description list option ->
'a Mavryk_protocol_001_PtAtLas.Environment.RPC_context.simple ->
'b ->
((Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Script.expr
* Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Script.expr)
list
* Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Gas.t)
Mavryk_protocol_environment_001_PtAtLas.Error_monad.shell_tzresult
Mavryk_protocol_environment_001_PtAtLas.Lwt.t
val typecheck_code :
gas:
Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Gas.Arith.integral
option ->
legacy:bool ->
script:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Script.expr ->
show_types:bool ->
'a Mavryk_protocol_001_PtAtLas.Environment.RPC_context.simple ->
'b ->
((Mavryk_raw_protocol_001_PtAtLas.Alpha_context.Script.location
* (Mavryk_raw_protocol_001_PtAtLas.Alpha_context.Script.expr list
* Mavryk_raw_protocol_001_PtAtLas.Alpha_context.Script.expr list))
list
* Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Gas.t)
Mavryk_protocol_environment_001_PtAtLas.Error_monad.shell_tzresult
Mavryk_protocol_environment_001_PtAtLas.Lwt.t
val script_size :
gas:
Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Gas.Arith.integral
option ->
legacy:bool ->
script:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Script.expr ->
storage:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Script.expr ->
'a Mavryk_protocol_001_PtAtLas.Environment.RPC_context.simple ->
'b ->
int Mavryk_protocol_environment_001_PtAtLas.Error_monad.shell_tzresult
Mavryk_protocol_environment_001_PtAtLas.Lwt.t
val typecheck_data :
gas:
Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Gas.Arith.integral
option ->
legacy:bool ->
data:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Script.expr ->
ty:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Script.expr ->
'a Mavryk_protocol_001_PtAtLas.Environment.RPC_context.simple ->
'b ->
Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Gas.t
Mavryk_protocol_environment_001_PtAtLas.Error_monad.shell_tzresult
Mavryk_protocol_environment_001_PtAtLas.Lwt.t
val pack_data :
gas:
Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Gas.Arith.integral
option ->
data:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Script.expr ->
ty:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Script.expr ->
'a Mavryk_protocol_001_PtAtLas.Environment.RPC_context.simple ->
'b ->
(Mavryk_protocol_environment_001_PtAtLas.Bytes.t
* Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Gas.t)
Mavryk_protocol_environment_001_PtAtLas.Error_monad.shell_tzresult
Mavryk_protocol_environment_001_PtAtLas.Lwt.t
val normalize_data :
legacy:bool ->
other_contracts:S.other_contract_description list option ->
extra_big_maps:S.extra_big_map_description list option ->
data:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Script.expr ->
ty:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Script.expr ->
unparsing_mode:
Mavryk_protocol_001_PtAtLas.Protocol.Script_ir_unparser.unparsing_mode ->
'a Mavryk_protocol_001_PtAtLas.Environment.RPC_context.simple ->
'b ->
Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Script.expr
Mavryk_protocol_environment_001_PtAtLas.Error_monad.shell_tzresult
Mavryk_protocol_environment_001_PtAtLas.Lwt.t
val normalize_stack :
legacy:bool ->
other_contracts:S.other_contract_description list option ->
extra_big_maps:S.extra_big_map_description list option ->
stack:
(Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Script.expr
* Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Script.expr)
list ->
unparsing_mode:
Mavryk_protocol_001_PtAtLas.Protocol.Script_ir_unparser.unparsing_mode ->
'a Mavryk_protocol_001_PtAtLas.Environment.RPC_context.simple ->
'b ->
(Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Script.expr
* Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Script.expr)
list
Mavryk_protocol_environment_001_PtAtLas.Error_monad.shell_tzresult
Mavryk_protocol_environment_001_PtAtLas.Lwt.t
val normalize_script :
script:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Script.expr ->
unparsing_mode:
Mavryk_protocol_001_PtAtLas.Protocol.Script_ir_unparser.unparsing_mode ->
'a Mavryk_protocol_001_PtAtLas.Environment.RPC_context.simple ->
'b ->
Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Script.expr
Mavryk_protocol_environment_001_PtAtLas.Error_monad.shell_tzresult
Mavryk_protocol_environment_001_PtAtLas.Lwt.t
val normalize_type :
ty:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Script.expr ->
'a Mavryk_protocol_001_PtAtLas.Environment.RPC_context.simple ->
'b ->
Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Script.expr
Mavryk_protocol_environment_001_PtAtLas.Error_monad.shell_tzresult
Mavryk_protocol_environment_001_PtAtLas.Lwt.t
val run_operation :
op:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Operation.packed ->
chain_id:Mavryk_protocol_001_PtAtLas.Environment.Chain_id.t ->
?version:version ->
'a Mavryk_protocol_001_PtAtLas.Environment.RPC_context.simple ->
'b ->
(Mavryk_raw_protocol_001_PtAtLas.Alpha_context.Operation.packed_protocol_data
* Mavryk_protocol_001_PtAtLas.Protocol.Apply_results.packed_operation_metadata,
Mavryk_base.TzPervasives.Error_monad.tztrace)
Stdlib.result
Lwt.t
val simulate_operation :
op:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Operation.packed ->
chain_id:Mavryk_protocol_001_PtAtLas.Environment.Chain_id.t ->
latency:int ->
?version:version ->
?successor_level:bool ->
?blocks_before_activation:int32 ->
'a Mavryk_protocol_001_PtAtLas.Environment.RPC_context.simple ->
'b ->
(Mavryk_raw_protocol_001_PtAtLas.Alpha_context.Operation.packed_protocol_data
* Mavryk_protocol_001_PtAtLas.Protocol.Apply_results.packed_operation_metadata,
Mavryk_base.TzPervasives.Error_monad.tztrace)
Stdlib.result
Lwt.t
val entrypoint_type :
script:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Script.expr ->
entrypoint:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Entrypoint.t ->
'a Mavryk_protocol_001_PtAtLas.Environment.RPC_context.simple ->
'b ->
Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Script.expr
Mavryk_protocol_environment_001_PtAtLas.Error_monad.shell_tzresult
Mavryk_protocol_environment_001_PtAtLas.Lwt.t
val list_entrypoints :
'a Mavryk_protocol_001_PtAtLas.Environment.RPC_context.simple ->
'b ->
script:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Script.expr ->
(Mavryk_protocol_001_PtAtLas.Protocol.Michelson_v1_primitives.prim list list
* (string * Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Script.expr)
list)
Mavryk_protocol_environment_001_PtAtLas.Error_monad.shell_tzresult
Mavryk_protocol_environment_001_PtAtLas.Lwt.t