Waffle icon indicating copy to clipboard operation
Waffle copied to clipboard

Support side-effects on mocks

Open suranap opened this issue 3 years ago • 1 comments

Similar to Python's Mock class here. I can't figure out how to do this with Waffle.

For example, I want to mock a UniswapV2Pair to force removeLiquidity to have different behaviors. This is easy with mocks. However, it also needs to transfer tokens to the calling contract. This is a side-effect caused when removing liquidity.

suranap avatar Oct 19 '21 19:10 suranap

Might be a duplicate of https://github.com/TrueFiEng/Waffle/issues/545

rzadp avatar Nov 10 '22 14:11 rzadp