Skip to content

feat: ownership added to blr#1216

Open
AlbertoMolinaIoBuilders wants to merge 5 commits into
developmentfrom
feat/BBND-1824
Open

feat: ownership added to blr#1216
AlbertoMolinaIoBuilders wants to merge 5 commits into
developmentfrom
feat/BBND-1824

Conversation

@AlbertoMolinaIoBuilders
Copy link
Copy Markdown
Contributor

Description

Type of change

  • Bug fix 🐞
  • New feature ✨
  • Breaking change 💥
  • Documentation update 📖
  • Refactor 🔧

Testing

Node version:

  • 20
  • 22
  • 24

Checklist

  • Style Guidelines followed ✅
  • Documentation Updated 📚
  • Linters - No New Warnings ⚠️
  • Local Tests Pass ✅
  • Effective Tests Added ✔️
  • No reduction of Coverage

Signed-off-by: Alberto Molina <alberto@io.builders>
Signed-off-by: Alberto Molina <alberto@io.builders>
@github-actions github-actions Bot added the hash-change PR modifies @custom:hash annotations or codegen formula — review on-chain impact carefully label May 28, 2026
Signed-off-by: Alberto Molina <alberto@io.builders>
Signed-off-by: Alberto Molina <alberto@io.builders>
Signed-off-by: Alberto Molina <alberto@io.builders>
}

modifier checkOwnership(bytes32 _configurationId) {
if (_getOwner(_configurationId) != address(0)) _checkOwnership(_configurationId);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We have now AccessControl, It's really needed Ownership?

*/
function _setOwner(bytes32 _configId, address _owner) internal {
OwnershipStorage storage os = _ownershipStorage();
os.configOwners[_configId] = _owner;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Avoid single usage variables. Remove os.

*/
function _setPendingOwner(bytes32 _configId, address _pendingOwner) internal {
OwnershipStorage storage os = _ownershipStorage();
os.configPendingOwners[_configId] = _pendingOwner;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

single variable usage. Remove.

*/
function _getOwner(bytes32 _configId) internal view returns (address owner_) {
OwnershipStorage storage os = _ownershipStorage();
owner_ = os.configOwners[_configId];
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Single variable usage, remove.

*/
function _getPendingOwner(bytes32 _configId) internal view returns (address pendingOwner_) {
OwnershipStorage storage os = _ownershipStorage();
pendingOwner_ = os.configPendingOwners[_configId];
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Single variable usage, use inline and remove os.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hash-change PR modifies @custom:hash annotations or codegen formula — review on-chain impact carefully

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants