metagov / daostar

DAOstar (or DAO*) is a set of technical standards and tools for DAOs and DAO tooling
https://daostar.org/
MIT License
57 stars 25 forks source link

Update the DAODAO <> DAOstar integration #112

Closed thelastjosh closed 11 months ago

thelastjosh commented 1 year ago

Goal is to (1) integrate query to DAODAO's indexer to daostar.org explorer frontend, AND/OR (2) deploy an update to the DAODAO factory so that it emits the right events for future DAOs (or figure out some other workaround) so that future DAODAO DAOs and daoURIs are indexed in our explorer.

Background:

  1. Isaac and Josh recently updated the registration & indexing pattern for daoURI. We also redeployed the registration factory contracts across most chains. In particular, we noticed that many frameworks, e.g. Aragon and Snapshot X, had deployed DAOs with daoURI embedded in the contract itself, but we didn't have an indexing approach to capture all these DAOs.
  2. DAODAO, daoURI has been configured for a while, it exists on DAODAO DAOs (though usage may not be much).
  3. Noah has an indexer that is very complete, that has all the daoURIs.
thelastjosh commented 1 year ago

In today's call with Noah and Jake from DAODAO, we agreed the simplest thing would be to ask for a query to incorporate into our explorer frontend to Noah's indexer, which he maintains for all DAODAO DAOs. @ipatka will send the basic structure of the request we want to Noah in the TG chat.

There's also some work that needs to happen on DAODAO's end, i.e. a lot of the daoURIs for current DAOs on DAODAO may be empty, so in the future they may want to update the default reference membersURI, proposalsURI, governanceURI, contractsURI, issuersURI, etc. so that each DAO is serving non-empty information by default.

thelastjosh commented 1 year ago

Josh pinged Noah and Jake with a broad schema request, waiting on reply.

thelastjosh commented 1 year ago

Noah Saso, [Aug 23, 2023 at 12:39:29 PM]:

curl -v https://search.daodao.zone/indexes/INDEX/documents\?limit=10000 -H 'Content-Type: application/json' -H 'Authorization: Bearer 29547412f05b2a4a52fe8b1f000f03206c9e650f66900a945370ff4ee616f659'

replace INDEX with daos for Juno DAOs, osmosis_daos for Osmosis DAOS, or stargaze_daos for Stargaze DAOs

output looks something like this:

{ "contractAddress": "juno10h0hc64jv006rr8qy0zhlu4jsxct8qwa0vtaleayh0ujz0zynf2s2r7v8q", "codeId": 2454, "block": { "height": "9559797", "timeUnixMs": "1691898715175" }, "value": { "admin": "juno10h0hc64jv006rr8qy0zhlu4jsxct8qwa0vtaleayh0ujz0zynf2s2r7v8q", "config": { "name": "DAO DAO", "dao_uri": "https://daodao.zone/dao/juno10h0hc64jv006rr8qy0zhlu4jsxct8qwa0vtaleayh0ujz0zynf2s2r7v8q", "image_url": "ipfs://bafkreiefe4icv32rsn5l43p776d5rd4yk6expmiita5jt5tqqugc65mbua", "description": "A DAO that builds DAOs.", "automatically_add_cw20s": false, "automatically_add_cw721s": false }, "version": { "version": "2.1.0", "contract": "crates.io:dao-core" }, "proposal_modules": [ { "prefix": "A", "status": "enabled", "address": "juno1hk37s260qdcxtv0qz3fzgr9cft7z2vt8shk2p96jxp3fxv0zvj6s47muex", "info": { "version": "2.1.0", "contract": "crates.io:dao-proposal-single" } }, { "prefix": "C", "status": "enabled", "address": "juno16t9xlgeg6vf08t550lsutdc30a39d95alt3yar50kkgdyt38ckvqrpxx6r", "info": { "version": "2.1.0", "contract": "crates.io:dao-proposal-multiple" } }, { "prefix": "B", "status": "disabled", "address": "juno13hfmp0tck77nwd6uu28t3envzpa6qmhuwlt6q5e4txkj6m5sf2wsmjwvmt", "info": { "version": "2.0.2", "contract": "crates.io:dao-migrator" } } ], "voting_module": "juno18mgqtspuydkn9kx4khp7652x3dmg9teryj845dz99tfp5jar6y5q4fks0z", "active_proposal_module_count": 2, "total_proposal_module_count": 3, "votingModuleInfo": { "version": "2.1.0", "contract": "crates.io:dao-voting-cw20-staked" }, "createdAt": "2022-08-11T20:17:10.234Z", "adminInfo": null, "proposalCount": 11, "polytoneProxies": {} } }

