storable_alloy_ints

Macro storable_alloy_ints 

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

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

Generates implementations for all alloy integer types (both signed and unsigned): U8/I8, U16/I16, U32/I32, U64/I64, U128/I128, U256/I256.

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