This commit is contained in:
Eitan Seri-Levi
2024-07-22 14:00:54 -07:00
parent fd7c0bf48e
commit 0e66c5075b

View File

@@ -150,15 +150,14 @@ impl<'a> From<&'a ExecutionBlockHeader> for EncodableExecutionBlockHeader<'a> {
}
}
// TODO(alloy) this shim can be removed once we fully migrate
// from ethereum types to alloy primitives
struct U256Shim(Uint256);
impl From<U256Shim> for alloy_primitives::U256 {
impl From<U256Shim> for alloy_primitives::U256 {
fn from(value: U256Shim) -> Self {
let mut buffer: [u8; 32] = [0; 32];
value.0.to_little_endian(&mut buffer);
Self::from_le_slice(&buffer)
}
}
}