moonbeam_client_evm_tracing/formatters/mod.rs
1// Copyright 2019-2025 PureStake Inc.
2// This file is part of Moonbeam.
3
4// Moonbeam is free software: you can redistribute it and/or modify
5// it under the terms of the GNU General Public License as published by
6// the Free Software Foundation, either version 3 of the License, or
7// (at your option) any later version.
8
9// Moonbeam is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12// GNU General Public License for more details.
13
14// You should have received a copy of the GNU General Public License
15// along with Moonbeam. If not, see <http://www.gnu.org/licenses/>.
16
17pub mod blockscout;
18pub mod call_tracer;
19pub mod raw;
20pub mod trace_filter;
21
22pub use blockscout::Formatter as Blockscout;
23pub use call_tracer::Formatter as CallTracer;
24pub use raw::Formatter as Raw;
25pub use trace_filter::Formatter as TraceFilter;
26
27use evm_tracing_events::Listener;
28use serde::Serialize;
29
30pub trait ResponseFormatter {
31 type Listener: Listener;
32 type Response: Serialize;
33
34 fn format(listener: Self::Listener) -> Option<Self::Response>;
35}