radius-dev

star 0

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.

erikzrekz By erikzrekz schedule Updated 2/10/2026

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)

  1. SDK: @radiustechsystems/sdk + viem
  • Built natively on viem. Extends wallet clients with radiusWalletActions().
  • Use createPublicClient for reads, createWalletClient for writes.
  • Always call .extend(radiusWalletActions()) on wallet clients for Radius features (batch transactions, optimized gas estimation).
  1. UI: wagmi + @tanstack/react-query for React apps
  • Import radiusTestnet chain from @radiustechsystems/sdk.
  • Use injected() connector for MetaMask and EIP-1193 wallets.
  • Standard wagmi hooks: useAccount, useConnect, useSendTransaction, useWaitForTransactionReceipt.
  1. Smart contracts: Foundry
  • forge create for direct deployment, forge script for scripted deploys.
  • cast call for reads, cast send for writes.
  • OpenZeppelin for standard patterns (ERC-20, ERC-721, access control).
  • Solidity 0.8.x, Osaka hardfork support via Revm 33.1.0.
  1. 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
  1. 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_gasPrice returns 0x0. 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 + radiusTestnet chain + React hooks
  • Scripts/backends: @radiustechsystems/sdk + viem directly
  • 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 radiusTestnet chain 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 parseEther for USD amounts (18 decimals, same as ETH)
  • Environment variables for private keys (never hardcode)

4. Test

  • Smart contracts: forge test locally, 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)

Install via CLI
npx skills add https://github.com/erikzrekz/skills --skill radius-dev
Repository Details
star Stars 0
call_split Forks 0
navigation Branch main
article Path SKILL.md
More from Creator