name: radius-dev description: End-to-end Radius Network development playbook. Stablecoin-native EVM with sub-second finality and 2.5M TPS. Uses @radiustechsystems/sdk (viem-native) with radiusWalletActions() decorator for wallet clients. wagmi for React wallet integration. Foundry for smart contract development and testing. Covers micropayment patterns (pay-per-visit content, real-time API metering, streaming payments), stablecoin-native fees via Turnstile, batch transactions, ERC-20 operations, SDK event watching, and EVM compatibility differences from Ethereum. user-invocable: true
Radius Development Skill
What this Skill is for
Use this Skill when the user asks for:
- Radius dApp UI work (React / Next.js with wagmi)
- Wallet connection + transaction signing on Radius
- Smart contract deployment to Radius (Foundry / Solidity)
- Micropayment patterns (pay-per-visit content, API metering, streaming payments)
- Radius SDK usage (TypeScript, events, batch transactions)
- EVM compatibility questions specific to Radius
- Stablecoin-native fee model and Turnstile mechanism
- Radius network configuration, RPC endpoints, contract addresses
Default stack decisions (opinionated)
- SDK: @radiustechsystems/sdk + viem
- Built natively on viem. Extends wallet clients with
radiusWalletActions(). - Use
createPublicClientfor reads,createWalletClientfor writes. - Always call
.extend(radiusWalletActions())on wallet clients for Radius features (batch transactions, optimized gas estimation).
- UI: wagmi + @tanstack/react-query for React apps
- Import
radiusTestnetchain from@radiustechsystems/sdk. - Use
injected()connector for MetaMask and EIP-1193 wallets. - Standard wagmi hooks:
useAccount,useConnect,useSendTransaction,useWaitForTransactionReceipt.
- Smart contracts: Foundry
forge createfor direct deployment,forge scriptfor scripted deploys.cast callfor reads,cast sendfor writes.- OpenZeppelin for standard patterns (ERC-20, ERC-721, access control).
- Solidity 0.8.x, Osaka hardfork support via Revm 33.1.0.
- Chain: Radius Testnet
- Chain ID:
72344 - RPC:
https://rpc.testnet.radiustech.xyz - Native currency: RUSD (18 decimals)
- Fee token (radUSD):
0xF966020a30946A64B39E2e243049036367590858 - Faucet:
https://testnet.radiustech.xyz/testnet/faucet
- Fees: Stablecoin-native via Turnstile
- Users pay gas in stablecoins (USD). No separate gas token needed.
- Fixed cost: ~0.0001 USD per transaction (10,000 txs per 1 USD).
eth_gasPricereturns0x0. Wallets and tooling work normally.- Failed transactions do NOT charge gas.
Critical Radius differences from Ethereum
Always keep these in mind when writing code for Radius:
| Feature | Ethereum | Radius |
|---|---|---|
| Fee model | Market-based ETH gas bids | Fixed 0.0001 USD via Turnstile |
| Settlement | ~12 minutes (12+ confirmations) | Immediate (~200ms) |
| Failed txs | Charge gas even if reverted | Charge only on success |
| Required token | Must hold ETH for gas | Stablecoins only (USD) |
| Reorgs | Possible | Impossible |
eth_gasPrice |
Market rate | Returns 0x0 |
eth_getBalance |
Native ETH balance | Native + convertible USD balance |
Solidity patterns to watch:
// DON'T — always returns 0 on Radius
require(address(this).balance > 0);
// DO — use ERC-20 balance instead
require(IERC20(feeToken).balanceOf(address(this)) > 0);
Standard ERC-20 interactions, storage operations, and events work unchanged.
Operating procedure (how to execute tasks)
1. Classify the task layer
- UI/wallet layer — React components, wallet connection, transaction UX
- SDK/scripts layer — Backend scripts, server-side verification, event monitoring
- Smart contract layer — Solidity contracts, deployment, testing
- Micropayment layer — Pay-per-visit, API metering, streaming payments
2. Pick the right building blocks
- UI: wagmi +
radiusTestnetchain + React hooks - Scripts/backends:
@radiustechsystems/sdk+viemdirectly - Smart contracts: Foundry (
forge/cast) + OpenZeppelin - Micropayments: Combine SDK + server-side verification + wallet integration
3. Implement with Radius-specific correctness
Always be explicit about:
- Using
radiusTestnetchain definition from the SDK - Extending wallet clients with
radiusWalletActions() - Stablecoin fee model (no ETH needed, no gas price bidding)
- Instant finality (no need to wait for multiple confirmations)
- Using
parseEtherfor USD amounts (18 decimals, same as ETH) - Environment variables for private keys (never hardcode)
4. Test
- Smart contracts:
forge testlocally, then deploy to Radius Testnet - SDK scripts: Run against testnet RPC with funded test accounts
- Get testnet tokens from
https://testnet.radiustech.xyz/testnet/faucet - Verify deployments:
cast code <address> --rpc-url https://rpc.testnet.radiustech.xyz
5. Deliverables expectations
When you implement changes, provide:
- Exact files changed + diffs (or patch-style output)
- Commands to install dependencies, build, and test
- A short "risk notes" section for anything touching signing, fees, payments, or token transfers
Progressive disclosure (read when needed)
- TypeScript SDK reference: sdk-typescript.md
- Event watching + historical queries: sdk-events.md
- Smart contract deployment (Foundry): smart-contracts.md
- Wallet integration (wagmi / viem / MetaMask): wallet-integration.md
- Micropayment patterns: micropayments.md
- EVM differences + Turnstile + architecture: evm-differences.md
- Network config + contract addresses + RPC reference: network-config.md
- Security checklist: security.md
- Curated reference links: resources.md