Radius Configuration Reference
Complete reference for configuring Radius testnet in your SBC application.
Quick Reference
| Property | Value |
|---|---|
| Chain ID | 72344 |
| Chain Name | Radius Testnet |
| RPC URL | https://rpc.testnet.radiustech.xyz |
| Explorer | https://testnet.radiustech.xyz/testnet/explorer |
| Native Currency | USD (18 decimals) |
| Gas Price | 0 gwei (free) |
Viem Chain Configuration
import { defineChain } from 'viem'
export const radiusTestnet = defineChain({
id: 72344,
name: 'Radius Testnet',
nativeCurrency: {
name: 'USD',
symbol: 'USD',
decimals: 18
},
rpcUrls: {
default: {
http: ['https://rpc.testnet.radiustech.xyz']
}
},
blockExplorers: {
default: {
name: 'Radius Explorer',
url: 'https://testnet.radiustech.xyz/testnet/explorer',
apiUrl: 'https://testnet.radiustech.xyz/testnet/explorer/api'
}
},
testnet: true
})Note: For contract addresses and EntryPoint information, see Radius Overview.
SBC AppKit Configuration
Minimal Config
import { SbcProvider } from '@stablecoin.xyz/react'
import { radiusTestnet } from './config/radius'
const config = {
apiKey: process.env.VITE_SBC_API_KEY,
chain: radiusTestnet
}
<SbcProvider config={config}>
<YourApp />
</SbcProvider>Full Config
const config = {
// Required
apiKey: process.env.VITE_SBC_API_KEY,
chain: radiusTestnet,
// Optional: Wallet configuration
wallet: 'auto', // 'auto' | 'metamask' | 'coinbase' | 'walletconnect'
walletOptions: {
autoConnect: false,
preferredWallets: ['metamask', 'coinbase']
},
// Optional: Custom RPC
rpcUrl: 'https://rpc.testnet.radiustech.xyz',
// Optional: Debug mode
debug: true,
// Optional: EntryPoint override (usually not needed)
entryPoint: {
address: '0xfA15FF1e8e3a66737fb161e4f9Fa8935daD7B04F',
version: '0.7'
}
}Environment Variables
# .env file
# Required: SBC API Key
VITE_SBC_API_KEY=your_api_key_here
# Optional: Chain selection
VITE_CHAIN=radiusTestnet
# Optional: Custom RPC
VITE_RPC_URL=https://rpc.testnet.radiustech.xyz
# Optional: EntryPoint override
VITE_ENTRY_POINT=0xfA15FF1e8e3a66737fb161e4f9Fa8935daD7B04FCore SDK Configuration
Backend Integration
import { SbcAppKit } from '@stablecoin.xyz/core'
import { radiusTestnet } from './config/radius'
const appKit = new SbcAppKit({
apiKey: process.env.SBC_API_KEY,
chain: radiusTestnet,
privateKey: process.env.PRIVATE_KEY as Hex
})With Custom RPC
const appKit = new SbcAppKit({
apiKey: process.env.SBC_API_KEY,
chain: radiusTestnet,
privateKey: process.env.PRIVATE_KEY as Hex,
rpcUrl: 'https://rpc.testnet.radiustech.xyz'
})Direct Integration
For direct paymaster integration on Radius, use the API URL format:
const PAYMASTER_API_URL = `https://api.aa.stablecoin.xyz/rpc/v1/radiusTestnet/${SBC_PAYMASTER_API_KEY}`;See Direct Integration for full details.
MetaMask Network Configuration
Users can add Radius to MetaMask manually:
async function addRadiusToMetamask() {
try {
await window.ethereum.request({
method: 'wallet_addEthereumChain',
params: [{
chainId: '0x11A88', // 72344 in hex
chainName: 'Radius Testnet',
nativeCurrency: {
name: 'USD',
symbol: 'USD',
decimals: 18
},
rpcUrls: ['https://rpc.testnet.radiustech.xyz'],
blockExplorerUrls: ['https://testnet.radiustech.xyz/testnet/explorer']
}]
})
} catch (error) {
console.error('Error adding network:', error)
}
}Differences from Base
| Aspect | Base | Radius |
|---|---|---|
| EntryPoint | Canonical 0x0000...7Da032 | Custom 0xfA15...d7B04F |
| Smart Account | Kernel (ZeroDev) | SimpleAccount |
| Gas | Standard (varies) | Free (0 gwei) |
| Native Token | ETH | USD |
Migration: Base to Radius
// Switching chains in your app
import { baseSepolia } from 'viem/chains'
import { radiusTestnet } from './config/radius'
// Change your config
const config = {
apiKey: process.env.VITE_SBC_API_KEY,
chain: isRadius ? radiusTestnet : baseSepolia // Toggle based on environment
}Gas Parameter Configuration
Since Radius has free gas, you can simplify gas parameters:
// Radius: Simplified (gas is free)
const userOperation = {
to: recipient,
value: '1000000000000000000',
data: '0x'
// maxFeePerGas and maxPriorityFeePerGas handled automatically (set to 0)
}
// Base: Might need explicit gas settings during congestion
const userOperation = {
to: recipient,
value: '1000000000000000000',
data: '0x',
maxFeePerGas: '1000000000', // 1 gwei
maxPriorityFeePerGas: '1000000000'
}Troubleshooting
Wrong EntryPoint Error
Error: EntryPoint not deployed at canonical addressSolution: Ensure you're using the Radius custom EntryPoint:
entryPoint: '0xfA15FF1e8e3a66737fb161e4f9Fa8935daD7B04F'RPC Connection Issues
// Add timeout and retries
const radiusWithRetry = {
...radiusTestnet,
rpcUrls: {
default: {
http: ['https://rpc.testnet.radiustech.xyz'],
webSocket: ['wss://rpc.testnet.radiustech.xyz']
}
}
}Chain ID Mismatch
// Verify chain ID matches
if (await walletClient.getChainId() !== 72344) {
await walletClient.switchChain({ id: 72344 })
}Next Steps
- Getting Started - Build your first app
- Overview - Learn about Radius
- AppKit Docs - Full SDK reference
- Direct Integration - Manual paymaster usage