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

Initial revision of MigrationHelper #387

Open
wants to merge 3 commits into
base: staging
Choose a base branch
from
Open

Conversation

Arachnid
Copy link
Member

MigrationHelper would allow people to opt in to the ENSv2 migration ahead of time by calling setApprovalForAll on the .eth registrar or Name Wrapper targeting this contract. This contract will be owned by the DAO; at migration time, the DAO can specify a migration target address (likely the L1MigrationController) and a controller contract or address that is authorized to make calls to migrate domains to this contract.

Notably, this introduces a trusted dependency - a malicious DAO could use this contract to steal names from users who have elected to use it.

@Arachnid Arachnid marked this pull request as draft September 13, 2024 14:13
) external onlyController {
for (uint256 i = 0; i < tokenIds.length; i++) {
registrar.safeTransferFrom(
owner,
Copy link
Member

Choose a reason for hiding this comment

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

Is the owner the owner of this contract (aka DAO) or the actual name owner? If the latter, you may want to change to nameowner or something as onlyOwner at setMigrationTarget and owner here have different semantics.

Copy link
Member

Choose a reason for hiding this comment

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

Looks like it's the actual name owner, because the owner of the name is what you need to transfer it

Copy link
Member Author

Choose a reason for hiding this comment

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

owner in this context is the owner of the name, yes. It's passed in as a function parameter.

Copy link
Member

@jefflau jefflau left a comment

Choose a reason for hiding this comment

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

LGTM. I guess we need E2E tests of this being approved and then a dummy migration controller to make sure everything works as expected

@Arachnid
Copy link
Member Author

@jefflau @TateB PTAL

@Arachnid Arachnid marked this pull request as ready for review September 18, 2024 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants