MCPcopy Create free account
hub / github.com/dexloom/loom / write

Method write

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

Source from the content-addressed store, hash-verified

19 }
20
21 pub async fn write(&self, method: String, index: B256, data: String) -> Result<()> {
22 let file_path = format!("{}/{}_{}.json", self.path, method.to_lowercase(), index.to_string().strip_prefix("0x").unwrap());
23 let mut file = fs::File::create(file_path).await?;
24 file.write_all(data.as_bytes()).await?;
25 Ok(())
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());

Callers 7

replayer_mempool_taskFunction · 0.45
node_player_workerFunction · 0.45
write_cachedMethod · 0.45
fetch_next_blockMethod · 0.45
create_block_filterMethod · 0.45
get_filter_changesMethod · 0.45
new_block_filterMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected