Skip to content

Conversation

@nicholaspai
Copy link
Member

@nicholaspai nicholaspai commented Jun 14, 2023

This contract is a proxy that owns another contract and can split permissions by role based on what method is being called. All methods are always callable by the owner of the proxy.

nicholaspai and others added 7 commits June 13, 2023 20:27
Signed-off-by: nicholaspai <npai.nyc@gmail.com>
Signed-off-by: Matt Rice <matthewcrice32@gmail.com>
Signed-off-by: Matt Rice <matthewcrice32@gmail.com>
Signed-off-by: Matt Rice <matthewcrice32@gmail.com>
@mrice32 mrice32 marked this pull request as ready for review June 20, 2023 23:05
mrice32 added 3 commits June 20, 2023 19:06
Signed-off-by: Matt Rice <matthewcrice32@gmail.com>
Signed-off-by: Matt Rice <matthewcrice32@gmail.com>
Signed-off-by: Matt Rice <matthewcrice32@gmail.com>
@mrice32 mrice32 changed the title WIP: Create PermissionSplitter Create PermissionSplitter Jun 20, 2023
@mrice32 mrice32 requested review from james-a-morris and pxrl June 20, 2023 23:09
Copy link
Contributor

@james-a-morris james-a-morris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a few comments related to documentation and a small nit. LGTM

Comment on lines +24 to +25
// Public function!
// Note: these have two underscores in front to prevent any collisions with the target contract.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to be following the natspec for this?

It may be beneficial to include these doc comments (/** .. */ or ///) for better IDE support / readability

Comment on lines +31 to +32
// Public function!
// Note: these have two underscores in front to prevent any collisions with the target contract.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to above


function _isAllowedToCall(address caller, bytes calldata callData) internal view virtual returns (bool) {
bytes4 selector;
if (callData.length < 4) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: would we want to store this in a constant? The 4 seems like a magic number

@nicholaspai nicholaspai merged commit d17fa59 into master Jan 19, 2024
@nicholaspai nicholaspai deleted the permissions-splitter branch January 19, 2024 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants