Skip to content

Commit

Permalink
Make the eth registrar interface inherit from IERC721 (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
Arachnid committed May 24, 2021
1 parent 59b5906 commit bd45d16
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion contracts/ethregistrar/BaseRegistrar.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import "../registry/ENS.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

abstract contract BaseRegistrar is Ownable {
abstract contract BaseRegistrar is Ownable, IERC721 {
uint constant public GRACE_PERIOD = 90 days;

event ControllerAdded(address indexed controller);
Expand Down
4 changes: 2 additions & 2 deletions contracts/ethregistrar/BaseRegistrarImplementation.sol
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ contract BaseRegistrarImplementation is ERC721, BaseRegistrar {
* @param tokenId uint256 ID of the token to query the owner of
* @return address currently marked as the owner of the given token ID
*/
function ownerOf(uint256 tokenId) public view override returns (address) {
function ownerOf(uint256 tokenId) public view override(IERC721, ERC721) returns (address) {
require(expiries[tokenId] > block.timestamp);
return super.ownerOf(tokenId);
}
Expand Down Expand Up @@ -146,7 +146,7 @@ contract BaseRegistrarImplementation is ERC721, BaseRegistrar {
ens.setSubnodeOwner(baseNode, bytes32(id), owner);
}

function supportsInterface(bytes4 interfaceID) public override view returns (bool) {
function supportsInterface(bytes4 interfaceID) public override(ERC721, IERC165) view returns (bool) {
return interfaceID == INTERFACE_META_ID ||
interfaceID == ERC721_ID ||
interfaceID == RECLAIM_ID;
Expand Down

0 comments on commit bd45d16

Please sign in to comment.