diff --git a/contracts/IReverseRegistrar.sol b/contracts/IReverseRegistrar.sol new file mode 100644 index 00000000..99b644b9 --- /dev/null +++ b/contracts/IReverseRegistrar.sol @@ -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); + +} diff --git a/contracts/ReverseRegistrar.sol b/contracts/ReverseRegistrar.sol index fe8f90e9..12931277 100644 --- a/contracts/ReverseRegistrar.sol +++ b/contracts/ReverseRegistrar.sol @@ -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; @@ -28,7 +29,7 @@ contract ReverseRegistrar { oldRegistrar.claim(msg.sender); } } - + /** * @dev Transfers ownership of the reverse ENS record associated with the * calling account.