Skip to content

Commit

Permalink
Update interfaces
Browse files Browse the repository at this point in the history
Changes:
A	src/lib-external/oz-v3.4-solc-0.7/contracts/introspection/IERC165.sol
A	src/lib-external/oz-v3.4-solc-0.7/contracts/token/ERC20/IERC20.sol
A	src/lib-external/oz-v3.4-solc-0.7/contracts/token/ERC721/IERC721.sol
A	src/lib-external/oz-v3.4-solc-0.7/contracts/token/ERC721/IERC721Enumerable.sol
A	src/lib-external/oz-v3.4-solc-0.7/contracts/token/ERC721/IERC721Metadata.sol
A	src/lib-external/oz-v4.7.0/contracts/token/ERC1155/IERC1155Receiver.sol
A	src/lib-external/oz-v4.7.0/contracts/token/ERC20/IERC20.sol
A	src/lib-external/oz-v4.7.0/contracts/token/ERC721/IERC721Receiver.sol
A	src/lib-external/oz-v4.7.0/contracts/utils/introspection/IERC165.sol
A	src/lib-external/solmate-27545b0/src/tokens/ERC20.sol
A	src/lib-external/solmate-8d910d8/src/tokens/ERC20.sol
A	src/permit2/interfaces/IAllowanceTransfer.sol
A	src/permit2/interfaces/IDAIPermit.sol
A	src/permit2/interfaces/IEIP712.sol
A	src/permit2/interfaces/IERC1271.sol
A	src/permit2/interfaces/IPermit2.sol
A	src/permit2/interfaces/ISignatureTransfer.sol
A	src/uniswapx/base/ReactorStructs.sol
A	src/uniswapx/interfaces/IProtocolFeeController.sol
A	src/uniswapx/interfaces/IReactor.sol
A	src/uniswapx/interfaces/IReactorCallback.sol
A	src/uniswapx/interfaces/IValidationCallback.sol
A	src/universal-router/interfaces/IRewardsCollector.sol
A	src/universal-router/interfaces/IUniversalRouter.sol
A	src/universal-router/interfaces/external/ICryptoPunksMarket.sol
A	src/universal-router/interfaces/external/IWETH9.sol
A	src/v2-core/interfaces/IERC20.sol
A	src/v2-core/interfaces/IUniswapV2Callee.sol
A	src/v2-core/interfaces/IUniswapV2ERC20.sol
A	src/v2-core/interfaces/IUniswapV2Factory.sol
A	src/v2-core/interfaces/IUniswapV2Pair.sol
A	src/v2-periphery/interfaces/IERC20.sol
A	src/v2-periphery/interfaces/IUniswapV2Migrator.sol
A	src/v2-periphery/interfaces/IUniswapV2Router01.sol
A	src/v2-periphery/interfaces/IUniswapV2Router02.sol
A	src/v2-periphery/interfaces/IWETH.sol
A	src/v2-periphery/interfaces/V1/IUniswapV1Exchange.sol
A	src/v2-periphery/interfaces/V1/IUniswapV1Factory.sol
A	src/v3-core/interfaces/IERC20Minimal.sol
A	src/v3-core/interfaces/IUniswapV3Factory.sol
A	src/v3-core/interfaces/IUniswapV3Pool.sol
A	src/v3-core/interfaces/IUniswapV3PoolDeployer.sol
A	src/v3-core/interfaces/callback/IUniswapV3FlashCallback.sol
A	src/v3-core/interfaces/callback/IUniswapV3MintCallback.sol
A	src/v3-core/interfaces/callback/IUniswapV3SwapCallback.sol
A	src/v3-core/interfaces/pool/IUniswapV3PoolActions.sol
A	src/v3-core/interfaces/pool/IUniswapV3PoolDerivedState.sol
A	src/v3-core/interfaces/pool/IUniswapV3PoolEvents.sol
A	src/v3-core/interfaces/pool/IUniswapV3PoolImmutables.sol
A	src/v3-core/interfaces/pool/IUniswapV3PoolOwnerActions.sol
A	src/v3-core/interfaces/pool/IUniswapV3PoolState.sol
A	src/v3-periphery/interfaces/IERC20Metadata.sol
A	src/v3-periphery/interfaces/IERC721Permit.sol
A	src/v3-periphery/interfaces/IMulticall.sol
A	src/v3-periphery/interfaces/INonfungiblePositionManager.sol
A	src/v3-periphery/interfaces/INonfungibleTokenPositionDescriptor.sol
A	src/v3-periphery/interfaces/IPeripheryImmutableState.sol
A	src/v3-periphery/interfaces/IPeripheryPayments.sol
A	src/v3-periphery/interfaces/IPeripheryPaymentsWithFee.sol
A	src/v3-periphery/interfaces/IPoolInitializer.sol
A	src/v3-periphery/interfaces/IQuoter.sol
A	src/v3-periphery/interfaces/IQuoterV2.sol
A	src/v3-periphery/interfaces/ISelfPermit.sol
A	src/v3-periphery/interfaces/ISwapRouter.sol
A	src/v3-periphery/interfaces/ITickLens.sol
A	src/v3-periphery/interfaces/IV3Migrator.sol
A	src/v3-periphery/interfaces/external/IERC1271.sol
A	src/v3-periphery/interfaces/external/IERC20PermitAllowed.sol
A	src/v3-periphery/interfaces/external/IWETH9.sol
A	src/v4-core/interfaces/IExtsload.sol
A	src/v4-core/interfaces/IExttload.sol
A	src/v4-core/interfaces/IHooks.sol
A	src/v4-core/interfaces/IPoolManager.sol
A	src/v4-core/interfaces/IProtocolFeeController.sol
A	src/v4-core/interfaces/IProtocolFees.sol
A	src/v4-core/interfaces/callback/IUnlockCallback.sol
A	src/v4-core/interfaces/external/IERC20Minimal.sol
A	src/v4-core/interfaces/external/IERC6909Claims.sol
A	src/v4-core/libraries/CustomRevert.sol
A	src/v4-core/libraries/SafeCast.sol
A	src/v4-core/types/BalanceDelta.sol
A	src/v4-core/types/BeforeSwapDelta.sol
A	src/v4-core/types/Currency.sol
A	src/v4-core/types/PoolId.sol
A	src/v4-core/types/PoolKey.sol
A	src/v4-periphery/interfaces/IERC721Permit.sol
A	src/v4-periphery/interfaces/IMulticall.sol
A	src/v4-periphery/interfaces/IPositionManager.sol
A	src/v4-periphery/interfaces/IQuoter.sol
A	src/v4-periphery/interfaces/IV4Router.sol
A	src/v4-periphery/interfaces/external/IERC20PermitAllowed.sol
A	src/v4-periphery/libraries/PathKey.sol
  • Loading branch information
