From fb07c7e35a7549aec72689d220ef9cb82fc24da9 Mon Sep 17 00:00:00 2001 From: Manank Patni Date: Thu, 19 Dec 2024 00:59:02 +0530 Subject: [PATCH] Fix test case for delegate call Signed-off-by: Manank Patni --- .../TestAccountExecution_ExecuteFromExecutor.t.sol | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/foundry/unit/concrete/accountexecution/TestAccountExecution_ExecuteFromExecutor.t.sol b/test/foundry/unit/concrete/accountexecution/TestAccountExecution_ExecuteFromExecutor.t.sol index 9bac7853..f9a446cb 100644 --- a/test/foundry/unit/concrete/accountexecution/TestAccountExecution_ExecuteFromExecutor.t.sol +++ b/test/foundry/unit/concrete/accountexecution/TestAccountExecution_ExecuteFromExecutor.t.sol @@ -61,11 +61,13 @@ contract TestAccountExecution_ExecuteFromExecutor is TestAccountExecution_Base { address valueTarget = makeAddr("valueTarget"); uint256 value = 1 ether; - bytes memory sendValueCallData = - abi.encodeWithSelector(MockDelegateTarget.sendValue.selector, valueTarget, value); + bytes memory sendValueCallData = abi.encodePacked( + address(delegateTarget), + abi.encodeWithSelector(MockDelegateTarget.sendValue.selector, valueTarget, value) + ); mockExecutor.execDelegatecall(BOB_ACCOUNT, sendValueCallData); // Assert that the value was set ie that execution was successful - // assertTrue(valueTarget.balance == value); + assertTrue(valueTarget.balance == value); } /// @notice Tests batch execution via MockExecutor