Skip to content

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

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft

Conversation

Soubhik-10
Copy link
Contributor

closes #6062

Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

nice, one suggestion

Comment on lines 151 to 156

/// Override the time field of a block
///
/// Format: block:time
#[arg(long = "override-time", value_name = "BLOCK:TIME")]
pub time_overrides: Option<Vec<String>>,
Copy link
Member

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

Comment on lines 440 to 445
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))
}
Copy link
Member

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

@Soubhik-10 Soubhik-10 requested a review from mattsse June 9, 2025 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

feat(cast) Add --timestamp flag to cast call --block to override the timestamp of the block
3 participants