Skip to main content

Module diff

Module diff 

Source
Expand description

§Snapshot diff

Off-chain symmetric of hopper-core::diff. Given the raw before and after blobs of a Hopper account, this module produces a structured field-level diff using the layout manifest.

Indexers care about this because receipts only tell them which fields changed by index. This module answers what they changed to.

Structs§

FieldDelta
One field’s before/after value, as raw bytes.

Enums§

DiffError
Error surface for diff operations.

Functions§

field_change_mask
Bitmask version. same scan but returns a u64 whose ith bit is set when the ith field differs. Useful when comparing to the changed_fields mask from a receipt.
fixed_size_diff
Compute a fixed-size diff (no resize). Returns a list of FieldDeltas . one per changed field.