Context
The Arbitrum Orbit ecosystem (Apechain, XAI, Sanko, etc.) uses the same JSON-RPC surface as Arbitrum One. The CLI currently hardcodes https://arb1.arbitrum.io/rpc. Adding a --chain <name> flag (orbit-aware) and a small preset table makes the tool useful for the whole Orbit fleet — broader addressable market, same code.
Scope
- Add a
chains module (src/chains.rs) with a preset table: {name, chain_id, rpc_url, explorer, native_token, is_orbit: bool}.
- Populate with: Arbitrum One, Arbitrum Nova, Arbitrum Sepolia, Apechain, XAI, Sanko.
- Add
--chain <name> global flag to Cli. If set, rpc_url defaults to that chain's RPC (but explicit --rpc still wins).
- If
--chain is unknown, print the supported list.
- Update
commands::info (see related issue) to source its chain list from this table.
- CI: add a smoke test that does
arbitrum-cli --chain apechain info and asserts the chain_id is 33139.
Acceptance criteria
arbitrum-cli --chain apechain block latest returns JSON from apechain's RPC.
arbitrum-cli --chain bogus block latest fails fast with a helpful error listing chains.
--rpc still overrides --chain.
cargo test green.
Reference: src/main.rs::Cli for where to add the global flag; PR #2 sets CI expectations.
Estimated effort
M (1 day)
— kcolbchain / Abhishek Krishna
Context
The Arbitrum Orbit ecosystem (Apechain, XAI, Sanko, etc.) uses the same JSON-RPC surface as Arbitrum One. The CLI currently hardcodes
https://arb1.arbitrum.io/rpc. Adding a--chain <name>flag (orbit-aware) and a small preset table makes the tool useful for the whole Orbit fleet — broader addressable market, same code.Scope
chainsmodule (src/chains.rs) with a preset table:{name, chain_id, rpc_url, explorer, native_token, is_orbit: bool}.--chain <name>global flag toCli. If set,rpc_urldefaults to that chain's RPC (but explicit--rpcstill wins).--chainis unknown, print the supported list.commands::info(see related issue) to source its chain list from this table.arbitrum-cli --chain apechain infoand asserts the chain_id is33139.Acceptance criteria
arbitrum-cli --chain apechain block latestreturns JSON from apechain's RPC.arbitrum-cli --chain bogus block latestfails fast with a helpful error listing chains.--rpcstill overrides--chain.cargo testgreen.Reference:
src/main.rs::Clifor where to add the global flag; PR #2 sets CI expectations.Estimated effort
M (1 day)
— kcolbchain / Abhishek Krishna