From c158786765918d10c1a324065d1f130ef4888299 Mon Sep 17 00:00:00 2001 From: Piotr Grzesik Date: Mon, 6 Jul 2026 18:21:05 +0200 Subject: [PATCH] feat: Add support for Robinhood chain --- README.md | 3 ++- skills/0x-trade/references/tokens.md | 1 + src/chain/mod.rs | 28 ++++++++++++++++++++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c4414e0..221e1d0 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ curl -fsSL https://raw.githubusercontent.com/0xProject/0x-cli/main/scripts/insta ## Features - **4 APIs**: EVM Swap (Allowance Holder), Gasless Swap, Solana Swap, Cross-Chain -- **21 chains**: Ethereum, Base, Arbitrum, Optimism, Polygon, BSC, Avalanche, Linea, Scroll, Blast, Mantle, Berachain, Sonic, Unichain, World Chain, Abstract, Ink, Monad, HyperEVM, Solana, Tron +- **22 chains**: Ethereum, Base, Arbitrum, Optimism, Polygon, BSC, Avalanche, Linea, Scroll, Blast, Mantle, Berachain, Sonic, Unichain, World Chain, Abstract, Ink, Monad, HyperEVM, Robinhood Chain, Solana, Tron - **Agent-first**: Auto-detect non-TTY for JSON output, structured error codes, stable exit codes, inline `RESPONSE:` schemas in every `--help` - **Pay-per-request (no API key)**: `--pay x402-evm` or `--pay mpp` settles ~$0.01 USDC per request via the 0x agent gateway — for autonomous agents with a funded wallet - **Safe by default**: OS keyring for wallet secrets, transaction simulation before every execution, `--dry-run` mode, exact token approvals @@ -485,6 +485,7 @@ Every interactive prompt has a flag equivalent: | 480 | worldchain | World Chain | ETH | | 999 | hyperevm | HyperEVM | HYPE | | 2741 | abstract | Abstract | ETH | +| 4663 | robinhood | Robinhood Chain | ETH | | 5000 | mantle | Mantle | MNT | | 8453 | base | Base | ETH | | 42161 | arbitrum | Arbitrum | ETH | diff --git a/skills/0x-trade/references/tokens.md b/skills/0x-trade/references/tokens.md index 8ac327a..3a24aa4 100644 --- a/skills/0x-trade/references/tokens.md +++ b/skills/0x-trade/references/tokens.md @@ -14,6 +14,7 @@ Run `0x chains -o json-envelope` for the live list (with explorer URLs and chain | 480 | worldchain | World Chain | ETH | | 999 | hyperevm | HyperEVM | HYPE | | 2741 | abstract | Abstract | ETH | +| 4663 | robinhood | Robinhood Chain | ETH | | 5000 | mantle | Mantle | MNT | | 8453 | base | Base | ETH | | 42161 | arbitrum | Arbitrum | ETH | diff --git a/src/chain/mod.rs b/src/chain/mod.rs index c1615da..9cc9144 100644 --- a/src/chain/mod.rs +++ b/src/chain/mod.rs @@ -315,6 +315,19 @@ const CHAINS: &[ChainInfo] = &[ chain_type: ChainType::Evm, default_rpc_url: Some("https://rpc.hyperliquid.xyz/evm"), }, + ChainInfo { + id: ChainId::Numeric(4663), + name: "robinhood", + display_name: "Robinhood Chain", + native_token: "ETH", + explorer_url: "https://robinhoodchain.blockscout.com", + chain_type: ChainType::Evm, + // Public endpoint documented by Robinhood; rate-limited (they steer + // production traffic to Alchemy et al.), which matches how the other + // built-in defaults here are "good enough to try, configure your own + // for real volume". + default_rpc_url: Some("https://rpc.mainnet.chain.robinhood.com"), + }, ChainInfo { id: ChainId::Solana, name: "solana", @@ -502,6 +515,21 @@ mod tests { assert_eq!(chain.name, "base"); } + #[test] + fn test_resolve_robinhood() { + let by_name = resolve_chain("robinhood").unwrap(); + assert!(by_name.is_evm()); + assert_eq!(by_name.numeric_id(), Some(4663)); + assert_eq!(by_name.api_chain_id(), "4663"); + // Blockscout explorer uses the standard /tx/ path. + assert_eq!( + by_name.explorer_tx_url("0xabc"), + "https://robinhoodchain.blockscout.com/tx/0xabc" + ); + // Resolvable by numeric ID too. + assert_eq!(resolve_chain("4663").unwrap().name, "robinhood"); + } + #[test] fn test_resolve_solana() { let chain = resolve_chain("solana").unwrap();