🐙
Subgraph
Subgraphs are our read-only APIs that subscribe to our on-chain events and construct easy-to-consume entities for clients.
The subgraphs urls are network specific and following the following template
- API: https://api.thegraph.com/subgraphs/name/otterspace-xyz/badges-[network-name]
- Interactive: https://thegraph.com/hosted-service/subgraph/otterspace-xyz/badges-[network-name]
Network | Subgraph |
---|---|
Optimism | |
Mainnet | |
Polygon | |
Goerli | |
Optimism Goerli |
{
rafts(where: {totalSpecsCount_gt: 0}) {
id
metadata {
name
}
totalSpecsCount
totalBadgesCount
specs {
metadata {
name
}
totalBadgesCount
}
}
}
{
badges(
where: {
spec_: {
raft: "rafts:1"
}
status_in: ["MINTED", "REINSTATED"]
}
) {
id
owner
status
createdAt
spec {
metadata {
name
expiresAt
}
}
}
}
{
raft(id: "rafts:1") {
id
metadata {
name
}
totalSpecsCount
totalBadgesCount
specs {
uri
totalBadgesCount
metadata {
name
}
}
}
}
{
badgeSpec(id: "bafyreicl3unvw6tvzjfduvrhxbfi74gsob6mpf6ekn3s2nkopqz2phtx7e") {
id
metadata {
name
description
image
expiresAt
}
totalBadgesCount
badges {
id
owner
status
createdAt
}
}
}
{
badges(where: {owner: "0x77B476429826C5ba77885D08F272d89D8F1Ed0e4"}) {
id
createdAt
status
spec {
id
metadata {
name
description
expiresAt
image
}
raft {
id
metadata {
name
image
}
}
}
}
}
{
badges(
where: {owner: "0x77B476429826C5ba77885D08F272d89D8F1Ed0e4", spec_in: ["bafyreicl3unvw6tvzjfduvrhxbfi74gsob6mpf6ekn3s2nkopqz2phtx7e", "bafyreia2lnu2jmr6sqqijzd3xt6fw2qriyy2vbq57zikzrkeyxfvlpqp3i"]}
) {
id
owner
status
createdAt
}
}
Last modified 3mo ago