We need to start building habitat front end. What is the best start, if not setting up the development environment and slightly touch contracts?
🦋 Desired Outcome
All necessary dependencies are in front end repository
Anyone with Metamask (other wallets?) is able to connect
Support optimism mainnet, goerli testnet, optimism goerli testnet
Front end knows our core contract addresses and ABIs (contract instances?)
Front end displays results of call few view functions: totalAmountOfVotingPower, connected wallet address amount of voting power.
Would be cool to start working with modularity in mind
🎯 Action Points:
Set up the development enviroment that you like (make our habitat-ui repo yours)
Implement wallet functionality. Integrate usedapp or WAGMI
When wallet is connected, check the network. Show the page if networks are from supported list, chain_ids: [10, 5, 420], supported list could be adjusted easiely. Show the corresponding message and request wallet to switch the network, if the network is not in supported list.
Core contract. HabitatDAO contract address is hardcoded for each network. ABI must be getting from etherscan (or sourcify?), if not there hardcoded ABI array is used.
add Typechain
dao function getManagementSystemsHumanReadable() must be called first it returns an array of dao modules. Each element contains module name, it's decision type and it's current decider contract address.
Currently we have 2 decision types implemented and used by our modules: VotingPowerDecider (decisionType: 2) and SignersDeciders (decisionType: 3)(excluded from first priority scope). By parsing this array we must get another at least 2 core contract addresses. ABI must be getting same way as for dao contract.
*additional info
Time to display few values on a page. Use ui design from figma. Make calls to VotingPowerDecider contract: display "Total Voting Power" by calling it's function getTotalAmountOfVotingPower(), display user amount of voting power by calling function getVoterVotingPower(address user) - each time address changing make recall for new address.
btw, weird thought, what to do if balance changed - can we listen events on front? =)
p.s. question to Max does it make sense to display totalAmountOfVotingPower/maxAmountOfVotingPower?
🐇 Additional Information
Our HabitatDAO has modular structure. The core is management systems (modules), which you can imagine as specific set of functionalities and state. Already implemented: moduleManager, governance, treasury; to be implemented: subDAOCreation, launchPad. ModuleManager provides functionalities to add new modules, change existing modules and remove modules. Each module has it's own decision system (you can imagine as dozens, limited only by devs creativity, different sets of rules and conditions how the decision process goes to finally get the proposal onchain executed) with it's own specific configuration. ModuleManager is able to switch module deciders. Governance module is able to change specific configuration of module decision system.
🏆 Reward + Contributor involved
Please give a sizing of your bounty and name all contributors involved + their respective share.
⚡️ Challenge:
We need to start building habitat front end. What is the best start, if not setting up the development environment and slightly touch contracts?
🦋 Desired Outcome
🎯 Action Points:
HabitatDAO
contract address is hardcoded for each network. ABI must be getting from etherscan (or sourcify?), if not there hardcoded ABI array is used.getManagementSystemsHumanReadable()
must be called first it returns an array of dao modules. Each element contains module name, it's decision type and it's current decider contract address. Currently we have 2 decision types implemented and used by our modules:VotingPowerDecider
(decisionType: 2) andSignersDeciders
(decisionType: 3)(excluded from first priority scope). By parsing this array we must get another at least 2 core contract addresses. ABI must be getting same way as for dao contract. *additional infoVotingPowerDecider
contract: display "Total Voting Power" by calling it's functiongetTotalAmountOfVotingPower()
, display user amount of voting power by calling functiongetVoterVotingPower(address user)
- each time address changing make recall for new address. btw, weird thought, what to do if balance changed - can we listen events on front? =) p.s. question to Max does it make sense to display totalAmountOfVotingPower/maxAmountOfVotingPower?🐇 Additional Information
Our HabitatDAO has modular structure. The core is management systems (modules), which you can imagine as specific set of functionalities and state. Already implemented: moduleManager, governance, treasury; to be implemented: subDAOCreation, launchPad. ModuleManager provides functionalities to add new modules, change existing modules and remove modules. Each module has it's own decision system (you can imagine as dozens, limited only by devs creativity, different sets of rules and conditions how the decision process goes to finally get the proposal onchain executed) with it's own specific configuration. ModuleManager is able to switch module deciders. Governance module is able to change specific configuration of module decision system.
🏆 Reward + Contributor involved
Please give a sizing of your bounty and name all contributors involved + their respective share.
e.g Max 200 DAI + 400 HBT Vic 300 DAI + 500 HBT