Clarify function naming as it relates to ACL restrictions - change addAdmin
to createAdmin
, address comments
#184
Labels
ℹ️ Discussion
Informative Issue used for pre-planning / gathering requirements / etc
remove or delete?1
mevETH2/src/libraries/Auth.sol
Line 52 in 216fe89
When the difference between remove and delete is not so obvious to you, I’d suggest looking at their opposite actions - add and create.
The key difference between
add
andcreate
is thatadd
needs a destination, whilecreate
requires no destination.You add an item to somewhere, but you don’t “create it to somewhere”.
Simply pair
remove
withadd
anddelete
withcreate
.Suggestion
Change the wording from
addAdmin
tocreateAdmin
.Further Discussion
Access Control List details
This highlights an additional issue of the ordering of operations in this ACL scheme that is meant to restrict certain operations to certain addresses.
We may want to implement a 'base' ACL ring (that only serves as a registration method, it does not grant any permissions to the protocol). An example: https://github.com/transmissions11/solmate/blob/fab107565a51674f3a3b5bfdaacc67f6179b1a9b/src/auth/Trust.sol
Accounts should be 'Trusted'. Then elevate the permissions to the respective roles. We should add a hard limit to the number of active addresses assigned to their relative roles.
Consider: EIP-173 Contract Ownership Standard2
See https://github.com/ethereum/EIPs/blob/master/EIPS/eip-173.md
Example implementation for reference: https://github.com/Nipol/bean-contracts/blob/main/contracts/library/Ownership.sol
Reference
Footnotes
See Manifold Finance Styling Guide, Naming Things is Easy: Delete ↩
See this handy tool, EIP-FZF https://github.com/cds-amal/fzf-eip ↩
The text was updated successfully, but these errors were encountered: