Commit 21d24135 authored by Maurelian's avatar Maurelian Committed by GitHub

contracts-bedrock: Add test to ensure delayed vetoable returns the correct data (#8725)

parent 313596d9
...@@ -216,6 +216,31 @@ contract DelayedVetoable_HandleCall_TestFail is DelayedVetoable_Init { ...@@ -216,6 +216,31 @@ contract DelayedVetoable_HandleCall_TestFail is DelayedVetoable_Init {
success2; success2;
} }
function testFuzz_handleCall_forwardingTargetRetValue_succeeds(
bytes calldata inData,
bytes calldata outData
)
external
{
assumeNoClash(inData);
// Initiate the call
vm.prank(initiator);
(bool success,) = address(delayedVetoable).call(inData);
success;
vm.warp(block.timestamp + operatingDelay);
vm.expectEmit(true, false, false, true, address(delayedVetoable));
emit Forwarded(keccak256(inData), inData);
vm.mockCall(target, inData, outData);
// Forward the call
(bool success2, bytes memory retData) = address(delayedVetoable).call(inData);
assertTrue(success2);
assertEq(keccak256(retData), keccak256(outData));
}
/// @dev A test documenting the single instance in which the contract is not 'transparent' to the initiator. /// @dev A test documenting the single instance in which the contract is not 'transparent' to the initiator.
function testFuzz_handleCall_queuedAtClash_reverts(bytes memory outData) external { function testFuzz_handleCall_queuedAtClash_reverts(bytes memory outData) external {
// This will get us calldata with the same function selector as the queuedAt function, but // This will get us calldata with the same function selector as the queuedAt function, but
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment