Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Transfer

Query ERC1155 transfer history.

import { Client } from '@sceneinfrastructure/sdk'
 
const client = Client.create({ url: '...' })

Try It

Transfer Namespace Demo
Query transfer history including mints and burns. Track token movement between addresses.
Get transfer history for a specific token.
await client.transfer.listByToken({
  contractAddress,
  tokenId,
  limit: 10,
  order: 'desc',
})
Browser requests require CORS to be enabled.

Methods

listByToken

List transfers for a specific token.

import { Client } from '@sceneinfrastructure/sdk'
 
const client = Client.create({ url: 'https://ponder.mesh.xyz' })
 
const transfers = await client.transfer.listByToken({
  contractAddress: '0x1234567890123456789012345678901234567890',
  tokenId: 1n,
  limit: 50
})
 
for (const transfer of transfers) {
  const type = transfer.fromAddress === null ? 'MINT' :
               transfer.toAddress === null ? 'BURN' : 'TRANSFER'
  console.log(`${type}: ${transfer.quantity} tokens`)
}

Parameters

ParameterTypeDefaultDescription
contractAddressAddressrequiredThe contract address
tokenIdbigintrequiredThe token ID
limitnumber50Maximum results to return
offsetnumber0Number of results to skip
order'asc' | 'desc''desc'Sort by creation time

Returns

Transfer[] - Array of transfer records.


listByFrom

List transfers sent from a specific address.

import { Client } from '@sceneinfrastructure/sdk'
 
const client = Client.create({ url: 'https://ponder.mesh.xyz' })
 
const sent = await client.transfer.listByFrom({
  from: '0x2345678901234567890123456789012345678901',
  limit: 50
})
 
for (const transfer of sent) {
  console.log(`Sent ${transfer.quantity} of token ${transfer.tokenId}`)
}
 
// Filter by contract
const sentFromContract = await client.transfer.listByFrom({
  from: '0x2345678901234567890123456789012345678901',
  contractAddress: '0x1234567890123456789012345678901234567890'
})

Parameters

ParameterTypeDefaultDescription
fromAddressrequiredThe sender address
contractAddressAddress-Filter to specific contract
limitnumber50Maximum results to return
offsetnumber0Number of results to skip

Returns

Transfer[] - Array of transfer records.


listByTo

List transfers received by a specific address.

import { Client } from '@sceneinfrastructure/sdk'
 
const client = Client.create({ url: 'https://ponder.mesh.xyz' })
 
const received = await client.transfer.listByTo({
  to: '0x2345678901234567890123456789012345678901',
  limit: 50
})
 
for (const transfer of received) {
  console.log(`Received ${transfer.quantity} of token ${transfer.tokenId}`)
}
 
// Filter by contract
const receivedFromContract = await client.transfer.listByTo({
  to: '0x2345678901234567890123456789012345678901',
  contractAddress: '0x1234567890123456789012345678901234567890'
})

Parameters

ParameterTypeDefaultDescription
toAddressrequiredThe recipient address
contractAddressAddress-Filter to specific contract
limitnumber50Maximum results to return
offsetnumber0Number of results to skip

Returns

Transfer[] - Array of transfer records.


listMints

List mint events (transfers from the zero address).

import { Client } from '@sceneinfrastructure/sdk'
 
const client = Client.create({ url: 'https://ponder.mesh.xyz' })
 
const mints = await client.transfer.listMints({
  contractAddress: '0x1234567890123456789012345678901234567890',
  limit: 50
})
 
for (const mint of mints) {
  console.log(`Minted ${mint.quantity} of token ${mint.tokenId} to ${mint.toAddress}`)
}
 
// Filter by token ID
const tierMints = await client.transfer.listMints({
  contractAddress: '0x1234567890123456789012345678901234567890',
  tokenId: 1n
})

Parameters

ParameterTypeDefaultDescription
contractAddressAddressrequiredThe contract address
tokenIdbigint-Filter to specific token
limitnumber50Maximum results to return
offsetnumber0Number of results to skip

Returns

Transfer[] - Array of mint records (where fromAddress is null).


listBurns

List burn events (transfers to the zero address).

import { Client } from '@sceneinfrastructure/sdk'
 
const client = Client.create({ url: 'https://ponder.mesh.xyz' })
 
const burns = await client.transfer.listBurns({
  contractAddress: '0x1234567890123456789012345678901234567890',
  limit: 50
})
 
for (const burn of burns) {
  console.log(`Burned ${burn.quantity} of token ${burn.tokenId} from ${burn.fromAddress}`)
}
 
// Filter by token ID
const tierBurns = await client.transfer.listBurns({
  contractAddress: '0x1234567890123456789012345678901234567890',
  tokenId: 1n
})

Parameters

ParameterTypeDefaultDescription
contractAddressAddressrequiredThe contract address
tokenIdbigint-Filter to specific token
limitnumber50Maximum results to return
offsetnumber0Number of results to skip

Returns

Transfer[] - Array of burn records (where toAddress is null).


Types

Transfer

import type { Address, Hex } from 'viem'
 
type Transfer = {
  id: string
  contractAddress: Address
  tokenId: bigint
  fromAddress: Address | null  // null for mints
  toAddress: Address | null    // null for burns
  quantity: bigint
  createdAt: bigint
  createdAtBlock: bigint
  createdAtLogIndex: number
  creationTxHash: Hex
  updatedAt: bigint
  updatedAtBlock: bigint
  updatedAtLogIndex: number
  updatedTxHash: Hex | null
}
FieldTypeDescription
idstringUnique transfer identifier
contractAddressAddressThe contract address
tokenIdbigintThe token ID
fromAddressAddress | nullSender (null for mints)
toAddressAddress | nullRecipient (null for burns)
quantitybigintNumber of tokens transferred
creationTxHashHexTransaction hash

Transfer Types

  • Mint: fromAddress === null - New tokens created
  • Burn: toAddress === null - Tokens destroyed
  • Transfer: Both addresses present - Standard transfer

Schema

Zod Validation

import { Transfer } from '@sceneinfrastructure/sdk'
 
const data = {
  id: 'transfer_123',
  contractAddress: '0x1234567890123456789012345678901234567890',
  tokenId: 1n,
  fromAddress: null,
  toAddress: '0x2345678901234567890123456789012345678901',
  quantity: 1n,
  createdAt: 1700000000n,
  createdAtBlock: 100000n,
  createdAtLogIndex: 0,
  creationTxHash: '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef',
  updatedAt: 1700000000n,
  updatedAtBlock: 100000n,
  updatedAtLogIndex: 0,
  updatedTxHash: null,
}
 
const result = Transfer.schema.safeParse(data)
 
if (result.success) {
  console.log('Valid transfer:', result.data)
}