0

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?

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

0

Your Answer

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

Browse other questions tagged or ask your own question.