Alpha_context.Script
This module re-exports definitions from Script_repr
and Michelson_v1_primitives
.
type prim = Michelson_v1_primitives.prim =
| K_parameter
| K_storage
| K_code
| K_view
| D_False
| D_Elt
| D_Left
| D_None
| D_Pair
| D_Right
| D_Some
| D_True
| D_Unit
| D_Lambda_rec
| I_PACK
| I_UNPACK
| I_BLAKE2B
| I_SHA256
| I_SHA512
| I_ABS
| I_ADD
| I_AMOUNT
| I_AND
| I_BALANCE
| I_CAR
| I_CDR
| I_CHAIN_ID
| I_CHECK_SIGNATURE
| I_COMPARE
| I_CONCAT
| I_CONS
| I_CREATE_ACCOUNT
| I_CREATE_CONTRACT
| I_IMPLICIT_ACCOUNT
| I_DIP
| I_DROP
| I_DUP
| I_VIEW
| I_EDIV
| I_EMPTY_BIG_MAP
| I_EMPTY_MAP
| I_EMPTY_SET
| I_EQ
| I_EXEC
| I_APPLY
| I_FAILWITH
| I_GE
| I_GET
| I_GET_AND_UPDATE
| I_GT
| I_HASH_KEY
| I_IF
| I_IF_CONS
| I_IF_LEFT
| I_IF_NONE
| I_INT
| I_LAMBDA
| I_LAMBDA_REC
| I_LE
| I_LEFT
| I_LEVEL
| I_LOOP
| I_LSL
| I_LSR
| I_LT
| I_MAP
| I_MEM
| I_MUL
| I_NEG
| I_NEQ
| I_NIL
| I_NONE
| I_NOT
| I_NOW
| I_MIN_BLOCK_TIME
| I_OR
| I_PAIR
| I_UNPAIR
| I_PUSH
| I_RIGHT
| I_SIZE
| I_SOME
| I_SOURCE
| I_SENDER
| I_SELF
| I_SELF_ADDRESS
| I_SLICE
| I_STEPS_TO_QUOTA
| I_SUB
| I_SUB_MUMAV
| I_SWAP
| I_TRANSFER_TOKENS
| I_SET_DELEGATE
| I_UNIT
| I_UPDATE
| I_XOR
| I_ITER
| I_LOOP_LEFT
| I_ADDRESS
| I_CONTRACT
| I_ISNAT
| I_CAST
| I_RENAME
| I_SAPLING_EMPTY_STATE
| I_SAPLING_VERIFY_UPDATE
| I_DIG
| I_DUG
| I_NEVER
| I_VOTING_POWER
| I_TOTAL_VOTING_POWER
| I_KECCAK
| I_SHA3
| I_PAIRING_CHECK
| I_TICKET
| I_TICKET_DEPRECATED
| I_READ_TICKET
| I_SPLIT_TICKET
| I_JOIN_TICKETS
| I_OPEN_CHEST
| I_EMIT
| I_BYTES
| I_NAT
| T_bool
| T_contract
| T_int
| T_key
| T_key_hash
| T_lambda
| T_list
| T_map
| T_big_map
| T_nat
| T_option
| T_or
| T_pair
| T_set
| T_signature
| T_string
| T_bytes
| T_mumav
| T_timestamp
| T_unit
| T_operation
| T_address
| T_tx_rollup_l2_address
| T_sapling_transaction
| T_sapling_transaction_deprecated
| T_sapling_state
| T_chain_id
| T_never
| T_bls12_381_g1
| T_bls12_381_g2
| T_bls12_381_fr
| T_ticket
| T_chest_key
| T_chest
| H_constant
type lazy_expr =
expr Mavryk_protocol_environment_001_PtAtLas.Data_encoding.lazy_t
type 'location michelson_node =
('location, prim) Mavryk_protocol_environment_001_PtAtLas.Micheline.node
type node = location michelson_node
val location_encoding :
location Mavryk_protocol_environment_001_PtAtLas.Data_encoding.t
val expr_encoding :
expr Mavryk_protocol_environment_001_PtAtLas.Data_encoding.t
val prim_encoding :
prim Mavryk_protocol_environment_001_PtAtLas.Data_encoding.t
val encoding : t Mavryk_protocol_environment_001_PtAtLas.Data_encoding.t
val lazy_expr_encoding :
lazy_expr Mavryk_protocol_environment_001_PtAtLas.Data_encoding.t
val deserialization_cost_estimated_from_bytes : int -> Gas.cost
val bytes_node_cost : bytes -> Gas.cost
Mode of deserialization gas consumption in force_decode
:
Always
: the gas is taken independently of the internal state of the lazy_expr
When_needed
: the gas is consumed only if the lazy_expr
has never been deserialized before.val force_decode_in_context :
consume_deserialization_gas:consume_deserialization_gas ->
context ->
lazy_expr ->
(expr * context) Mavryk_protocol_environment_001_PtAtLas.Error_monad.tzresult
Decode an expression in the context after consuming the deserialization gas cost (see consume_deserialization_gas
).
val force_bytes_in_context :
context ->
lazy_expr ->
(bytes * context)
Mavryk_protocol_environment_001_PtAtLas.Error_monad.tzresult
Decode an expression in the context after consuming the deserialization gas cost.
val consume_decoding_gas :
Gas.Arith.fp ->
lazy_expr ->
Gas.Arith.fp Mavryk_protocol_environment_001_PtAtLas.Error_monad.tzresult
consume_decoding_gas available_gas lexpr
subtracts (a lower bound on) the cost to deserialize lexpr
from available_gas
. The cost does not depend on the internal state of the lazy_expr.
val unit_parameter : lazy_expr
val is_unit : expr -> bool
val strip_locations_cost : _ michelson_node -> Gas.cost