HausDAO / daohaus-supergraph

MIT License
6 stars 22 forks source link

Looking to understand missing data #44

Open mattcan opened 3 years ago

mattcan commented 3 years ago

Hoping I can have someone validate my thinking on this one or give me pointers on where to look.

I'm looking at Moloch DAOs on xDai and Polygon and seeing some with no members.moloch.title. Here is an example query for a particular wallet:

{
  members(where: {memberAddress: "0xb53b0255895c4f9e3a185e484e5b674bccfbc076"}) {
    moloch { title }
    molochAddress
  }
}

Running that query on the xDai subgraph page, these results come up (snipped for size, 12 of 14 results are title: null):

{
  "data": {
    "members": [
      {
        "moloch": {
          "title": null
        },
        "molochAddress": "0x0079255ac5861e109fe80cd105fdc5de819897fa"
      },
      {
        "moloch": {
          "title": "HausDAO"
        },
        "molochAddress": "0x283bdc900b6ec9397abb721c5bbff5ace46e0f50"
      }
    ]
  }
}

On the xDai blockexplorer:

Both seem to be Moloch based, which is good in that the subgraph is pulling the correct data based on my understanding.

My understanding

I have read through the Moloch.sol contract and the HausDao Summoner. I'm no Solidity expert but it seems that the only way to have a DAO title (with Moloch) is via the HausDao registerDao function which writes an event. With that understanding, would it be safe to assume that the DAOs in the results are Moloch based but were not registered? They may have been summoned or deployed by hand but probably not registered. Otherwise there would be a bug.

Is my understanding correct? Is there a way I could verify or help to verify?

Related issue: https://github.com/MetaFam/TheGame/issues/549

skuhlmann commented 3 years ago

Good catch!

Dao titles are no longer saved in the subgraph. That was an old feature of moloch V1 and early V2 daos - added through registering in the factory. New factories for the latets v2 daos do not have that title field so we don't map anything to title.

DAO titles can now be changed by daos - and it's stored in dao metadata outside the subgraph.

I think the fix here is actually to remove the title field completely to avoid confusion.