diff --git a/tezt/tests/sc_rollup.ml b/tezt/tests/sc_rollup.ml index dabebc89791b8952a26cedefa97d6ad2d0889c47..3c78c4dc93f3d95769c230bbd29ff9be6c733ebf 100644 --- a/tezt/tests/sc_rollup.ml +++ b/tezt/tests/sc_rollup.ml @@ -1,7 +1,7 @@ (*****************************************************************************) (* *) (* Open Source License *) -(* Copyright (c) 2021-2022 Nomadic Labs *) +(* Copyright (c) 2021-2023 Nomadic Labs *) (* Copyright (c) 2022-2023 TriliTech *) (* *) (* Permission is hereby granted, free of charge, to any person obtaining a *) @@ -26,7 +26,7 @@ (* Testing ------- - Component: Smart Contract Optimistic Rollups + Component: Smart Optimistic Rollups Invocation: dune exec tezt/tests/main.exe -- --file sc_rollup.ml *) @@ -699,21 +699,6 @@ let get_inbox_from_sc_rollup_node sc_rollup_node = let* inbox = sc_rollup_node_rpc sc_rollup_node "global/block/head/inbox" in parse_inbox inbox -let fetch_messages_from_block client = - let* ops = RPC.Client.call client @@ RPC.get_chain_block_operations () in - let messages = - ops |> JSON.as_list - |> List.concat_map JSON.as_list - |> List.concat_map (fun op -> JSON.(op |-> "contents" |> as_list)) - |> List.filter_map (fun op -> - if JSON.(op |-> "kind" |> as_string) = "smart_rollup_add_messages" - then Some JSON.(op |-> "message" |> as_list) - else None) - |> List.hd - |> List.map (fun message -> JSON.(message |> as_string)) - in - return messages - (* Synchronizing the inbox in the rollup node ------------------------------------------ diff --git a/tezt/tests/sc_rollup.mli b/tezt/tests/sc_rollup.mli new file mode 100644 index 0000000000000000000000000000000000000000..114bf8e2355c17f285debf51de1bb2fda53a82fa --- /dev/null +++ b/tezt/tests/sc_rollup.mli @@ -0,0 +1,33 @@ +(*****************************************************************************) +(* *) +(* Open Source License *) +(* Copyright (c) 2021-2023 Nomadic Labs *) +(* Copyright (c) 2022-2023 TriliTech *) +(* *) +(* Permission is hereby granted, free of charge, to any person obtaining a *) +(* copy of this software and associated documentation files (the "Software"),*) +(* to deal in the Software without restriction, including without limitation *) +(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *) +(* and/or sell copies of the Software, and to permit persons to whom the *) +(* Software is furnished to do so, subject to the following conditions: *) +(* *) +(* The above copyright notice and this permission notice shall be included *) +(* in all copies or substantial portions of the Software. *) +(* *) +(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*) +(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *) +(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *) +(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*) +(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *) +(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *) +(* DEALINGS IN THE SOFTWARE. *) +(* *) +(*****************************************************************************) + +(* Testing + ------- + Component: Smart Optimistic Rollups + Invocation: dune exec tezt/tests/main.exe -- --file sc_rollup.ml +*) + +val register : protocols:Protocol.t list -> unit