Boilerplate error: the transaction is executed but errors are printed in the HH node
Version of Hardhat
latest
What happened?
Download the boilerplate repository Then, follow the steps explained in the documentation at https://hardhat.org/tutorial/boilerplate-project. Using MetaMask (I haven't tested with Coinbase Wallet), the transaction executes correctly. However, several errors are printed in the Hardhat node:
eth_call
Contract call: Token#<unrecognized-selector>
From: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
To: 0x5fbdb2315678afecb367f032d93f642f64180aa3
Error: Transaction reverted: function selector was not recognized and there's no fallback function
at Token.<unrecognized-selector> (contracts/Token.sol:12)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at HardhatNode.runCall (/home/chris/repos/NomicFoundation/tests_folder/dapp/node_modules/hardhat/src/internal/hardhat-network/provider/node.ts:718:7)
at EthModule._callAction (/home/chris/repos/NomicFoundation/tests_folder/dapp/node_modules/hardhat/src/internal/hardhat-network/provider/modules/eth.ts:365:9)
at HardhatNetworkProvider._sendWithLogging (/home/chris/repos/NomicFoundation/tests_folder/dapp/node_modules/hardhat/src/internal/hardhat-network/provider/provider.ts:145:22)
at HardhatNetworkProvider.request (/home/chris/repos/NomicFoundation/tests_folder/dapp/node_modules/hardhat/src/internal/hardhat-network/provider/provider.ts:122:18)
at JsonRpcHandler._handleRequest (/home/chris/repos/NomicFoundation/tests_folder/dapp/node_modules/hardhat/src/internal/hardhat-network/jsonrpc/handler.ts:191:20)
at JsonRpcHandler._handleSingleRequest (/home/chris/repos/NomicFoundation/tests_folder/dapp/node_modules/hardhat/src/internal/hardhat-network/jsonrpc/handler.ts:152:17)
Did I misunderstand our conversation or did we think that we need a change in metamask before we can progress this?
Out of band we have discussed this. This issue is likely interacting with internals we are reworking with EDR. We are going to hold until EDR is merged, then we can leverage the EDR teams knowledged here.
Out of band we have discussed this.
Hi, @kanej , I am interest with EDR, what is the links of you guys talk. Thanks in advance.
Out of band we have discussed this.
Hi, @kanej , I am interest with EDR, what is the links of you guys talk. Thanks in advance.
I am afraid that while there was a Devconnect talk on EDR it wasn't recorded due to technical issues. So there is currently no talk.
You can follow along with the project at https://github.com/orgs/NomicFoundation/projects/3
This issue is important because the error shows up in Hardhat's boilerplate project.
This is caused by MetaMask calling supportsInterface(bytes4) on the token, which doesn't implement that method.
To fix it, the example token should implement EIP-165.
Closing because there's nothing to do on the EDR side.