MCPcopy Create free account
hub / github.com/cakevm/kabu / read

Method read

crates/node/debug-provider/src/cachefolder.rs:28–34  ·  view source on GitHub ↗
(&self, method: String, index: B256)

Source from the content-addressed store, hash-verified

26 }
27
28 pub async fn read(&self, method: String, index: B256) -> Result<String> {
29 let file_path = format!("{}/{}_{}.json", self.path, method.to_lowercase(), index.to_string().strip_prefix("0x").unwrap());
30 let mut file = fs::File::open(file_path).await?;
31 let mut content = String::new();
32 file.read_to_string(&mut content).await?;
33 Ok(content)
34 }
35}

Calls

no outgoing calls