openlawteam / tribute-ui

Tribute - A modular DAO framework developed and coordinated by its members
https://demo.tributedao.com
Apache License 2.0
45 stars 40 forks source link

DAO Creation UI #132

Open jdville03 opened 3 years ago

jdville03 commented 3 years ago

Placeholder

Finish the DAO Creation UI

sophiacodes commented 3 years ago

Creating a Bank

On Dao creation, we need to create the bank immediately after and set the ACL for adapters to access the bank.

For example, after calling createDao(name, creator) from the DaoFactory contract, we should:

Call createBank from the BankFactory using the bank factory contract address, either with a default maxExternalTokens value of 200 or accept user input value.

.createBank(200) returns bankAddress

Then, call the .addExtension(sha3(“bank”),bankAddress,creator) from the daoRegistry(daoAddress) contract.

Lastly, we should give permission to adapters that require access to the bank, such as the OffChainVotingContract. An example:

Using the DaoFactory contract, we need to call configureExtension(DaoRegistry dao,address extension,Adapter[] calldata adapters).

configureExtension(daoAddress,bankAddress,adapters[])

Suggestion, we should perhaps call this function when the finalizing DAO action is called.

Sets the access control for a particular adapter (by address) to a specific extension. Both adapter and extension need to be already registered to the DAO.

https://github.com/openlawteam/molochv3-contracts/blob/master/docs/core/DaoRegistry.md#function-setacltoextensionforadapteraddress-extensionaddress-address-adapteraddress-uint256-acl

sophiacodes commented 3 years ago

We can use the DAO Artifacts to retrieve/manage/view adapters/extensions https://github.com/openlawteam/tribute-contracts/issues/273