From 53f5860acdfb333158df1b618876342b1bdf9ae1 Mon Sep 17 00:00:00 2001 From: Lethale Date: Fri, 22 Nov 2024 17:40:30 +0100 Subject: [PATCH] reverse Registrar set default resolver and tests --- script/System.s.sol | 1 + test/System.t.sol | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/script/System.s.sol b/script/System.s.sol index 2b48aff..e0ed166 100644 --- a/script/System.s.sol +++ b/script/System.s.sol @@ -151,6 +151,7 @@ contract ContractScript is Script { // admin control reverseRegistrar.setController(address(registrarAdmin), true); reverseRegistrar.setController(address(registrar), true); + reverseRegistrar.setDefaultResolver(address(resolver)); reverseRegistrar.transferOwnership(address(registrarAdmin)); resolver.transferOwnership(address(registrarAdmin)); diff --git a/test/System.t.sol b/test/System.t.sol index e7096f4..9cfa24e 100644 --- a/test/System.t.sol +++ b/test/System.t.sol @@ -146,6 +146,7 @@ contract SystemTest is BaseTest { // admin control reverseRegistrar.setController(address(registrarAdmin), true); reverseRegistrar.setController(address(registrar), true); + reverseRegistrar.setDefaultResolver(address(resolver)); reverseRegistrar.transferOwnership(address(registrarAdmin)); resolver.transferOwnership(address(registrarAdmin)); @@ -183,6 +184,7 @@ contract SystemTest is BaseTest { } function test_initialized() public view { + // registry ownership and resolvers assertEq(registry.owner(BERA_NODE), address(baseRegistrar), "BERA_NODE owner"); assertEq(registry.owner(ADDR_REVERSE_NODE), address(reverseRegistrar), "ADDR_REVERSE_NODE owner"); assertEq(registry.resolver(BERA_NODE), address(resolver), "BERA_NODE resolver"); @@ -194,6 +196,10 @@ contract SystemTest is BaseTest { assertEq(reverseRegistrar.owner(), address(registrarAdmin), "reverseRegistrar owner"); assertEq(resolver.owner(), address(registrarAdmin), "resolver owner"); assertEq(auctionHouse.owner(), address(registrarAdmin), "auctionHouse owner"); + + // check reverse registrar + assertEq(address(reverseRegistrar.registry()), address(registry), "reverseRegistrar registry"); + assertEq(address(reverseRegistrar.defaultResolver()), address(resolver), "reverseRegistrar defaultResolver"); } function test_basic_success_and_resolution() public {