A factory to create and deploy one or more instance of the Lodash smart contract and to create one or more app clients to interact with those (or other) app instances

Constructors

  • Creates a new instance of LodashFactory

    Parameters

    • params: Omit<AppFactoryParams, "appSpec">

      The parameters to initialise the app factory with

    Returns LodashFactory

Properties

appFactory: AppFactory

The underlying AppFactory for when you want to have more flexibility

createTransaction: {
    create: {
        bare: (
            params?: {
                accountReferences?: (string | Address)[];
                appReferences?: bigint[];
                args?: Uint8Array<ArrayBufferLike>[];
                assetReferences?: bigint[];
                boxReferences?: (BoxReference | BoxIdentifier)[];
                deletable?: boolean;
                deployTimeParams?: TealTemplateParams;
                extraFee?: AlgoAmount;
                extraProgramPages?: number;
                firstValidRound?: bigint;
                lastValidRound?: bigint;
                lease?: string | Uint8Array<ArrayBufferLike>;
                maxFee?: AlgoAmount;
                note?: string | Uint8Array<ArrayBufferLike>;
                onComplete?: NoOpOC;
                rekeyTo?: string | Address;
                schema?: {
                    globalByteSlices: number;
                    globalInts: number;
                    localByteSlices: number;
                    localInts: number;
                };
                sender?: string
                | Address;
                signer?: TransactionSigner | TransactionSignerAccount;
                staticFee?: AlgoAmount;
                updatable?: boolean;
                validityWindow?: number | bigint;
            },
        ) => Promise<Transaction>;
    };
} = ...

Create transactions for the current app

Type declaration

  • create: {
        bare: (
            params?: {
                accountReferences?: (string | Address)[];
                appReferences?: bigint[];
                args?: Uint8Array<ArrayBufferLike>[];
                assetReferences?: bigint[];
                boxReferences?: (BoxReference | BoxIdentifier)[];
                deletable?: boolean;
                deployTimeParams?: TealTemplateParams;
                extraFee?: AlgoAmount;
                extraProgramPages?: number;
                firstValidRound?: bigint;
                lastValidRound?: bigint;
                lease?: string | Uint8Array<ArrayBufferLike>;
                maxFee?: AlgoAmount;
                note?: string | Uint8Array<ArrayBufferLike>;
                onComplete?: NoOpOC;
                rekeyTo?: string | Address;
                schema?: {
                    globalByteSlices: number;
                    globalInts: number;
                    localByteSlices: number;
                    localInts: number;
                };
                sender?: string
                | Address;
                signer?: TransactionSigner | TransactionSignerAccount;
                staticFee?: AlgoAmount;
                updatable?: boolean;
                validityWindow?: number | bigint;
            },
        ) => Promise<Transaction>;
    }

    Gets available create methods

    • bare: (
          params?: {
              accountReferences?: (string | Address)[];
              appReferences?: bigint[];
              args?: Uint8Array<ArrayBufferLike>[];
              assetReferences?: bigint[];
              boxReferences?: (BoxReference | BoxIdentifier)[];
              deletable?: boolean;
              deployTimeParams?: TealTemplateParams;
              extraFee?: AlgoAmount;
              extraProgramPages?: number;
              firstValidRound?: bigint;
              lastValidRound?: bigint;
              lease?: string | Uint8Array<ArrayBufferLike>;
              maxFee?: AlgoAmount;
              note?: string | Uint8Array<ArrayBufferLike>;
              onComplete?: NoOpOC;
              rekeyTo?: string | Address;
              schema?: {
                  globalByteSlices: number;
                  globalInts: number;
                  localByteSlices: number;
                  localInts: number;
              };
              sender?: string
              | Address;
              signer?: TransactionSigner | TransactionSignerAccount;
              staticFee?: AlgoAmount;
              updatable?: boolean;
              validityWindow?: number | bigint;
          },
      ) => Promise<Transaction>

      Creates a new instance of the Lodash smart contract using a bare call.

