Contract
A utility endpoint that helps identify which application/protocol a smart contract belongs to on a given network.
contract
Takes a contract address
and network
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",
"network": "BASE_MAINNET"
}
Example Query
query ($address: String!, $network: Network!) {
contract(address: $address, network: $network) {
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! |
network | The network where the contract is deployed | Network! |
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.