-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Orchestrator whitelist #253
base: master
Are you sure you want to change the base?
Conversation
@@ -22,6 +22,8 @@ contract Orchestrator is Ownable { | |||
// Stable ordering is not guaranteed. | |||
Transaction[] public transactions; | |||
|
|||
address[] private whitelist; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe use EnumerableSet
here, so we don't have to loop through the list to check existence every time?
EnumerableSet
is a little more expensive on write though (uses 2 slots instead of 1)
@@ -42,7 +44,24 @@ contract Orchestrator is Ownable { | |||
*/ | |||
function rebase() external { | |||
require(msg.sender == tx.origin); // solhint-disable-line avoid-tx-origin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could just have one rebase
function but add a modifier where we check if either msg.sender == tx.origin
or msg.sender
is part of the whitelist
We could also update the orchestrator to the latest solidity version as we do this |
adds whitelist to orchestrator contract so that whitelisted contracts can call rebase