params: {
    create: {
        bare: (
            params?: {
                accountReferences?: (string | Address)[];
                appReferences?: bigint[];
                args?: Uint8Array<ArrayBufferLike>[];
                assetReferences?: bigint[];
                boxReferences?: (BoxReference | BoxIdentifier)[];
                deletable?: boolean;
                deployTimeParams?: TealTemplateParams;
                extraFee?: AlgoAmount;
                extraProgramPages?: number;
                firstValidRound?: bigint;
                lastValidRound?: bigint;
                lease?: string | Uint8Array<ArrayBufferLike>;
                maxFee?: AlgoAmount;
                note?: string | Uint8Array<ArrayBufferLike>;
                onComplete?: NoOpOC;
                rekeyTo?: string | Address;
                schema?: {
                    globalByteSlices: number;
                    globalInts: number;
                    localByteSlices: number;
                    localInts: number;
                };
                sender?: string
                | Address;
                signer?: TransactionSigner | TransactionSignerAccount;
                staticFee?: AlgoAmount;
                updatable?: boolean;
                validityWindow?: number | bigint;
            },
        ) => Promise<
            {
                accountReferences?: (string | Address)[];
                appReferences?: bigint[];
                approvalProgram: Uint8Array;
                args?: Uint8Array<ArrayBufferLike>[];
                assetReferences?: bigint[];
                boxReferences?: (BoxReference | BoxIdentifier)[];
                clearStateProgram: Uint8Array;
                compiledApproval?: CompiledTeal;
                compiledClear?: CompiledTeal;
                deletable?: boolean;
                deployTimeParams: undefined | TealTemplateParams;
                extraFee?: AlgoAmount;
                extraProgramPages?: number;
                firstValidRound?: bigint;
                lastValidRound?: bigint;
                lease?: string | Uint8Array<ArrayBufferLike>;
                maxFee?: AlgoAmount;
                note?: string | Uint8Array<ArrayBufferLike>;
                onComplete?:
                    | NoOpOC
                    | OptInOC
                    | CloseOutOC
                    | UpdateApplicationOC
                    | DeleteApplicationOC;
                rekeyTo?: string
                | Address;
                schema: {
                    globalByteSlices: number;
                    globalInts: number;
                    localByteSlices: number;
                    localInts: number;
                };
                sender?: string
                | Address;
                signer?: TransactionSigner | TransactionSignerAccount;
                staticFee?: AlgoAmount;
                updatable?: boolean;
                validityWindow?: number | bigint;
            } & {
                onComplete: | NoOpOC
                | OptInOC
                | CloseOutOC
                | UpdateApplicationOC
                | DeleteApplicationOC;
                sender: Address;
                signer: undefined
                | TransactionSigner
                | TransactionSignerAccount;
            },
        >;
    };
} = ...

Get parameters to create transactions (create and deploy related calls) for the current app. A good mental model for this is that these parameters represent a deferred transaction creation.

