-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* update hardhat * remove symlinks by using hardhat-foundry use hardhat-foundry package to use foundry remappings to compile. Symlinks are no longer necessary After upgrade HH412 error was thrown caused by the existing symlinks ref: https://hardhat.org/hardhat-runner/docs/errors#HH412 NomicFoundation/hardhat#3623 * update compiler version to ^0.8.24 supporting the cancun upgrades * fix ci * fix lock file * Update yarn.lock * regenerate gas snapshots * install foundry in ci * Use mainnet permit2 (#347) * solc upgrade to 0.8.26 * use mainnet permit2 work started * fix uniswap tests * Remove block from resetFork * Refactor to fetch fee tiers * remove NFT protocols for V4 router (#348) * first pass * fix forge builds * fix reentrancy test * Add check to receive * remove .only rip * add todo for tests that need wrtiting * update readme and planner --------- Co-authored-by: Alice <34962750+hensha256@users.noreply.github.com> Co-authored-by: Alice Henshaw <henshawalice@gmail.com>
- Loading branch information
1 parent
228f2d1
commit 6cf84c8
Showing
126 changed files
with
613 additions
and
13,000 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
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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
# Compiler files | ||
cache/ | ||
cache_hardhat/ | ||
out/ | ||
|
||
# Ignores development broadcast logs | ||
|
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 |
---|---|---|
|
@@ -7,3 +7,4 @@ out | |
openzeppelin-contracts | ||
permit2 | ||
solmate | ||
cache_hardhat |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,13 @@ | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
pragma solidity ^0.8.17; | ||
pragma solidity ^0.8.24; | ||
|
||
import {IERC721Receiver} from '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol'; | ||
import {IERC1155Receiver} from '@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol'; | ||
import {IERC165} from '@openzeppelin/contracts/utils/introspection/IERC165.sol'; | ||
|
||
/// @title ERC Callback Support | ||
/// @notice Implements various functions introduced by a variety of ERCs for security reasons. | ||
/// All are called by external contracts to ensure that this contract safely supports the ERC in question. | ||
contract Callbacks is IERC721Receiver, IERC1155Receiver { | ||
function onERC721Received(address, address, uint256, bytes calldata) external pure returns (bytes4) { | ||
return this.onERC721Received.selector; | ||
} | ||
|
||
function onERC1155Received(address, address, uint256, uint256, bytes calldata) external pure returns (bytes4) { | ||
return this.onERC1155Received.selector; | ||
} | ||
|
||
function onERC1155BatchReceived(address, address, uint256[] calldata, uint256[] calldata, bytes calldata) | ||
external | ||
pure | ||
returns (bytes4) | ||
{ | ||
return this.onERC1155BatchReceived.selector; | ||
} | ||
|
||
contract Callbacks { | ||
function supportsInterface(bytes4 interfaceId) external pure returns (bool) { | ||
return interfaceId == type(IERC1155Receiver).interfaceId || interfaceId == type(IERC721Receiver).interfaceId | ||
|| interfaceId == type(IERC165).interfaceId; | ||
return interfaceId == type(IERC165).interfaceId; | ||
} | ||
} |
Oops, something went wrong.