feat(evm): add Radius Network and Radius Testnet SBC as default stablecoin (Permit2 + EIP-2612)#2038
Conversation
|
@TJ-Frederick is attempting to deploy a commit to the Coinbase Team on Vercel. A member of the Team first needs to authorize it. |
…Permit2 + EIP-2612) Add SBC as the default stablecoin for Radius Network (eip155:723487) and Radius Testnet (eip155:72344) across Go, TypeScript, and Python SDKs. SBC does not support EIP-3009, so Permit2 is the required transfer method. SBC does support EIP-2612 permit() for gasless approval.
f775f07 to
ef8ed93
Compare
DEFAULT_ASSETS.md's 'Adding a New Chain' numbered flow stopped at 'Update all three SDKs' → 'Submit a PR' and did not mention the user-facing docs surfaces that also enumerate every chain with default-asset support. As a result, recent onboarding PRs have shipped with stale docs (e.g. the Radius PR x402-foundation#2038 updated the SDKs but not the docs table or Go README). The existing Cross-SDK Checklist at the bottom enumerates only the three code registries, mirroring the same gap. network-and-token-support.mdx has a parallel discoverability problem: the pointer to DEFAULT_ASSETS.md used a repo-relative path that resolves to a broken link on docs.x402.org, and the pointer sat inside the 'Default Assets for Dollar-String Pricing' intro rather than under 'Adding Support for New Networks' where a would-be contributor actually looks. The 'Adding' section itself described only runtime registration (server.register from consumer code) and did not mention the separate upstream-contribution path, and it also contained a 'Running Your Own Facilitator' subsection that is about facilitator infrastructure, not about adding networks — a topical mismatch. The page also ordered the 'Facilitators' section before 'Adding Support for New Networks', which inverts the natural read → use → extend → operate narrative. Changes: * DEFAULT_ASSETS.md: - Promote 'Update user-facing documentation' to a numbered step in 'Adding a New Chain' (new step 3, between 'Update all three SDKs' and 'Submit a PR'), with a cross-reference to the new checklist. - Append a new 'Documentation Checklist' section below the existing Cross-SDK Checklist, naming the two hot docs surfaces (network-and-token-support.mdx and go/mechanisms/evm/README.md) that must also be updated on a new chain onboarding. * docs/core-concepts/network-and-token-support.mdx: - Remove the oddly-placed 'See DEFAULT_ASSETS.md' link from the Dollar-String Pricing intro; replace with an in-page anchor pointing at the new contribution subsection. - Split 'Adding Support for New Networks' into two subsections: 'Runtime Registration' (the existing content, unchanged) and a new 'Contributing a New Default Asset' subsection that links to DEFAULT_ASSETS.md via an absolute github.com URL (so the link works on the published docs site) and explicitly names the cross-SDK + docs checklist. - Move 'Running Your Own Facilitator' out of 'Adding Support for New Networks' into the existing 'Facilitators' section, where it belongs topically. - Swap top-level section order: 'Adding Support for New Networks' now precedes 'Facilitators', matching the read → use → extend → operate narrative. No code changes. Documentation only.
|
Hey @TJ-Frederick thrilled to see Radius here. Heads up there is a docs gap in this PR addressed in #2049 I want to make you aware of. I suggest you add two files for your Radius default stablecoin entry:
Happy to answer questions. |
DEFAULT_ASSETS.md's 'Adding a New Chain' numbered flow stopped at 'Update all three SDKs' → 'Submit a PR' and did not mention the user-facing docs surfaces that also enumerate every chain with default-asset support. As a result, recent onboarding PRs have shipped with stale docs (e.g. the Radius PR x402-foundation#2038 updated the SDKs but not the docs table or Go README). The existing Cross-SDK Checklist at the bottom enumerates only the three code registries, mirroring the same gap. network-and-token-support.mdx has a parallel discoverability problem: the pointer to DEFAULT_ASSETS.md used a repo-relative path that resolves to a broken link on docs.x402.org, and the pointer sat inside the 'Default Assets for Dollar-String Pricing' intro rather than under 'Adding Support for New Networks' where a would-be contributor actually looks. The 'Adding' section itself described only runtime registration (server.register from consumer code) and did not mention the separate upstream-contribution path, and it also contained a 'Running Your Own Facilitator' subsection that is about facilitator infrastructure, not about adding networks — a topical mismatch. The page also ordered the 'Facilitators' section before 'Adding Support for New Networks', which inverts the natural read → use → extend → operate narrative. Changes: * DEFAULT_ASSETS.md: - Promote 'Update user-facing documentation' to a numbered step in 'Adding a New Chain' (new step 3, between 'Update all three SDKs' and 'Submit a PR'), with a cross-reference to the new checklist. - Append a new 'Documentation Checklist' section below the existing Cross-SDK Checklist, naming the two hot docs surfaces (network-and-token-support.mdx and go/mechanisms/evm/README.md) that must also be updated on a new chain onboarding. * docs/core-concepts/network-and-token-support.mdx: - Remove the oddly-placed 'See DEFAULT_ASSETS.md' link from the Dollar-String Pricing intro; replace with an in-page anchor pointing at the new contribution subsection. - Split 'Adding Support for New Networks' into two subsections: 'Runtime Registration' (the existing content, unchanged) and a new 'Contributing a New Default Asset' subsection that links to DEFAULT_ASSETS.md via an absolute github.com URL (so the link works on the published docs site) and explicitly names the cross-SDK + docs checklist. - Move 'Running Your Own Facilitator' out of 'Adding Support for New Networks' into the existing 'Facilitators' section, where it belongs topically. - Swap top-level section order: 'Adding Support for New Networks' now precedes 'Facilitators', matching the read → use → extend → operate narrative. No code changes. Documentation only.
|
Hey @ryanRfox ! Thanks for the suggestion, added |
|
@TJ-Frederick this PR looks good to me. Also, I want to alert you and @phdargen about #2054 which impacts Radius, Mezo and other newer Importantly, there is zero impact to Radius using the complete functionality within I appreciate your eyes on this. Please reach out if your team needs assistance working around that limitation in the mean time. |
Adds Radius Network (chain ID 723487) and Radius Testnet (chain ID 72344)
to the EVM network registry in both the TypeScript and Python packages,
and to the create-onchain-agent scaffolder so users can select Radius
during setup.
Changes:
typescript/agentkit/src/network/network.ts
- Define Radius mainnet and testnet chains inline via viem's defineChain
(viem is pinned at exact 2.47.4 in this repo; importing from viem/chains
would require a dep bump).
- Add entries to CHAIN_ID_TO_NETWORK_ID and NETWORK_ID_TO_VIEM_CHAIN.
typescript/create-onchain-agent/src/common/constants.ts
- Add "radius-mainnet" and "radius-testnet" to EVM_NETWORKS.
- Map both to NON_CDP_SUPPORTED_EVM_WALLET_PROVIDERS (Viem + Privy) —
Radius isn't CDP-supported, so CDP wallet providers are excluded.
typescript/create-onchain-agent/src/common/utils.ts
- Mirror the CHAIN_ID_TO_NETWORK_ID additions.
typescript/.changeset/add-radius-network.md
- Minor-version changeset for @coinbase/agentkit.
python/coinbase-agentkit/coinbase_agentkit/network/chain_definitions.py
- Add radius and radius_testnet Chain instances with Multicall3 address.
python/coinbase-agentkit/coinbase_agentkit/network/network.py
- Add entries to CHAIN_ID_TO_NETWORK_ID and NETWORK_ID_TO_CHAIN.
python/create-onchain-agent/create_onchain_agent/cli.py
- Add ("radius-mainnet", "Radius Mainnet") and ("radius-testnet",
"Radius Testnet") to EVM_NETWORKS. The existing get_network_choices
substring filter classifies them correctly (mainnet vs testnet).
python/coinbase-agentkit/changelog.d/add-radius-network.feature.md
python/create-onchain-agent/changelog.d/add-radius-network.feature.md
- Changelog fragments.
Scope
This PR only touches the generic EVM network registry and the scaffolder.
It intentionally does NOT modify the x402 action provider's
SUPPORTED_NETWORKS list, which tracks x402 protocol support and is gated
on upstream chain registration (x402-foundation/x402#2038). Adding Radius
as an x402-supported network will follow in a separate PR once the
upstream lands and this repo bumps its x402 dep.
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
Verified locally: @coinbase/agentkit `pnpm check` and `pnpm test`
(60 suites, 864 tests) pass; @coinbase/create-onchain-agent
`pnpm check:types` passes; Python chain_definitions and network modules
import and resolve cleanly.
Description
Add SBC as the default stablecoin for Radius Network (
eip155:723487) and Radius Testnet (eip155:72344) across all three SDKs, following the DEFAULT_ASSET.md guide.Radius Network is a stablecoin-native smart contract platform purpose-built for agentic micropayments. SBC does not support EIP-3009, so Permit2 is the required transfer method. SBC does support EIP-2612
permit()for gasless approval.eip155:723487eip155:723440x33ad9e4BD16B69B5BFdED37D8B5D9fF9aba014Fb0x33ad9e4BD16B69B5BFdED37D8B5D9fF9aba014FbStable CoinStable Coin11permit2permit2truetrueFiles changed (cross-SDK checklist per DEFAULT_ASSET.md):
go/mechanisms/evm/constants.gotypescript/packages/mechanisms/evm/src/shared/defaultAssets.tspython/x402/mechanisms/evm/constants.py.changeset, Go.changes/unreleasedyaml, Pythonchangelog.dfeature.mdTests
eip712Domain()on both networks (name="Stable Coin",version="1")x402ExactPermit2Proxydeployed and verified at0x402085c248EeA27D92E8b30b2C58ed07f9E20001on both Radius mainnet and testnetPermit2deployed at0x000000000022D473030F116dDEE9F6B43aC78BA3on both networksMulticall3deployed at0xcA11bde05977b3631167028862bE2a173976CA11on both networksChecklist