useCompilerMetadata
Hook for retrieving information such as the ABI, license, and metadata of a smart contract using it's contract address.
import { useCompilerMetadata } from "@thirdweb-dev/react";
const { data, isLoading, error } = useCompilerMetadata("{{contract_address}}");
Usage
Provide your contract address as the argument.
import { useCompilerMetadata } from "@thirdweb-dev/react";
// Your smart contract address
const contractAddress = "{{contract_address}}";
function App() {
const { data, isLoading, error } = useCompilerMetadata(contractAddress);
}
export default App;
Return Value
The hook's data
property, once loaded, contains the following properties: