DAO icon indicating copy to clipboard operation
DAO copied to clipboard

Feature Request: make DAO.sol modular based upon permission

Open colm opened this issue 8 years ago • 1 comments

All the variables and functions that individual users can change should be defined in a separate contract for transfer* newProposal vote executeProposal splitDAO retrieveDAOReward getMyReward withdrawRewardFor halveMinQuorum

DAO.sol should define the functions and variables that a Majority of the Users can changes. Changing proposal deposit changeProposalDeposit, newContract

'Curators.sol' should define the functions and variables that the Curator can change. changeAllowedRecipients halveMinQuorum

This is a good idea because

  1. It will make reviewing a little simpler as you can easily confirm that all the functions in Curator.sol are only accessible to the curators. Also the files will be smaller and considering the modules separately can make things less complex.
  2. There are many use cases where only changes to UserState.sol would be required.
  3. Although this reduces the readability a little, it make the understanding the framework and its implications easier. If forces the reader to consider that it is basically a state machine, some variables can be changed by individuals, some by the majority (if you don't like a change you can split to a new DAO which is initialized with a certain state based upon 'splitDAO') this is a very powerful paradigm. These changes will allow developers to more easily leverage the DAO framework.

colm avatar May 22 '16 17:05 colm

An intermediate state could be just sort them and put a Header Comment before each block.

Before splitting more the code in different files, I would do some kind of generateDeployScript script in order to make the deployment of the different contracts more easy. (geth , mist). This is specially annoying when you are manually testing.

jbaylina avatar May 23 '16 09:05 jbaylina