735546619e
Signed-off-by: T-Hax <>
33 lines
1.4 KiB
Solidity
33 lines
1.4 KiB
Solidity
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
pragma solidity >=0.7.5;
|
|
|
|
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;
|
|
}
|