React Moralis useWeb3Contract hook

How do I give a manual gas Limit in useWeb3Contract hook. This is becuse I recieve error
cannot estimate gas; transaction may fail or may require manual gas limit [ See: https://links.ethers.org/v5-errors-UNPREDICTABLE_GAS_LIMIT ] (error={"code":-32603,"message":"execution reverted","data":{"originalError":{"code":3,"data":"0x64283d7b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cbe66646c0450d75957f726cf99dad471916933b","message":"execution reverted"}}}, method="estimateGas", transaction={"from":"0x5d0655b8D44A7FA3a8fc7ff3846d971397eA21B1","to":"0x12Ab5A925Ec5Dac5004F07A20ca7b40c0aafb011","value":{"type":"BigNumber","hex":"0x016345785d8a0000"},"data":"0x096c5e1a0000000000000000000000006c8988a0b21c4d3357f991735d3e7d1adfd682700000000000000000000000000000000000000000000000000000000000000000","accessList":null}, code=UNPREDICTABLE_GAS_LIMIT, version=providers/5.6.0)

1 Like

Hi @raaghavmanivel

useWeb3Contract hook does not support adding custom gas. To customise gas you will have to use ether.js or wagmi sdk.

1 Like