-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
3 changed files
with
93 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,29 @@ | ||
mod request; | ||
mod download; | ||
|
||
use std::path::PathBuf; | ||
|
||
use download::create_directory; | ||
use eyre::Result; | ||
use request::handle_processing; | ||
use reqwest::Client; | ||
|
||
#[tokio::main] | ||
async fn main() { | ||
async fn main() -> Result<()>{ | ||
let client = Client::new(); | ||
let address = "0x495f947276749Ce646f68AC8c248420045cb7b5e"; | ||
|
||
if let Err(e) = handle_processing(&client, address).await { | ||
println!("Error: {}", e); | ||
let address = "0xa3a4548b39da96eb065ff91811ca30da40431c0d"; | ||
let mut path = PathBuf::from("test"); | ||
path.push(&address); | ||
println!("{:#?}", &path); | ||
|
||
match create_directory(&path).await { | ||
Ok(path) => { | ||
if let Err(e) = handle_processing(&client, address, path).await { | ||
println!("Error: {}", e); | ||
}; | ||
} | ||
Err(err) => return Err(err) | ||
} | ||
|
||
Ok(()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters