mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: flashbots_validateBuilderSubmissionV3 (#12168)
This commit is contained in:
@ -24,6 +24,7 @@ eyre.workspace = true
|
||||
rand.workspace = true
|
||||
secp256k1 = { workspace = true, features = ["rand"] }
|
||||
thiserror.workspace = true
|
||||
serde.workspace = true
|
||||
|
||||
tracy-client = { workspace = true, optional = true, features = ["demangle"] }
|
||||
|
||||
|
||||
@ -1,7 +1,9 @@
|
||||
use alloy_eips::BlockHashOrNumber;
|
||||
use alloy_primitives::B256;
|
||||
use reth_fs_util::FsPathError;
|
||||
use std::{
|
||||
net::{IpAddr, Ipv4Addr, SocketAddr, ToSocketAddrs},
|
||||
path::Path,
|
||||
str::FromStr,
|
||||
time::Duration,
|
||||
};
|
||||
@ -82,6 +84,11 @@ pub fn parse_socket_address(value: &str) -> eyre::Result<SocketAddr, SocketAddre
|
||||
.ok_or_else(|| SocketAddressParsingError::Parse(value.to_string()))
|
||||
}
|
||||
|
||||
/// Wrapper around [`reth_fs_util::read_json_file`] which can be used as a clap value parser.
|
||||
pub fn read_json_from_file<T: serde::de::DeserializeOwned>(path: &str) -> Result<T, FsPathError> {
|
||||
reth_fs_util::read_json_file(Path::new(path))
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
Reference in New Issue
Block a user