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
| Parameter | Type | Default | Description |
|---|---|---|---|
contractAddress | Address | required | The contract address |
tokenId | bigint | required | The token ID |
limit | number | 50 | Maximum results to return |
offset | number | 0 | Number 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
| Parameter | Type | Default | Description |
|---|---|---|---|
from | Address | required | The sender address |
contractAddress | Address | - | Filter to specific contract |
limit | number | 50 | Maximum results to return |
offset | number | 0 | Number 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
| Parameter | Type | Default | Description |
|---|---|---|---|
to | Address | required | The recipient address |
contractAddress | Address | - | Filter to specific contract |
limit | number | 50 | Maximum results to return |
offset | number | 0 | Number 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
| Parameter | Type | Default | Description |
|---|---|---|---|
contractAddress | Address | required | The contract address |
tokenId | bigint | - | Filter to specific token |
limit | number | 50 | Maximum results to return |
offset | number | 0 | Number 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
| Parameter | Type | Default | Description |
|---|---|---|---|
contractAddress | Address | required | The contract address |
tokenId | bigint | - | Filter to specific token |
limit | number | 50 | Maximum results to return |
offset | number | 0 | Number 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
}| Field | Type | Description |
|---|---|---|
id | string | Unique transfer identifier |
contractAddress | Address | The contract address |
tokenId | bigint | The token ID |
fromAddress | Address | null | Sender (null for mints) |
toAddress | Address | null | Recipient (null for burns) |
quantity | bigint | Number of tokens transferred |
creationTxHash | Hex | Transaction 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)
}