defi-wonderland / smock

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

fix: support faking and mocking delegated calls #131

Closed 0xGorilla closed 2 years ago

0xGorilla commented 2 years ago

Describe the bug Smock currently does not support any interaction with delegated calls.

Reproduction steps

  1. Create a Proxy contract
  2. Fake a fake using an interface of a contract with the function foo
  3. Force the fake to return true when the function foo is called
  4. Call the method foo of the fake through the proxy
  5. Expect to receive true

Expected behavior Be able to work with mock and fakes when using delegated calls.

As well, it would be great to have a way to assert that a call to a function was delegated from address 0x123.