From c98a175da1ce18c4ddaec4aacb997a7769c3f6d7 Mon Sep 17 00:00:00 2001 From: Delweng Date: Mon, 1 Jul 2024 17:38:04 +0800 Subject: [PATCH] fix: ots_getContractCreater has field hash instead of tx (#999) * fix: ots_ContractCreater has hash instead of tx field Signed-off-by: jsvisa * clippy Signed-off-by: jsvisa --------- Signed-off-by: jsvisa --- crates/rpc-types-trace/src/otterscan.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/crates/rpc-types-trace/src/otterscan.rs b/crates/rpc-types-trace/src/otterscan.rs index 8ddb704ee86..3fad4d8197b 100644 --- a/crates/rpc-types-trace/src/otterscan.rs +++ b/crates/rpc-types-trace/src/otterscan.rs @@ -3,7 +3,7 @@ //! //! -use alloy_primitives::{Address, Bloom, Bytes, U256}; +use alloy_primitives::{Address, Bloom, Bytes, TxHash, U256}; use alloy_rpc_types_eth::{Block, Rich, Transaction, TransactionReceipt}; use serde::{Deserialize, Serialize}; @@ -169,11 +169,10 @@ pub struct TransactionsWithReceipts { } /// Custom struct for otterscan `getContractCreator` RPC responses -#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] +#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize)] pub struct ContractCreator { /// The transaction used to create the contract. - #[doc(alias = "transaction")] - pub tx: Transaction, + pub hash: TxHash, /// The address of the contract creator. pub creator: Address, }