useCompilerMetadata

Hook for retrieving information such as the ABI, license, and metadata of a smart contract using it's contract address.

Example

import { useCompilerMetadata } from "@thirdweb-dev/react";
function App() {
const { data, isLoading, error } =
useCompilerMetadata(contractAddress);
}
export default App;
function useCompilerMetadata(
contractAddress: RequiredParam<string>,
): UseQueryResult<PublishedMetadata | null>;

Parameters

The address of the deployed contract

Type

let contractAddress: RequiredParam<string>;

Returns

let returnType: UseQueryResult<PublishedMetadata | null>;

Query result containing the compiler metadata of the deployed contract in the data property