foundry-rs/foundry

`cast call --chain` fails on custom chain ids

Closed this issue · 1 comments

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 (e5dbb7a 2024-12-03T00:25:01.006590000Z)

What command(s) is the bug in?

cast call

Operating System

macOS (Apple Silicon)

Describe the bug

When I run:

cast call --chain 55555

I get

Error: invalid type: found string "55555", expected u64

(with proper arguments for the rest). I printed the Figment object, and it shows:

          "chain_id": String(
              "41454",
          ),

The line that specifically errors seems to be this line:

let evm_opts = figment.extract::<EvmOpts>()?;

The value parser for the Chain can properly parse this however.

workaround is also to use --chain-id instead