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

fix: remove serde "helper" Numeric #6304

Merged
merged 2 commits into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 1 addition & 3 deletions crates/cast/bin/opts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ use clap::{Parser, Subcommand, ValueHint};
use ethers_core::types::{BlockId, NameOrAddress};
use eyre::Result;
use foundry_cli::opts::{EtherscanOpts, RpcOpts};
use foundry_common::serde_helpers::Numeric;
use std::{path::PathBuf, str::FromStr};

const VERSION_MESSAGE: &str = concat!(
Expand Down Expand Up @@ -874,8 +873,7 @@ pub struct ToBaseArgs {
}

pub fn parse_slot(s: &str) -> Result<B256> {
let slot = Numeric::from_str(s).map_err(|e| eyre::eyre!("Could not parse slot number: {e}"))?;
let slot: U256 = slot.into();
let slot = U256::from_str(s).map_err(|e| eyre::eyre!("Could not parse slot number: {e}"))?;
Comment on lines -878 to +876
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool, since u256 fromstr can handle this we indeed no longer need this

Ok(B256::from(slot))
}

Expand Down
1 change: 0 additions & 1 deletion crates/common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ pub mod glob;
pub mod provider;
pub mod runtime_client;
pub mod selectors;
pub mod serde_helpers;
pub mod shell;
pub mod term;
pub mod traits;
Expand Down
38 changes: 0 additions & 38 deletions crates/common/src/serde_helpers.rs

This file was deleted.

Loading