diff --git a/src/proto_alpha/lib_protocol/src/apply.ml b/src/proto_alpha/lib_protocol/src/apply.ml index 2aa67974c..59d20937b 100644 --- a/src/proto_alpha/lib_protocol/src/apply.ml +++ b/src/proto_alpha/lib_protocol/src/apply.ml @@ -373,6 +373,15 @@ let apply_manager_operation_content : (ctxt, (Reveal_result : kind successful_manager_operation_result), []) | Transaction { amount ; parameters ; destination } -> begin spend ctxt source amount >>=? fun ctxt -> + begin match Contract.is_implicit destination with + | None -> return (ctxt, []) + | Some _ -> + Contract.allocated ctxt destination >>=? function + | true -> return (ctxt, []) + | false -> + Fees.origination_burn ctxt ~payer >>=? fun (ctxt, orignation_burn) -> + return (ctxt, [ Delegate.Contract payer, Delegate.Debited orignation_burn ]) + end >>=? fun (ctxt, maybe_burn_balance_update) -> Contract.credit ctxt destination amount >>=? fun ctxt -> Contract.get_script ctxt destination >>=? fun (ctxt, script) -> match script with @@ -398,8 +407,9 @@ let apply_manager_operation_content : big_map_diff = None; balance_updates = Delegate.cleanup_balance_updates - [ Contract source, Debited amount ; - Contract destination, Credited amount ] ; + ([ Delegate.Contract source, Delegate.Debited amount ; + Contract destination, Credited amount ] + @ maybe_burn_balance_update) ; originated_contracts = [] ; consumed_gas = Gas.consumed ~since:before_operation ~until:ctxt ; storage_size = Z.zero ;