Skip to content

Commit

Permalink
feat: cast client (gakonst#635)
Browse files Browse the repository at this point in the history
  • Loading branch information
mds1 authored Jan 30, 2022
1 parent 1be3bab commit dd76c0f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cli/src/cast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,10 @@ async fn main() -> eyre::Result<()> {
let provider = Provider::try_from(rpc_url)?;
println!("{}", Cast::new(provider).chain_id().await?);
}
Subcommands::Client { rpc_url } => {
let provider = Provider::try_from(rpc_url)?;
println!("{}", provider.client_version().await?);
}
Subcommands::Code { block, who, rpc_url } => {
let provider = Provider::try_from(rpc_url)?;
println!("{}", Cast::new(provider).code(who, block).await?);
Expand Down
6 changes: 6 additions & 0 deletions cli/src/opts/cast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,12 @@ pub enum Subcommands {
#[clap(long, env = "ETH_RPC_URL")]
rpc_url: String,
},
#[clap(name = "client")]
#[clap(about = "returns the current client version")]
Client {
#[clap(long, env = "ETH_RPC_URL")]
rpc_url: String,
},
#[clap(name = "namehash")]
#[clap(about = "returns ENS namehash of provided name")]
Namehash { name: String },
Expand Down

0 comments on commit dd76c0f

Please sign in to comment.