Hey guys,
I’m trying to test my contract on the Mumbai Testnet, however the following function returns a MetaMask RPC error: block gas limit exceeded.
const {
runContractFunction: createClone,
isFetching,
isLoading,
} = useWeb3Contract({
abi: wfABI,
contractAddress: "0xa56F180aF0A73d948b6B386616f549279F4d6e4d",
functionName: "createClone",
params: {},
msgValue: ethers.utils.parseUnits("1000000000000000", "wei"),
});
The same function works on the Mumbai testnet when I run it on the Hardhat CLI and it also works from the front end when I use Hardhat, however for some reason it’s not working on my moralis front end when I try it with Polygon Mumbai. I have double checked the addresses, abi, etc, and I still can’t figure out why this isn’t working. I’ve added gasLimit using ethers manually as well.
This is the exact error I get: MetaMask - RPC Error: [ethjs-query] while formatting outputs from RPC '{"value":{"code":-32603,"data":{"code":-32000,"message":"exceeds block gas limit"}}}' {code: -32603, message:
[ethjs-query] while formatting outputs from RPC ‘{…e":-32000,“message”:“exceeds block gas limit”}}}’}
Thanks!