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 configurationupdateSale- Update an existing salepurchase- Execute a purchasepurchaseWithApproval- Execute a purchase with EIP-712 signaturegetPrice- Calculate purchase price with feeswithdraw- 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 tierupdateToken- Update tier metadatagrantRoles/revokeRoles- Role managementbalanceOf- Check ticket balancegetTierInfo- 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 proxypredictDeterministicAddress- 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
simulateContractfor 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],
// })