Skip to content

Commit

Permalink
fix: ots_getContractCreater has field hash instead of tx (#999)
Browse files Browse the repository at this point in the history
* fix: ots_ContractCreater has hash instead of tx field

Signed-off-by: jsvisa <[email protected]>

* clippy

Signed-off-by: jsvisa <[email protected]>

---------

Signed-off-by: jsvisa <[email protected]>
  • Loading branch information
jsvisa committed Jul 1, 2024
1 parent b036bc9 commit c98a175
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions crates/rpc-types-trace/src/otterscan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//! <https://www.quicknode.com/docs/ethereum/ots_getBlockTransactions>
//! <https://github.com/otterscan/otterscan/blob/develop/docs/custom-jsonrpc.md>

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};

Expand Down Expand Up @@ -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,
}
Expand Down

0 comments on commit c98a175

Please sign in to comment.