seismic-react / useSignedReadContract
Function: useSignedReadContract()
function useSignedReadContract<TAbi, TFunctionName, TArgs>(config): objectDefined 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 tosignedRead.error(string): Any error message from the most recent call tosignedRead, if present.
| Name | Type | Default value | Defined in |
|---|---|---|---|
error | null | Error | - | packages/seismic-react/src/hooks/signedReadContract.ts:90 |
isLoading | boolean | - | packages/seismic-react/src/hooks/signedReadContract.ts:89 |
read | () => Promise<unknown> | signedRead | packages/seismic-react/src/hooks/signedReadContract.ts:88 |
signedRead | () => Promise<unknown> | - | packages/seismic-react/src/hooks/signedReadContract.ts:87 |