Changing the chain last video tutorial

Dear Moralis team

I’m following your last video on how to create a dex, I can’t change the bock chain, it’s configured on the mainnet,

try importing the mumbai testnet as in the example.
He can’t find it, if I import goerli if he finds it, could you help me

import { configureChains, mainnet, WagmiConfig, createClient, goerli,polygonMumbai } from “wagmi”;
const { provider, webSocketProvider } = configureChains(

[goerli],

[publicProvider()]

);

this is the video of his channel

Hey @Vargosky,

I’m not sure I get what you are talking about, what chain do you want to include in the configurations?

In the index.js’s file you imports the chains,
For default is mainnet, and y can change it to goerli, but if i import polygonMumbai dont find the chain.

The chain is import from @wagmi, if you go there, you can see a list of chains,
declare const arbitrum: Chain;

declare const arbitrumGoerli: Chain;

declare const avalanche: Chain;

declare const avalancheFuji: Chain;

declare const bsc: Chain;

declare const bscTestnet: Chain;

declare const canto: Chain;

declare const crossbell: Chain;

declare const evmos: Chain;

declare const evmosTestnet: Chain;

declare const fantom: Chain;

declare const fantomTestnet: Chain;

declare const filecoin: Chain;

declare const filecoinHyperspace: Chain;

declare const foundry: Chain;

declare const iotex: Chain;

declare const iotexTestnet: Chain;

declare const goerli: Chain;

declare const gnosis: Chain;

declare const gnosisChiado: Chain;

declare const hardhat: Chain;

declare const localhost: Chain;

declare const mainnet: Chain;

declare const metis: Chain;

declare const metisGoerli: Chain;

declare const optimism: Chain;

declare const optimismGoerli: Chain;

declare const polygon: Chain;

declare const polygonMumbai: Chain;

declare const sepolia: Chain;

declare const taraxa: Chain;

declare const taraxaTestnet: Chain;

declare const zkSync: Chain;

declare const zkSyncTestnet: Chain;

¿How i can cange the chain to polygonMumbai?

Which version of wagmi are you using within your project currently?

If you are using the latest one you can use this

import { goerli, polygonMumbai } from 'wagmi/chains'
1 Like

Thanks a lot , it works !!!

1 Like

Great!

It’s been my pleasure to help you out :grinning_face_with_smiling_eyes: If you have any other inquiries, please feel free to open a new thread.

For now, I will close this one.

Have a nice day~