cast::revm::interpreter::primitives::alloy_primitives

Macro b128

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

Converts a sequence of string literals containing hex-encoded data into a new B128 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::{b128, B128};

const ZERO: B128 = b128!();
assert_eq!(ZERO, B128::ZERO);

let byte_array: B128 = b128!("0123abcd…");