Cyfrin / foundry-defi-stablecoin-cu

241 stars 107 forks source link

:white_check_mark: fixed : Handler-burnDsc, adding approve #64

Closed ibourn closed 6 months ago

ibourn commented 6 months ago

Update StopOnRevertHandler.t.sol - fixing burnDsc (as a follow-up to #35 )

burnDsc reverts due to a ERC20InsufficientAllowance error.

The burnDsc function ends up calling _burnDsc where a dsc transfer is made. An 'approve' is therefore necessary before. To perform this we must also 'prank' the msg.sender

ibourn commented 6 months ago

My apologies, I screwed up with my commits. There should be 2 PR because two different topics. I close this one and go through two branches