Skip to content

Radius Configuration Reference

Complete reference for configuring Radius in your SBC application.

Quick Reference

Mainnet

PropertyValue
Chain ID723
Chain NameRadius Network
RPC URLhttps://rpc.radiustech.xyz
Explorerhttps://network.radiustech.xyz
Currency SymbolRUSD (18 decimals)
Gas PriceLow, fixed

Testnet

PropertyValue
Chain ID72344
Chain NameRadius Testnet
RPC URLhttps://rpc.testnet.radiustech.xyz
Explorerhttps://testnet.radiustech.xyz
Currency SymbolRUSD (18 decimals)
Gas PriceLow, fixed

Viem Chain Configuration

Mainnet

import { defineChain } from 'viem'
 
export const radiusMainnet = defineChain({
  id: 723,
  name: 'Radius Network',
  nativeCurrency: {
    name: 'RUSD',
    symbol: 'RUSD',
    decimals: 18
  },
  rpcUrls: {
    default: {
      http: ['https://rpc.radiustech.xyz']
    }
  },
  blockExplorers: {
    default: {
      name: 'Radius Explorer',
      url: 'https://network.radiustech.xyz'
    }
  }
})

Testnet

import { defineChain } from 'viem'
 
export const radiusTestnet = defineChain({
  id: 72344,
  name: 'Radius Testnet',
  nativeCurrency: {
    name: 'RUSD',
    symbol: 'RUSD',
    decimals: 18
  },
  rpcUrls: {
    default: {
      http: ['https://rpc.testnet.radiustech.xyz']
    }
  },
  blockExplorers: {
    default: {
      name: 'Radius Explorer',
      url: 'https://testnet.radiustech.xyz',
      apiUrl: 'https://testnet.radiustech.xyz/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=0xfA15FF1e8e3a66737fb161e4f9Fa8935daD7B04F

Core 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: '0x11A98', // 72344 in hex
        chainName: 'Radius Testnet',
        nativeCurrency: {
          name: 'RUSD',
          symbol: 'RUSD',
          decimals: 18
        },
        rpcUrls: ['https://rpc.testnet.radiustech.xyz'],
        blockExplorerUrls: ['https://testnet.radiustech.xyz']
      }]
    })
  } catch (error) {
    console.error('Error adding network:', error)
  }
}

Differences from Base

AspectBaseRadius
EntryPointCanonical 0x0000...7Da032Custom 0xfA15...d7B04F
Smart AccountKernel (ZeroDev)SimpleAccount
GasStandard (varies)Low, fixed (~$0.000093/transfer)
Currency SymbolETHRUSD

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

Radius uses fixed gas pricing (~985998816 wei) instead of EIP-1559. On non-EIP-1559 chains, maxPriorityFeePerGas must equal maxFeePerGas. The SBC AppKit handles this automatically, but if you're constructing UserOperations manually:

// Radius: Fixed gas pricing (no EIP-1559 fee market)
// maxPriorityFeePerGas MUST equal maxFeePerGas
const gasPrice = await publicClient.getGasPrice();
const userOperation = {
  to: recipient,
  value: '1000000000000000000',
  data: '0x',
  maxFeePerGas: gasPrice,
  maxPriorityFeePerGas: gasPrice // Must be equal on Radius!
}
 
// Base: EIP-1559 supported, priority fee can differ
const userOperation = {
  to: recipient,
  value: '1000000000000000000',
  data: '0x',
  maxFeePerGas: '2000000000', // 2 gwei
  maxPriorityFeePerGas: '1000000000' // 1 gwei
}

Important: Setting maxPriorityFeePerGas to a different value than maxFeePerGas on Radius will cause the error: maxPriorityFeePerGas must equal maxFeePerGas on chains that don't support EIP-1559

Troubleshooting

Wrong EntryPoint Error

Error: EntryPoint not deployed at canonical address

Solution: 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 })
}

Gas Price Parity Error

Error: maxPriorityFeePerGas must equal maxFeePerGas

Solution: On Radius, always set maxPriorityFeePerGas equal to maxFeePerGas. This is a non-EIP-1559 chain. The SBC AppKit v1.6.1+ handles this automatically.

Receipt Polling Timeout

If transaction receipt polling times out on Radius, this is likely due to eth_getLogs exceeding the block range limit. Radius produces ~1600 blocks/sec, so the block range grows very fast. Use pimlico_getUserOperationStatus for polling instead. The SBC AppKit v1.6.1+ handles this automatically.

Next Steps