Vana SDK - v3.13.3
    Preparing search index...

    Function getContractInfo

    • Gets contract information without creating a contract instance.

      Type Parameters

      • T extends AddressedVanaContract

      Parameters

      • contract: T

        Name of the contract. Use const assertion for typed ABI.

      • chainId: VanaChainId = ...

        Chain ID to get contract info for. Defaults to Vana mainnet (1480).

      Returns ContractInfo<{}[T]>

      Contract information with typed ABI

      Returns contract address and ABI for manual contract interaction or custom client configuration. Useful when you need contract details but don't want to create a client connection.

      const info = getContractInfo("DataRegistry" as const, 14800);
      console.log(info.address); // Typed as Address
      console.log(info.abi); // Fully typed ABI

      // Use with custom viem client
      const contract = getContract({
      ...info,
      client: customClient
      });