Skip to main content

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"
}
}
}
}
}
Try in sandbox

Arguments

ArgumentDescriptionType
addressThe contract address you want to identifyString!
networkThe network where the contract is deployedNetwork!
allowInferredWhether to allow inferred contract data, default is trueBoolean = true

Fields

Contract Fields

FieldDescriptionType
addressThe queried contract addressAddress!
networkNetwork where the contract is deployedNetwork!
appAssociated protocol/application details (if any)App

App Fields

FieldDescriptionType
databaseIdUnique application IDInt!
displayNameThe typical display name of the applicationString!
descriptionDescription of the applicationString!
urlApplication websiteString
imgUrlApplication image URLString!
slugUnique application slugString!
linksApplication linksAppLinks
categoryIdCategory IDInt
categoryApplication categoryAppCategoryObject
twitterUrlTwitter profile URL (if any)String
farcasterUrlFarcaster profile URL (if any)String
createdAtCreation timestampTimestamp!
note

If no associated application is found, the app field will be null.