Contract
The Contract
object represents a contract address deployed on-chain. It contains comprehensive details about the smart contract.
type Contract {
id: ID!
type: ContractType!
isERC20: Boolean!
isERC721: Boolean!
isERC1155: Boolean!
name: String
symbol: String
decimals: Int
supportsMetadata: Boolean!
createdAt: Time!
createdBlock: Int!
holders: Int!
tokens(
first: Int = 10
skip: Int = 0
after: String
where: TokenFilter
orderBy: TokenOrderBy
orderDirection: OrderDirection
): Tokens!
}
Fields
Contract.id
● ID!
non-null scalar
Contract.type
● ContractType!
non-null enum
Contract.isERC20
● Boolean!
non-null scalar
Contract.isERC721
● Boolean!
non-null scalar
Contract.isERC1155
● Boolean!
non-null scalar
Contract.name
● String
scalar
Contract.symbol
● String
scalar
Contract.decimals
● Int
scalar
Contract.supportsMetadata
● Boolean!
non-null scalar
Contract.createdAt
● Time!
non-null scalar
Contract.createdBlock
● Int!
non-null scalar
Contract.holders
● Int!
non-null scalar
Contract.tokens
● Tokens!
non-null object
Contract.tokens.first
● Int
scalar
Contract.tokens.skip
● Int
scalar
Contract.tokens.after
● String
scalar
Contract.tokens.where
● TokenFilter
input
Contract.tokens.orderBy
● TokenOrderBy
enum
Contract.tokens.orderDirection
● OrderDirection
enum
Returned By
contract
query
Member Of
Balance
object ● Contracts
object ● Token
object
Field Descriptions
Field Name | Type | Description |
---|---|---|
id | ID! | The contract address. |
type | ContractType! | The type of contract. |
isERC20 | Boolean! | Whether the contract is an ERC-20 contract. |
isERC721 | Boolean! | Whether the contract is an ERC-721 contract. |
isERC1155 | Boolean! | Whether the contract is an ERC-1155 contract. |
name | String | The name of the contract. |
symbol | String | The symbol of the contract. |
decimals | Int | The number of decimals (for ERC-20 ). |
supportsMetadata | Boolean! | Whether the contract supports metadata. |
createdAt | Time! | When the contract was created. |
createdBlock | Int! | The block number at which the contract was created. |
holders | Int! | The number of holders. |
tokens | Tokens! | The tokens in this contract. |
Example Query
query AuditContract($contractId: ID!) {
contract(id: $contractId) {
id
type
name
symbol
holders
createdAt
}
}
Use Cases
- Contract audits (fetch comprehensive details about a contract).
- Track total holders for community growth metrics.
- NFT discovery (filter contracts by token standard, name, etc.).