Commit b6a4be07 authored by Mark Tyneway's avatar Mark Tyneway Committed by GitHub

Merge pull request #7390 from ethereum-optimism/ctb/fix-compiler-warnings-delayed-vetoable

contracts-bedrock: fix compiler warnings
parents 0bd60024 af9ee1c1
......@@ -47,8 +47,8 @@ CrossDomainOwnableThroughPortal_Test:test_depositTransaction_crossDomainOwner_su
CrossDomainOwnable_Test:test_onlyOwner_notOwner_reverts() (gas: 10597)
CrossDomainOwnable_Test:test_onlyOwner_succeeds() (gas: 34883)
DelayedVetoable_Getters_Test:test_getters() (gas: 24466)
DelayedVetoable_Getters_TestFail:test_getters_notZeroAddress_reverts() (gas: 31166)
DelayedVetoable_HandleCall_TestFail:test_handleCall_unauthorizedInitiation_reverts() (gas: 20234)
DelayedVetoable_Getters_TestFail:test_getters_notZeroAddress_reverts() (gas: 31206)
DelayedVetoable_HandleCall_TestFail:test_handleCall_unauthorizedInitiation_reverts() (gas: 20291)
DeleteOutput:test_script_succeeds() (gas: 3100)
DeployerWhitelist_Test:test_owner_succeeds() (gas: 7582)
DeployerWhitelist_Test:test_storageSlots_succeeds() (gas: 33395)
......
......@@ -32,6 +32,7 @@ contract DelayedVetoable_Init is CommonTest {
// value in storage.
vm.prank(initiator);
(bool success,) = address(delayedVetoable).call(hex"");
assertTrue(success);
}
/// @dev This function is used to prevent initiating the delay unintentionally.
......@@ -146,6 +147,7 @@ contract DelayedVetoable_HandleCall_TestFail is DelayedVetoable_Init {
function test_handleCall_unauthorizedInitiation_reverts() external {
vm.expectRevert(abi.encodeWithSelector(Unauthorized.selector, initiator, address(this)));
(bool success,) = address(delayedVetoable).call(NON_ZERO_DATA);
assertTrue(success);
}
/// @dev The call cannot be forwarded until the delay has passed.
......@@ -156,6 +158,7 @@ contract DelayedVetoable_HandleCall_TestFail is DelayedVetoable_Init {
vm.expectRevert(abi.encodeWithSelector(ForwardingEarly.selector));
(success,) = address(delayedVetoable).call(data);
success;
}
/// @dev The call cannot be forwarded a second time.
......@@ -165,6 +168,7 @@ contract DelayedVetoable_HandleCall_TestFail is DelayedVetoable_Init {
// Initiate the call
vm.prank(initiator);
(bool success,) = address(delayedVetoable).call(data);
assertTrue(success);
vm.warp(block.timestamp + operatingDelay);
vm.expectEmit(true, false, false, true, address(delayedVetoable));
......@@ -193,6 +197,7 @@ contract DelayedVetoable_HandleCall_TestFail is DelayedVetoable_Init {
// 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));
......@@ -203,6 +208,7 @@ contract DelayedVetoable_HandleCall_TestFail is DelayedVetoable_Init {
// Forward the call
vm.expectRevert(outData);
(bool success2,) = address(delayedVetoable).call(inData);
success2;
}
/// @dev A test documenting the single instance in which the contract is not 'transparent' to the initiator.
......@@ -217,5 +223,6 @@ contract DelayedVetoable_HandleCall_TestFail is DelayedVetoable_Init {
vm.prank(initiator);
vm.expectRevert(outData);
(bool success,) = address(delayedVetoable).call(inData);
success;
}
}
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