MCPcopy Create free account
hub / github.com/consensus-shipyard/ipc / from

Method from

ipc/types/src/ethaddr.rs:21–25  ·  view source on GitHub ↗
(v: U256)

Source from the content-addressed store, hash-verified

19/// Per the EVM spec, this simply discards the high bytes.
20impl From<U256> for EthAddress {
21 fn from(v: U256) -> Self {
22 let mut bytes = [0u8; 32];
23 v.to_big_endian(&mut bytes);
24 Self(bytes[12..].try_into().unwrap())
25 }
26}
27
28/// Converts an H160 to an EthAddress

Callers

nothing calls this directly

Calls 4

try_intoMethod · 0.80
as_idMethod · 0.80
EthAddressClass · 0.70
as_refMethod · 0.45

Tested by

no test coverage detected