pub struct StateDiff {
pub accounts: BTreeMap<Address, AccountDiff>,
}Expand description
Net state changes, keyed by account.
Fields§
§accounts: BTreeMap<Address, AccountDiff>Implementations§
Source§impl StateDiff
impl StateDiff
Sourcepub fn from_prestate(trace: &PrestateDiff) -> Self
pub fn from_prestate(trace: &PrestateDiff) -> Self
Reconstructs explicit before/after values from geth’s diff-mode encoding:
postlists only changed fields, so a missing field is unchanged;- an account only in
postwas empty before (created); - an account only in
prewas deleted (self-destructed); - a slot in
prebut missing from a presentpostwas cleared to zero; - a slot only in
postwas zero before.
Sourcepub fn compose<'a>(diffs: impl IntoIterator<Item = &'a StateDiff>) -> Self
pub fn compose<'a>(diffs: impl IntoIterator<Item = &'a StateDiff>) -> Self
Folds per-transaction diffs, applied in order, into one net diff.
pub fn is_empty(&self) -> bool
pub fn summary(&self) -> Summary
Trait Implementations§
impl Eq for StateDiff
impl StructuralPartialEq for StateDiff
Auto Trait Implementations§
impl Freeze for StateDiff
impl RefUnwindSafe for StateDiff
impl Send for StateDiff
impl Sync for StateDiff
impl Unpin for StateDiff
impl UnsafeUnpin for StateDiff
impl UnwindSafe for StateDiff
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more