Skip to content

Commit

Permalink
fix: resolve merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
ducthotran2010 committed Oct 12, 2023
1 parent 4229251 commit 0d3f5df
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/RNSUnified.sol
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ contract RNSUnified is Initializable, RNSToken {
}

/// @inheritdoc INSUnified
function namehash(string memory) external pure returns (uint256) {
function namehash(string memory) external pure returns (bytes32 node) {
revert("TODO");
}

Expand Down
5 changes: 5 additions & 0 deletions src/interfaces/INSUnified.sol
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@ interface INSUnified is IAccessControlEnumerable, IERC721Metadata {
*/
function MAX_EXPIRY() external pure returns (uint64);

/**
* @dev Returns the name hash output of a domain.
*/
function namehash(string memory domain) external pure returns (bytes32 node);

/**
* @dev Returns true if the specified name is available for registration.
* Note: Only available after passing the grace period.
Expand Down
4 changes: 2 additions & 2 deletions src/resolvers/PublicResolver.sol
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ contract PublicResolver is

/// @inheritdoc IPublicResolver
function isAuthorized(bytes32 node, address account) public view returns (bool authorized) {
(authorized,) = _rnsUnified.canSetRecords(account, uint256(node), USER_FIELDS_INDICATOR);
(authorized,) = _rnsUnified.canSetRecord(account, uint256(node), USER_FIELDS_INDICATOR);
}

/// @dev Override {IAddressResolvable-addr}.
Expand All @@ -177,7 +177,7 @@ contract PublicResolver is
function name(bytes32 node) public view virtual override(INameResolver, NameResolvable) returns (string memory) {
address reversedAddress = _reverseRegistrar.getAddress(node);
string memory domainName = super.name(node);
uint256 tokenId = _rnsUnified.namehash(domainName);
uint256 tokenId = uint256(_rnsUnified.namehash(domainName));
return _rnsUnified.ownerOf(tokenId) == reversedAddress ? domainName : "";
}

Expand Down

0 comments on commit 0d3f5df

Please sign in to comment.