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

Method fund_subnet

fendermint/testing/materializer/src/validation.rs:321–336  ·  view source on GitHub ↗
(
        &'s mut self,
        _parent_submit_config: &SubmitConfig<'a, ValidationMaterials>,
        account: &'a VAccount,
        subnet: &'a VSubnet,
        amount: TokenAmount,
        referenc

Source from the content-addressed store, hash-verified

319 }
320
321 async fn fund_subnet<'s, 'a>(
322 &'s mut self,
323 _parent_submit_config: &SubmitConfig<'a, ValidationMaterials>,
324 account: &'a VAccount,
325 subnet: &'a VSubnet,
326 amount: TokenAmount,
327 reference: Option<ResourceHash>,
328 ) -> anyhow::Result<()>
329 where
330 's: 'a,
331 {
332 // Debit parent balance; Credit child balance
333 self.fund_from_parent(&subnet.name, account, amount, true)?;
334 self.ensure_unique(&subnet.name.parent().unwrap(), reference)?;
335 Ok(())
336 }
337
338 async fn join_subnet<'s, 'a>(
339 &'s mut self,

Callers

nothing calls this directly

Calls 3

fund_from_parentMethod · 0.80
ensure_uniqueMethod · 0.80
parentMethod · 0.45

Tested by

no test coverage detected