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

Adding interface to reverse registrar #336

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
10 changes: 10 additions & 0 deletions contracts/IReverseRegistrar.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
pragma solidity >=0.4.24;

interface IReverseRegistrar {

function claim(address owner) external returns (bytes32);
function claimWithResolver(address owner, address resolver) external returns (bytes32);
function setName(string calldata name) external returns (bytes32);
function node(address addr) external pure returns (bytes32);

}
5 changes: 3 additions & 2 deletions contracts/ReverseRegistrar.sol
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
pragma solidity ^0.5.0;

import "./ENS.sol";
import "./IReverseRegistrar.sol";

contract Resolver {
function setName(bytes32 node, string memory name) public;
}

contract ReverseRegistrar {
contract ReverseRegistrar is IReverseRegistrar{
// namehash('addr.reverse')
bytes32 public constant ADDR_REVERSE_NODE = 0x91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e2;

Expand All @@ -28,7 +29,7 @@ contract ReverseRegistrar {
oldRegistrar.claim(msg.sender);
}
}

/**
* @dev Transfers ownership of the reverse ENS record associated with the
* calling account.
Expand Down