Macro alloy_primitives::b256
source · macro_rules! b256 { () => { ... }; ($($t:tt)+) => { ... }; }
Expand description
Converts a sequence of string literals containing hex-encoded data
into a new B256
at compile time.
If the input is empty, a zero-initialized array is returned.
See hex!
for more information.
§Examples
use alloy_primitives::{b256, B256};
const ZERO: B256 = b256!();
assert_eq!(ZERO, B256::ZERO);
let byte_array: B256 = b256!("0x0123abcd…");