-
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 theCALL
opcode 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 payablereceive
function that reverts. Returningfalse
does not do anything - thesuccess
boolean just indicates whether theCALL
opcode encountered a revert or not.