defi-wonderland / smock

The Solidity mocking library
MIT License
319 stars 40 forks source link

Deploy mock with custom sender #63

Closed 0xGorilla closed 3 years ago

0xGorilla commented 3 years ago

Describe the bug Currently, it is not possible to deploy a mock with a custom sender since the connect returns the contract factory and not the MockFactory

Reproduction steps Run (await smock.mock('MyContract')).connect(someone).deploy(...)

Expected behavior The connect method should be overridden in order to return the mock factory when executed

smartcontracts commented 3 years ago

I'm a little confused by this. What's the desired behavior?

0xGorilla commented 3 years ago

Right now you are not able to deploy a mock while also using the connect method, it would be great if it would work... Can you deal with this one?

smartcontracts commented 3 years ago

Ohhh I see the issue. Ok I can tackle this but will probably can't get to it until thursday.