Skip to main content

useDeployedContractInfo

Use this hook to fetch details about a deployed smart contract, including the ABI and address.

const { data: deployedContractData } = useDeployedContractInfo({ contractName: "YourContract" });

This example retrieves the details of the deployed contract with the specified name and stores the details in the deployedContractData object.

Configurationโ€‹

ParameterTypeDescription
contractNamestringName of the contract.
chainId (optional)stringId of the chain the contract lives on. Defaults to targetNetworks[0].id

Return Valueโ€‹

  • data: Object containing address and abi of contract.