-
Notifications
You must be signed in to change notification settings - Fork 413
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
235 additions
and
193 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,41 @@ | ||
// SPDX-License-Identifier: MIT | ||
|
||
pragma solidity ^0.8.4; | ||
|
||
/// @notice Interface for the L2 reverse resolver | ||
interface IL2ReverseResolver { | ||
/// @notice Thrown when the specified address is not the owner of the contract | ||
error NotOwnerOfContract(); | ||
|
||
/// @notice Sets the `name()` record for the reverse ENS record associated with | ||
/// the calling account. | ||
/// @param name The name to set | ||
/// @return The ENS node hash of the reverse record | ||
function setName(string memory name) external returns (bytes32); | ||
|
||
/// @notice Sets the `name()` record for the reverse ENS record associated with | ||
/// the addr provided account. | ||
/// Can be used if the addr is a contract that is owned by an SCA. | ||
/// @param addr The address to set the name for | ||
/// @param name The name to set | ||
/// @return The ENS node hash of the reverse record | ||
function setNameForAddr( | ||
address addr, | ||
string memory name | ||
) external returns (bytes32); | ||
|
||
/// @notice Sets the `name()` record for the reverse ENS record associated with | ||
/// the contract provided that is owned with `Ownable`. | ||
/// @param contractAddr The address of the contract to set the name for | ||
/// @param owner The owner of the contract (via Ownable) | ||
/// @param name The name to set | ||
/// @param signatureExpiry The expiry of the signature | ||
/// @param signature The signature of an address that will return true on isValidSignature for the owner | ||
/// @return The ENS node hash of the reverse record | ||
function setNameForAddrWithSignatureAndOwnable( | ||
address contractAddr, | ||
address owner, | ||
string memory name, | ||
uint256 inceptionDate, | ||
bytes memory signature | ||
string calldata name, | ||
uint256 signatureExpiry, | ||
bytes calldata signature | ||
) external returns (bytes32); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,37 @@ | ||
// SPDX-License-Identifier: MIT | ||
|
||
pragma solidity ^0.8.4; | ||
|
||
/// @notice Interface for the signature reverse resolver | ||
interface ISignatureReverseResolver { | ||
event ReverseClaimed(address indexed addr, bytes32 indexed node); | ||
event NameChanged(bytes32 indexed node, string name); | ||
/// @notice Emitted when the name of a reverse record is changed. | ||
/// @param addr The address of the reverse record | ||
/// @param node The ENS node hash of the reverse record | ||
/// @param name The name of the reverse record | ||
event NameChanged(address indexed addr, bytes32 indexed node, string name); | ||
|
||
/// @notice Sets the `name()` record for the reverse ENS record associated with | ||
/// the addr provided account using a signature. | ||
/// @param addr The address to set the name for | ||
/// @param name The name of the reverse record | ||
/// @param signatureExpiry Date when the signature expires | ||
/// @param signature The signature from the addr | ||
/// @return The ENS node hash of the reverse record | ||
function setNameForAddrWithSignature( | ||
address addr, | ||
string memory name, | ||
uint256 inceptionDate, | ||
bytes memory signature | ||
string calldata name, | ||
uint256 signatureExpiry, | ||
bytes calldata signature | ||
) external returns (bytes32); | ||
|
||
/// @notice Returns the name associated with an ENS node hash, for reverse resolution. | ||
/// Defined in ENSIP-3. | ||
/// @param node The ENS node hash to query. | ||
/// @return The associated name. | ||
function name(bytes32 node) external view returns (string memory); | ||
|
||
/// @notice Returns the ENS node hash for the reverse record associated with | ||
/// the addr provided account. | ||
/// @param addr The address to get the reverse node hash for | ||
/// @return The ENS node hash | ||
function node(address addr) external view returns (bytes32); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.