Skip to content
Back to skills

Wagmi Config

ASecurity

Wagmi createConfig setup with chains and transports. Use when configuring multi-chain support and network connections.

  • 9 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 10, 2026
businesstypescript

Works with

  • cli

Security analysis

A100/100

Scanned September 10, 2026

npx -y skills add cyotee/indexedex --skill wagmi-config --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Wagmi Config?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Wagmi Config
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/cyotee-wagmi-config/badge)](https://www.skillsdirectory.com/skills/cyotee-wagmi-config)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: wagmi-config
description: Wagmi createConfig setup with chains and transports. Use when configuring multi-chain support and network connections.
---

# Wagmi Config

Setup wagmi with chains and transports.

## Basic Config

```typescript
import { createConfig, http } from '@wagmi/core'
import { mainnet, sepolia, base } from '@wagmi/core/chains'

export const config = createConfig({
  chains: [mainnet, sepolia, base],
  transports: {
    [mainnet.id]: http('https://mainnet.example.com'),
    [sepolia.id]: http('https://sepolia.example.com'),
    [base.id]: http('https://base.example.com'),
  },
})
```

## With Connectors

```typescript
import { createConfig, http } from '@wagmi/core'
import { mainnet, sepolia } from '@wagmi/core/chains'
import { injected } from '@wagmi/connectors'
import { walletConnect } from '@wagmi/connectors'

export const config = createConfig({
  chains: [mainnet, sepolia],
  connectors: [
    injected(),
    walletConnect({ projectId: '...' })
  ],
  transports: {
    [mainnet.id]: http(),
    [sepolia.id]: http(),
  },
})
```

## Storage Persistence

```typescript
import { createConfig, createStorage, http } from '@wagmi/core'
import { mainnet, sepolia } from '@wagmi/core/chains'

export const config = createConfig({
  chains: [mainnet, sepolia],
  storage: createStorage({ storage: window.localStorage }),
  transports: {
    [mainnet.id]: http(),
    [sepolia.id]: http(),
  },
})
```

## Config Methods

```typescript
import { config } from './config'

// Get viem client
const client = config.getClient({ chainId: 1 })

// Subscribe to state changes
const unsubscribe = config.subscribe(
  (state) => state.chainId,
  (chainId) => console.log('Chain changed:', chainId)
)

// Manually set state
config.setState((state) => ({ ...state, chainId: 1 }))
```

## MultiInjectedProviderDiscovery

Enable EIP-6963 multi-injected provider discovery:

```typescript
export const config = createConfig({
  chains: [mainnet, sepolia],
  multiInjectedProviderDiscovery: true, // default
  transports: { ... },
})
```

## Polling & Batching

```typescript
export const config = createConfig({
  chains: [mainnet, sepolia],
  pollingInterval: 4_000,    // polling interval in ms
  cacheTime: 4_000,          // cache duration
  batch: { multicall: true }, // enable multicall batching
  transports: { ... },
})
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…