Type declaration

  • create: {
        bare: (
            params?: {
                accountReferences?: (string | Address)[];
                appReferences?: bigint[];
                args?: Uint8Array<ArrayBufferLike>[];
                assetReferences?: bigint[];
                boxReferences?: (BoxReference | BoxIdentifier)[];
                deletable?: boolean;
                deployTimeParams?: TealTemplateParams;
                extraFee?: AlgoAmount;
                extraProgramPages?: number;
                firstValidRound?: bigint;
                lastValidRound?: bigint;
                lease?: string | Uint8Array<ArrayBufferLike>;
                maxFee?: AlgoAmount;
                note?: string | Uint8Array<ArrayBufferLike>;
                onComplete?: NoOpOC;
                rekeyTo?: string | Address;
                schema?: {
                    globalByteSlices: number;
                    globalInts: number;
                    localByteSlices: number;
                    localInts: number;
                };
                sender?: string
                | Address;
                signer?: TransactionSigner | TransactionSignerAccount;
                staticFee?: AlgoAmount;
                updatable?: boolean;
                validityWindow?: number | bigint;
            },
        ) => Promise<
            {
                accountReferences?: (string | Address)[];
                appReferences?: bigint[];
                approvalProgram: Uint8Array;
                args?: Uint8Array<ArrayBufferLike>[];
                assetReferences?: bigint[];
                boxReferences?: (BoxReference | BoxIdentifier)[];
                clearStateProgram: Uint8Array;
                compiledApproval?: CompiledTeal;
                compiledClear?: CompiledTeal;
                deletable?: boolean;
                deployTimeParams: undefined | TealTemplateParams;
                extraFee?: AlgoAmount;
                extraProgramPages?: number;
                firstValidRound?: bigint;
                lastValidRound?: bigint;
                lease?: string | Uint8Array<ArrayBufferLike>;
                maxFee?: AlgoAmount;
                note?: string | Uint8Array<ArrayBufferLike>;
                onComplete?:
                    | NoOpOC
                    | OptInOC
                    | CloseOutOC
                    | UpdateApplicationOC
                    | DeleteApplicationOC;
                rekeyTo?: string
                | Address;
                schema: {
                    globalByteSlices: number;
                    globalInts: number;
                    localByteSlices: number;
                    localInts: number;
                };
                sender?: string
                | Address;
                signer?: TransactionSigner | TransactionSignerAccount;
                staticFee?: AlgoAmount;
                updatable?: boolean;
                validityWindow?: number | bigint;
            } & {
                onComplete: | NoOpOC
                | OptInOC
                | CloseOutOC
                | UpdateApplicationOC
                | DeleteApplicationOC;
                sender: Address;
                signer: undefined
                | TransactionSigner
                | TransactionSignerAccount;
            },
        >;
    }

    Gets available create methods

    • bare: (
          params?: {
              accountReferences?: (string | Address)[];
              appReferences?: bigint[];
              args?: Uint8Array<ArrayBufferLike>[];
              assetReferences?: bigint[];
              boxReferences?: (BoxReference | BoxIdentifier)[];
              deletable?: boolean;
              deployTimeParams?: TealTemplateParams;
              extraFee?: AlgoAmount;
              extraProgramPages?: number;
              firstValidRound?: bigint;
              lastValidRound?: bigint;
              lease?: string | Uint8Array<ArrayBufferLike>;
              maxFee?: AlgoAmount;
              note?: string | Uint8Array<ArrayBufferLike>;
              onComplete?: NoOpOC;
              rekeyTo?: string | Address;
              schema?: {
                  globalByteSlices: number;
                  globalInts: number;
                  localByteSlices: number;
                  localInts: number;
              };
              sender?: string
              | Address;
              signer?: TransactionSigner | TransactionSignerAccount;
              staticFee?: AlgoAmount;
              updatable?: boolean;
              validityWindow?: number | bigint;
          },
      ) => Promise<
          {
              accountReferences?: (string | Address)[];
              appReferences?: bigint[];
              approvalProgram: Uint8Array;
              args?: Uint8Array<ArrayBufferLike>[];
              assetReferences?: bigint[];
              boxReferences?: (BoxReference | BoxIdentifier)[];
              clearStateProgram: Uint8Array;
              compiledApproval?: CompiledTeal;
              compiledClear?: CompiledTeal;
              deletable?: boolean;
              deployTimeParams: undefined | TealTemplateParams;
              extraFee?: AlgoAmount;
              extraProgramPages?: number;
              firstValidRound?: bigint;
              lastValidRound?: bigint;
              lease?: string | Uint8Array<ArrayBufferLike>;
              maxFee?: AlgoAmount;
              note?: string | Uint8Array<ArrayBufferLike>;
              onComplete?:
                  | NoOpOC
                  | OptInOC
                  | CloseOutOC
                  | UpdateApplicationOC
                  | DeleteApplicationOC;
              rekeyTo?: string
              | Address;
              schema: {
                  globalByteSlices: number;
                  globalInts: number;
                  localByteSlices: number;
                  localInts: number;
              };
              sender?: string
              | Address;
              signer?: TransactionSigner | TransactionSignerAccount;
              staticFee?: AlgoAmount;
              updatable?: boolean;
              validityWindow?: number | bigint;
          } & {
              onComplete: | NoOpOC
              | OptInOC
              | CloseOutOC
              | UpdateApplicationOC
              | DeleteApplicationOC;
              sender: Address;
              signer: undefined
              | TransactionSigner
              | TransactionSignerAccount;
          },
      >

      Creates a new instance of the Lodash smart contract using a bare call.