Homepage: https://daodao.zone/dao/CONTRACT Info for one DAO: https://indexer.daodao.zone/CHAIN/contract/CONTRACT/daoCore/dumpState

is one of these the DAO URI? ^

and CHAIN is one of:

thelastjosh commented 1 year ago

@Rashmi-278 If you can start querying the thing above that would be great; added you to the TG chat with DAODAO.

eleventh19 commented 1 year ago

Next thing to be done, query the end point that is listed above. Working on this - API returns a large amount of data, not GraphQL. Needs some more work - likely to have updates the week of Sept 18

Rashmi-278 commented 1 year ago

Note from Telegram chat, We would be including the empty DAO URI strings too as it would help announce that a given contract self-identifies as a DAO

thelastjosh commented 1 year ago

From today's conversation: Rashmi is working on improving this / converting their data format into the version we need for our frontend. Effectively, instead of fetching the data from the DAOs' own daoURIs, we are fetching it from the DAODAO's proprietary API.

Just a note that I would like to keep this issue open until we are fetching data from the DAOs themselves in the canonical way.

thelastjosh commented 1 year ago

We also talked about the need to paginate to deal with the 1000s of DAOs coming from DAODAO.

thelastjosh commented 1 year ago

Hooray to getting 1000s of DAOs!

thelastjosh commented 1 year ago

No progress this week.

thelastjosh commented 1 year ago

Any progress on this, Rashmi?

thelastjosh commented 1 year ago

No updates yet.

thelastjosh commented 1 year ago

No updates.

thelastjosh commented 11 months ago

DAODAO integration is working on localhost!

Issues:

  1. rename to ethereum mainnet (v1) vs. ethereum mainnet (v0)
  2. It should be "juno" not "junos".
  3. remove all the DAOs that do not have daoURI. These are not compliant with the standard.
Rashmi-278 commented 11 months ago

Actively being worked on here, https://github.com/metagov/daostar/pull/185 Juno and Osmosis are ready Preview here: https://deploy-preview-185--whimsical-cuchufli-3a5565.netlify.app/explore

PR is ready to merge to display Juno and Osmosis Regsistration Instances Facing some issues with displaying Stargaze registration instances, Working on debugging the issue and pagination

Discuss: How to paginate? Our options are,

  1. Pagination Instead of loading all items at once, implement pagination. Load a certain number of items (e.g., 100) initially, and then load more as the user navigates through pages.
  2. Infinite Scrolling As an alternative to traditional pagination, you can use infinite scrolling, where more items are loaded automatically or on demand as the user scrolls down.
  3. Load on Demand Implement a feature to load additional items on demand. For example, you could have a "Load More" button at the end of the list or use a scroll event to trigger the loading of more items.
thelastjosh commented 11 months ago

Great progress!

Rashmi-278 commented 11 months ago

Stargaze DAOs aren't being displayed as none of them have a DAO Name

curl -v "https://search.daodao.zone/indexes/stargaze_daos/documents?limit=5" ^ -H "Content-Type: application/json" ^ -H "Authorization: Bearer 29547412f05b2a4a52fe8b1f000f03206c9e650f66900a945370ff4ee616f659"

Response:

{ "results": [ { "contractAddress": "stars1yq8vkp8e9w0f8vmzqchzvhzdpgw4f3xare67s7uh6nps4d58z2gqph2sde", "codeId": 0 }, { "contractAddress": "stars1yrlwe5fwumrprjhx8edwp5s666gzzdw88cflpg86q53jftnnp7zswqsx3j", "codeId": 0 }, { "contractAddress": "stars1yrf6t5rjuk7un6saunvv43map9v692h5ge6vanv4tekjwsxfmfyqgnse56", "codeId": 0 }, { "contractAddress": "stars1yzjz9pkufaqam43ydxdh55v0jk36ur6yjpaq0ay5dvug59c0hy9qgevxdr", "codeId": 0 }, { "contractAddress": "stars1yqz6z3xssn0alf3862jj2z8quj2wttu8kggu29wjkcpct7ktsqgq9h52vc", "codeId": 0 } ], "offset": 0, "limit": 5, "total": 204 }

Rashmi-278 commented 11 months ago

Closing this as this integration is completed.

Rashmi-278 commented 11 months ago

Refer PR https://github.com/metagov/daostar/pull/185