Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions crates/eip7928/src/slot_changes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

use crate::StorageChange;
use alloc::vec::Vec;
use alloy_primitives::{B256, StorageKey};
use alloy_primitives::U256;

/// Represents all changes made to a single storage slot across multiple transactions.
#[derive(Debug, Clone, Default, PartialEq, Eq)]
Expand All @@ -14,7 +14,7 @@ use alloy_primitives::{B256, StorageKey};
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
pub struct SlotChanges {
/// The storage slot key being modified.
pub slot: StorageKey,
pub slot: U256,
/// A list of write operations to this slot, ordered by transaction index.
#[cfg_attr(feature = "serde", serde(alias = "slotChanges"))]
pub changes: Vec<StorageChange>,
Expand All @@ -25,7 +25,7 @@ impl SlotChanges {
///
/// Preallocates capacity for up to 300,000 changes.
#[inline]
pub const fn new(slot: StorageKey, changes: Vec<StorageChange>) -> Self {
pub const fn new(slot: U256, changes: Vec<StorageChange>) -> Self {
Self { slot, changes }
}

Expand All @@ -49,7 +49,7 @@ impl SlotChanges {

/// Creates a new `SlotChanges` for the given slot.
#[inline]
pub const fn with_slot(mut self, slot: B256) -> Self {
pub const fn with_slot(mut self, slot: U256) -> Self {
self.slot = slot;
self
}
Expand Down
8 changes: 4 additions & 4 deletions crates/eip7928/src/storage_change.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//! a transaction.

use crate::BlockAccessIndex;
use alloy_primitives::B256;
use alloy_primitives::U256;

/// Represents a single storage write operation within a transaction.
#[derive(Debug, Clone, Default, PartialEq, Eq)]
Expand All @@ -17,13 +17,13 @@ pub struct StorageChange {
pub block_access_index: BlockAccessIndex,
/// The new value written to the storage slot.
#[cfg_attr(feature = "serde", serde(alias = "postValue"))]
pub new_value: B256,
pub new_value: U256,
}

impl StorageChange {
/// Creates a new `StorageChange`.
#[inline]
pub const fn new(block_access_index: BlockAccessIndex, new_value: B256) -> Self {
pub const fn new(block_access_index: BlockAccessIndex, new_value: U256) -> Self {
Self { block_access_index, new_value }
}

Expand All @@ -41,7 +41,7 @@ impl StorageChange {

/// Returns a copy with a different storage value.
#[inline]
pub const fn with_value(&self, value: B256) -> Self {
pub const fn with_value(&self, value: U256) -> Self {
Self { block_access_index: self.block_access_index, new_value: value }
}
}