Macro revm_primitives::address

macro_rules! address {
    () => { ... };
    ($($s:literal)+) => { ... };
}
Expand description

Converts a sequence of string literals containing hex-encoded data into a new Address at compile time.

If the input is empty, a zero-initialized array is returned.

Note that the strings cannot be prefixed with 0x.

See hex! for more information.

§Examples

use alloy_primitives::{address, Address};

const ZERO: Address = address!();
assert_eq!(ZERO, Address::ZERO);

let byte_array: Address = address!("0123abcd…");