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

fix: make compatibility fb handler updatable #5

Merged
merged 2 commits into from
Sep 4, 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 src/RumpelWalletFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ contract RumpelWalletFactory is Ownable, Pausable {
else if (what == "RUMPEL_MODULE") rumpelModule = data;
else if (what == "RUMPEL_GUARD") rumpelGuard = data;
else if (what == "INITIALIZATION_SCRIPT") initializationScript = data;
else if (what == "COMPATIBILITY_FALLBACK") compatibilityFallback = data;
else revert UnrecognizedParam(what);
emit ParamChanged(what, data);
}
Expand Down
3 changes: 3 additions & 0 deletions test/RumpelWallet.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -90,20 +90,23 @@ contract RumpelWalletTest is Test {
address newScript = makeAddr("newScript");
address newSingleton = makeAddr("newSingleton");
address newProxyFactory = makeAddr("newProxyFactory");
address newCompatibilityFallback = makeAddr("newCompatibilityFallback");

vm.startPrank(admin);
rumpelWalletFactory.setParam("RUMPEL_GUARD", newGuard);
rumpelWalletFactory.setParam("RUMPEL_MODULE", newModule);
rumpelWalletFactory.setParam("INITIALIZATION_SCRIPT", newScript);
rumpelWalletFactory.setParam("SAFE_SINGLETON", newSingleton);
rumpelWalletFactory.setParam("PROXY_FACTORY", newProxyFactory);
rumpelWalletFactory.setParam("COMPATIBILITY_FALLBACK", newCompatibilityFallback);
vm.stopPrank();

assertEq(rumpelWalletFactory.rumpelGuard(), newGuard);
assertEq(rumpelWalletFactory.rumpelModule(), newModule);
assertEq(rumpelWalletFactory.initializationScript(), newScript);
assertEq(rumpelWalletFactory.safeSingleton(), newSingleton);
assertEq(address(rumpelWalletFactory.proxyFactory()), newProxyFactory);
assertEq(rumpelWalletFactory.compatibilityFallback(), newCompatibilityFallback);
}

function testFuzz_createWalletOwners(uint256 ownersLength, uint256 threshold) public {
Expand Down