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.
contracts(
first: Int = 10
skip: Int = 0
after: String
where: ContractFilter
orderBy: ContractOrderBy
orderDirection: OrderDirection
): Contracts!
Arguments
contracts.first ● Int scalar
contracts.skip ● Int scalar
contracts.after ● String scalar
contracts.where ● ContractFilter input
contracts.orderBy ● ContractOrderBy enum
contracts.orderDirection ● OrderDirection enum
Type
Contracts object
Argument Descriptions
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. |
Core Filters
| Argument | Type | Description |
|---|---|---|
where | ContractFilter | Filter by is_erc20, is_erc721, is_erc1155, name_like, etc. |
Sorting Filters
| 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"
}
]
}
}
}
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
wherefilters to improve performance. - Prefer
afteroverskipfor large datasets. - Cache frequently accessed contract lists.
- Combine with
tokensquery for full collection analysis.
Related Queries
contract: For single contract details.tokens: To explore a contract's NFTs.