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

Restructure Company with Board template's initialization #128

Merged
merged 7 commits into from Aug 9, 2019

Conversation

@sohkai
Copy link
Member

commented Aug 8, 2019

Refactors how the Company with Board template is initialized, grouping more like-elements together.

To create a Company with Board, the flow is now:

  1. Call prepareInstance(), creating an incomplete org with its two voting apps installed, and
  2. Call finalizeInstance(), to finish setting up the org with token holders and other apps.

Orgs at the end of step 1 (prepareInstance()) will be viewable in an Aragon client, but will have their permissions locked such that no votes can be created, and only the template is able to continue adding apps, changing permissions, or minting tokens. The previous versions also held this property.

It's not obvious from the tests, but the changes result in ~16k gas being saved in an org without Payroll installed, and a ~1k save when Payroll is installed. It also makes it slightly easier to add larger groups of board members or share holders (each cost ~50-100k gas), since they happen in the second step that requires less overall gas.

sohkai added some commits Aug 8, 2019

@sohkai sohkai requested review from ajsantander and facuspagnuolo Aug 8, 2019

@ajsantander
Copy link
Contributor

left a comment

LGTM!

@facuspagnuolo
Copy link
Member

left a comment

LGTM! Let's propagate the memory thing to the rest of the templates as well

sohkai added some commits Aug 9, 2019

@sohkai

This comment has been minimized.

Copy link
Member Author

commented Aug 9, 2019

I've added the memory keyword to public and internal functions in 5ab50e5.

@facuspagnuolo facuspagnuolo merged commit eeb89d7 into master Aug 9, 2019

4 checks passed

WIP Ready for review
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
license/cla Contributor License Agreement is signed.
Details

@facuspagnuolo facuspagnuolo deleted the company-board-restructure branch Aug 9, 2019

osarrouy added a commit to AragonBlack/dao-templates that referenced this pull request Aug 12, 2019

Merge pull request #1 from aragon/master
Restructure Company with Board template's initialization (aragon#128)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.