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

Method try_from

ipc/api/src/validator.rs:22–28  ·  view source on GitHub ↗
(value: Validator)

Source from the content-addressed store, hash-verified

20 type Error = anyhow::Error;
21
22 fn try_from(value: Validator) -> Result<Self, Self::Error> {
23 Ok(subnet_actor_getter_facet::Validator {
24 addr: payload_to_evm_address(value.addr.payload())?,
25 weight: fil_to_eth_amount(&value.weight)?,
26 metadata: ethers::core::types::Bytes::from(value.metadata),
27 })
28 }
29}
30
31pub fn into_contract_validators(

Callers

nothing calls this directly

Calls 2

payload_to_evm_addressFunction · 0.85
fil_to_eth_amountFunction · 0.85

Tested by

no test coverage detected