-
Notifications
You must be signed in to change notification settings - Fork 394
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
base: staging
Are you sure you want to change the base?
Conversation
contracts/utils/MigrationHelper.sol
Outdated
) external onlyController { | ||
for (uint256 i = 0; i < tokenIds.length; i++) { | ||
registrar.safeTransferFrom( | ||
owner, |
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.
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.
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.
Looks like it's the actual name owner, because the owner of the name is what you need to transfer it
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.
owner
in this context is the owner of the name, yes. It's passed in as a function parameter.
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.
LGTM. I guess we need E2E tests of this being approved and then a dummy migration controller to make sure everything works as expected
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 theL1MigrationController
) 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.