@@ -30,27 +30,30 @@ contract TestTransferOwnership is Test {
3030 proxyAsAuthenticator = GPv2AllowListAuthentication (deployed);
3131 }
3232
33- function test_transfers_proxy_ownership_and_resets_manager () public {
33+ function test_transfers_proxy_ownership_and_updates_manager () public {
3434 address newOwner = makeAddr ("TestTransferOwnership: new proxy owner " );
35+ address newManager = makeAddr ("TestTransferOwnership: new authenticator manager " );
3536 assertEq (proxy.owner (), owner);
3637 assertEq (proxyAsAuthenticator.manager (), owner);
3738
3839 TransferOwnership.ScriptParams memory params =
39- TransferOwnership.ScriptParams ({newOwner: newOwner, authenticatorProxy: proxy, resetManager: true });
40+ TransferOwnership.ScriptParams ({newOwner: newOwner, authenticatorProxy: proxy, newManager: newManager });
4041
4142 script.runWith (params);
4243
4344 assertEq (proxy.owner (), newOwner, "did not change the owner " );
44- assertEq (proxyAsAuthenticator.manager (), newOwner , "did not change the manager " );
45+ assertEq (proxyAsAuthenticator.manager (), newManager , "did not change the manager " );
4546 }
4647
4748 function test_only_transfers_proxy_ownership () public {
4849 address newOwner = makeAddr ("TestTransferOwnership: new proxy owner " );
4950 assertEq (proxy.owner (), owner);
5051 assertEq (proxyAsAuthenticator.manager (), owner);
5152
53+ address NO_MANAGER = script.NO_MANAGER ();
54+ require (owner != NO_MANAGER, "Invalid test setup, owner should not coincide with NO_MANAGER flag address " );
5255 TransferOwnership.ScriptParams memory params =
53- TransferOwnership.ScriptParams ({newOwner: newOwner, authenticatorProxy: proxy, resetManager: false });
56+ TransferOwnership.ScriptParams ({newOwner: newOwner, authenticatorProxy: proxy, newManager: NO_MANAGER });
5457
5558 script.runWith (params);
5659
@@ -63,7 +66,7 @@ contract TestTransferOwnership is Test {
6366 TransferOwnership.ScriptParams memory params = TransferOwnership.ScriptParams ({
6467 newOwner: makeAddr ("some owner " ),
6568 authenticatorProxy: ERC173 (notAProxy),
66- resetManager: false
69+ newManager: makeAddr ( " some manager " )
6770 });
6871
6972 vm.expectRevert (bytes (string .concat ("No code at target authenticator proxy " , vm.toString (notAProxy), ". " )));
@@ -75,7 +78,7 @@ contract TestTransferOwnership is Test {
7578 TransferOwnership.ScriptParams memory params = TransferOwnership.ScriptParams ({
7679 newOwner: makeAddr ("some owner " ),
7780 authenticatorProxy: ERC173 (noERC173Proxy),
78- resetManager: false
81+ newManager: makeAddr ( " some manager " )
7982 });
8083 vm.etch (noERC173Proxy, hex "1337 " );
8184 vm.mockCall (
@@ -99,7 +102,7 @@ contract TestTransferOwnership is Test {
99102 TransferOwnership.ScriptParams memory params = TransferOwnership.ScriptParams ({
100103 newOwner: makeAddr ("some owner " ),
101104 authenticatorProxy: ERC173 (revertingProxy),
102- resetManager: false
105+ newManager: makeAddr ( " some manager " )
103106 });
104107 vm.etch (revertingProxy, hex "1337 " );
105108 vm.mockCallRevert (
0 commit comments