Hi,
I’m building a multi-chain dApp and would like to fetch data in similar smart contracts but on different chains. One is one Goerli, the other is on Mumbai, and the last one is on Bsc Testnet.
I have been digging within the moralis SDK repository and the only clue I’ve found to achieve this is doing something like :
// chainIdDecimal is just the decimal value of a chainId, I also printed this to be sure I sent the right value
const web3 = await Moralis.enableWeb3({ chainId: chainIdDecimal });
I’ve also tried
const web3 = await Moralis.enableWeb3(chainIdDecimal);
But when I do the following
console.log(await web3.eth.net.getId());
It always prints the one from the Metamask… Any solution?
Thanks