-
Notifications
You must be signed in to change notification settings - Fork 25
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
add dictator.sol #752
add dictator.sol #752
Conversation
* @param _avatar the scheme avatar | ||
* @param _owner the contract owner | ||
*/ | ||
function initialize(Avatar _avatar, address _owner) public initializer { |
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.
why not register the owner as admin right away in the initialize and then unregister self?
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.
because the initialize function is called as the process of instance the scheme before the scheme is registered .
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.
oh right, so nevermind
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.
The contract and tests seem fine, but I am not completely clear about the intended usage here.
So the idea here is that we have a daostack account called 0xdaosstack, and to execute any type of function we:
- deploy our daos with the dictator scheme registered, and with dictator.owner set to 0xdaostack
- call dictator.registerScheme(0xdaostack)
- and now we can do everything the controller allows us to do from the 0xdaostack account
Changing ownership would then be a 3-step process:
- call Dictator.setOwner(0xnewOnwer)
- call Dicator.registerScheme(0xnewOwner)
- unregister the 0xdaostack account (the old backdoor ccount) as a scheme
@orenyodfat @jellegerbrandy Would be great if docs like this could be in the code: |
not exactly :
0xanyarbitraryschemeoraccount can do what ever. changing ownership of Dictator will be 1 step :
Such a contract is needed to register 0xanyarbitraryschemeoraccount due to the fact that daoFactory can register contracts only. |
0e45639
No description provided.