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

reverse Registrar set default resolver and tests #89

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
1 change: 1 addition & 0 deletions script/System.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down
6 changes: 6 additions & 0 deletions test/System.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down Expand Up @@ -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");
Expand All @@ -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 {
Expand Down
Loading