I am following the documentation to work with nextjs https://docs.moralis.io/web3-data-api/evm/quickstart-nextjs
by default it is using Ethereum,
How can I use polygon?
Thanks in advance,
Jose
I am following the documentation to work with nextjs https://docs.moralis.io/web3-data-api/evm/quickstart-nextjs
by default it is using Ethereum,
How can I use polygon?
Thanks in advance,
Jose
Hi @jcsancho
You just have to update the following line with the chain props and value as polygon chain to use it on for getting polygon chain data.
import { EvmChain } from 'moralis/common-evm-utils'; // add this import on top
const { data: nativeBalance } = useEvmNativeBalance({ address, chain: EvmChain.POLYGON });
This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.