Skip to content

Commit

Permalink
chore: remove ethers keccak
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel-aranha-cw committed Feb 4, 2025
1 parent 3122472 commit af91a35
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/eth/primitives/block_number.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ use std::ops::Add;
use std::ops::AddAssign;
use std::str::FromStr;

use alloy_primitives::keccak256;
use anyhow::anyhow;
use display_json::DebugAsJson;
use ethereum_types::U64;
use ethers_core::utils::keccak256;
use fake::Dummy;
use fake::Faker;

Expand All @@ -24,7 +24,7 @@ impl BlockNumber {

/// Calculates the keccak256 hash of the block number.
pub fn hash(&self) -> Hash {
Hash::new(keccak256(<[u8; 8]>::from(*self)))
Hash::new(*keccak256(<[u8; 8]>::from(*self)))
}

/// Returns the previous block number.
Expand Down
4 changes: 2 additions & 2 deletions src/eth/primitives/slot_index.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use std::fmt::Display;
use std::io::Read;

use alloy_primitives::keccak256;
use display_json::DebugAsJson;
use ethereum_types::U256;
use ethers_core::utils::keccak256;
use fake::Dummy;
use fake::Faker;

Expand Down Expand Up @@ -33,7 +33,7 @@ impl SlotIndex {
mapping_index_bytes[32..64].copy_from_slice(&slot_index_bytes);

let hashed_bytes = keccak256(mapping_index_bytes);
Self::from(hashed_bytes)
Self::from(hashed_bytes.0)
}
}

Expand Down

0 comments on commit af91a35

Please sign in to comment.