I'm testing my Ethereum smart contract with Hardhat and Metamask. In Metamask if I try to send zero tokens it reverts, as expected (the transfer function reverts if token amount is zero).

If I look at the Hardhat console output I see the call to the transfer function, followed by a call to a second function which is an external function that isn't called anywhere in the contract or by any external calls.

If I remove this function and perform the above test again, same thing happens, only this time, after the call to the transfer function, it calls another external function which, like the previous, is never called anywhere in the contract.

Can anyone confirm this behaviour is normal and if so, what's going on here?

  • Can you please share your code for more clarification? Commented Oct 13, 2023 at 8:00


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.