Skip to main content

hopper_assert_fingerprint

Macro hopper_assert_fingerprint 

Source
macro_rules! hopper_assert_fingerprint {
    ($layout:ty, $expected:expr) => { ... };
}
Expand description

Assert that a layout’s fingerprint matches an expected value.

Use this to pin a layout’s fingerprint in tests. If someone changes the layout fields, this assertion catches the ABI break at compile time.

hopper_assert_fingerprint!(Vault, [0x1a, 0x2b, 0x3c, 0x4d, 0x5e, 0x6f, 0x70, 0x81]);