useContractMetadata

Get the metadata of given contract

Example

const { data: contractMetadata, isLoading } =
useContractMetadata(contract);
function useContractMetadata(
contract: RequiredParam<TContract>,
): UseQueryResult<
RequiredParam<TContract> extends undefined
? undefined
: Awaited<ReturnType<TContract["metadata"]["get"]>>,
unknown
>;

Parameters

The ValidContractInstance instance of the contract to get the metadata for

Type

let contract: RequiredParam<TContract>;

Returns

let returnType: UseQueryResult<
RequiredParam<TContract> extends undefined
? undefined
: Awaited<ReturnType<TContract["metadata"]["get"]>>,
unknown
>;

A Query result object that includes the contract metadata of the deployed contract