GraphQL
Nomis SBT provides access to data about changed scores in the blockchain events through a GraphQL endpoint. This documentation outlines how to formulate queries to retrieve relevant data and provides an example query.
Endpoint
You can access the data about changed scores in blockchain events using the following GraphQL endpoint: https://cms.nomis.cc/graphql
.
Access to the GraphQL endpoint requires an API Key provided by the Nomis Team.
Obtaining API Key
To obtain the API Key necessary for accessing the GraphQL endpoint, you need to contact the Nomis Team. The API Key can be obtained by reaching out to the Nomis Team via Discord through a support ticket or by contacting them via Telegram.
Discord: Nomis Team Discord Server (via support-ticket) Telegram: Nomis Team Telegram Channel
Attributes
scoreName: The name of the score.
Available values:
Score | Slug |
---|---|
Astar zkEVM | astar-zkevm |
Berachain Artio Testnet | berachain |
Blast | blast |
Blast Sepolia Testnet | blast-sepolia |
Core | kroma |
Cronos | cronos |
Cross-Chain DeFi | rubic |
Energi | energi |
Enuls | enuls |
EYWA | eywa |
Gnosis | gnosis |
Kroma | kroma |
LayerZero | layerzero |
LightLink | lightlink |
Linea | linea |
Manta | manta |
Metis | metis |
Mint | sei |
Mode | mode |
Moonbeam | moonbeam |
Multichain | multichain |
Neon EVM | neon |
opBNB | opbnb |
Plume Testnet | plume |
Polygon zkEVM | zkevm |
Scroll | scroll |
Sei | sei |
Taiko Katla Testnet | taiko |
Web3 Social | web3social |
ZetaChain Testnet | zetchain |
ZKFair | zkfair |
zkLink Nova | zklink-nova |
zkSync | zksync |
eventId: The ID of the event.
tokenId: The ID of the token.
owner: The address of the SBT owner.
score: The score value.
calculationModel: The calculation model.
chainId: The ID of the chain.
metadataUrl: The metadata URL.
referralCode: The referral code.
referrerCode: The referrer code.
blockNumber: The block number.
blockTimestamp: The timestamp of the block.
transactionHash: The hash of the transaction.
Query Example
Below is an example GraphQL query demonstrating how to retrieve data about changed scores in blockchain events:
query {
blockchainEventChangedScores(
pagination: { page: 1, pageSize: 100 }
sort: "blockTimestamp:asc"
filters: {
scoreName: { eq: "multichain" } // filter by scoreName equals multichain
blockTimestamp: { gt: 1691691762 } // filter by blockTimestamp greater than August 10, 2023 6:22:42 PM GMT+00:00
}
) {
data {
id
attributes {
eventId
tokenId
owner
score
calculationModel
chainId
metadataUrl
referralCode
referrerCode
blockNumber
blockTimestamp
transactionHash
scoreName
}
}
meta {
pagination {
page
pageSize
pageCount
total
}
}
}
}
This query fetches data from the blockchainEventChangedScores endpoint with the following parameters:
Pagination set to retrieve the first page with 100 items per page.
Sorting in ascending order based on blockTimestamp.
Filters applied to include data where scoreName equals multichain
, chainId equals 9999999999999
, and blockTimestamp is greater than 1691691762
.
Conclusion
This documentation provides a structured example of a GraphQL query to retrieve data about changed scores in blockchain events using the Nomis SBT GraphQL endpoint. Remember that access to the endpoint requires an API Key obtained from the Nomis Team via Discord or Telegram. If you encounter any issues or need further assistance, feel free to consult the Nomis Team.