In the Deployer.s.sol, the laundrette contract is assigned the role of admin. However the function laundrette::retrieveAdmin will always revert because it attempts to execute a function that can only be called by the Executor.
The function kernel::executeAction in the Kernel contract has an onlyExecutor modifier, which restricts its execution to only the Executor. In Deployer.s.sol, the Laundrette contract is granted the admin role, not the executor role. Therefore, when the Laundrette contract calls kernel::executeAction within its retrieveAdmin function, it will revert due to lack of the necessary Executor role.
The laundrette::retrieveAdmin function is rendered useless because it cannot successfully call kernel.executeAction without the Executor role. This means that any attempt to change the admin through this function will fail, potentially leaving the system in an undesirable state.
Place the following into laundrette.t.sol.
Manual Review, Foundry
To fix this issue, the GodFather account, which has the Executor role, should directly call the kernel contract to retrieve the admin role when needed. This ensures that only the account with the correct permissions attempts to execute the action, preventing the revert error and aligning the function usage with the intended access control logic.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.