[SOLVED] Check is not a function

Hi all - I have been battling this error for 3 weeks now. I have searched all over with regards to this error to no avail. The error appears on the first line below. I had first assumed it was due to the function in question appearing more than once on the contract and in the abi so I even went to the abi and renamed the function in question as it contains an internalType that distinguishes it from the other function of the same name. The function definitely exists I have checked spelling etc. With this information could anyone direct me as to what the error might mean. When I change the function to one that appears once on the contract I receive no errors. Kindly direct me.

const txData = contractAddress.methods.function().encodeABI()
      const gasPrice = await web3.eth.getGasPrice()
      const permitTX = {
          from: initiator,
          to: contractAddress,
          nonce: web3.utils.toHex(initiatorNonce),
          gasLimit: web3.utils.toHex(98000),
          gasPrice: web3.utils.toHex(Math.floor(Number(gasPrice * (BigInt(13)/BigInt(10))))),
          value: "0x",
          data: txData
      const signedPermitTX = await web3.eth.accounts.signTransaction(permitTX, initiatorPK)

Hi @CleanMcGerk

Can you show what does the error message exactly say?

Web3ValidatorError: Web3 validator found 1 error[s]:
check is not a function

There is no function named check in the code you shared. Can you verify if this error is related to any other part of your code?

turn out to be a web3js bug which is still not solved. Downgrading to 1.8.0 solved it for me. Find details below https://github.com/web3/web3.js/pull/6434

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.