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

Method ipld

fendermint/rpc/src/query.rs:44–50  ·  view source on GitHub ↗

Query the contents of a CID from the IPLD store.

(&self, cid: &Cid, height: FvmQueryHeight)

Source from the content-addressed store, hash-verified

42pub trait QueryClient: Sync {
43 /// Query the contents of a CID from the IPLD store.
44 async fn ipld(&self, cid: &Cid, height: FvmQueryHeight) -> anyhow::Result<Option<Vec<u8>>> {
45 let res = self
46 .perform(FvmQuery::Ipld(*cid), height)
47 .await
48 .context("ipld query failed")?;
49 extract_opt(res, |res| Ok(res.value))
50 }
51
52 /// Query the the state of an actor.
53 async fn actor_state(

Callers 2

get_codeFunction · 0.80
queryFunction · 0.80

Implementers 1

client.rsfendermint/rpc/src/client.rs

Calls 3

extract_optFunction · 0.85
contextMethod · 0.80
performMethod · 0.45

Tested by

no test coverage detected