Mavryk_raw_protocol_001_PtAtLas.Apply_internal_results
Types representing results of applying an internal operation.
These are used internally by Apply
.
type 'kind internal_operation_contents =
| Transaction : {
amount : Alpha_context.Tez.mav;
parameters : Alpha_context.Script.lazy_expr;
entrypoint : Alpha_context.Entrypoint.t;
destination : Alpha_context.Destination.t;
} -> Alpha_context.Kind.transaction internal_operation_contents
| Origination : {
delegate : Mavryk_protocol_environment_001_PtAtLas.Signature.Public_key_hash.t
option;
script : Alpha_context.Script.t;
credit : Alpha_context.Tez.mav;
} -> Alpha_context.Kind.origination internal_operation_contents
| Delegation : Mavryk_protocol_environment_001_PtAtLas.Signature.Public_key_hash.t
option -> Alpha_context.Kind.delegation
internal_operation_contents
| Event : {
ty : Alpha_context.Script.expr;
tag : Alpha_context.Entrypoint.t;
payload : Alpha_context.Script.expr;
} -> Alpha_context.Kind.event internal_operation_contents
internal_operation_contents
are the internal operations as output in receipts. The type simply weakens Script_typed_ir.internal_operation_contents
so that it is easier to define an encoding for it (i.e. we remove the typed parameter).
type 'kind internal_operation = {
sender : Alpha_context.Destination.t;
operation : 'kind internal_operation_contents;
nonce : int;
}
type packed_internal_operation =
| Internal_operation : 'kind internal_operation -> packed_internal_operation
val packed_internal_operation :
Script_typed_ir.packed_internal_operation ->
packed_internal_operation
val packed_internal_operations :
Script_typed_ir.packed_internal_operation list ->
packed_internal_operation list
type successful_transaction_result =
| Transaction_to_contract_result of {
storage : Alpha_context.Script.expr option;
lazy_storage_diff : Alpha_context.Lazy_storage.diffs option;
balance_updates : Alpha_context.Receipt.balance_updates;
ticket_receipt : Ticket_receipt.t;
originated_contracts : Contract_hash.t list;
consumed_gas : Alpha_context.Gas.Arith.fp;
storage_size : Mavryk_protocol_environment_001_PtAtLas.Z.t;
paid_storage_size_diff : Mavryk_protocol_environment_001_PtAtLas.Z.t;
allocated_destination_contract : bool;
}
| Transaction_to_sc_rollup_result of {
consumed_gas : Alpha_context.Gas.Arith.fp;
ticket_receipt : Ticket_receipt.t;
}
| Transaction_to_zk_rollup_result of {
ticket_hash : Alpha_context.Ticket_hash.t;
balance_updates : Alpha_context.Receipt.balance_updates;
consumed_gas : Alpha_context.Gas.Arith.fp;
paid_storage_size_diff : Mavryk_protocol_environment_001_PtAtLas.Z.t;
}
Result of applying an internal transaction.
type successful_origination_result = {
lazy_storage_diff : Alpha_context.Lazy_storage.diffs option;
balance_updates : Alpha_context.Receipt.balance_updates;
originated_contracts : Contract_hash.t list;
consumed_gas : Alpha_context.Gas.Arith.fp;
storage_size : Mavryk_protocol_environment_001_PtAtLas.Z.t;
paid_storage_size_diff : Mavryk_protocol_environment_001_PtAtLas.Z.t;
}
Result of applying an internal origination.
type _ successful_internal_operation_result =
| ITransaction_result : successful_transaction_result -> Alpha_context.Kind.transaction
successful_internal_operation_result
| IOrigination_result : successful_origination_result -> Alpha_context.Kind.origination
successful_internal_operation_result
| IDelegation_result : {
consumed_gas : Alpha_context.Gas.Arith.fp;
balance_updates : Alpha_context.Receipt.balance_updates;
} -> Alpha_context.Kind.delegation successful_internal_operation_result
| IEvent_result : {
consumed_gas : Alpha_context.Gas.Arith.fp;
} -> Alpha_context.Kind.event successful_internal_operation_result
Result of applying a Script_typed_ir.internal_operation_contents
.
type 'kind internal_operation_result =
('kind,
'kind Alpha_context.Kind.manager,
'kind successful_internal_operation_result)
Apply_operation_result.operation_result
type packed_internal_operation_result =
| Internal_operation_result : 'kind internal_operation
* 'kind internal_operation_result -> packed_internal_operation_result
val internal_operation :
'kind Script_typed_ir.internal_operation ->
'kind internal_operation
val pack_internal_operation_result :
'kind Script_typed_ir.internal_operation ->
'kind internal_operation_result ->
packed_internal_operation_result
val internal_operation_encoding :
packed_internal_operation
Mavryk_protocol_environment_001_PtAtLas.Data_encoding.t
val internal_operation_result_encoding :
packed_internal_operation_result
Mavryk_protocol_environment_001_PtAtLas.Data_encoding.t