Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: replace some from with try_from calls #6832

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/cast/bin/cmd/estimate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ impl EstimateArgs {
let EstimateArgs { from, to, sig, args, value, rpc, etherscan, command } = self;

let figment = Figment::from(Config::figment()).merge(etherscan).merge(rpc);
let config = Config::from_provider(figment);
let config = Config::try_from(figment)?;

let provider = utils::get_provider(&config)?;
let chain = utils::get_chain(config.chain, &provider).await?;
Expand Down
2 changes: 1 addition & 1 deletion crates/cast/bin/cmd/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ impl RunArgs {
let figment =
Config::figment_with_root(find_project_root_path(None).unwrap()).merge(self.rpc);
let evm_opts = figment.extract::<EvmOpts>()?;
let mut config = Config::from_provider(figment).sanitized();
let mut config = Config::try_from(figment)?.sanitized();

let compute_units_per_second =
if self.no_rate_limit { Some(u64::MAX) } else { self.compute_units_per_second };
Expand Down