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: "LuckyGuess" });

This example retrieves the details of the deployed LuckyGuess contract bundled with the default template and stores them in the deployedContractData object.

Configuration​

ParameterTypeRequiredDescription
contractNamestringYesName of the contract.
chainIdnumberNoChain ID of blockchain contract is deployed to

Return Value​

  • data: Object containing address and abi of contract.
  • isLoading: Boolean indicating whether the data is loaded