From 82f20ade37df4169b0c42fe5305ad65e6d40913c Mon Sep 17 00:00:00 2001 From: Alain Mebsout Date: Thu, 5 Jul 2018 16:23:30 +0200 Subject: [PATCH] Proto: show big map diff in transaction receipt --- src/proto_alpha/lib_protocol/src/apply.ml | 2 ++ src/proto_alpha/lib_protocol/src/apply_results.ml | 12 +++++++----- src/proto_alpha/lib_protocol/src/apply_results.mli | 1 + 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/proto_alpha/lib_protocol/src/apply.ml b/src/proto_alpha/lib_protocol/src/apply.ml index 8f915eaa7..2efcc5f07 100644 --- a/src/proto_alpha/lib_protocol/src/apply.ml +++ b/src/proto_alpha/lib_protocol/src/apply.ml @@ -395,6 +395,7 @@ let apply_manager_operation_content : let result = Transaction_result { storage = None ; + big_map_diff = None; balance_updates = Delegate.cleanup_balance_updates [ Contract source, Debited amount ; @@ -431,6 +432,7 @@ let apply_manager_operation_content : let result = Transaction_result { storage = Some storage ; + big_map_diff; balance_updates = Delegate.cleanup_balance_updates [ Contract payer, Debited fees ; diff --git a/src/proto_alpha/lib_protocol/src/apply_results.ml b/src/proto_alpha/lib_protocol/src/apply_results.ml index 999f397ff..3fd74ff84 100644 --- a/src/proto_alpha/lib_protocol/src/apply_results.ml +++ b/src/proto_alpha/lib_protocol/src/apply_results.ml @@ -45,6 +45,7 @@ type _ successful_manager_operation_result = | Reveal_result : Kind.reveal successful_manager_operation_result | Transaction_result : { storage : Script.expr option ; + big_map_diff : Contract.big_map_diff option ; balance_updates : Delegate.balance_updates ; originated_contracts : Contract.t list ; consumed_gas : Z.t ; @@ -163,8 +164,9 @@ module Manager_result = struct make ~op_case: Operation.Encoding.Manager_operations.transaction_case ~encoding: - (obj6 + (obj7 (opt "storage" Script.expr_encoding) + (opt "big_map_diff" Contract.big_map_diff_encoding) (dft "balance_updates" Delegate.balance_updates_encoding []) (dft "originated_contracts" (list Contract.encoding) []) (dft "consumed_gas" z Z.zero) @@ -184,17 +186,17 @@ module Manager_result = struct ~proj: (function | Transaction_result - { storage ; balance_updates ; + { storage ; big_map_diff ; balance_updates ; originated_contracts ; consumed_gas ; storage_size ; paid_storage_size_diff } -> - (storage, balance_updates, + (storage, big_map_diff, balance_updates, originated_contracts, consumed_gas, storage_size, paid_storage_size_diff)) ~inj: - (fun (storage, balance_updates, + (fun (storage, big_map_diff, balance_updates, originated_contracts, consumed_gas, storage_size, paid_storage_size_diff) -> - Transaction_result { storage ; balance_updates ; + Transaction_result { storage ; big_map_diff ; balance_updates ; originated_contracts ; consumed_gas ; storage_size ; paid_storage_size_diff }) diff --git a/src/proto_alpha/lib_protocol/src/apply_results.mli b/src/proto_alpha/lib_protocol/src/apply_results.mli index ad37dd046..35d016658 100644 --- a/src/proto_alpha/lib_protocol/src/apply_results.mli +++ b/src/proto_alpha/lib_protocol/src/apply_results.mli @@ -89,6 +89,7 @@ and _ successful_manager_operation_result = | Reveal_result : Kind.reveal successful_manager_operation_result | Transaction_result : { storage : Script.expr option ; + big_map_diff : Contract.big_map_diff option ; balance_updates : Delegate.balance_updates ; originated_contracts : Contract.t list ; consumed_gas : Z.t ;