-
Notifications
You must be signed in to change notification settings - Fork 414
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add L2 reverse registrar contract #265
Open
jefflau
wants to merge
37
commits into
dev
Choose a base branch
from
l2-reverse-registrar
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
23c4a72
Add L2 reverse registrar contract
c763636
WIP
jefflau 21c5d36
Refactor L2 Reverse registrar to incorporate the resolver within
jefflau 29fb8d7
Add boilerplate for tests
jefflau 7d632cb
Remove setNameForAddr()
jefflau 0c67b45
WIP
jefflau 1e464bd
Add setName test, remove setNameForAddr()
jefflau 27854e4
Update OZ library to 4.9.3, add setNameWithAddrWithSignature tests
jefflau 669081c
Add mocks to test ownable with signature
jefflau fea6ecb
Fix Natspec
jefflau 4ef442f
Add signature setting for text records
jefflau c9274e3
Add tests for TextResolver
jefflau de9959a
Remove relayer
jefflau a104c83
Change expiry to inception date
jefflau 2b66f4f
Add block.timestamp if first time setting
jefflau 7530428
Merge text/name resolver into main contract
jefflau 37eeec4
WIP multicall
jefflau eea2bd9
Add L2 reverse registrar deploy script
jefflau 569f07a
Add tests for multicall
jefflau d25e521
Fix inceptionDate comparisons
jefflau 5ed5fa9
Refactor setName/Text
jefflau 369cc4a
Remove L2 ReverseClaimer.sol
jefflau 6ed6d5f
Remove profiles in readme
jefflau 4136a75
Remove L2 ReverseResolverBase contract and merge into registrar
jefflau 26fc75a
Move supportsInterface below
jefflau 4ab3a85
Test for clearRecordsWithSignature
jefflau 3c93765
Add tests for inceptionDate
jefflau 9bfdad0
Fix formatting
jefflau 6a86103
Keep events together
jefflau dfb000d
lower case variable
jefflau dc6e94d
SignatureOutOfDate() + comment for lookup
jefflau 9eb42f1
Add custom error to isAuthorised()
jefflau cbba61f
Move authorisation of ownable funcs to modifier
jefflau 3b9e8d7
WIP add cointype
jefflau 27ad314
Move to a double hash signature
jefflau d2315a9
Add coinType to prevent crosschain replay attacks
jefflau a97255a
Add namespace to deploy script
jefflau File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,63 @@ | ||
pragma solidity >=0.8.4; | ||
|
||
interface IL2ReverseRegistrar { | ||
function setName(string memory name) external returns (bytes32); | ||
|
||
function setNameForAddr( | ||
address addr, | ||
string memory name | ||
) external returns (bytes32); | ||
|
||
function setNameForAddrWithSignature( | ||
address addr, | ||
string memory name, | ||
uint256 inceptionDate, | ||
bytes memory signature | ||
) external returns (bytes32); | ||
|
||
function setNameForAddrWithSignatureAndOwnable( | ||
address contractAddr, | ||
makoto marked this conversation as resolved.
Show resolved
Hide resolved
|
||
address owner, | ||
string memory name, | ||
uint256 inceptionDate, | ||
bytes memory signature | ||
) external returns (bytes32); | ||
|
||
function setText( | ||
string calldata key, | ||
string calldata value | ||
) external returns (bytes32); | ||
|
||
function setTextForAddr( | ||
address addr, | ||
string calldata key, | ||
string calldata value | ||
) external returns (bytes32); | ||
|
||
function setTextForAddrWithSignature( | ||
address addr, | ||
string calldata key, | ||
string calldata value, | ||
uint256 inceptionDate, | ||
bytes memory signature | ||
) external returns (bytes32); | ||
|
||
function setTextForAddrWithSignatureAndOwnable( | ||
address contractAddr, | ||
address owner, | ||
string calldata key, | ||
string calldata value, | ||
uint256 inceptionDate, | ||
bytes memory signature | ||
) external returns (bytes32); | ||
|
||
function clearRecords(address addr) external; | ||
|
||
function clearRecordsWithSignature( | ||
address addr, | ||
uint256 inceptionDate, | ||
bytes memory signature | ||
) external; | ||
|
||
function node(address addr) external view returns (bytes32); | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to return
bytes32
for transactions?setName
on L1 doesn't return anything https://github.com/ensdomains/ens-contracts/blob/staging/contracts/resolvers/profiles/NameResolver.sol#L15 . The same applies to allset*
functions.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This point still stands
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original reverseRegistrar does this: https://github.com/ensdomains/ens-contracts/blob/staging/contracts/reverseRegistrar/IReverseRegistrar.sol
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't it the contract you added several months ago? What was the intention at that time? If it's wrong then it should be fixed now unless it requires some sort of complex migration work as the change itself is not so critical