Permalink
Show file tree
Hide file tree
8 changes: 4 additions & 4 deletions
8
test/integration-tests/gas-tests/__snapshots__/CheckOwnership.gas.test.ts.snap
2 changes: 1 addition & 1 deletion
2
test/integration-tests/gas-tests/__snapshots__/CryptoPunk.gas.test.ts.snap
2 changes: 1 addition & 1 deletion
2
test/integration-tests/gas-tests/__snapshots__/Foundation.gas.test.ts.snap
4 changes: 2 additions & 2 deletions
4
test/integration-tests/gas-tests/__snapshots__/LooksRare.gas.test.ts.snap
2 changes: 1 addition & 1 deletion
2
test/integration-tests/gas-tests/__snapshots__/NFT20.gas.test.ts.snap
2 changes: 1 addition & 1 deletion
2
test/integration-tests/gas-tests/__snapshots__/NFTX.gas.test.ts.snap
14 changes: 7 additions & 7 deletions
14
test/integration-tests/gas-tests/__snapshots__/Payments.gas.test.ts.snap
4 changes: 2 additions & 2 deletions
4
test/integration-tests/gas-tests/__snapshots__/Seaport.gas.test.ts.snap
2 changes: 1 addition & 1 deletion
2
test/integration-tests/gas-tests/__snapshots__/Sudoswap.gas.test.ts.snap
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[to consider] dirty reentrancy lock (#189)
* Gas costs for clean reentrancy lock * Gas costs for direct reentrancy lock * Reentrancy test * bytecode increase
- Loading branch information
Showing
19 changed files
with
136 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| // SPDX-License-Identifier: GPL-3.0-or-later | ||
| pragma solidity ^0.8.17; | ||
|
|
||
| contract ReentrancyLock { | ||
| error ContractLocked(); | ||
|
|
||
| uint256 private isLocked = 1; | ||
|
|
||
| modifier isNotLocked() { | ||
| if (isLocked != 1) revert ContractLocked(); | ||
| isLocked = 2; | ||
| _; | ||
| isLocked = 1; | ||
| } | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| // SPDX-License-Identifier: GPL-3.0-or-later | ||
| pragma solidity ^0.8.15; | ||
|
|
||
| contract ReenteringProtocol { | ||
| error NotAllowedReenter(); | ||
|
|
||
| function callAndReenter(address universalRouter, bytes calldata data) public payable { | ||
| (bool success,) = universalRouter.call(data); | ||
| if (!success) revert NotAllowedReenter(); | ||
| } | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 0 additions & 17 deletions
17
test/integration-tests/gas-tests/__snapshots__/Router.gas.test.ts.snap
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.