openPack Function out of gas

How to resolve openPack out of gas error

The openPack can fail with an out of gas issue, depending on the size of the Pack, as the this function can be gas intensive. To resolve this, you can add a gas override in your code when sending the transaction like this:

await contract.interceptor.overrideNextTransaction(() => ({
       gasLimit: 3000000,
}));

const tx = await contract.open(tokenId, openAmount);
 
Did this answer your question?
😞
😐
🤩