Skip to content

Commit

Permalink
Remove storage-annotations in build_off_chain_view_contract
Browse files Browse the repository at this point in the history
  • Loading branch information
smondet committed Aug 24, 2023
1 parent db6fe83 commit 220062b
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion vendor/tezai-contract-metadata-manipulation/micheline_helpers.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 220062b

Please sign in to comment.