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

Change reverse registrar owner and tests #88

Merged
merged 1 commit into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion script/System.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ contract ContractScript is Script {
// admin control
reverseRegistrar.setController(address(registrarAdmin), true);
reverseRegistrar.setController(address(registrar), true);
reverseRegistrar.transferOwnership(address(registrar));
reverseRegistrar.transferOwnership(address(registrarAdmin));
resolver.transferOwnership(address(registrarAdmin));

// Stop broadcast
Expand Down
12 changes: 8 additions & 4 deletions test/System.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,12 @@ contract SystemTest is BaseTest {
// root node
registry.setOwner(bytes32(0), address(registrarAdmin));
baseRegistrar.transferOwnership(address(registrarAdmin));
universalResolver.transferOwnership(address(registrarAdmin));

// admin control
reverseRegistrar.setController(address(registrarAdmin), true);
reverseRegistrar.setController(address(registrar), true);
reverseRegistrar.transferOwnership(address(registrar));
reverseRegistrar.transferOwnership(address(registrarAdmin));
resolver.transferOwnership(address(registrarAdmin));

// Stop pranking
Expand Down Expand Up @@ -186,10 +187,13 @@ contract SystemTest is BaseTest {
assertEq(registry.owner(ADDR_REVERSE_NODE), address(reverseRegistrar), "ADDR_REVERSE_NODE owner");
assertEq(registry.resolver(BERA_NODE), address(resolver), "BERA_NODE resolver");
assertEq(registry.resolver(ADDR_REVERSE_NODE), address(0), "ADDR_REVERSE_NODE resolver");

// check ownership
assertEq(baseRegistrar.owner(), address(registrarAdmin), "baseRegistrar owner");
assertEq(reverseRegistrar.owner(), address(registrar), "reverseRegistrar owner");
assertEq(address(resolver.owner()), address(registrarAdmin), "resolver owner");
assertEq(address(auctionHouse.owner()), address(registrarAdmin), "auctionHouse owner");
assertEq(universalResolver.owner(), address(registrarAdmin), "universalResolver owner");
assertEq(reverseRegistrar.owner(), address(registrarAdmin), "reverseRegistrar owner");
assertEq(resolver.owner(), address(registrarAdmin), "resolver owner");
assertEq(auctionHouse.owner(), address(registrarAdmin), "auctionHouse owner");
}

function test_basic_success_and_resolution() public {
Expand Down
Loading