I'm facing this error while I'm trying to mint with sending transaction
const tx = {
from: accounts[0],
to: ContractAddress,
value: ethers.utils.parseEther("0.0005"),
nonce: await provider.getTransactionCount(
accounts[0],
"latest"
),
gasLimit: ethers.utils.hexlify(10000),
gasPrice: ethers.utils.hexlify(
parseInt(await provider.getGasPrice())
),
};
await contract.CustomMint(1, tx);
signer.sendTransaction(tx).then((transaction) => {
console.dir(transaction);
alert("Send finished!");
if (transaction) {
alert("Minted! Check Your Opensea Account For CrownNFT!");
handleNewNotification("Success");
SetMinting(false);
}
});
}
} catch (error) {
console.log(error);
}
CustomMint()
function code?