From 5b2e8a1806a255237f75f91bc15d641b0d5f4168 Mon Sep 17 00:00:00 2001 From: Justin Phu Date: Tue, 21 Mar 2023 02:54:39 +1100 Subject: [PATCH 1/2] fix(core): re-export CallLogFrame from geth types The CallLogFrame was not being exported from geth which made it difficult to store all the logs using the ethers type. --- ethers-core/src/types/trace/geth.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ethers-core/src/types/trace/geth.rs b/ethers-core/src/types/trace/geth.rs index 630810db7..49a5fe7f1 100644 --- a/ethers-core/src/types/trace/geth.rs +++ b/ethers-core/src/types/trace/geth.rs @@ -4,7 +4,7 @@ mod noop; mod pre_state; pub use self::{ - call::{CallConfig, CallFrame}, + call::{CallConfig, CallFrame, CallLogFrame}, four_byte::FourByteFrame, noop::NoopFrame, pre_state::{PreStateConfig, PreStateFrame}, From 6287267e0edf53925cd02b821812ea1dc77c3474 Mon Sep 17 00:00:00 2001 From: Justin Phu Date: Tue, 21 Mar 2023 05:32:27 +1100 Subject: [PATCH 2/2] fix(core): correct the visibility of the geth CallLogFrame struct The previous diff made the struct public but did not change the fields itself. The struct being public is not useful unless the fields are public. --- ethers-core/src/types/trace/geth/call.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ethers-core/src/types/trace/geth/call.rs b/ethers-core/src/types/trace/geth/call.rs index f6c97b899..e0854a719 100644 --- a/ethers-core/src/types/trace/geth/call.rs +++ b/ethers-core/src/types/trace/geth/call.rs @@ -32,11 +32,11 @@ pub struct CallFrame { #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub struct CallLogFrame { #[serde(default, skip_serializing_if = "Option::is_none")] - address: Option
, + pub address: Option
, #[serde(default, skip_serializing_if = "Option::is_none")] - topics: Option>, + pub topics: Option>, #[serde(default, skip_serializing_if = "Option::is_none")] - data: Option, + pub data: Option, } #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)]