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

Method try_from

ipc/api/src/staking.rs:41–52  ·  view source on GitHub ↗
(
        value: lib_power_change_log::NewPowerChangeRequestFilter,
    )

Source from the content-addressed store, hash-verified

39 type Error = anyhow::Error;
40
41 fn try_from(
42 value: lib_power_change_log::NewPowerChangeRequestFilter,
43 ) -> Result<Self, Self::Error> {
44 Ok(Self {
45 configuration_number: value.configuration_number,
46 change: PowerChange {
47 op: PowerOperation::try_from(value.op)?,
48 payload: value.payload.to_vec(),
49 validator: ethers_address_to_fil_address(&value.validator)?,
50 },
51 })
52 }
53}
54
55/// The staking validator information

Callers

nothing calls this directly

Calls 2

eth_to_fil_amountFunction · 0.85

Tested by

no test coverage detected