RocketMinipoolDelegate - enforce that the delegate contract cannot be called directly
This contract is not meant to be consumed directly and will only be delegate called from `Minipool`. Being able to call it directly might even create the problem that, in the worst case, someone might be able to `selfdestruct` the contract rendering all other contracts that link to it dysfunctional. This might even not be easily detectable because `delegatecall` to an EOA will act as a NOP.\\nThe access control checks on the methods currently prevent methods from being called directly on the delegate. They require state variables to be set correctly, or the delegate is registered as a valid minipool in the system. Both conditions are improbable to be fulfilled, hence, mitigation any security risk. However, it looks like this is more of a side-effect than a design decision, and we would recommend not explicitly stating that the delegate contract cannot be used directly.\\n```\\nconstructor(address \\_rocketStorageAddress) {\\n    // Initialise RocketStorage\\n    require(\\_rocketStorageAddress != address(0x0), "Invalid storage address");\\n    rocketStorage = RocketStorageInterface(\\_rocketStorageAddress);\\n}\\n```\\n
Resolution\\nAddressed in branch `rp3.0-updates` (rocket-pool/[email protected]b424ca1) by removing the constructor and therefore the initialization code from the RocketMinipoolDelegate contract. The contract cannot be used directly anymore as all relevant methods are decorated `onlyInitialised` and there is no way to initialize it in the implementation directly.\\nRemove the initialization from the constructor in the delegate contract. Consider adding a flag that indicates that the delegate contract is initialized and only set in the Minipool contract and not in the logic contract (delegate). On calls, check that the contract is initialized.
```\\nconstructor(address \\_rocketStorageAddress) {\\n    // Initialise RocketStorage\\n    require(\\_rocketStorageAddress != address(0x0), "Invalid storage address");\\n    rocketStorage = RocketStorageInterface(\\_rocketStorageAddress);\\n}\\n```\\n