From 4ab924c5d361bbfdcdad9f997d16d67b4a1730b7 Mon Sep 17 00:00:00 2001 From: Thomas Coratger <60488569+tcoratger@users.noreply.github.com> Date: Thu, 27 Jul 2023 12:31:01 +0200 Subject: [PATCH] feat(doc): Document `JsTracerBuilder` (#3949) --- crates/rpc/rpc-testing-util/src/debug.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/crates/rpc/rpc-testing-util/src/debug.rs b/crates/rpc/rpc-testing-util/src/debug.rs index 2aad67e175..aedb83ac16 100644 --- a/crates/rpc/rpc-testing-util/src/debug.rs +++ b/crates/rpc/rpc-testing-util/src/debug.rs @@ -40,11 +40,20 @@ impl DebugApiExt for T { /// A helper type that can be used to build a javascript tracer. #[derive(Debug, Clone, Default)] pub struct JsTracerBuilder { + /// `setup_body` is invoked once at the beginning, during the construction of a given + /// transaction. setup_body: Option, + /// `fault_body` is invoked when an error happens during the execution of an opcode which + /// wasn't reported in step. fault_body: Option, + /// `result_body` returns a JSON-serializable value to the RPC caller. result_body: Option, + /// `enter_body` is invoked on stepping in of an internal call. enter_body: Option, + /// `step_body` is called for each step of the EVM, or when an error occurs, as the specified + /// transaction is traced. step_body: Option, + /// `exit_body` is invoked on stepping out of an internal call. exit_body: Option, }