@thruputchain/client
    Preparing search index...

    Function getContract

    • Bind a generated interface to an address and public client. Views preserve heights and events and accept cancellation and minimum-height constraints. A minimum height is a freshness floor; use readViews when several results must come from the same snapshot.

      Type Parameters

      Parameters

      • options: {
            address: ContractAddress;
            binding: T;
            client: Pick<ThruputClient, "simulateInvocation">;
        }

      Returns ContractInstance<T>

      const token = getContract({ binding: ERC20.v0_1, address, client });
      const balance = await token.getBalanceOf.view({ args: { addr: owner }, signal });