Contract
A utility endpoint that helps identify which application/protocol a smart contract belongs to on a given network.
Try it nowcontractV2
Takes a contract address and chainId as input and returns information about any associated application or protocol. This is particularly useful when you have a contract address and need to determine which protocol it belongs to.
Example Use Case: Protocol Identification
When you encounter a contract address in a transaction or elsewhere, you can use this endpoint to identify which protocol that contract is associated with. For example, you could use this to:
- Identify which DEX a router contract belongs to
- Determine which protocol a lending pool, or LP token belongs to
Example Variables
{
  "address": "0x4bbfd120d9f352a0bed7a014bd67913a2007a878",
  "chainId": 8453
}
Example Query
query ($address: String!, $chainId: Int!) {
  contractV2(address: $address, chainId: $chainId) {
    address
    network
    app {
      databaseId
      displayName
      url
      slug
      imgUrl
      category {
        name
        slug
      }
    }
  }
}
Example Response
{
  "data": {
    "contract": {
      "address": "0x794a61358d6845594f94dc1db02a252b5b4814ad",
      "network": "ARBITRUM_MAINNET",
      "app": {
        "databaseId": 5,
        "displayName": "Aave V3",
        "url": "https://aave.com/",
        "slug": "aave-v3",
        "imgUrl": "https://storage.googleapis.com/zapper-fi-assets/apps%2Faave-v3.png",
        "category": {
          "name": "DeFi",
          "slug": "defi"
        }
      }
    }
  }
}
Arguments
| Argument | Description | Type | 
|---|---|---|
| address | The contract address you want to identify | String! | 
| chainId | The chain where the contract is deployed | Int! | 
| allowInferred | Whether to allow inferred contract data, default is true | Boolean = true | 
Fields
Contract Fields
| Field | Description | Type | 
|---|---|---|
| address | The queried contract address | Address! | 
| network | Network where the contract is deployed | Network! | 
| app | Associated protocol/application details (if any) | App | 
App Fields
| Field | Description | Type | 
|---|---|---|
| databaseId | Unique application ID | Int! | 
| displayName | The typical display name of the application | String! | 
| description | Description of the application | String! | 
| url | Application website | String | 
| imgUrl | Application image URL | String! | 
| slug | Unique application slug | String! | 
| links | Application links | AppLinks | 
| categoryId | Category ID | Int | 
| category | Application category | AppCategoryObject | 
| twitterUrl | Twitter profile URL (if any) | String | 
| farcasterUrl | Farcaster profile URL (if any) | String | 
| createdAt | Creation timestamp | Timestamp! | 
note
If no associated application is found, the app field will be null.