Skip to content

chore(config): curl mode as config key#13260

Draft
mablr wants to merge 1 commit intofoundry-rs:masterfrom
mablr:chore/curl_mode_in_config
Draft

chore(config): curl mode as config key#13260
mablr wants to merge 1 commit intofoundry-rs:masterfrom
mablr:chore/curl_mode_in_config

Conversation

@mablr
Copy link
Contributor

@mablr mablr commented Jan 29, 2026

Motivation

Close #13252

Solution

  • Provide --curl consistently in all subcommands
  • Simplified helpers for provider instantiation using config
  • Adjusted the signing_provider_with_curl function to get_provider_with_wallet for consistency.

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes (always consider --curl, no more implicit ignore)

- Provide `--curl` consistently in all subcommands
- Simplified helpers for provider instantiation using config
- Adjusted the `signing_provider_with_curl` function to `get_provider_with_wallet` for consistency.
Copy link
Member

@onbjerg onbjerg left a comment

Choose a reason for hiding this comment

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

i dont want this as a config key, idt it makes sense to configure this overall. can we fix this in another way?

Copy link
Contributor Author

@mablr mablr left a comment

Choose a reason for hiding this comment

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

@onbjerg I see your point.

My goal was primarily to fix inconsistent handling of the --curl flag and secondarily to simplify logic before doing #13259.

Can we fix this in another way?
Another clean approach could consist of:

  • Remove curl from RpcOpts
  • Introduce CurlRpcOpts
  • Use CurlRpcOpts instead of RpcOpts for all subcommands to which we want to provide the --curl flag
#[derive(Clone, Debug, Default, Parser)]
#[command(next_help_heading = "Rpc options")]
pub struct CurlRpcOpts {
    /// RPC options
    #[command(flatten)]
    pub url: RpcOpts,

    /// Print the equivalent curl command instead of making the RPC request.
    #[arg(long)]
    pub curl: bool,
}

If you're okay with this proposition , i'll do first #13259 and then go back to this PR (as it's not anymore on my critical path)

@mablr mablr marked this pull request as draft January 29, 2026 21:31
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.

--curl flag silently ignored in several Cast commands

2 participants