Skip to content
This repository has been archived by the owner on May 9, 2024. It is now read-only.

Bridge admin access segregator #585

Merged
merged 13 commits into from
Jul 6, 2022

Conversation

mpetrun5
Copy link
Member

  • create a AccessControlSegregator contract to allow for per function address access for admin methods
  • update Bridge to use AccessControlSegregator contract

Related Issue Or Context

Closes: #563

How Has This Been Tested? Testing details.

Unit tests.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation

Checklist:

  • I have commented my code, particularly in hard-to-understand areas.
  • I have ensured that all acceptance criteria (or expected behavior) from issue are met
  • I have updated the documentation locally and in chainbridge-docs.
  • I have added tests to cover my changes.
  • I have ensured that all the checks are passing and green, I've signed the CLA bot

contracts/Bridge.sol Outdated Show resolved Hide resolved
test/gasBenchmarks/deployments.js Outdated Show resolved Hide resolved
Copy link
Contributor

@lastperson lastperson left a comment

Choose a reason for hiding this comment

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

Just realized that right now the relation between role and actor is one-to-one. Do we envision a situation where we might want multiple actors to have access to a function?

contracts/utils/AccessControlSegregator.sol Outdated Show resolved Hide resolved
contracts/utils/AccessControlSegregator.sol Outdated Show resolved Hide resolved
@mpetrun5
Copy link
Member Author

mpetrun5 commented Jul 4, 2022

Just realized that right now the relation between role and actor is one-to-one. Do we envision a situation where we might want multiple actors to have access to a function?

As far as I understand it is not a case that we planned to support, but I might be mistaken.
@P1sar

@mpetrun5 mpetrun5 requested a review from lastperson July 4, 2022 13:06
@P1sar
Copy link
Member

P1sar commented Jul 4, 2022

Just realized that right now the relation between role and actor is one-to-one. Do we envision a situation where we might want multiple actors to have access to a function?

As far as I understand it is not a case that we planned to support, but I might be mistaken. @P1sar

Yes one role to one function is what we need

@mpetrun5 mpetrun5 merged commit 726c476 into master Jul 6, 2022
@mpetrun5 mpetrun5 deleted the mpetrun5/bridge-admin-access-segregator branch July 6, 2022 10:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bridge admin access rights segregator (permission contract)
4 participants