From 220062b415b1b1a30e61cf55733d2ff95fe6cfb5 Mon Sep 17 00:00:00 2001 From: Sebastien Mondet Date: Thu, 24 Aug 2023 16:04:43 -0400 Subject: [PATCH] Remove storage-annotations in `build_off_chain_view_contract` --- .../micheline_helpers.ml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/vendor/tezai-contract-metadata-manipulation/micheline_helpers.ml b/vendor/tezai-contract-metadata-manipulation/micheline_helpers.ml index 59e87fd..00d610a 100644 --- a/vendor/tezai-contract-metadata-manipulation/micheline_helpers.ml +++ b/vendor/tezai-contract-metadata-manipulation/micheline_helpers.ml @@ -142,11 +142,20 @@ let build_off_chain_view_contract view ~contract_balance ~contract_address prim name (continue args) ~annotations | Seq (_, l) -> seq (continue l) in + let rec remove_annotations c = + let continue = List.map (fun c -> remove_annotations c) in + match c with + | (Int _ | String _ | Bytes _) as lit -> + Tezai_michelson.Untyped.of_micheline_node lit + | Prim (_, name, args, _annotations) -> + prim name (continue args) ~annotations:[] + | Seq (_, l) -> seq (continue l) + in ( `Contract (seq [ prim "parameter" [ parameter ]; - prim "storage" [ prim "option" [ storage ] ]; + prim "storage" [ prim "option" [ remove_annotations storage ] ]; prim "code" [ seq