useContractMetadata
Get the metadata of this contract
function useContractMetadata<TContract extends ValidContractInstance>(
contract: RequiredParam<TContract>,
): UseQueryResult<
RequiredParam<TContract> extends undefined
? undefined
: Awaited<ReturnType<TContract["metadata"]["get"]>>,
unknown
>;
Parameters
Returns
a response object that includes the contract metadata of the deployed contract
type ReturnType = UseQueryResult<
RequiredParam<TContract> extends undefined
? undefined
: Awaited<ReturnType<TContract["metadata"]["get"]>>,
unknown
>;
Example
const { data: contractMetadata, isLoading } =
useContractMetadata(contract);