-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Part 2 - option 1] feat: refactor v4 to infinity (#78)
* feat: rename _v4 to without _v4 * Update src/interfaces/external/IV3NonfungiblePositionManager.sol Co-authored-by: Chef Omelette <[email protected]> --------- Co-authored-by: Chef Omelette <[email protected]>
- Loading branch information
1 parent
85c5433
commit 6d8ec06
Showing
16 changed files
with
88 additions
and
88 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,27 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; | ||
|
||
/// @title ERC721 with permit | ||
/// @notice Extension to ERC721 that includes a permit function for signature based approvals | ||
interface IERC721Permit is IERC721 { | ||
/// @notice The permit typehash used in the permit signature | ||
/// @return The typehash for the permit | ||
function PERMIT_TYPEHASH() external pure returns (bytes32); | ||
|
||
/// @notice The domain separator used in the permit signature | ||
/// @return The domain seperator used in encoding of permit signature | ||
function DOMAIN_SEPARATOR() external view returns (bytes32); | ||
|
||
/// @notice Approve of a specific token ID for spending by spender via signature | ||
/// @param spender The account that is being approved | ||
/// @param tokenId The ID of the token that is being approved for spending | ||
/// @param deadline The deadline timestamp by which the call must be mined for the approve to work | ||
/// @param v Must produce valid secp256k1 signature from the holder along with `r` and `s` | ||
/// @param r Must produce valid secp256k1 signature from the holder along with `v` and `s` | ||
/// @param s Must produce valid secp256k1 signature from the holder along with `r` and `v` | ||
function permit(address spender, uint256 tokenId, uint256 deadline, uint8 v, bytes32 r, bytes32 s) | ||
external | ||
payable; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,38 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.0; | ||
|
||
import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; | ||
|
||
/// @title ERC721 with permit | ||
/// @notice Extension to ERC721 that includes a permit function for signature based approvals | ||
interface IERC721Permit is IERC721 { | ||
/// @notice The permit typehash used in the permit signature | ||
/// @return The typehash for the permit | ||
function PERMIT_TYPEHASH() external pure returns (bytes32); | ||
|
||
/// @notice The domain separator used in the permit signature | ||
/// @return The domain seperator used in encoding of permit signature | ||
function DOMAIN_SEPARATOR() external view returns (bytes32); | ||
interface IERC721Permit { | ||
error SignatureDeadlineExpired(); | ||
error NoSelfPermit(); | ||
error Unauthorized(); | ||
|
||
/// @notice Approve of a specific token ID for spending by spender via signature | ||
/// @param spender The account that is being approved | ||
/// @param tokenId The ID of the token that is being approved for spending | ||
/// @param deadline The deadline timestamp by which the call must be mined for the approve to work | ||
/// @param v Must produce valid secp256k1 signature from the holder along with `r` and `s` | ||
/// @param r Must produce valid secp256k1 signature from the holder along with `v` and `s` | ||
/// @param s Must produce valid secp256k1 signature from the holder along with `r` and `v` | ||
function permit(address spender, uint256 tokenId, uint256 deadline, uint8 v, bytes32 r, bytes32 s) | ||
/// @param nonce a unique value, for an owner, to prevent replay attacks; an unordered nonce where the top 248 bits correspond to a word and the bottom 8 bits calculate the bit position of the word | ||
/// @param signature Concatenated data from a valid secp256k1 signature from the holder, i.e. abi.encodePacked(r, s, v) | ||
/// @dev payable so it can be multicalled with NATIVE related actions | ||
function permit(address spender, uint256 tokenId, uint256 deadline, uint256 nonce, bytes calldata signature) | ||
external | ||
payable; | ||
|
||
/// @notice Set an operator with full permission to an owner's tokens via signature | ||
/// @param owner The address that is setting the operator | ||
/// @param operator The address that will be set as an operator for the owner | ||
/// @param approved The permission to set on the operator | ||
/// @param deadline The deadline timestamp by which the call must be mined for the approve to work | ||
/// @param nonce a unique value, for an owner, to prevent replay attacks; an unordered nonce where the top 248 bits correspond to a word and the bottom 8 bits calculate the bit position of the word | ||
/// @param signature Concatenated data from a valid secp256k1 signature from the holder, i.e. abi.encodePacked(r, s, v) | ||
/// @dev payable so it can be multicalled with NATIVE related actions | ||
function permitForAll( | ||
address owner, | ||
address operator, | ||
bool approved, | ||
uint256 deadline, | ||
uint256 nonce, | ||
bytes calldata signature | ||
) external payable; | ||
} |
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
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