New answers tagged

0 votes

Hardhat doesn't recognize custom errors from inherited Contracts

The message is thrown at chai-matchers validation and it means, that the expected error is not found in the contracts interface:
tenbits's user avatar
  • 2,323
0 votes

Error: Transaction reverted: function selector was not recognized and there's no fallback nor receive function

Update the smart contract address after deployment in your tests. It seems like the contract address is hardcoded.
gigs's user avatar
  • 103
0 votes

When I run the yarn hardhat test the console only shows 0passing(0ms) and the test didn't run

In ethers V6 ethers.utils.parseEther() has been updated to ethers.parseEther() or as in your case ethers.utils.parseUnits() to ethers.parseUnits() This causes hardhat not to run the test without ...
Snoep's user avatar
  • 3
1 vote

ethers.utils.solidityKeccak256 in hardhat test file

If you are on ethers v6, try this: const message = ethers.solidityPackedKeccak256( ['address', 'bytes32', 'uint256'], [userAddr, nonce, ammount] );
user133751's user avatar

Top 50 recent answers are included