Skip to content

How to connect to localhost / foundry / anvil? #1109

Closed Answered by zkovac58
ian asked this question in Q&A
Discussion options

You must be logged in to vote

In the latest version (v2), Anvil can be imported from 'wagami/chains' ...

import { mainnet, polygon, optimism, arbitrum, base, anvil, } from 'wagmi/chains';

and then added to the chains array...

const config = getDefaultConfig({ appName: 'myapp', projectId: 'projectId', chains: [mainnet, polygon, optimism, arbitrum, base, anvil], ssr: false, });

This worked for me.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by DanielSinclair
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants