Out of gas / CALL_EXCEPTION error on Moralis.executeFunction

Hi, i’m having some problems while implementing an nft mint function. I’m using ethereum boilerplate.
When I run “let tx = await Moralis.executeFunction(options)”
there is an error with code=CALL_EXCEPTION and the transaction fails. In the rinkeby etherscan the transaction fail error is “out of gas”. If I increase manually the gas limit in the metamask, it works correctly.
Anyone knows how to fix this? This is a rinkeby bug or should I set the gas limit manually in some place?

that gas limit should be set properly by metamask after calling gas_estimation on a RPC node, can you try with a different RPC node in metamask?

you can not change that gas parameter in executeFunction

1 Like

Thanks for your reply, I had to use ethers.js directly and passing the gas limit as last parameter { gasLimit: 600000 } in the function call.

1 Like