feat: add Radius Network support (mainnet + testnet)#42
Open
TJ-Frederick wants to merge 1 commit into
Open
Conversation
|
@TJ-Frederick is attempting to deploy a commit to the Inventions Hub Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR adds Radius Network (mainnet and testnet) to MCPay. Radius is an EVM-compatible network purpose-built for high-throughput stablecoin payments, with sub-second finality and very low per-tx cost — a natural fit for x402/MCPay micropayment flows.
Changes:
viemoverride andmcpaydep from2.37.13to^2.48.0. viem 2.48.0+ ships nativeradiusandradiusTestnetchain definitions, so no custom chain config is needed.radiusandradius-testnetcases to the chain switch inpackages/js-sdk/src/utils/signer.ts.radiusandradius-testnetentries toUNIFIED_NETWORKSinapps/app/src/lib/commons/networks.ts, registersSBC(Brale-issued stablecoin, EIP-2612) as a verified stablecoin on both, and extends theUnifiedNetwork/EVMNetworktypes.Network details
0x33ad9e4BD16B69B5BFdED37D8B5D9fF9aba014Fb(6 decimals, EIP-2612)SBC (Stablecoin by Brale) is a regulated USD-backed stablecoin issued by Brale and is the canonical stablecoin on Radius. The contract address is identical on mainnet and testnet.
A note on x402
x402Supportedis set tofalseon both Radius entries for now. Radius support landed upstream in x402-foundation/x402#2038 (merged 2026-05-07), but as of this PR the latestx402npm release (1.2.0, published 2026-04-16) does not yet include those defaults. Once a release with Radius defaults is published, flippingx402Supported: trueis a one-line change in both entries — TODO comments mark the spot.Icon asset
The entries reference
/networks/radius.svg, which is not committed in this PR (onlyapps/app/public/networks/SVGs already in the repo are referenced by other networks). Happy to provide an SVG in whatever format/dimensions the existing icon set uses — let me know.References
radiuschain (added in 2.48.0): https://github.com/wevm/viem/blob/main/src/chains/definitions/radius.ts