Skip to main content

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 NameTypeDescription
idID!The contract address.
typeContractType!The type of contract.
isERC20Boolean!Whether the contract is an ERC-20 contract.
isERC721Boolean!Whether the contract is an ERC-721 contract.
isERC1155Boolean!Whether the contract is an ERC-1155 contract.
nameStringThe name of the contract.
symbolStringThe symbol of the contract.
decimalsIntThe number of decimals (for ERC-20).
supportsMetadataBoolean!Whether the contract supports metadata.
createdAtTime!When the contract was created.
createdBlockInt!The block number at which the contract was created.
holdersInt!The number of holders.
tokensTokens!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.).