Skip to main content

parse_b256_const

Function parse_b256_const 

Source
pub fn parse_b256_const(
    value: &str,
    name: &'static str,
) -> Result<B256, HexConstError>
Expand description

Parses a 0x-prefixed 32-byte hash constant, surfacing a clear error if the placeholder marker <paste_ is still present.

ยงErrors

Returns HexConstError::Placeholder if value still contains the <paste_ marker, or HexConstError::InvalidHex if it is not valid 32-byte hex.