Skip to content

chore: strip WalletOpts and EtherscanOpts from cast subcommands that dont expect a signer or need etherscan api #12394

@0xferrous

Description

@0xferrous

Component

Cast

Describe the feature you would like

The WalletOpts and EtherscanOpts are part of the the EthereumOpts which is used in several CastSubcommand

https://github.com/foundry-rs/foundry/blob/master/crates/cli/src/opts/rpc.rs#L186-L197

Image

of which:

  1. logs
    • doesn't need etherescan api
    • doesn't need signer
  2. call
    • doesn't need etherscan api
    • doesn't need signer
    • should accept optional --from
  3. estimate
    • doesn't need etherscan api
    • doesn't need signer
    • should accept optional --from
  4. access_list
    • doesn't need etherscan api
    • doesn't need signer
    • should accept optional --from

Why should we eliminate them?

  1. wallet options bloat the --help with extra 66 lines
  2. EtherescanOpts is actually relatively small, only two fields, of which the chain field seems like it shouldn't belong there anyway, should be part of the EthereumOpts or RpcOpts. So, it doesn't bloat the help that much, so I don't have any strong opinions here.

Similarly, I think any such unused options bloat elsewhere(forge probably) should be removed too to make the help page more useful and easy to navigate.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-castCommand: castT-featureType: featurefirst issueA good way to start contributing

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions