- useReadContract<TContract, TFunctionName>(contract: null | TContract | Contract, functionName: TFunctionName, args: Parameters<ContractFunctions<TContract>[TFunctionName]>, options?: { autoUpdateInterval?: number }): { error: null | Error; loading: boolean; response: undefined | Awaited<ReturnType<ContractFunctions<TContract>[TFunctionName]>>; mutate: any }
Type parameters
Parameters
contract: null | TContract | Contract
functionName: TFunctionName
args: Parameters<ContractFunctions<TContract>[TFunctionName]>
optionaloptions: { autoUpdateInterval?: number }
Returns { error: null | Error; loading: boolean; response: undefined | Awaited<ReturnType<ContractFunctions<TContract>[TFunctionName]>>; mutate: any }
error: null | Error
loading: boolean
response: undefined | Awaited<ReturnType<ContractFunctions<TContract>[TFunctionName]>>
mutate: function
- mutate(): Promise<undefined | { error: Error; loading: boolean; response: any }>
Returns Promise<undefined | { error: Error; loading: boolean; response: any }>
Read from contract