-
Notifications
You must be signed in to change notification settings - Fork 2k
added time override #10727
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
base: master
Are you sure you want to change the base?
added time override #10727
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice, one suggestion
crates/cast/src/cmd/call.rs
Outdated
|
||
/// Override the time field of a block | ||
/// | ||
/// Format: block:time | ||
#[arg(long = "override-time", value_name = "BLOCK:TIME")] | ||
pub time_overrides: Option<Vec<String>>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can name this just block.time
because block overrides arent't that complex, this can be a simple u64
crates/cast/src/cmd/call.rs
Outdated
fn time_value_override(input: &str) -> Result<(&str, &str), eyre::Report> { | ||
let (block_str, time_str) = input.split_once(':').ok_or_else(|| { | ||
eyre::eyre!("Invalid override `{input}`. Expected format: <block>:<time>") | ||
})?; | ||
Ok((block_str, time_str)) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this we can change to a single u64 arg on the cli
closes #6062