storable_rust_ints

Macro storable_rust_ints 

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

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

Generates implementations for all standard Rust integer types: u8/i8, u16/i16, u32/i32, u64/i64, u128/i128.

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 with random values