react-moralis
react-moralis copied to clipboard
GasLimit in `useWeb3ExecuteFunction` hook
New Feature Request
Add the option to set the gasLimit when use the useWeb3ExecuteFunction hook
Checklist
- [x] I am not disclosing a vulnerability.
- [x] I have searched through existing issues and the Moralis Forum.
Current Limitation
I cannot run my function on the chain caused by :
cannot estimate gas; transaction may fail or may require manual gas limit
Feature / Enhancement Description
Add in the option:
const { data, error, fetch, isFetching, isLoading } = useWeb3ExecuteFunction({
abi: abi,
contractAddress: raffleAddress!,
functionName: "placeBet",
params: {
_roomSize: roomSize,
},
msgValue: ethers.utils.parseEther(bet.toString()).toString(),
gasLimit:xxxx, // new param
})