MCPcopy Create free account
hub / github.com/cakevm/kabu / 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 15

fetchMethod · 0.45
set_eth_priceMethod · 0.45
same_path_merger_taskFunction · 0.45
set_monitor_nonceFunction · 0.45
preload_market_stateFunction · 0.45
verify_pool_state_taskFunction · 0.45
fetch_state_and_add_poolFunction · 0.45

Calls

no outgoing calls