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

Method blob_get_call

fendermint/rpc/src/query.rs:166–184  ·  view source on GitHub ↗
(
        &mut self,
        blob_hash: fendermint_actor_blobs_shared::bytes::B256,
        value: TokenAmount,
        gas_params: GasParams,
        height: FvmQueryHeight,
    )

Source from the content-addressed store, hash-verified

164 /// Get a blob from the blobs actor without including a transaction on the blockchain.
165 #[cfg(feature = "ipc-storage")]
166 async fn blob_get_call(
167 &mut self,
168 blob_hash: fendermint_actor_blobs_shared::bytes::B256,
169 value: TokenAmount,
170 gas_params: GasParams,
171 height: FvmQueryHeight,
172 ) -> anyhow::Result<Option<fendermint_actor_blobs_shared::blobs::Blob>> {
173 let msg = MessageFactory::new(system::SYSTEM_ACTOR_ADDR, 0)
174 .blob_get(blob_hash, value, gas_params)?;
175
176 let response = self.call(msg, height).await?;
177 if response.value.code.is_err() {
178 return Err(anyhow!("{}", response.value.info));
179 }
180 let return_data = decode_blob_get(&response.value)
181 .context("error decoding blob data from deliver_tx in call")?;
182
183 Ok(return_data)
184 }
185
186 /// Run an ABCI query.
187 async fn perform(&self, query: FvmQuery, height: FvmQueryHeight) -> anyhow::Result<AbciQuery>;

Callers 4

blob_getFunction · 0.80
query_blobFunction · 0.80
handle_get_blobFunction · 0.80
handle_get_blob_contentFunction · 0.80

Implementers 1

client.rsfendermint/rpc/src/client.rs

Calls 4

decode_blob_getFunction · 0.85
blob_getMethod · 0.80
contextMethod · 0.80
callMethod · 0.45

Tested by

no test coverage detected