--- ###### tags: `Public Haus` --- # DH Signal TCR App ## Deployed contract addresses DhSignalTCR deployed to 0x96ce3b16492829149F5c5b741d418EA39F0e3a9d dhSignalTCRSummoner deployed to 0x017eD0e82bCD242C7Cd89F02c2Eee9826BEaBC67 ## Resources https://github.com/HausDAO/baal-shamans/tree/feat/tcr https://github.com/HausDAO/dh-signal-tcr-subgraph https://thegraph.com/hosted-service/subgraph/hausdao/dh-signal-tcr-goerli choice schema https://github.com/HausDAO/monorepo/blob/develop/libs/moloch-v3-data/src/subgraph/json-schemas/signal-tcr-choice.json ## create token snapshots Currently a token snapshot needs to be created by the DAO process: - Multicall transaction builder - tx1 - target: baal address - value: 0 - function: executeAsBaal - params: - target: shares token - value: 0 - data: 0x9711715a (this is the snapshot function signature, no params) - tx2 - target: baal address - value: 0 - function: executeAsBaal - params: - target: loot token - value: 0 - data: 0x9711715a (this is the snapshot function signature, no params) - tx3 - could deploy the new tcr proposal here, it will use the latest snapshot future update: allowing the admin shaman to take snapshots, but that would require a redeploy of the baal template ## TODO - Define DaoDatabse json schema - creates choiceID - Define details schema - {title: 'some title', description: 'some description', link: 'some url'} ## UI Notes - home page not scoped to the dao with a proposal form to launch a tcr instance - snapshot (above) - and tcr factory function in the same proposal - target: tcr factory - function: summonSignalTCR(address baal, string calldata details) - value: 0 - args - baal - target dao - details string - formalize the details string stucture - maybe json with a title and description and url? - then dao scoped route - see dekan's mock up - :daochain/:daoid/:tcrContract - new useQuery with fetch to the new subgraph - gql - get tcr by id - with vote an voters - get dao and tcr records by id - mash records to get valid choices - might also need to fetch for connected user or sort the data accordingly in the useQuery - claim - check connected users claim status - use the snapshotid in the tcr record - function claim(address account) - add choice - poster call - need to define the schema - vote - function vote(BatchVoteParam[] calldata _batch) - function _vote(uint48 _choiceId, uint152 _amount) - batch arg [[0x8031c7630009, "1000000000000000000"]] - remove vote - function releaseTokens(uint256[] calldata _voteIds) ![](https://i.imgur.com/jZfovNr.png) TODO: ~~1. SETUP~~ ~~- Backout multi-tenant ~~- Redo routing~~ ~~- Set up home page hard coded scope to some dao and network~~ ~~- Set up TCR page (/:tcrAddress)~~ ~~2. Create FORM and tx~~ ~~3. Home page useQuery ~~- and list of tcrs w/ link to tcr page~~ ~~4. TCR page useQueries w/ data manipulation ~~- 2 subgraphs~~ ~~- and connected user related queries~~ ~~7. style it~~ 5. TCR page functions ~~- claim more data display ~~- add choice ~~- stake~~ ~~- release~~ ~~- combos: - add claim and stake ``` # new field to take in the stake amount - required > 0 - needs to validate vs. user balance - adds the tcr vote action - listens to the choiceId and formats that ``` - batch stake - batch release~~ 6. word cloud ~~8. custom polls on these txs to update data properly after~~ ~~- need to update the packages first~~ ~~- still need green balance button to update~~ ~~10. live point countdown as you enter fields and validation on Update button ~~ 11. sort the list - CHOICES: auto sort by highest stake - SIGALS: see/inactive signals - will need to adjust the details page to stop any actions 12. details truncation on long descriptions - maybe in a modal - or push to use link 13. mobile 14. options to display submitters - can dao indicate if they want it anon or not ~~15. countdown on details page ~~ 16. make the list more like an order form w/ a single update action/tx 17. visual indication of strength of signal