Contracts
The contracts
query retrieves a paginated list of smart contracts with filtering and sorting capabilities. This is your primary tool for discovering and analyzing NFT collections, token contracts, and their metadata across the blockchain.
Arguments
Pagination Controls
Argument | Type | Default | Description |
---|---|---|---|
first | Int | 10 | Number of contracts to return. |
skip | Int | 0 | Legacy pagination offset. |
after | String | - | Cursor for next page. |
Filtering Options
Argument | Type | Description |
---|---|---|
where | ContractFilter | Filter by is_erc20 , is_erc721 , is_erc1155 , name_like , etc. |
Sorting Options
Argument | Type | Options |
---|---|---|
orderBy | ContractOrderBy | ID , NAME , SYMBOL , CREATED_AT , CREATED_BLOCK |
orderDirection | OrderDirection | ASC , DESC |
Example
10 Newest ERC-1155 Contracts
query Contracts($first: Int, $where: ContractFilter, $orderBy: ContractOrderBy, $orderDirection: OrderDirection) {
contracts(first: $first, where: $where, orderBy: $orderBy, orderDirection: $orderDirection) {
contracts {
symbol
name
createdAt
id
}
}
}
Variables
{
"first": "10",
"where": {
"is_erc1155": true
},
"orderBy": "CREATED_AT",
"orderDirection": "DESC"
}
Response
This response is an example only and may not reflect current data.
{
"data": {
"contracts": {
"contracts": [
{
"symbol": "BZZ",
"name": "BUZZ",
"createdAt": "2025-03-14T13:19:35Z",
"id": "0xce3a9dd08d4ec23efe955549ce82a2d9485c6c70"
}
]
}
}
}
Response Fields
The query returns a Contracts!
object containing:
contracts
: Array ofContract
objects.symbol
: Contract's identification symbol.name
: Name of each contract.createdAt
: Timestamp at which contract was created.id
: Contract address.
Common Use Cases
- Collection Discovery: Browse trending NFT projects.
- Developer Onboarding: Find contracts for integration.
- Analytics: Track contract deployment trends.
- Metadata Research: Identify contracts with metadata support.
Best Practices
- Use
where
filters to improve performance. - Prefer
after
overskip
for large datasets. - Cache frequently accessed contract lists.
- Combine with
tokens
query for full collection analysis.
Related Queries
contract
: For single contract details.tokens
: To explore a contract's NFTs.