feat: ownership added to blr#1216
Open
AlbertoMolinaIoBuilders wants to merge 5 commits into
Open
Conversation
Signed-off-by: Alberto Molina <alberto@io.builders>
Signed-off-by: Alberto Molina <alberto@io.builders>
Signed-off-by: Alberto Molina <alberto@io.builders>
Signed-off-by: Alberto Molina <alberto@io.builders>
Signed-off-by: Alberto Molina <alberto@io.builders>
marcosio
requested changes
May 29, 2026
| } | ||
|
|
||
| modifier checkOwnership(bytes32 _configurationId) { | ||
| if (_getOwner(_configurationId) != address(0)) _checkOwnership(_configurationId); |
Contributor
There was a problem hiding this comment.
Use private function _check function to save bytecode.
| bytes32 constant STORAGE_LOCATION_DIAMOND_CUT_MANAGER = 0xc9161810d6144bfe5b28041c8a23ceedf202e65acda5c323c5b387259e601000; | ||
|
|
||
| abstract contract DiamondCutManagerWrapper is IDiamondCutManager, BusinessLogicResolverWrapper { | ||
| abstract contract DiamondCutManagerWrapper is IDiamondCutManager, Ownership, BusinessLogicResolverWrapper { |
Contributor
There was a problem hiding this comment.
We have now AccessControl, It's really needed Ownership?
| */ | ||
| function _setOwner(bytes32 _configId, address _owner) internal { | ||
| OwnershipStorage storage os = _ownershipStorage(); | ||
| os.configOwners[_configId] = _owner; |
Contributor
There was a problem hiding this comment.
Avoid single usage variables. Remove os.
| */ | ||
| function _setPendingOwner(bytes32 _configId, address _pendingOwner) internal { | ||
| OwnershipStorage storage os = _ownershipStorage(); | ||
| os.configPendingOwners[_configId] = _pendingOwner; |
Contributor
There was a problem hiding this comment.
single variable usage. Remove.
| */ | ||
| function _getOwner(bytes32 _configId) internal view returns (address owner_) { | ||
| OwnershipStorage storage os = _ownershipStorage(); | ||
| owner_ = os.configOwners[_configId]; |
Contributor
There was a problem hiding this comment.
Single variable usage, remove.
| */ | ||
| function _getPendingOwner(bytes32 _configId) internal view returns (address pendingOwner_) { | ||
| OwnershipStorage storage os = _ownershipStorage(); | ||
| pendingOwner_ = os.configPendingOwners[_configId]; |
Contributor
There was a problem hiding this comment.
Single variable usage, use inline and remove os.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Type of change
Testing
Node version:
Checklist