Skip to main content

useCompilerMetadata() function

Signature:

export declare function useCompilerMetadata(
contractAddress: RequiredParam<ContractAddress>,
): UseQueryResult<
{
name: string;
metadata: Record<string, any>;
abi: {
[x: string]: any;
type: string;
name: string;
outputs: {
[x: string]: any;
components?:
| {
[x: string]: any;
type: string;
name: string;
}[]
| undefined;
stateMutability?: string | undefined;
type: string;
name: string;
}[];
inputs: {
[x: string]: any;
components?:
| {
[x: string]: any;
type: string;
name: string;
}[]
| undefined;
stateMutability?: string | undefined;
type: string;
name: string;
}[];
}[];
info: {
title?: string | undefined;
author?: string | undefined;
details?: string | undefined;
notice?: string | undefined;
};
licenses: string[];
} | null,
unknown
>;

Parameters

ParameterTypeDescription
contractAddressRequiredParam<ContractAddress>

Returns:

UseQueryResult<{ name: string; metadata: Record<string, any>; abi: { [x: string]: any; type: string; name: string; outputs: { [x: string]: any; components?: { [x: string]: any; type: string; name: string; }[] | undefined; stateMutability?: string | undefined; type: string; name: string; }[]; inputs: { [x: string]: any; components?: { [x: string]: any; type: string; name: string; }[] | undefined; stateMutability?: string | undefined; type: string; name: string; }[]; }[]; info: { title?: string | undefined; author?: string | undefined; details?: string | undefined; notice?: string | undefined; }; licenses: string[]; } | null, unknown>