send: {
    create: {
        bare: (
            params?: {
                accountReferences?: (string | Address)[];
                appReferences?: bigint[];
                args?: Uint8Array<ArrayBufferLike>[];
                assetReferences?: bigint[];
                boxReferences?: (BoxReference | BoxIdentifier)[];
                coverAppCallInnerTransactionFees?: boolean;
                deletable?: boolean;
                deployTimeParams?: TealTemplateParams;
                extraFee?: AlgoAmount;
                extraProgramPages?: number;
                firstValidRound?: bigint;
                lastValidRound?: bigint;
                lease?: string | Uint8Array<ArrayBufferLike>;
                maxFee?: AlgoAmount;
                maxRoundsToWaitForConfirmation?: number;
                note?: string | Uint8Array<ArrayBufferLike>;
                onComplete?: NoOpOC;
                populateAppCallResources?: boolean;
                rekeyTo?: string | Address;
                schema?: {
                    globalByteSlices: number;
                    globalInts: number;
                    localByteSlices: number;
                    localInts: number;
                };
                sender?: string
                | Address;
                signer?: TransactionSigner | TransactionSignerAccount;
                staticFee?: AlgoAmount;
                suppressLog?: boolean;
                updatable?: boolean;
                validityWindow?: number | bigint;
            },
        ) => Promise<
            {
                appClient: LodashClient;
                result: {
                    appAddress: Address;
                    appId: bigint;
                    compiledApproval?: CompiledTeal;
                    compiledClear?: CompiledTeal;
                    confirmation: PendingTransactionResponse;
                    confirmations: PendingTransactionResponse[];
                    groupId: string;
                    return: undefined;
                    returns?: ABIReturn[];
                    transaction: Transaction;
                    transactions: Transaction[];
                    txIds: string[];
                };
            },
        >;
    };
} = ...

Send calls to the current app

Type declaration

  • create: {
        bare: (
            params?: {
                accountReferences?: (string | Address)[];
                appReferences?: bigint[];
                args?: Uint8Array<ArrayBufferLike>[];
                assetReferences?: bigint[];
                boxReferences?: (BoxReference | BoxIdentifier)[];
                coverAppCallInnerTransactionFees?: boolean;
                deletable?: boolean;
                deployTimeParams?: TealTemplateParams;
                extraFee?: AlgoAmount;
                extraProgramPages?: number;
                firstValidRound?: bigint;
                lastValidRound?: bigint;
                lease?: string | Uint8Array<ArrayBufferLike>;
                maxFee?: AlgoAmount;
                maxRoundsToWaitForConfirmation?: number;
                note?: string | Uint8Array<ArrayBufferLike>;
                onComplete?: NoOpOC;
                populateAppCallResources?: boolean;
                rekeyTo?: string | Address;
                schema?: {
                    globalByteSlices: number;
                    globalInts: number;
                    localByteSlices: number;
                    localInts: number;
                };
                sender?: string
                | Address;
                signer?: TransactionSigner | TransactionSignerAccount;
                staticFee?: AlgoAmount;
                suppressLog?: boolean;
                updatable?: boolean;
                validityWindow?: number | bigint;
            },
        ) => Promise<
            {
                appClient: LodashClient;
                result: {
                    appAddress: Address;
                    appId: bigint;
                    compiledApproval?: CompiledTeal;
                    compiledClear?: CompiledTeal;
                    confirmation: PendingTransactionResponse;
                    confirmations: PendingTransactionResponse[];
                    groupId: string;
                    return: undefined;
                    returns?: ABIReturn[];
                    transaction: Transaction;
                    transactions: Transaction[];
                    txIds: string[];
                };
            },
        >;
    }

    Gets available create methods

    • bare: (
          params?: {
              accountReferences?: (string | Address)[];
              appReferences?: bigint[];
              args?: Uint8Array<ArrayBufferLike>[];
              assetReferences?: bigint[];
              boxReferences?: (BoxReference | BoxIdentifier)[];
              coverAppCallInnerTransactionFees?: boolean;
              deletable?: boolean;
              deployTimeParams?: TealTemplateParams;
              extraFee?: AlgoAmount;
              extraProgramPages?: number;
              firstValidRound?: bigint;
              lastValidRound?: bigint;
              lease?: string | Uint8Array<ArrayBufferLike>;
              maxFee?: AlgoAmount;
              maxRoundsToWaitForConfirmation?: number;
              note?: string | Uint8Array<ArrayBufferLike>;
              onComplete?: NoOpOC;
              populateAppCallResources?: boolean;
              rekeyTo?: string | Address;
              schema?: {
                  globalByteSlices: number;
                  globalInts: number;
                  localByteSlices: number;
                  localInts: number;
              };
              sender?: string
              | Address;
              signer?: TransactionSigner | TransactionSignerAccount;
              staticFee?: AlgoAmount;
              suppressLog?: boolean;
              updatable?: boolean;
              validityWindow?: number | bigint;
          },
      ) => Promise<
          {
              appClient: LodashClient;
              result: {
                  appAddress: Address;
                  appId: bigint;
                  compiledApproval?: CompiledTeal;
                  compiledClear?: CompiledTeal;
                  confirmation: PendingTransactionResponse;
                  confirmations: PendingTransactionResponse[];
                  groupId: string;
                  return: undefined;
                  returns?: ABIReturn[];
                  transaction: Transaction;
                  transactions: Transaction[];
                  txIds: string[];
              };
          },
      >

      Creates a new instance of the Lodash smart contract using a bare call.

Accessors

  • get algorand(): AlgorandClientInterface

    A reference to the underlying AlgorandClient this app factory is using.

    Returns AlgorandClientInterface

  • get appName(): string

    The name of the app (from the ARC-32 / ARC-56 app spec or override).

    Returns string

  • get appSpec(): Arc56Contract

    The ARC-56 app spec being used

    Returns Arc56Contract

