-
|
I have a 721 mint function for a free mint that attempts to refund any excess balance sent: So, I thought, I would do something like this in my test file: But, for reasons slightly outside of my understanding of Solidity / the EVM - How would I go about mocking the call or manipulating the VM state such that I can hit my |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
|
Beta Was this translation helpful? Give feedback.
address.call("")just invokes theCALLopcode with no calldata, so you do not need to usevm.mockCall. Although, in order to hit your path, you would essentially need to create a contract with a payablereceivefunction that reverts. Returningfalsedoes not do anything - thesuccessboolean just indicates whether theCALLopcode encountered a revert or not.