Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
b6a4be07
Unverified
Commit
b6a4be07
authored
Sep 26, 2023
by
Mark Tyneway
Committed by
GitHub
Sep 26, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7390 from ethereum-optimism/ctb/fix-compiler-warnings-delayed-vetoable
contracts-bedrock: fix compiler warnings
parents
0bd60024
af9ee1c1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
.gas-snapshot
packages/contracts-bedrock/.gas-snapshot
+2
-2
DelayedVetoable.t.sol
packages/contracts-bedrock/test/DelayedVetoable.t.sol
+7
-0
No files found.
packages/contracts-bedrock/.gas-snapshot
View file @
b6a4be07
...
...
@@ -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: 31
16
6)
DelayedVetoable_HandleCall_TestFail:test_handleCall_unauthorizedInitiation_reverts() (gas: 202
34
)
DelayedVetoable_Getters_TestFail:test_getters_notZeroAddress_reverts() (gas: 31
20
6)
DelayedVetoable_HandleCall_TestFail:test_handleCall_unauthorizedInitiation_reverts() (gas: 202
91
)
DeleteOutput:test_script_succeeds() (gas: 3100)
DeployerWhitelist_Test:test_owner_succeeds() (gas: 7582)
DeployerWhitelist_Test:test_storageSlots_succeeds() (gas: 33395)
...
...
packages/contracts-bedrock/test/DelayedVetoable.t.sol
View file @
b6a4be07
...
...
@@ -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;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment