Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
clabby committed Feb 18, 2023
1 parent 019157a commit 13d25e4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
7 changes: 4 additions & 3 deletions packages/contracts-bedrock/.gas-snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ CrossDomainOwnable_Test:test_onlyOwner_succeeds() (gas: 34861)
CrossDomainOwnable2_Test:test_onlyOwner_notMessenger_reverts() (gas: 8416)
CrossDomainOwnable2_Test:test_onlyOwner_notOwner2_reverts() (gas: 64332)
CrossDomainOwnable2_Test:test_onlyOwner_notOwner_reverts() (gas: 16588)
CrossDomainOwnable2_Test:test_onlyOwner_succeeds() (gas: 77766)
CrossDomainOwnable2_Test:test_onlyOwner_succeeds() (gas: 79009)
CrossDomainOwnable3_Test:test_constructor_succeeds() (gas: 10510)
CrossDomainOwnable3_Test:test_crossDomainOnlyOwner_notMessenger_reverts() (gas: 28311)
CrossDomainOwnable3_Test:test_crossDomainOnlyOwner_notOwner2_reverts() (gas: 78170)
CrossDomainOwnable3_Test:test_crossDomainOnlyOwner_notOwner2_reverts() (gas: 79413)
CrossDomainOwnable3_Test:test_crossDomainOnlyOwner_notOwner_reverts() (gas: 32000)
CrossDomainOwnable3_Test:test_crossDomainTransferOwnership_succeeds() (gas: 95748)
CrossDomainOwnable3_Test:test_crossDomainTransferOwnership_succeeds() (gas: 96991)
CrossDomainOwnable3_Test:test_localOnlyOwner_notOwner_reverts() (gas: 13237)
CrossDomainOwnable3_Test:test_localOnlyOwner_succeeds() (gas: 35197)
CrossDomainOwnable3_Test:test_localTransferOwnership_succeeds() (gas: 52084)
Expand Down Expand Up @@ -394,6 +394,7 @@ RLPWriter_writeUint_Test:test_writeUint_smallint3_succeeds() (gas: 7256)
RLPWriter_writeUint_Test:test_writeUint_smallint4_succeeds() (gas: 7280)
RLPWriter_writeUint_Test:test_writeUint_smallint_succeeds() (gas: 7258)
RLPWriter_writeUint_Test:test_writeUint_zero_succeeds() (gas: 7726)
ReentrancyGuard_Test:test_perMessageNonReentrant_reverts() (gas: 31939)
ResourceMetering_Test:test_meter_initialResourceParams_succeeds() (gas: 8983)
ResourceMetering_Test:test_meter_updateNoGasDelta_succeeds() (gas: 2008119)
ResourceMetering_Test:test_meter_updateOneEmptyBlock_succeeds() (gas: 18148)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ contract ReentrancyGuard {

// Check if the reentrancy lock for the `_msgHash` is set. If so, revert.
if sload(_hashMsgHash) {
// MEMORY SAFETY: We're reverting, so it's fine that we're clobbering the free memory
// pointer.
// MEMORY SAFETY: We're reverting, so it's fine that we're clobbering the free
// memory pointer.

// Store selector for "Error(string)" in scratch space
mstore(0x00, 0x08c379a0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ contract ReentrancyGuard_Test is Test {
reentrant = new NonReentrant();
}

function test_perMessageNonReentrant_succeeds() public {
reentrant.noReentrance(bytes32(0));
}

function test_perMessageNonReentrant_reverts() public {
vm.expectRevert("ReentrancyGuard: reentrant call");
reentrant.noReentrance(MSG_HASH);
Expand Down

0 comments on commit 13d25e4

Please sign in to comment.