@thruputchain/client
    Preparing search index...

    Function hashContract

    • Return the network identity of a protocol contract.

      The hash covers the canonical encoded Contract, including its type and payload framing. Hashing only the raw artifact bytes produces a different value and therefore a different derived address.

      Parameters

      • contract: Contract

      Returns SHA256Hash

      import {
      deriveContractAddress,
      hashContract,
      } from "@thruputchain/client";

      const contractHash = hashContract(contract);
      const address = deriveContractAddress(wallet, deploymentNonce, contractHash);