You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Revert reason not supplied on revert for delegated calls.
Reproduction steps
The following test fails. The revert happens but no reason it is returned:
constaMock: FakeContract<SomeContract>=awaitsmock.fake('SomeContract');aMock.aFunction.reverts("A REASON")...awaitexpect(otherContract.aFunctionThatExecuteDelegateCall(// delegates to aMock.aFunctionaMock,),"Should reverts with the mock programed reason").to.rejectedWith("A REASON")
If I execute the same test without using the smock library, but instead using a mock contract that reverts, compiled from solidity code, the test passes.
Expected behavior
In the above test otherContract.aFunctionThatExecuteDelegateCall should revert using reason "A REASON".
Screenshots
NA
System Specs:
Ubuntu Server 20.04:
Package Version (or commit hash): 2.2.0
Additional context
For the contract delegator solidity code I am using functionDelegateCall from Openzeppelin's Address lib:
Describe the bug
Revert reason not supplied on revert for delegated calls.
Reproduction steps
The following test fails. The revert happens but no reason it is returned:
If I execute the same test without using the smock library, but instead using a mock contract that reverts, compiled from solidity code, the test passes.
Expected behavior
In the above test
otherContract.aFunctionThatExecuteDelegateCall
should revert using reason"A REASON"
.Screenshots
NA
System Specs:
Additional context
For the contract delegator solidity code I am using
functionDelegateCall
from Openzeppelin's Address lib:https://github.com/OpenZeppelin/openzeppelin-contracts/blob/4b16e887474eebb64e3f8266c68ef151a3f1b769/contracts/utils/Address.sol#L170
The text was updated successfully, but these errors were encountered: