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
Returning from a fake function reverts with Error: Transaction reverted: function returned an unexpected amount of data.
If the sendTransaction is left out, it works as expected
Reproduction steps
// test for userWithdraw methodawaitfakeStrategy.withdraw.returns(async()=>{awaitowner.sendTransaction({to: yieldFarm.address,value: TEN_ETH,});returnTEN_ETH;})// contractcontractYieldFarm{functionuserWithdraw(){/// ... custom logicamountReceived=strategy.withdraw();// this function moves funds from strategy to yieldFarm, ETH in this case}}
Expected behavior
TEN_ETH value should be transferred to the yieldFarm contract. and this function withdraw should return the value TEN_ETH as well
The text was updated successfully, but these errors were encountered:
Describe the bug
Returning from a fake function reverts with
Error: Transaction reverted: function returned an unexpected amount of data
.If the sendTransaction is left out, it works as expected
Reproduction steps
Expected behavior
TEN_ETH value should be transferred to the yieldFarm contract. and this function withdraw should return the value TEN_ETH as well
The text was updated successfully, but these errors were encountered: