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

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

ParameterTypeDescription
contractAddressAddressThe 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

ParameterTypeDefaultDescription
creatorAddress-Filter by creator address
ownerAddress-Filter by owner address
limitnumber50Maximum results to return
offsetnumber0Number 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

ParameterTypeDefaultDescription
creatorAddressrequiredThe creator address
limitnumber50Maximum 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

ParameterTypeDefaultDescription
ownerAddressrequiredThe owner address
limitnumber50Maximum 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
}
FieldTypeDescription
contractAddressAddressThe deployed contract address
contractURIstringContract metadata URI
creatorAddressAddressAddress that deployed the contract
implementationAddressAddressImplementation contract address
ownerAddressAddressCurrent owner address
createdAtbigintCreation timestamp
createdAtBlockbigintBlock number of creation
creationTxHashHexTransaction hash of creation
updatedAtbigintLast 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)
}