pub fn gen_word_from(values: &[&str]) -> U256Available on crate features
test-utils only.Expand description
Test helper function for constructing EVM words from hex string literals.
Takes an array of hex strings (with or without “0x” prefix), concatenates them left-to-right, left-pads with zeros to 32 bytes, and returns a U256.
§Example
ⓘ
let word = gen_word_from(&[
"0x2a", // 1 byte
"0x1111111111111111111111111111111111111111", // 20 bytes
"0x01", // 1 byte
]);
// Produces: [10 zeros] [0x2a] [20 bytes of 0x11] [0x01]