From 25f88be145fdbcb2d6b919a596b70320605183ab Mon Sep 17 00:00:00 2001 From: pgherveou Date: Fri, 3 Jan 2025 12:15:14 +0100 Subject: [PATCH] Fix build --- substrate/frame/revive/rpc/src/apis/debug_apis.rs | 4 ++-- substrate/frame/revive/src/debug.rs | 2 +- substrate/frame/revive/src/evm/api/debug_rpc_types.rs | 7 ++++++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/substrate/frame/revive/rpc/src/apis/debug_apis.rs b/substrate/frame/revive/rpc/src/apis/debug_apis.rs index ee6302b2808e..73434f81295b 100644 --- a/substrate/frame/revive/rpc/src/apis/debug_apis.rs +++ b/substrate/frame/revive/rpc/src/apis/debug_apis.rs @@ -15,7 +15,7 @@ pub trait DebugRpc { async fn trace_block_by_number( &self, block: Option, - tracer: Tracer, + tracer_config: TracerConfig, ) -> RpcResult>; /// Returns a transaction's traces by replaying it. This method provides a detailed @@ -30,6 +30,6 @@ pub trait DebugRpc { async fn trace_transaction( &self, transaction_hash: H256, - tracer: Tracer, + tracer_config: TracerConfig, ) -> RpcResult; } diff --git a/substrate/frame/revive/src/debug.rs b/substrate/frame/revive/src/debug.rs index f7e32e827cc6..f0504bba37fc 100644 --- a/substrate/frame/revive/src/debug.rs +++ b/substrate/frame/revive/src/debug.rs @@ -22,7 +22,7 @@ pub use crate::{ BalanceOf, }; use crate::{Config, DispatchError, GasMeter, LOG_TARGET}; -use alloc::vec::Vec; +use alloc::{format, vec::Vec}; use sp_core::{H160, H256, U256}; /// Umbrella trait for all interfaces that serves for debugging. diff --git a/substrate/frame/revive/src/evm/api/debug_rpc_types.rs b/substrate/frame/revive/src/evm/api/debug_rpc_types.rs index 3917173dd407..7c09692e039b 100644 --- a/substrate/frame/revive/src/evm/api/debug_rpc_types.rs +++ b/substrate/frame/revive/src/evm/api/debug_rpc_types.rs @@ -1,11 +1,16 @@ #![allow(missing_docs)] use crate::{evm::Bytes, ExecReturnValue, Weight}; -use alloc::vec::Vec; +use alloc::{string::String, vec::Vec}; use codec::{Decode, Encode}; use scale_info::TypeInfo; use serde::{Deserialize, Serialize}; use sp_core::{H160, H256, U256}; +/// Tracer configuration used to trace calls. +#[derive(Debug, Clone, Encode, Decode, Serialize, Deserialize)] +pub enum TracerConfig { + CallTracer { with_logs: bool }, +} /// The type of call that was executed. #[derive( Default, TypeInfo, Encode, Decode, Serialize, Deserialize, Eq, PartialEq, Clone, Debug,