-
Notifications
You must be signed in to change notification settings - Fork 2
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
refactor: move module access controller #56
Conversation
Missing tests. |
@@ -10,7 +10,7 @@ import {IRequestModule} from '../interfaces/modules/request/IRequestModule.sol'; | |||
import {IResolutionModule} from '../interfaces/modules/resolution/IResolutionModule.sol'; | |||
import {IResponseModule} from '../interfaces/modules/response/IResponseModule.sol'; | |||
import {ValidatorLib} from '../libraries/ValidatorLib.sol'; | |||
import {OracleAccessController} from './OracleAccessController.sol'; | |||
import {OracleAccessController} from './access/OracleAccessController.sol'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, I didn't like the files thrown in contracts/
if (!ORACLE.isAccessModuleApproved(_accessControl.user, _accessModule)) { | ||
revert ModuleAccessController_AccessModuleNotApproved(); | ||
} | ||
_hasAccess(_accessModule, _typehash, _params, _accessControl); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#55 will impact here.
Similarly in OracleAccessController
.
abstract contract ModuleAccessController is IModuleAccessController, CommonAccessController, Module { | ||
constructor(IOracle _oracle) Module(_oracle) {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does ModuleAccessController
inherit from Module
, if it is not a module itself? In my opinion, it would make more sense to make the latter inherit from the former, such that:
Oracle is OracleAccessController
andModule is ModuleAccessController
, whileMyAccessModule is Module
.
🤖 Linear
Closes OPT-530