Skip to content
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

Merged
merged 3 commits into from
May 25, 2020
Merged

add dictator.sol #752

merged 3 commits into from
May 25, 2020

Conversation

orenyodfat
Copy link
Contributor

No description provided.

* @param _avatar the scheme avatar
* @param _owner the contract owner
*/
function initialize(Avatar _avatar, address _owner) public initializer {
Copy link
Contributor

@ben-kaufman ben-kaufman May 19, 2020

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?

Copy link
Contributor Author

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 .

Copy link
Contributor

Choose a reason for hiding this comment

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

oh right, so nevermind

ben-kaufman
ben-kaufman previously approved these changes May 20, 2020
@orenyodfat orenyodfat changed the title add backdoor.sol add dictator.sol May 21, 2020
jellegerbrandy
jellegerbrandy previously approved these changes May 22, 2020
Copy link
Contributor

@jellegerbrandy jellegerbrandy left a 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

@dkent600
Copy link
Contributor

dkent600 commented May 22, 2020

@orenyodfat @jellegerbrandy Would be great if docs like this could be in the code:

#752 (review)

@orenyodfat
Copy link
Contributor Author

  • 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

not exactly :

  • The owner of dictator is 0xdaostack .
  • 0xdaostack can register any arbitrary scheme or account with full permission to the dao by calling call dictator.registerScheme(0xanyarbitraryschemeoraccount)

0xanyarbitraryschemeoraccount can do what ever.

changing ownership of Dictator will be 1 step :

  • dictator.transferOwnership(0xnewOwner)

Such a contract is needed to register 0xanyarbitraryschemeoraccount due to the fact that daoFactory can register contracts only.

@orenyodfat orenyodfat merged commit 8eb5cc4 into arc-factory May 25, 2020
@orenyodfat orenyodfat deleted the backdoor branch July 19, 2020 05:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants