Skip to content
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
wants to merge 37 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
23c4a72
Add L2 reverse registrar contract
Jun 5, 2023
c763636
WIP
jefflau Aug 15, 2023
21c5d36
Refactor L2 Reverse registrar to incorporate the resolver within
jefflau Oct 6, 2023
29fb8d7
Add boilerplate for tests
jefflau Oct 6, 2023
7d632cb
Remove setNameForAddr()
jefflau Oct 6, 2023
0c67b45
WIP
jefflau Oct 9, 2023
1e464bd
Add setName test, remove setNameForAddr()
jefflau Oct 12, 2023
27854e4
Update OZ library to 4.9.3, add setNameWithAddrWithSignature tests
jefflau Oct 12, 2023
669081c
Add mocks to test ownable with signature
jefflau Oct 19, 2023
fea6ecb
Fix Natspec
jefflau Oct 19, 2023
4ef442f
Add signature setting for text records
jefflau Oct 19, 2023
c9274e3
Add tests for TextResolver
jefflau Oct 19, 2023
de9959a
Remove relayer
jefflau Oct 24, 2023
a104c83
Change expiry to inception date
jefflau Oct 24, 2023
2b66f4f
Add block.timestamp if first time setting
jefflau Oct 26, 2023
7530428
Merge text/name resolver into main contract
jefflau Nov 1, 2023
37eeec4
WIP multicall
jefflau Nov 6, 2023
eea2bd9
Add L2 reverse registrar deploy script
jefflau Nov 6, 2023
569f07a
Add tests for multicall
jefflau Nov 6, 2023
d25e521
Fix inceptionDate comparisons
jefflau Nov 6, 2023
5ed5fa9
Refactor setName/Text
jefflau Nov 8, 2023
369cc4a
Remove L2 ReverseClaimer.sol
jefflau Dec 6, 2023
6ed6d5f
Remove profiles in readme
jefflau Dec 6, 2023
4136a75
Remove L2 ReverseResolverBase contract and merge into registrar
jefflau Dec 6, 2023
26fc75a
Move supportsInterface below
jefflau Dec 6, 2023
4ab3a85
Test for clearRecordsWithSignature
jefflau Dec 7, 2023
3c93765
Add tests for inceptionDate
jefflau Dec 7, 2023
9bfdad0
Fix formatting
jefflau Dec 7, 2023
6a86103
Keep events together
jefflau Dec 13, 2023
dfb000d
lower case variable
jefflau Dec 13, 2023
dc6e94d
SignatureOutOfDate() + comment for lookup
jefflau Dec 18, 2023
9eb42f1
Add custom error to isAuthorised()
jefflau Dec 19, 2023
cbba61f
Move authorisation of ownable funcs to modifier
jefflau Dec 19, 2023
3b9e8d7
WIP add cointype
jefflau Dec 20, 2023
27ad314
Move to a double hash signature
jefflau Dec 20, 2023
d2315a9
Add coinType to prevent crosschain replay attacks
jefflau Dec 20, 2023
a97255a
Add namespace to deploy script
jefflau Dec 21, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 0 additions & 3 deletions .vscode/settings.json
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be added to .gitignore.

This file was deleted.

63 changes: 63 additions & 0 deletions contracts/reverseRegistrar/IL2ReverseRegistrar.sol
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);
Copy link
Member

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 all set* functions.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This point still stands

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

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


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);
}