agentleFS
sonorateksonoratek/legiox/skills/base-react-next-wallet-integration/SKILL.md

base-react-next-wallet-integration

Skill0 starsChanged 44 days agoMITView on GitHub

Adding Base chain to wagmi-config.ts.

The file

Files
SKILL.md

Base React/Next.js — wagmi + viem

Summary

Base wagmi integration extends existing EVM provider — add base and baseSepolia chains, RING mirror ABI with 8 decimals in formatUnits. ring-config.chains.evm.base.ringTokenAddress is SSOT for contract address. For gasless US users, wagmi alone is insufficient — route to CDP smart account + paymaster. Keep Web3Provider client boundary; dynamic import to save bundle size. Never treat Base as ring-native chain in UI copy.

Instructions

  1. wagmi config: import { base, baseSepolia } from 'wagmi/chains'.
  2. useReadContract({ address: ringConfig.evm.base.ringToken, abi: erc20Abi, functionName: 'balanceOf' }).
  3. useWriteContract for non-sponsored power-user path only.
  4. useSendUserOperation when smartAccount enabled in config.
  5. wallet-wrapper.tsx: conditional Base section if chains.evm.base.enabled.
  6. hooks/use-wallet-balance.ts: branch chain === 'base' for mirror read.

Deeper fields

jq -r '.mission, .expertise, .keywords' "mcp/AI-LEGIOX/legiox-truth-lens/base-react-next-wallet-integration.nodus.json"

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.