EventContract
Query deployed Gatekeeper1155 contracts.
import { Client } from '@sceneinfrastructure/sdk'
const client = Client.create({ url: '...' })Try It
EventContract Namespace Demo
Query deployed Gatekeeper1155 contracts. These are the core event contracts that manage ticket tiers, sales, and permissions.
List contracts with optional filters.
await client.eventContract.list({
limit: 10,
orderBy: 'createdAt',
order: 'desc',
})Browser requests require CORS to be enabled.
Methods
get
Get a single contract by address.
import { Client } from '@sceneinfrastructure/sdk'
const client = Client.create({ url: 'https://ponder.mesh.xyz' })
const contract = await client.eventContract.get({
contractAddress: '0x1234567890123456789012345678901234567890'
})
if (contract) {
console.log('Owner:', contract.ownerAddress)
console.log('Creator:', contract.creatorAddress)
console.log('Contract URI:', contract.contractURI)
}Parameters
| Parameter | Type | Description |
|---|---|---|
contractAddress | Address | The contract address to look up |
Returns
EventContract | null - The contract data or null if not found.
list
List contracts with optional filters.
import { Client } from '@sceneinfrastructure/sdk'
const client = Client.create({ url: 'https://ponder.mesh.xyz' })
// List all contracts
const contracts = await client.eventContract.list({
limit: 20,
offset: 0
})
// List contracts by creator
const myContracts = await client.eventContract.list({
creator: '0x2345678901234567890123456789012345678901',
limit: 10
})
// List contracts by owner
const ownedContracts = await client.eventContract.list({
owner: '0x2345678901234567890123456789012345678901',
orderBy: 'createdAt',
order: 'desc'
})Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
creator | Address | - | Filter by creator address |
owner | Address | - | Filter by owner address |
limit | number | 50 | Maximum results to return |
offset | number | 0 | Number of results to skip |
orderBy | 'createdAt' | 'updatedAt' | 'createdAt' | Sort field |
order | 'asc' | 'desc' | 'desc' | Sort direction |
Returns
EventContract[] - Array of matching contracts.
listByCreator
List contracts created by a specific address.
import { Client } from '@sceneinfrastructure/sdk'
const client = Client.create({ url: 'https://ponder.mesh.xyz' })
const myContracts = await client.eventContract.listByCreator({
creator: '0x2345678901234567890123456789012345678901',
limit: 10
})
for (const contract of myContracts) {
console.log(contract.contractAddress)
}Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
creator | Address | required | The creator address |
limit | number | 50 | Maximum results to return |
Returns
EventContract[] - Array of contracts created by the address.
listByOwner
List contracts owned by a specific address.
import { Client } from '@sceneinfrastructure/sdk'
const client = Client.create({ url: 'https://ponder.mesh.xyz' })
const ownedContracts = await client.eventContract.listByOwner({
owner: '0x2345678901234567890123456789012345678901',
limit: 10
})Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
owner | Address | required | The owner address |
limit | number | 50 | Maximum results to return |
Returns
EventContract[] - Array of contracts owned by the address.
Types
EventContract
import type { Address, Hex } from 'viem'
type EventContract = {
contractAddress: Address
contractURI: string
creatorAddress: Address
implementationAddress: Address
ownerAddress: Address
createdAt: bigint
createdAtBlock: bigint
createdAtLogIndex: number
creationTxHash: Hex
updatedAt: bigint
updatedAtBlock: bigint
updatedAtLogIndex: number
updatedTxHash: Hex | null
}| Field | Type | Description |
|---|---|---|
contractAddress | Address | The deployed contract address |
contractURI | string | Contract metadata URI |
creatorAddress | Address | Address that deployed the contract |
implementationAddress | Address | Implementation contract address |
ownerAddress | Address | Current owner address |
createdAt | bigint | Creation timestamp |
createdAtBlock | bigint | Block number of creation |
creationTxHash | Hex | Transaction hash of creation |
updatedAt | bigint | Last update timestamp |
Schema
Zod Validation
import { EventContract } from '@sceneinfrastructure/sdk'
const data = {
contractAddress: '0x1234567890123456789012345678901234567890',
contractURI: 'https://example.com/metadata.json',
creatorAddress: '0x2345678901234567890123456789012345678901',
implementationAddress: '0x3456789012345678901234567890123456789012',
ownerAddress: '0x2345678901234567890123456789012345678901',
createdAt: 1700000000n,
createdAtBlock: 100000n,
createdAtLogIndex: 0,
creationTxHash: '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef',
updatedAt: 1700000000n,
updatedAtBlock: 100000n,
updatedAtLogIndex: 0,
updatedTxHash: null,
}
const result = EventContract.schema.safeParse(data)
if (result.success) {
console.log('Valid contract:', result.data)
}