Skip to main content

Single Transactions

Presents the details of an onchain transaction in a simple descriptive summary with optional references to items such as apps, tokens, NFTs, and accounts. Can be useful for building an activity feed of onchain transactions or surfacing specific transaction details.

timelineEvent

Takes transactionHash and network as input. Returns detailed information about a specific transaction including:

  • Transaction details
  • Human-readable description
  • Display items such as tokens, NFTs, accounts, and more.
  • Related app information
  • Actor details

Example Use Case: Transaction Details

Let's say you want to surface details about an onchain transaction in a human-readable format with the network, app, and tokens or accounts involved. Start by passing a transactionHash and network. Then return description. The description will contain a human-readble format with variables in the form of $1, $2, $3,.... These variables reference fields from the descriptionDisplayItems object. This allows us to surface and link to dynamic onchain elements embedded in the human-readable description (e.g., vitalik.eth swapped 10 USDC...).

To make these references, add the fields TokenDisplayItem, NFTDisplayItem, NFTCollectionDisplayItem, and ActorDisplayItem. These will be returned when their type appears in the transaction. This will surface useful information about any tokens, NFTs, or account involved in the transaction. We will also display the app name and logo so we will return app with the fields displayName and imgUrl.

Example Variable

{
"transactionHash": "0x804bae8da222170bb398ed8f7a32fa9f48ed3410bf2d8fa63b06db21f6f62d15",
"network": "BASE_MAINNET"
}

Example Query

query ($transactionHash: String!, $network: Network!) {
timelineEvent(transactionHash: $transactionHash, network: $network) {
interpretation {
processedDescription
description
descriptionDisplayItems {
... on TokenDisplayItem {
type
network
tokenAddress
amountRaw
id
tokenV2 {
symbol
}
}
... on NFTDisplayItem {
type
network
collectionAddress
tokenId
quantity
nftToken {
tokenId
}
isMint
isBurn
}
... on NFTCollectionDisplayItem {
type
network
collectionAddress
quantity
}
... on ActorDisplayItem {
type
address
account {
displayName {
source
value
}
}
}
}
}
app {
app {
displayName
imgUrl
}
}
}
}
tip

It's useful to include all types of descriptionDisplayItems to account for the possible types that could appear in the transaction. You can explore all the fields available in the Sandbox.

Example Response

{
"data": {
"timelineEvent": {
"interpretation": {
"processedDescription": "Swapped 17,713.6112 TOSHI for 4.95 USDC and sent to 0x9b3a...4b30",
"description": "Swapped $1 for $2 and sent to $3",
"descriptionDisplayItems": [
{
"type": "token",
"network": "BASE_MAINNET",
"tokenAddress": "0xac1bd2486aaf3b5c0fc3fd868558b082a531b2b4",
"amountRaw": "17713611200960235617207",
"id": "VG9rZW5EaXNwbGF5SXRlbU9iamVjdC1iYXNlOjB4YWMxYmQyNDg2YWFmM2I1YzBmYzNmZDg2ODU1OGIwODJhNTMxYjJiNDoxNzcxMzYxMTIwMDk2MDIzNTYxNzIwNw==",
"tokenV2": {
"symbol": "TOSHI"
}
},
{
"type": "token",
"network": "BASE_MAINNET",
"tokenAddress": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"amountRaw": "4950000",
"id": "VG9rZW5EaXNwbGF5SXRlbU9iamVjdC1iYXNlOjB4ODMzNTg5ZmNkNmVkYjZlMDhmNGM3YzMyZDRmNzFiNTRiZGEwMjkxMzo0OTUwMDAw",
"tokenV2": {
"symbol": "USDC"
}
},
{
"type": "actor",
"address": "0x9b3a20176d2c5d0a22dae382496416a1a8934b30",
"account": {
"displayName": {
"source": "ADDRESS",
"value": "0x9b3a...4b30"
}
}
}
]
},
"app": {
"app": {
"displayName": "Coinbase Commerce",
"imgUrl": "https://storage.googleapis.com/zapper-fi-assets/apps%2Fcoinbase-commerce.png"
}
}
}
}
}
Try in sandbox
note

In this example, the variables $1 and $2 in the description make reference to the type: "token" display items. $3 makes reference to the type: "actor" item which in this example is the address that received the token transfer.


Arguments

ArgumentDescriptionType
transactionHashThe transaction hash to retreive information for.String!
networkThe network that the transaction happened on.Network!

Fields

FieldDescriptionType
keyA unique identifier.String!
networkNetwork on which the transaction happened.Network!
interpretationContains fields needed to present a human-readable transaction such as description, processedDescription, and descriptionDisplayItems.Network!
descriptionThe human-readble description of the transaction with variables referencing types such as tokens, NFTs, or accounts.String!
processedDescriptionThe human-readble description of the transaction.String!
descriptionDisplayItemsContains the fields which the variables in description make reference to.ActivityFeedDisplayItem!!
transactionContains onchain information like nounce , hash, blockNumber, gasPrice and more.OnChainTransaction!
appThe app that is associated with the transaction.Int!
displayNameReturns the display name of an address (ENS, Farcaster, Lens, etc.).Int!
actorsAddress(s) that were involved in the transaction. Could include accounts, tokens, NFTs, contracts, etc.ActorDisplayItem!
timestampRepresents date and time as number of milliseconds from start of UNIX epoch.Timestamp!
perspectiveThe address whose perspective is used in deltas.ActivityPerspective!
perspectiveDeltaObject containing different deltas such as tokenDetlasV2 and nftDeltasV2.ActivityAccountDelta!
tokenDeltasV2Returns info on the tokens transfered in the transaction such as address, amount, as well as the token object with more token specific info.FungibleTokenDeltaConnection!!
nftDeltasV2Returns info on the NFTs transfered in the transaction such as collectionAddress, tokenId, as well as attachment which surfaces other NFT specific fields.NftDeltaConnection!
interpreterIdUnique identifier for the Interpreter.String!
interpreterObject which contains info on the interpreter such as app and category.ActivityEventInterpreter!
sigHashReturns the sigHash for the transaction.String!