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?