foundry-rs / foundry-rs/foundry

Support multichain workflows in Cast

Open
#11,067 3 comments 0 reactions 0 assignees View on GitHub
C-cast T-feature
Dominant language
Rust
Stars
10.6k
Forks
2.6k
Avg merge
16h 38m
Merged PRs (30d)
511

Description

### Component

Cast

### Describe the feature you would like

Cast is a great utility for a variety of tasks, but it's only geared towards workflows that use a single RPC endpoint. For multichain workflows, you talk to multiple chains, and often you are trying to cross-reference information across chains or perform actions on multiple chains at once.

My proposal is to extend Cast with multichain support. My idea here is that anything that requires `--rpc-url` can now take multiple instances of that option. The action call is then made on each RPC.

This also enables cross-referencing information between nodes that aren't necessarily on different chains, e.g. for differential testing of RPC methods across client implementations.

For the environment variable, I think `clap` supports comma-delimited values for options that are `Vec<_>`.

### Additional context

Some Cast commands I'd particularly like to see this on:

- `cast send`
- `cast call`
- `cast code`
- `cast nonce`
- `cast block`

Contributor guide

Open the contributing guide

Research direction

Start in the Cast CLI entry points for --rpc-url and trace how the option reaches cast send, call, code, nonce, and block. Check how clap handles Vec values and how the environment variable is parsed; done means these commands can accept multiple RPC endpoints and perform the requested action for each.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
blockchain, cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.