Void
Query voiding events (ticket burns without stub conversion).
import { Client } from '@sceneinfrastructure/sdk'
const client = Client.create({ url: '...' })Try It
Void Namespace Demo
Query ticket voiding events. Voids are burns without stub conversion (e.g., refunds, cancellations). For check-ins, use the Stub namespace.
List voided tickets for a contract (burns without stub conversion).
await client.void.listByContract({
contractAddress,
tierId, // optional
limit: 10,
})Browser requests require CORS to be enabled.
Overview
Voiding is when tickets are burned directly without creating stubs. This is different from stubbing (check-in), where tickets are exchanged for stub tokens.
Use cases for voiding:
- Canceling tickets without marking as attended
- Refund scenarios
- Administrative removal of tickets
For check-in events (ticket to stub exchange), use the Stub namespace instead.
Methods
listByContract
List all voiding events for a contract.
import { Client } from '@sceneinfrastructure/sdk'
const client = Client.create({ url: 'https://dev.ponder.mesh.ing/sql' })
const voids = await client.void.listByContract({
contractAddress: '0x1234567890123456789012345678901234567890',
limit: 50
})
for (const v of voids) {
console.log(`${v.holderAddress} had ${v.amount} tickets voided`)
console.log(` Tier: ${v.tierId}`)
}
// Filter by tier
const tier1Voids = await client.void.listByContract({
contractAddress: '0x1234567890123456789012345678901234567890',
tierId: 1n
})Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
contractAddress | Address | required | The contract address |
tierId | bigint | - | Filter to specific tier |
limit | number | 50 | Maximum results to return |
offset | number | 0 | Number of results to skip |
Returns
Void[] - Array of voiding events.
listByHolder
List voiding events for a specific holder.
import { Client } from '@sceneinfrastructure/sdk'
const client = Client.create({ url: 'https://dev.ponder.mesh.ing/sql' })
const voids = await client.void.listByHolder({
holderAddress: '0x2345678901234567890123456789012345678901',
limit: 50
})
for (const v of voids) {
console.log(`${v.amount} tickets voided from ${v.contractAddress}`)
}
// Filter by contract
const contractVoids = await client.void.listByHolder({
holderAddress: '0x2345678901234567890123456789012345678901',
contractAddress: '0x1234567890123456789012345678901234567890'
})Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
holderAddress | Address | required | The holder address |
contractAddress | Address | - | Filter to specific contract |
limit | number | 50 | Maximum results to return |
offset | number | 0 | Number of results to skip |
Returns
Void[] - Array of voiding events.
listByTier
List voiding events for a specific tier.
import { Client } from '@sceneinfrastructure/sdk'
const client = Client.create({ url: 'https://dev.ponder.mesh.ing/sql' })
const voids = await client.void.listByTier({
contractAddress: '0x1234567890123456789012345678901234567890',
tierId: 1n,
limit: 50
})
let totalVoided = 0n
for (const v of voids) {
totalVoided += v.amount
}
console.log(`Total voided from tier 1: ${totalVoided}`)Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
contractAddress | Address | required | The contract address |
tierId | bigint | required | The tier ID |
limit | number | 50 | Maximum results to return |
offset | number | 0 | Number of results to skip |
Returns
Void[] - Array of voiding events for the tier.
Types
Void
import type { Address, Hex } from 'viem'
type Void = {
id: string
contractAddress: Address
holderAddress: Address
tierId: bigint
amount: bigint
createdAt: bigint
createdAtBlock: bigint
createdAtLogIndex: number
creationTxHash: Hex
updatedAt: bigint
updatedAtBlock: bigint
updatedAtLogIndex: number
updatedTxHash: Hex | null
}| Field | Type | Description |
|---|---|---|
id | string | Unique event identifier |
contractAddress | Address | The contract address |
holderAddress | Address | The holder whose tickets were voided |
tierId | bigint | The tier ID |
amount | bigint | Number of tickets voided |
creationTxHash | Hex | Transaction hash |
Schema
Zod Validation
import { Void } from '@sceneinfrastructure/sdk'
const data = {} // Data to validate
const result = Void.schema.safeParse(data)
if (result.success) {
console.log('Valid void event:', result.data)
}Void vs Stub
| Event | Action | Result |
|---|---|---|
| Stub (Check-in) | Ticket burned, stub minted | Holder gets stub token |
| Void | Ticket burned directly | No stub token |
Use stubs for attendance tracking (check-ins). Use voids for administrative actions like cancellations or refunds.