feat: add Radius Network support (eip155:723487)#29
feat: add Radius Network support (eip155:723487)#29lalalune merged 1 commit intoelizaos-plugins:alphafrom
Conversation
Adds Radius Network (chain ID 723487) and Radius Testnet (chain ID 72344)
as supported chains in the Rust and Python implementations. The TypeScript
implementation already auto-supports both via viem 2.48.0+, since
`SupportedChain = keyof typeof viemChains` — the `^2.21.0` viem pin accepts
the release that exports `radius` and `radiusTestnet`.
Changes:
- rust/src/types.rs: add `Radius` and `RadiusTestnet` enum variants with
chain_id, native_symbol ("RUSD"), default_rpc, is_testnet, Display, and
FromStr match arms following the existing 14-chain pattern.
- python/elizaos_plugin_evm/types.py: add `RADIUS` and `RADIUS_TESTNET` enum
entries plus dict entries across chain_id, native_symbol, default_rpc,
and is_testnet properties.
- python/tests/test_types.py: update EXPECTED_CHAIN_IDS, EXPECTED_SYMBOLS,
test_testnet_identification, test_mainnet_chains_are_not_testnet, and
test_enum_count to include the two new chains.
- rust/tests/integration_tests.rs: extend test_all_chain_ids,
test_all_native_symbols, test_all_default_rpcs_are_https,
test_testnet_identification, and test_chain_from_str_standard with
Radius + RadiusTestnet coverage.
- README.md: add two rows to the Supported Chains table.
Radius Network is a stablecoin-native EVM platform with ~500ms finality
and sub-penny gas. Native currency is RUSD (Radius USD, 18 decimals).
Registered in viem 2.48.0, alloy-rs/chains, and
ethereum-lists/chains (#8168, merged).
Website: https://radiustech.xyz
Docs: https://docs.radiustech.xyz
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
WalkthroughAdded support for two new blockchain networks (Radius Network and Radius Testnet) to the EVM plugin. Chain identifiers, native symbols, RPC endpoints, and testnet classifications were integrated into Python and Rust codebases along with corresponding test coverage updates. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Add Radius Network (chain ID
723487) and its testnet (chain ID72344) to the Rust and Python implementations ofplugin-evm. The TypeScript implementation already picks up Radius automatically viaviem/chains(SupportedChain = keyof typeof viemChains), so only the README needs updating there.Radius Network is an EVM-compatible platform purpose-built for agentic micropayments — sub-penny costs (~$0.0001/tx), sub-second finality (~500ms), and stablecoin-native gas (RUSD). It's a natural fit for plugin-evm's agent payment workflows.
Chain details
Native currency: RUSD (Radius USD, 18 decimals).
Registered in viem 2.48.0 as
radius/radiusTestnet, and in ethereum-lists/chains (PR #8168, merged).Links
Greptile Summary
This PR adds Radius Network (chain ID
723487) and Radius Testnet (chain ID72344) to the Rust and Python implementations ofplugin-evm, and updates the README — the TypeScript layer already picks up the chain automatically viaviem/chains. All chain metadata (RPC URLs, native symbolRUSD,is_testnetflag) is correct and consistent across both languages, and the new variants are fully covered by the extended test suites.Confidence Score: 5/5
Safe to merge; all remaining findings are P2 style suggestions about the pre-existing serde/Display naming gap and missing display assertions in tests.
Chain IDs, RPC URLs, native symbol, and testnet flags are all correct and consistent across Rust and Python. Tests are comprehensive. The only noteworthy issue is the pre-existing serde rename_all = 'lowercase' mismatch for multi-word chain names — RadiusTestnet follows the same pattern as BaseSepolia, which already exists in the codebase without observed breakage.
rust/src/types.rs warrants a follow-up to address the serde/Display inconsistency for both RadiusTestnet and BaseSepolia, but this is not blocking.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[SupportedChain input] --> B{FromStr lookup} B -->|radius| C[Radius - chain ID 723487] B -->|radiustestnet or radius-testnet| D[RadiusTestnet - chain ID 72344] C --> E[symbol: RUSD\nrpc: rpc.radiustech.xyz\nis_testnet: false] D --> F[symbol: RUSD\nrpc: rpc.testnet.radiustech.xyz\nis_testnet: true] E --> G[Display → radius\nSerde → radius] F --> H[Display → radiusTestnet\nSerde warning → radiustestnet]Comments Outside Diff (2)
rust/src/types.rs, line 11 (link)DisplayforRadiusTestnet#[serde(rename_all = "lowercase")]serialisesRadiusTestnetas"radiustestnet", butDisplayreturns"radiusTestnet"and the Python enum value is"radiusTestnet". This meansserde_json::from_str::<SupportedChain>("\"radiusTestnet\"")would silently fail while"radiustestnet"succeeds — a mismatch between the serde wire format and whatto_string()produces.This pre-existing gap also affects
BaseSepolia(serde:"basesepolia"vs Display:"baseSepolia"). Adding a per-variant rename on both would align all representations:The same fix applied to
BaseSepoliawould close the pre-existing gap too.rust/tests/integration_tests.rs, line 325-330 (link)test_chain_displayand serde tests not extended to Radius chainsThe existing
test_chain_displaytest coversBaseSepoliaandZksyncbut the new chains are not tested. Similarly,test_chain_serde_allonly covers single-word variants and deliberately skips multi-word ones (where the serde/Display mismatch would surface). Adding assertions here would catch the"radiusTestnet"→"radiusTestnet"Display roundtrip and make the serde gap visible:Reviews (1): Last reviewed commit: "feat: add Radius Network support (eip155..." | Re-trigger Greptile
Summary by CodeRabbit
Release Notes
New Features
Tests