Skip to content
This repository has been archived by the owner on Nov 7, 2023. It is now read-only.

feat: add abstract nodeowner interface #57

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions contracts/AbstractNodeOwner.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
pragma solidity ^0.5.3;

import "@openzeppelin/contracts/token/ERC721/IERC721.sol";

/// @title NodeOwner interface
/// @notice Defines an interface for the NodeOwner implementation.
contract AbstractNodeOwner is IERC721 {
function available (uint256 tokenId) public view returns(bool);
function reclaim(uint256 tokenId, address newOwner) external;
function removeExpired(uint256[] calldata tokenIds) external;
}
3 changes: 2 additions & 1 deletion contracts/NodeOwner.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/ownership/Ownable.sol";
import "@openzeppelin/contracts/access/Roles.sol";
import "@rsksmart/rns-registry/contracts/AbstractRNS.sol";
import "./AbstractNodeOwner.sol";

contract NodeOwner is ERC721, Ownable {
contract NodeOwner is ERC721, Ownable, AbstractNodeOwner {
using Roles for Roles.Role;

AbstractRNS private rns;
Expand Down