Skip to content
Function: useSignedReadContract()

seismic-react


seismic-react / useSignedReadContract

Function: useSignedReadContract()

function useSignedReadContract<TAbi, TFunctionName, TArgs>(config): object

Defined in: packages/seismic-react/src/hooks/signedReadContract.ts:38

Similar to wagmi's useReadContract hook, but uses signedReadContract instead.

Type Parameters

TAbi extends Abi | readonly unknown[]

TFunctionName extends string

TArgs extends unknown

Parameters

config

UseSignedReadContractConfig<TAbi, TFunctionName, TArgs>

The configuration object.

  • address (Hex) - The address of the contract.
  • abi (Abi) - The contract ABI.
  • functionName (string) - The name of the contract function to call.
  • args (array) - The arguments to pass to the contract function.

Returns

object

An object containing:

  • signedRead (function): A function to execute signed reads.
  • isLoading (boolean): Indicates if the read operation is in progress.
  • hash (string): The transaction hash from the last successful call to signedRead.
  • error (string): Any error message from the most recent call to signedRead, if present.
NameTypeDefault valueDefined in
errornull | Error-packages/seismic-react/src/hooks/signedReadContract.ts:90
isLoadingboolean-packages/seismic-react/src/hooks/signedReadContract.ts:89
read() => Promise<unknown>signedReadpackages/seismic-react/src/hooks/signedReadContract.ts:88
signedRead() => Promise<unknown>-packages/seismic-react/src/hooks/signedReadContract.ts:87