-
Notifications
You must be signed in to change notification settings - Fork 329
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
Delegated accounts custom errors #832
base: custom-errors
Are you sure you want to change the base?
Conversation
modifier onlyAccountAdmin(address account) { | ||
require(accounts[account].admins.contains(msg.sender), CallerNotAdmin()); | ||
_; | ||
} |
Check notice
Code scanning / Slither
Incorrect modifier
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.
false alarm it seems
} | ||
|
||
// The mapping of account address to all of the delegated account info for it. | ||
mapping(address => DelegatedAccountInfo) internal accounts; |
Check failure
Code scanning / Slither
Uninitialized state variables
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.
Seems erroneous?
db2ccda
to
153d625
Compare
1) Interface for composable permission controller. 2) Storage layout for permission controller. 3) Initial implementation for controller. I also added a library for a bytes4 enumerable set, since OZ didn't have one. We do this so people can easily inspect which permissions on which contracts people have. We could also add an index for which contracts have permissions, but I figured that getting the list of important addresses (core contracts + AVS contracts) would be far more legibile off-chain. We could maintain it on chain and provide that list of contracts, and quite frankly it would be great because then you could determine ALL permissions that a user had simply with view functions. I might add this incrementally if we can align on the basics here.
1c323e2
to
6d96106
Compare
////////////////////////////////////////////////// | ||
// Public Introspection Interface | ||
////////////////////////////////////////////////// |
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.
Is the idea that the core protocol functions would check one of these view functions to see if it's an admin or if it's a delegate and has the right permissions?
emit AccountDelegateStateChange(account, msg.sender, target, selector, delegate, hasPermission); | ||
} | ||
|
||
////////////////////////////////////////////////// |
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.
This would need a hasPermission
view function too.
No description provided.