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

docs: cast logs silently defaults to --from-block latest #1290

Open
2 tasks done
CodeSandwich opened this issue Jan 28, 2024 · 1 comment
Open
2 tasks done

docs: cast logs silently defaults to --from-block latest #1290

CodeSandwich opened this issue Jan 28, 2024 · 1 comment
Labels
A-cast Area: cast good first issue Good for newcomers T-enhancement Type: enhance existing docs

Comments

@CodeSandwich
Copy link
Contributor

Component

Cast

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge 0.2.0 (c5fd67b 2024-01-15T00:23:11.184513736Z)

What command(s) is the bug in?

cast logs

Operating System

Linux

Describe the bug

--from-block is an optional parameter that defaults to latest. This means that the user who forgets to set it to a different value usually gets no error and no output, and doesn't understand why. The default isn't mentioned in the --help, and the user needs to read the JSON RPC documentation to figure out the default.

At the very least the --help should list all the defaults coming from the JSON RPC specification. Ideally the user should be presented with the information about the range of the blocks that are queried. Alternatively the default could be set to earliest, because latest is very rarely what the user needs.

@CodeSandwich CodeSandwich added the T-to-fix Type: issue in docs label Jan 28, 2024
@CodeSandwich CodeSandwich changed the title cast logs silently defaults to a useless --from-block cast logs silently defaults to --from-block latest Jan 28, 2024
@DaniPopes
Copy link
Member

I guess this is more of a documentation issue? We are sending "null" when not provided so these are set by the provider

@DaniPopes DaniPopes removed the T-to-fix Type: issue in docs label Jan 29, 2024
@zerosnacks zerosnacks changed the title cast logs silently defaults to --from-block latest docs: cast logs silently defaults to --from-block latest Jul 10, 2024
@zerosnacks zerosnacks transferred this issue from foundry-rs/foundry Sep 12, 2024
@zerosnacks zerosnacks added T-enhancement Type: enhance existing docs A-cast Area: cast good first issue Good for newcomers labels Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cast Area: cast good first issue Good for newcomers T-enhancement Type: enhance existing docs
Projects
Status: Todo
Status: Todo
Development

No branches or pull requests

3 participants