From a9384d093b91ca110e934254a8cb21863ea74ecb Mon Sep 17 00:00:00 2001 From: Nicolas Ochem Date: Mon, 19 Sep 2022 11:03:15 +0200 Subject: [PATCH] Proto: invoice for Consensus Key feature in L protocol as announced in https://forum.tezosagora.org/t/tzip-feature-proposal-consensus-key/4503 --- src/proto_alpha/lib_protocol/init_storage.ml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/proto_alpha/lib_protocol/init_storage.ml b/src/proto_alpha/lib_protocol/init_storage.ml index 3af98031d1c1..baa5f97efda0 100644 --- a/src/proto_alpha/lib_protocol/init_storage.ml +++ b/src/proto_alpha/lib_protocol/init_storage.ml @@ -35,6 +35,9 @@ Do not fail if something goes wrong. *) + +*) + let invoice_contract ctxt ~address ~amount_mutez = match Tez_repr.of_mutez amount_mutez with | None -> Lwt.return (ctxt, []) @@ -49,7 +52,6 @@ let invoice_contract ctxt ~address ~amount_mutez = >|= function | Ok res -> res | Error _ -> (ctxt, [])) -*) (* To patch code of legacy contracts you can add a helper function here and call @@ -186,7 +188,17 @@ let prepare_first_block chain_id ctxt ~typecheck ~level ~timestamp = Storage.Tenderbake.First_level_of_protocol.update ctxt level >>=? fun ctxt -> Delegate_cycles.Migration_from_Kathmandu.update ctxt >>=? fun ctxt -> - Patch_ghostnet.patch chain_id ctxt level >>=? fun ctxt -> return (ctxt, [])) + Patch_ghostnet.patch chain_id ctxt level >>=? fun ctxt -> + invoice_contract + ctxt + ~address:"tz1X81bCXPtMiHu1d4UZF4GPhMPkvkp56ssb" + ~amount_mutez:15_000_000_000L + >>= fun (ctxt, bu1) -> + invoice_contract + ctxt + ~address:"tz1MidLyXXvKWMmbRvKKeusDtP95NDJ5gAUx" + ~amount_mutez:10_000_000_000L + >>= fun (ctxt, bu2) -> return (ctxt, bu1 @ bu2)) >>=? fun (ctxt, balance_updates) -> List.fold_right_es patch_script Legacy_script_patches.addresses_to_patch ctxt >>=? fun ctxt -> -- GitLab