Methods

  • Idempotently deploys the Lodash smart contract.

    Parameters

    • params: {
          appName?: string;
          coverAppCallInnerTransactionFees?: boolean;
          createParams?: {
              accountReferences?: (string | Address)[];
              appReferences?: bigint[];
              args?: Uint8Array<ArrayBufferLike>[];
              assetReferences?: bigint[];
              boxReferences?: (BoxReference | BoxIdentifier)[];
              extraFee?: AlgoAmount;
              extraProgramPages?: number;
              firstValidRound?: bigint;
              lastValidRound?: bigint;
              lease?: string | Uint8Array<ArrayBufferLike>;
              maxFee?: AlgoAmount;
              method?: undefined;
              note?: string | Uint8Array<ArrayBufferLike>;
              onComplete?: NoOpOC;
              rekeyTo?: string | Address;
              schema?: {
                  globalByteSlices: number;
                  globalInts: number;
                  localByteSlices: number;
                  localInts: number;
              };
              sender?: string
              | Address;
              signer?: TransactionSigner | TransactionSignerAccount;
              staticFee?: AlgoAmount;
              validityWindow?: number | bigint;
          };
          deletable?: boolean;
          deployTimeParams?: TealTemplateParams;
          existingDeployments?: AppLookup;
          ignoreCache?: boolean;
          maxRoundsToWaitForConfirmation?: number;
          onSchemaBreak?: "replace"
          | "fail"
          | "append"
          | OnSchemaBreak;
          onUpdate?: "replace" | "fail" | "append" | "update" | OnUpdate;
          populateAppCallResources?: boolean;
          suppressLog?: boolean;
          updatable?: boolean;
      } = {}

      The arguments for the contract calls and any additional parameters for the call

      • OptionalappName?: string

        Override the app name for this deployment

      • OptionalcoverAppCallInnerTransactionFees?: boolean

        Whether to use simulate to automatically calculate required app call inner transaction fees and cover them in the parent app call transaction fee

      • OptionalcreateParams?: {
            accountReferences?: (string | Address)[];
            appReferences?: bigint[];
            args?: Uint8Array<ArrayBufferLike>[];
            assetReferences?: bigint[];
            boxReferences?: (BoxReference | BoxIdentifier)[];
            extraFee?: AlgoAmount;
            extraProgramPages?: number;
            firstValidRound?: bigint;
            lastValidRound?: bigint;
            lease?: string | Uint8Array<ArrayBufferLike>;
            maxFee?: AlgoAmount;
            method?: undefined;
            note?: string | Uint8Array<ArrayBufferLike>;
            onComplete?: NoOpOC;
            rekeyTo?: string | Address;
            schema?: {
                globalByteSlices: number;
                globalInts: number;
                localByteSlices: number;
                localInts: number;
            };
            sender?: string
            | Address;
            signer?: TransactionSigner | TransactionSignerAccount;
            staticFee?: AlgoAmount;
            validityWindow?: number | bigint;
        }

        Create transaction parameters to use if a create needs to be issued as part of deployment; use method to define ABI call (if available) or leave out for a bare call (if available)

        • OptionalaccountReferences?: (string | Address)[]

          Any account addresses to add to the accounts array.

        • OptionalappReferences?: bigint[]

          The ID of any apps to load to the foreign apps array.

        • Optionalargs?: Uint8Array<ArrayBufferLike>[]
        • OptionalassetReferences?: bigint[]

          The ID of any assets to load to the foreign assets array.

        • OptionalboxReferences?: (BoxReference | BoxIdentifier)[]

          Any boxes to load to the boxes array.

          Either the name identifier (which will be set against app ID of 0 i.e. the current app), or a box identifier with the name identifier and app ID.

        • OptionalextraFee?: AlgoAmount

          The fee to pay IN ADDITION to the suggested fee. Useful for manually covering inner transaction fees.

        • OptionalextraProgramPages?: number

          Number of extra pages required for the programs. Defaults to the number needed for the programs in this call if not specified. This is immutable once the app is created.

        • OptionalfirstValidRound?: bigint

          Set the first round this transaction is valid. If left undefined, the value from algod will be used.

          We recommend you only set this when you intentionally want this to be some time in the future.

        • OptionallastValidRound?: bigint

          The last round this transaction is valid. It is recommended to use validityWindow instead.

        • Optionallease?: string | Uint8Array<ArrayBufferLike>

          Prevent multiple transactions with the same lease being included within the validity window.

          A lease enforces a mutually exclusive transaction (useful to prevent double-posting and other scenarios).

        • OptionalmaxFee?: AlgoAmount

          Throw an error if the fee for the transaction is more than this amount; prevents overspending on fees during high congestion periods.

        • Optionalmethod?: undefined
        • Optionalnote?: string | Uint8Array<ArrayBufferLike>

          Note to attach to the transaction. Max of 1000 bytes.

        • OptionalonComplete?: NoOpOC
        • OptionalrekeyTo?: string | Address

          Change the signing key of the sender to the given address.

          Warning: Please be careful with this parameter and be sure to read the official rekey guidance.

        • Optionalschema?: {
              globalByteSlices: number;
              globalInts: number;
              localByteSlices: number;
              localInts: number;
          }

          The state schema for the app. This is immutable once the app is created. By default uses the ARC32/ARC-56 spec.

          • globalByteSlices: number

            The number of byte slices saved in global state.

          • globalInts: number

            The number of integers saved in global state.

          • localByteSlices: number

            The number of byte slices saved in local state.

          • localInts: number

            The number of integers saved in local state.

        • Optionalsender?: string | Address

          The address of the account sending the transaction, if undefined then the app client's defaultSender is used.

        • Optionalsigner?: TransactionSigner | TransactionSignerAccount

          The function used to sign transaction(s); if not specified then an attempt will be made to find a registered signer for the given sender or use a default signer (if configured).

        • OptionalstaticFee?: AlgoAmount

          The static transaction fee. In most cases you want to use extraFee unless setting the fee to 0 to be covered by another transaction.

        • OptionalvalidityWindow?: number | bigint

          How many rounds the transaction should be valid for, if not specified then the registered default validity window will be used.

      • Optionaldeletable?: boolean

        Whether or not the contract should have deploy-time permanence control set. undefined = use AppFactory constructor value if set or base it on the app spec.

      • OptionaldeployTimeParams?: TealTemplateParams

        Any deploy-time parameters to replace in the TEAL code before compiling it (used if teal code is passed in as a string)

      • OptionalexistingDeployments?: AppLookup

        Optional cached value of the existing apps for the given creator; use this to avoid an indexer lookup

      • OptionalignoreCache?: boolean

        Whether or not to ignore the app metadata cache and force a lookup, default: use the cache *

      • OptionalmaxRoundsToWaitForConfirmation?: number

        The number of rounds to wait for confirmation. By default until the latest lastValid has past.

      • OptionalonSchemaBreak?: "replace" | "fail" | "append" | OnSchemaBreak

        What action to perform if a schema break (storage schema or extra pages change) is detected:

        • fail - Fail the deployment (throw an error, default)
        • replace - Delete the old app and create a new one
        • append - Deploy a new app and leave the old one as is
      • OptionalonUpdate?: "replace" | "fail" | "append" | "update" | OnUpdate

        What action to perform if a TEAL code update is detected:

        • fail - Fail the deployment (throw an error, default)
        • update - Update the app with the new TEAL code
        • replace - Delete the old app and create a new one
        • append - Deploy a new app and leave the old one as is
      • OptionalpopulateAppCallResources?: boolean

        Whether to use simulate to automatically populate app call resources in the txn objects. Defaults to Config.populateAppCallResources.

      • OptionalsuppressLog?: boolean

        Whether to suppress log messages from transaction send, default: do not suppress.

      • Optionalupdatable?: boolean

        Whether or not the contract should have deploy-time immutability control set. undefined = use AppFactory constructor value if set or base it on the app spec.

    Returns Promise<
        {
            appClient: LodashClient;
            result: | {
                appAddress: Address;
                appId: bigint;
                compiledApproval?: CompiledTeal;
                compiledClear?: CompiledTeal;
                confirmation: PendingTransactionResponse;
                confirmations: PendingTransactionResponse[];
                createdMetadata: AppDeployMetadata;
                createdRound: bigint;
                deletable?: boolean;
                deleted: boolean;
                deleteReturn: undefined
                | ABIValue
                | ABIStruct;
                groupId: string;
                name: string;
                operationPerformed: "create";
                return: undefined | ABIValue | ABIStruct;
                returns?: ABIReturn[];
                transaction: Transaction;
                transactions: Transaction[];
                txIds: string[];
                updatable?: boolean;
                updatedRound: bigint;
                version: string;
            }
            | {
                appAddress: Address;
                appId: bigint;
                compiledApproval?: CompiledTeal;
                compiledClear?: CompiledTeal;
                confirmation: PendingTransactionResponse;
                confirmations: PendingTransactionResponse[];
                createdMetadata: AppDeployMetadata;
                createdRound: bigint;
                deletable?: boolean;
                deleted: boolean;
                deleteReturn: undefined
                | ABIValue
                | ABIStruct;
                groupId: string;
                name: string;
                operationPerformed: "update";
                return: undefined | ABIValue | ABIStruct;
                returns?: ABIReturn[];
                transaction: Transaction;
                transactions: Transaction[];
                txIds: string[];
                updatable?: boolean;
                updatedRound: bigint;
                version: string;
            }
            | {
                appAddress: Address;
                appId: bigint;
                compiledApproval?: CompiledTeal;
                compiledClear?: CompiledTeal;
                confirmation: PendingTransactionResponse;
                confirmations: PendingTransactionResponse[];
                createdMetadata: AppDeployMetadata;
                createdRound: bigint;
                deletable?: boolean;
                deleted: boolean;
                deleteResult: ConfirmedTransactionResult;
                deleteReturn: undefined
                | ABIValue
                | ABIStruct;
                groupId: string;
                name: string;
                operationPerformed: "replace";
                return: undefined | ABIValue | ABIStruct;
                returns?: ABIReturn[];
                transaction: Transaction;
                transactions: Transaction[];
                txIds: string[];
                updatable?: boolean;
                updatedRound: bigint;
                version: string;
            }
            | {
                appAddress: Address;
                appId: bigint;
                compiledApproval?: CompiledTeal;
                compiledClear?: CompiledTeal;
                createdMetadata: AppDeployMetadata;
                createdRound: bigint;
                deletable?: boolean;
                deleted: boolean;
                deleteReturn: undefined
                | ABIValue
                | ABIStruct;
                name: string;
                operationPerformed: "nothing";
                return: undefined | ABIValue | ABIStruct;
                updatable?: boolean;
                updatedRound: bigint;
                version: string;
            };
        },
    >

    The deployment result

  • Returns a new AppClient client, resolving the app by creator address and name using AlgoKit app deployment semantics (i.e. looking for the app creation transaction note).

    Automatically populates appName, defaultSender and source maps from the factory if not specified in the params.

    Parameters

    • params: {
          appLookupCache?: AppLookup;
          appName?: string;
          approvalSourceMap?: ProgramSourceMap;
          clearSourceMap?: ProgramSourceMap;
          creatorAddress: string | Address;
          defaultSender?: string | Address;
          defaultSigner?: TransactionSigner;
          ignoreCache?: boolean;
      }

      The parameters to create the app client

      • OptionalappLookupCache?: AppLookup

        An optional cached app lookup that matches a name to on-chain details; either this is needed or indexer is required to be passed in to this ClientManager on construction.

      • OptionalappName?: string

        Optional override for the app name; used for on-chain metadata and lookups. Defaults to the ARC-32/ARC-56 app spec name

      • OptionalapprovalSourceMap?: ProgramSourceMap

        Optional source map for the approval program

      • OptionalclearSourceMap?: ProgramSourceMap

        Optional source map for the clear state program

      • creatorAddress: string | Address

        The address of the creator account for the app

      • OptionaldefaultSender?: string | Address

        Optional address to use for the account to use as the default sender for calls.

      • OptionaldefaultSigner?: TransactionSigner

        Optional signer to use as the default signer for default sender calls (if not specified then the signer will be resolved from AlgorandClient).

      • OptionalignoreCache?: boolean

        Whether or not to ignore the AppDeployer lookup cache and force an on-chain lookup, default: use any cached value

    Returns Promise<LodashClient>

    The AppClient

  • Returns a new AppClient client for an app instance of the given ID.

    Automatically populates appName, defaultSender and source maps from the factory if not specified in the params.

    Parameters

    • params: {
          appId: bigint;
          appName?: string;
          approvalSourceMap?: ProgramSourceMap;
          clearSourceMap?: ProgramSourceMap;
          defaultSender?: string | Address;
          defaultSigner?: TransactionSigner;
      }

      The parameters to create the app client

      • appId: bigint

        The ID of the app instance this client should make calls against.

      • OptionalappName?: string

        Optional override for the app name; used for on-chain metadata and lookups. Defaults to the ARC-32/ARC-56 app spec name

      • OptionalapprovalSourceMap?: ProgramSourceMap

        Optional source map for the approval program

      • OptionalclearSourceMap?: ProgramSourceMap

        Optional source map for the clear state program

      • OptionaldefaultSender?: string | Address

        Optional address to use for the account to use as the default sender for calls.

      • OptionaldefaultSigner?: TransactionSigner

        Optional signer to use as the default signer for default sender calls (if not specified then the signer will be resolved from AlgorandClient).

    Returns LodashClient

    The AppClient