(&self, method: String, index: B256, data: String)
| 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()); |
no outgoing calls