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

Method new_release_msg

ipc/api/src/cross.rs:41–65  ·  view source on GitHub ↗
(
        sub_id: &SubnetID,
        from: &Address,
        to: &Address,
        value: TokenAmount,
    )

Source from the content-addressed store, hash-verified

39
40impl IpcEnvelope {
41 pub fn new_release_msg(
42 sub_id: &SubnetID,
43 from: &Address,
44 to: &Address,
45 value: TokenAmount,
46 ) -> anyhow::Result<Self> {
47 let to = IPCAddress::new(
48 &match sub_id.parent() {
49 Some(s) => s,
50 None => return Err(anyhow!("error getting parent for subnet addr")),
51 },
52 to,
53 )?;
54
55 let from = IPCAddress::new(sub_id, from)?;
56 Ok(Self {
57 kind: IpcMsgKind::Transfer,
58 from,
59 to,
60 value,
61 local_nonce: 0,
62 original_nonce: 0,
63 message: Default::default(),
64 })
65 }
66
67 pub fn new_fund_msg(
68 sub_id: &SubnetID,

Callers

nothing calls this directly

Calls 1

parentMethod · 0.45

Tested by

no test coverage detected