Skip to content

getContract

getContract(options): object

Defined in: packages/synapse-core/src/pdp-verifier/index.ts:57

Get the PDP Verifier contract

ParameterTypeDescription
optionsOptionsTypegetContract.OptionsType

object

Contract getContract.OutputType

abi: Abi | readonly unknown[]

address: `0x${string}`

import { getContract } from '@filoz/synapse-core/pdp-verifier'
import { calibration } from '@filoz/synapse-core/chains'
import { createPublicClient, http } from 'viem'
const client = createPublicClient({
chain: calibration,
transport: http(),
})
const contract = getContract({ client })
const dataSetId = 1n
const isLive = await contract.read.dataSetLive([dataSetId])

Errors getContract.ErrorType