storable_alloy_bytes

Macro storable_alloy_bytes 

Source
storable_alloy_bytes!() { /* proc-macro */ }
Expand description

Generate StorableType and Storable<1> implementations for alloy FixedBytes<N> types.

Generates implementations for all fixed-size byte arrays from N = 1..32 All sizes fit within a single storage slot.

Each type gets:

  • StorableType impl with BYTE_COUNT constant
  • Storable<1> impl with load(), store(), to_evm_words(), from_evm_words() methods
  • StorageKey impl for use as mapping keys
  • Auto-generated tests that verify round-trip conversions using alloy’s .random() method

§Usage

storable_alloy_bytes!();