github-actions[bot] committed Jul 31, 2024
1 parent f33c3e4 commit f21ae06
Show file tree
Hide file tree
Showing 92 changed files with 4,502 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.0;

/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

78 changes: 78 additions & 0 deletions src/lib-external/oz-v3.4-solc-0.7/contracts/token/ERC20/IERC20.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.0;

/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);

/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);

/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);

/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);

/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);

/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);

/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}

129 changes: 129 additions & 0 deletions src/lib-external/oz-v3.4-solc-0.7/contracts/token/ERC721/IERC721.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.0;
import {IERC165} from "../../introspection/IERC165.sol";

/**
* @dev Required interface of an ERC721 compliant contract.
*/
interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

/**
* @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
*/
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

/**
* @dev Returns the number of tokens in ``owner``'s account.
*/
function balanceOf(address owner) external view returns (uint256 balance);

/**
* @dev Returns the owner of the `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function ownerOf(uint256 tokenId) external view returns (address owner);

/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(address from, address to, uint256 tokenId) external;

/**
* @dev Transfers `tokenId` token from `from` to `to`.
*
* WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 tokenId) external;

/**
* @dev Gives permission to `to` to transfer `tokenId` token to another account.
* The approval is cleared when the token is transferred.
*
* Only a single account can be approved at a time, so approving the zero address clears previous approvals.
*
* Requirements:
*
* - The caller must own the token or be an approved operator.
* - `tokenId` must exist.
*
* Emits an {Approval} event.
*/
function approve(address to, uint256 tokenId) external;

/**
* @dev Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function getApproved(uint256 tokenId) external view returns (address operator);

/**
* @dev Approve or remove `operator` as an operator for the caller.
* Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
*
* Requirements:
*
* - The `operator` cannot be the caller.
*
* Emits an {ApprovalForAll} event.
*/
function setApprovalForAll(address operator, bool _approved) external;

/**
* @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
*
* See {setApprovalForAll}
*/
function isApprovedForAll(address owner, address operator) external view returns (bool);

/**
* @dev Safely transfers `tokenId` token from `from` to `to`.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.0;
import {IERC721} from "./IERC721.sol";

/**
* @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/
interface IERC721Enumerable is IERC721 {

/**
* @dev Returns the total amount of tokens stored by the contract.
*/
function totalSupply() external view returns (uint256);

/**
* @dev Returns a token ID owned by `owner` at a given `index` of its token list.
* Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
*/
function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);

/**
* @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
* Use along with {totalSupply} to enumerate all tokens.
*/
function tokenByIndex(uint256 index) external view returns (uint256);
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.0;
import {IERC721} from "./IERC721.sol";

/**
* @title ERC-721 Non-Fungible Token Standard, optional metadata extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/
interface IERC721Metadata is IERC721 {

/**
* @dev Returns the token collection name.
*/
function name() external view returns (string memory);

/**
* @dev Returns the token collection symbol.
*/
function symbol() external view returns (string memory);

/**
* @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
*/
function tokenURI(uint256 tokenId) external view returns (string memory);
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)

pragma solidity ^0.8.0;
import {IERC165} from "../../utils/introspection/IERC165.sol";

// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)

/**
* @dev _Available since v3.1._
*/
interface IERC1155Receiver is IERC165 {
/**
* @dev Handles the receipt of a single ERC1155 token type. This function is
* called at the end of a `safeTransferFrom` after the balance has been updated.
*
* NOTE: To accept the transfer, this must return
* `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
* (i.e. 0xf23a6e61, or its own function selector).
*
* @param operator The address which initiated the transfer (i.e. msg.sender)
* @param from The address which previously owned the token
* @param id The ID of the token being transferred
* @param value The amount of tokens being transferred
* @param data Additional data with no specified format
* @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed
*/
function onERC1155Received(
address operator,
address from,
uint256 id,
uint256 value,
bytes calldata data
) external returns (bytes4);

/**
* @dev Handles the receipt of a multiple ERC1155 token types. This function
* is called at the end of a `safeBatchTransferFrom` after the balances have
* been updated.
*
* NOTE: To accept the transfer(s), this must return
* `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
* (i.e. 0xbc197c81, or its own function selector).
*
* @param operator The address which initiated the batch transfer (i.e. msg.sender)
* @param from The address which previously owned the token
* @param ids An array containing ids of each token being transferred (order and length must match values array)
* @param values An array containing amounts of each token being transferred (order and length must match ids array)
* @param data Additional data with no specified format
* @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed
*/
function onERC1155BatchReceived(
address operator,
address from,
uint256[] calldata ids,
uint256[] calldata values,
bytes calldata data
) external returns (bytes4);
}

Loading

0 comments on commit f21ae06

Please sign in to comment.