hackdays-io / toban

12 stars 2 forks source link

CLI: topHatIdを指定して紐づくHat(ロール)一覧を出す #105

Closed yu23ki14 closed 2 hours ago

yu23ki14 commented 4 hours ago

これを参考に https://app.hatsprotocol.xyz/trees/10/163

163を入力すると、配下のHat一覧が見えるようにする。

mashharuki commented 4 hours ago

https://zenn.dev/mashharuki/articles/4fc8bb038497aa#%E8%AA%AD%E3%81%BF%E5%8F%96%E3%82%8A%E7%B3%BB%E3%81%AE%E3%83%A1%E3%82%BD%E3%83%83%E3%83%89

↑ この辺使う感じですかね??

mashharuki commented 3 hours ago

https://api.studio.thegraph.com/query/55784/hats-v1-optimism/version/latest/graphql?query=query+MyQuery+%7B%0A++hats%28where%3A+%7Bid%3A+%220x000000a300000000000000000000000000000000000000000000000000000000%22%7D%29+%7B%0A++++details%0A++++id%0A++++imageUri%0A++++levelAtLocalTree%0A++++maxSupply%0A++++mutable%0A++++prettyId%0A++++status%0A++++toggle%0A++++createdAt%0A++++currentSupply%0A++++eligibility%0A++%7D%0A%7D

mashharuki commented 3 hours ago
query MyQuery {
  hats(where: {id: "0x000000a300000000000000000000000000000000000000000000000000000000"}) {
    details
    id
    imageUri
    levelAtLocalTree
    maxSupply
    mutable
    prettyId
    status
    toggle
    createdAt
    currentSupply
    eligibility
  }
}

↑ とりあえずトップのHatsはこれで取ってこれそう