Skip to content

Commit

Permalink
Merge pull request #88 from Beranames/reverse-owner
Browse files Browse the repository at this point in the history
Change reverse registrar owner and tests
  • Loading branch information
lethaale authored Nov 22, 2024
2 parents df6ef4e + 8ac6b04 commit 6b0e28f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
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

0 comments on commit 6b0e28f

Please sign in to comment.