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

ABIs

Contract ABIs and config objects exported from the SDK.

import {
  gatekeeperAbi,
  gatekeeper1155Abi,
  gatekeeper1155FactoryAbi,
} from '@sceneinfrastructure/sdk'

Available ABIs

gatekeeperAbi

The Gatekeeper contract ABI for sales and purchases.

import { gatekeeperAbi } from '@sceneinfrastructure/sdk'
 
// Use with viem
// const hash = await walletClient.writeContract({
//   address: gatekeeperAddress[chainId],
//   abi: gatekeeperAbi,
//   functionName: 'purchase',
//   args: [saleKey, purchaseParams],
// })

Key functions:

  • registerSale - Register a new sale configuration
  • updateSale - Update an existing sale
  • purchase - Execute a purchase
  • purchaseWithApproval - Execute a purchase with EIP-712 signature
  • getPrice - Calculate purchase price with fees
  • withdraw - Withdraw funds

gatekeeper1155Abi

The Gatekeeper1155 ERC1155 contract ABI for ticket operations.

import { gatekeeper1155Abi } from '@sceneinfrastructure/sdk'
 
// Use with viem
// const balance = await publicClient.readContract({
//   address: contractAddress,
//   abi: gatekeeper1155Abi,
//   functionName: 'balanceOf',
//   args: [userAddress, tokenId],
// })

Key functions:

  • adminMint - Mint tickets (requires MINTER_ROLE, HOST_ROLE, or ADMIN_ROLE)
  • adminStubTickets - Check-in attendees (requires DOOR_ROLE, HOST_ROLE, or ADMIN_ROLE)
  • voidTickets - Burn tickets (requires ADMIN_ROLE, HOST_ROLE, or MINTER_ROLE)
  • setupNewTier - Create a new token tier
  • updateToken - Update tier metadata
  • grantRoles / revokeRoles - Role management
  • balanceOf - Check ticket balance
  • getTierInfo - Get tier metadata

gatekeeper1155FactoryAbi

The factory contract ABI for deploying ticket contracts.

import { gatekeeper1155FactoryAbi } from '@sceneinfrastructure/sdk'
 
// Use with viem
// const { request } = await publicClient.simulateContract({
//   address: gatekeeper1155FactoryAddress[chainId],
//   abi: gatekeeper1155FactoryAbi,
//   functionName: 'deploy',
//   args: [implementation, salt, owner, contractURI, calls],
// })

Key functions:

  • deploy - Deploy a new Gatekeeper1155 proxy
  • predictDeterministicAddress - Calculate CREATE2 address

Config Objects

For convenience, the SDK also exports config objects that combine addresses and ABIs:

import {
  gatekeeperConfig,
  gatekeeper1155Config,
  gatekeeper1155FactoryConfig,
} from '@sceneinfrastructure/sdk'
 
// Each config contains address and abi
console.log(gatekeeperConfig.address[8453])
console.log(gatekeeperConfig.abi)

Usage with SDK Modules

The SDK modules handle ABI encoding internally, so you typically don't need to use ABIs directly:

import { Gatekeeper1155 } from '@sceneinfrastructure/sdk'
 
// SDK encodes the ABI call for you
const { to, data } = Gatekeeper1155.prepareAdminMint({
  contract: '0x...',
  recipient: '0x...',
  tokenId: 1n,
  quantity: 1n,
})
 
// Just send the transaction
// await walletClient.sendTransaction({ to, data })

However, ABIs are useful for:

  • Reading contract state with publicClient.readContract
  • Using viem's simulateContract for gas estimation
  • Building custom integrations

Usage Example

import {
  gatekeeperAbi,
  gatekeeperAddress,
  gatekeeper1155Abi,
} from '@sceneinfrastructure/sdk'
 
const chainId = 8453 // Base
 
// Read sale state
// const sale = await publicClient.readContract({
//   address: gatekeeperAddress[chainId],
//   abi: gatekeeperAbi,
//   functionName: 'getSale',
//   args: [saleKeyId],
// })
 
// Read ticket balance
// const balance = await publicClient.readContract({
//   address: contractAddress,
//   abi: gatekeeper1155Abi,
//   functionName: 'balanceOf',
//   args: [userAddress, 1n],
// })