{"version":3,"file":"app-deploy.mjs","names":[],"sources":["../src/app-deploy.ts"],"sourcesContent":["import algosdk, { Address } from 'algosdk'\nimport { compileTeal, getAppOnCompleteAction } from './app'\nimport { _getAppArgsForABICall, _getBoxReference } from './transaction/legacy-bridge'\nimport { getSenderAddress, getSenderTransactionSigner } from './transaction/transaction'\nimport { AlgorandClientTransactionSender } from './types/algorand-client-transaction-sender'\nimport {\n  ABIReturn,\n  APP_DEPLOY_NOTE_DAPP,\n  AppCompilationResult,\n  AppDeployMetadata,\n  AppDeploymentParams,\n  AppLookup,\n  AppMetadata,\n  CompiledTeal,\n  TealTemplateParams,\n} from './types/app'\nimport { AppDeployer } from './types/app-deployer'\nimport { AppManager, BoxReference } from './types/app-manager'\nimport { AssetManager } from './types/asset-manager'\nimport {\n  AppCreateMethodCall,\n  AppCreateParams,\n  AppDeleteMethodCall,\n  AppDeleteParams,\n  AppUpdateMethodCall,\n  AppUpdateParams,\n  TransactionComposer,\n} from './types/composer'\nimport { Arc2TransactionNote, ConfirmedTransactionResult, ConfirmedTransactionResults, SendTransactionFrom } from './types/transaction'\nimport Algodv2 = algosdk.Algodv2\nimport Indexer = algosdk.Indexer\nimport modelsv2 = algosdk.modelsv2\n\n/**\n * @deprecated Use `algorand.appDeployer.deploy` instead.\n *\n * Idempotently deploy (create, update/delete if changed) an app against the given name via the given creator account, including deploy-time template placeholder substitutions.\n *\n * To understand the architecture decisions behind this functionality please see https://github.com/algorandfoundation/algokit-cli/blob/main/docs/src/content/docs/architecture-decisions/2023-01-12_smart-contract-deployment.md\n *\n * **Note:** When using the return from this function be sure to check `operationPerformed` to get access to various return properties like `transaction`, `confirmation` and `deleteResult`.\n *\n * **Note:** if there is a breaking state schema change to an existing app (and `onSchemaBreak` is set to `'replace'`) the existing app will be deleted and re-created.\n *\n * **Note:** if there is an update (different TEAL code) to an existing app (and `onUpdate` is set to `'replace'`) the existing app will be deleted and re-created.\n * @param deployment The arguments to control the app deployment\n * @param algod An algod client\n * @param indexer An indexer client, needed if `existingDeployments` not passed in\n * @returns The app reference of the new/existing app\n */\nexport async function deployApp(\n  deployment: AppDeploymentParams,\n  algod: Algodv2,\n  indexer?: Indexer,\n): Promise<\n  Partial<AppCompilationResult> &\n    (\n      | (ConfirmedTransactionResults & AppMetadata & { return?: ABIReturn; operationPerformed: 'create' | 'update' })\n      | (ConfirmedTransactionResults &\n          AppMetadata & {\n            return?: ABIReturn\n            deleteReturn?: ABIReturn\n            deleteResult: ConfirmedTransactionResult\n            operationPerformed: 'replace'\n          })\n      | (AppMetadata & { operationPerformed: 'nothing' })\n    )\n> {\n  const appManager = new AppManager(algod)\n  const newGroup = () =>\n    new TransactionComposer({\n      algod,\n      getSigner: () => getSenderTransactionSigner(deployment.from),\n      getSuggestedParams: async () =>\n        deployment.transactionParams ? { ...deployment.transactionParams } : await algod.getTransactionParams().do(),\n      appManager,\n    })\n  const deployer = new AppDeployer(\n    appManager,\n    new AlgorandClientTransactionSender(newGroup, new AssetManager(algod, newGroup), appManager),\n    indexer,\n  )\n\n  const createParams = {\n    approvalProgram: deployment.approvalProgram,\n    clearStateProgram: deployment.clearStateProgram,\n    sender: getSenderAddress(deployment.from),\n    accountReferences: deployment.createArgs?.accounts?.map((a) => (typeof a === 'string' ? a : algosdk.encodeAddress(a.publicKey))),\n    appReferences: deployment.createArgs?.apps?.map((a) => BigInt(a)),\n    assetReferences: deployment.createArgs?.assets?.map((a) => BigInt(a)),\n    boxReferences: deployment.createArgs?.boxes\n      ?.map(_getBoxReference)\n      ?.map((r) => ({ appId: BigInt(r.appIndex), name: r.name }) satisfies BoxReference),\n    lease: deployment.createArgs?.lease,\n    rekeyTo: deployment.createArgs?.rekeyTo ? getSenderAddress(deployment.createArgs?.rekeyTo) : undefined,\n    staticFee: deployment.fee,\n    maxFee: deployment.maxFee,\n    extraProgramPages: deployment.schema.extraPages,\n    onComplete: getAppOnCompleteAction(deployment.createOnCompleteAction) as Exclude<\n      algosdk.OnApplicationComplete,\n      algosdk.OnApplicationComplete.ClearStateOC\n    >,\n    schema: deployment.schema,\n  } satisfies Partial<AppCreateParams>\n\n  const updateParams = {\n    approvalProgram: deployment.approvalProgram,\n    clearStateProgram: deployment.clearStateProgram,\n    sender: getSenderAddress(deployment.from),\n    accountReferences: deployment.updateArgs?.accounts?.map((a) => (typeof a === 'string' ? a : algosdk.encodeAddress(a.publicKey))),\n    appReferences: deployment.updateArgs?.apps?.map((a) => BigInt(a)),\n    assetReferences: deployment.updateArgs?.assets?.map((a) => BigInt(a)),\n    boxReferences: deployment.updateArgs?.boxes\n      ?.map(_getBoxReference)\n      ?.map((r) => ({ appId: BigInt(r.appIndex), name: r.name }) satisfies BoxReference),\n    lease: deployment.updateArgs?.lease,\n    rekeyTo: deployment.updateArgs?.rekeyTo ? getSenderAddress(deployment.updateArgs?.rekeyTo) : undefined,\n    staticFee: deployment.fee,\n    maxFee: deployment.maxFee,\n    onComplete: algosdk.OnApplicationComplete.UpdateApplicationOC,\n  } satisfies Partial<AppUpdateParams>\n\n  const deleteParams = {\n    sender: getSenderAddress(deployment.from),\n    accountReferences: deployment.deleteArgs?.accounts?.map((a) => (typeof a === 'string' ? a : algosdk.encodeAddress(a.publicKey))),\n    appReferences: deployment.deleteArgs?.apps?.map((a) => BigInt(a)),\n    assetReferences: deployment.deleteArgs?.assets?.map((a) => BigInt(a)),\n    boxReferences: deployment.deleteArgs?.boxes\n      ?.map(_getBoxReference)\n      ?.map((r) => ({ appId: BigInt(r.appIndex), name: r.name }) satisfies BoxReference),\n    lease: deployment.deleteArgs?.lease,\n    rekeyTo: deployment.deleteArgs?.rekeyTo ? getSenderAddress(deployment.deleteArgs?.rekeyTo) : undefined,\n    staticFee: deployment.fee,\n    maxFee: deployment.maxFee,\n    onComplete: algosdk.OnApplicationComplete.DeleteApplicationOC,\n  } satisfies Partial<AppDeleteParams>\n\n  const encoder = new TextEncoder()\n\n  const result = await deployer.deploy({\n    createParams: deployment.createArgs?.method\n      ? ({\n          ...createParams,\n          method:\n            'txnCount' in deployment.createArgs.method ? deployment.createArgs.method : new algosdk.ABIMethod(deployment.createArgs.method),\n          args: (await _getAppArgsForABICall(deployment.createArgs, deployment.from)).methodArgs,\n        } satisfies AppCreateMethodCall)\n      : ({\n          ...createParams,\n          args:\n            'appArgs' in (deployment?.createArgs ?? {})\n              ? deployment.createArgs?.appArgs?.map((a) => (typeof a === 'string' ? encoder.encode(a) : a))\n              : undefined,\n        } satisfies AppCreateParams),\n    updateParams: deployment.updateArgs?.method\n      ? ({\n          ...updateParams,\n          method:\n            'txnCount' in deployment.updateArgs.method ? deployment.updateArgs.method : new algosdk.ABIMethod(deployment.updateArgs.method),\n          args: (await _getAppArgsForABICall(deployment.updateArgs, deployment.from)).methodArgs,\n        } satisfies Omit<AppUpdateMethodCall, 'appId'>)\n      : ({\n          ...updateParams,\n          args:\n            'appArgs' in (deployment?.updateArgs ?? {})\n              ? deployment.updateArgs?.appArgs?.map((a) => (typeof a === 'string' ? encoder.encode(a) : a))\n              : undefined,\n        } satisfies Omit<AppUpdateParams, 'appId'>),\n    deleteParams: deployment.deleteArgs?.method\n      ? ({\n          ...deleteParams,\n          method:\n            'txnCount' in deployment.deleteArgs.method ? deployment.deleteArgs.method : new algosdk.ABIMethod(deployment.deleteArgs.method),\n          args: (await _getAppArgsForABICall(deployment.deleteArgs, deployment.from)).methodArgs,\n        } satisfies Omit<AppDeleteMethodCall, 'appId'>)\n      : ({\n          ...deleteParams,\n          args:\n            'appArgs' in (deployment?.deleteArgs ?? {})\n              ? deployment.deleteArgs?.appArgs?.map((a) => (typeof a === 'string' ? encoder.encode(a) : a))\n              : undefined,\n        } satisfies Omit<AppDeleteParams, 'appId'>),\n    metadata: deployment.metadata,\n    deployTimeParams: deployment.deployTimeParams,\n    onSchemaBreak: deployment.onSchemaBreak,\n    onUpdate: deployment.onUpdate,\n    existingDeployments: deployment.existingDeployments\n      ? {\n          creator: Address.fromString(deployment.existingDeployments.creator),\n          apps: Object.fromEntries(\n            Object.entries(deployment.existingDeployments.apps).map(([name, app]) => [\n              name,\n              {\n                ...app,\n                appAddress: Address.fromString(app.appAddress),\n                appId: BigInt(app.appId),\n                createdRound: BigInt(app.createdRound),\n                updatedRound: BigInt(app.updatedRound),\n              },\n            ]),\n          ),\n        }\n      : undefined,\n    maxRoundsToWaitForConfirmation: deployment.maxRoundsToWaitForConfirmation,\n    populateAppCallResources: deployment.populateAppCallResources,\n    suppressLog: deployment.suppressLog,\n  })\n\n  return {\n    ...result,\n    appAddress: result.appAddress.toString(),\n    appId: Number(result.appId),\n    createdRound: Number(result.createdRound),\n    updatedRound: Number(result.updatedRound),\n  }\n}\n\n/**\n * @deprecated Use `before.numByteSlice < after.numByteSlice || before.numUint < after.numUint` instead.\n *\n * Returns true is there is a breaking change in the application state schema from before to after.\n *  i.e. if the schema becomes larger, since applications can't ask for more schema after creation.\n *  Otherwise, there is no error, the app just doesn't store data in the extra schema :(\n *\n * @param before The existing schema\n * @param after The new schema\n * @returns Whether or not there is a breaking change\n */\nexport function isSchemaIsBroken(before: modelsv2.ApplicationStateSchema, after: modelsv2.ApplicationStateSchema) {\n  return before.numByteSlice < after.numByteSlice || before.numUint < after.numUint\n}\n\n/**\n * @deprecated Use `algorand.appDeployer.getCreatorAppsByName` instead.\n *\n * Returns a lookup of name => app metadata (id, address, ...metadata) for all apps created by the given account that have an `AppDeployNote` in the transaction note of the creation transaction.\n *\n * **Note:** It's recommended this is only called once and then stored since it's a somewhat expensive operation (multiple indexer calls).\n *\n * @param creatorAccount The account (with private key loaded) or string address of an account that is the creator of the apps you want to search for\n * @param indexer An indexer client\n * @returns A name-based lookup of the app information (id, address)\n */\nexport async function getCreatorAppsByName(creatorAccount: SendTransactionFrom | string, indexer: Indexer): Promise<AppLookup> {\n  const lookup = await new AppDeployer(undefined!, undefined!, indexer).getCreatorAppsByName(getSenderAddress(creatorAccount))\n\n  return {\n    creator: lookup.creator.toString(),\n    apps: Object.fromEntries(\n      Object.entries(lookup.apps).map(([name, app]) => [\n        name,\n        {\n          ...app,\n          appAddress: app.appAddress.toString(),\n          appId: Number(app.appId),\n          createdRound: Number(app.createdRound),\n          updatedRound: Number(app.updatedRound),\n        },\n      ]),\n    ),\n  }\n}\n\n/**\n * @deprecated Use `{ dAppName: APP_DEPLOY_NOTE_DAPP, data: metadata, format: 'j' }` instead.\n *\n * Return the transaction note for an app deployment.\n * @param metadata The metadata of the deployment\n * @returns The transaction note as a utf-8 string\n */\nexport function getAppDeploymentTransactionNote(metadata: AppDeployMetadata): Arc2TransactionNote {\n  return {\n    dAppName: APP_DEPLOY_NOTE_DAPP,\n    data: metadata,\n    format: 'j',\n  }\n}\n\n/**\n * @deprecated Use `AppManager.replaceTealTemplateDeployTimeControlParams` instead\n *\n * Replaces deploy-time deployment control parameters within the given teal code.\n *\n * * `TMPL_UPDATABLE` for updatability / immutability control\n * * `TMPL_DELETABLE` for deletability / permanence control\n *\n * Note: If these values are not undefined, but the corresponding `TMPL_*` value\n *  isn't in the teal code it will throw an exception.\n *\n * @param tealCode The TEAL code to substitute\n * @param params The deploy-time deployment control parameter value to replace\n * @returns The replaced TEAL code\n */\nexport function replaceDeployTimeControlParams(tealCode: string, params: { updatable?: boolean; deletable?: boolean }) {\n  return AppManager.replaceTealTemplateDeployTimeControlParams(tealCode, params)\n}\n\n/**\n * @deprecated Use `AppManager.replaceTealTemplateParams` instead\n *\n * Performs template substitution of a teal file.\n *\n * Looks for `TMPL_{parameter}` for template replacements.\n *\n * @param tealCode The TEAL logic to compile\n * @param templateParams Any parameters to replace in the .teal file before compiling\n * @returns The TEAL code with replacements\n */\nexport function performTemplateSubstitution(tealCode: string, templateParams?: TealTemplateParams) {\n  return AppManager.replaceTealTemplateParams(tealCode, templateParams)\n}\n\n/**\n * @deprecated Use `algorand.appManager.compileTealTemplate` instead.\n *\n * Performs template substitution of a teal file and compiles it, returning the compiled result.\n *\n * Looks for `TMPL_{parameter}` for template replacements.\n *\n * @param tealCode The TEAL logic to compile\n * @param algod An algod client\n * @param templateParams Any parameters to replace in the .teal file before compiling\n * @param deploymentMetadata The deployment metadata the app will be deployed with\n * @returns The information about the compiled code\n */\nexport async function performTemplateSubstitutionAndCompile(\n  tealCode: string,\n  algod: Algodv2,\n  templateParams?: TealTemplateParams,\n  deploymentMetadata?: AppDeployMetadata,\n): Promise<CompiledTeal> {\n  tealCode = stripTealComments(tealCode)\n\n  tealCode = performTemplateSubstitution(tealCode, templateParams)\n\n  if (deploymentMetadata) {\n    tealCode = replaceDeployTimeControlParams(tealCode, deploymentMetadata)\n  }\n\n  return await compileTeal(tealCode, algod)\n}\n\n/**\n * @deprecated Use `AppManager.stripTealComments` instead.\n *\n * Remove comments from TEAL Code\n *\n * @param tealCode The TEAL logic to compile\n * @returns The TEAL without comments\n */\nexport function stripTealComments(tealCode: string) {\n  return AppManager.stripTealComments(tealCode)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkDA,eAAsB,UACpB,YACA,OACA,SAcA;CACA,MAAM,aAAa,IAAI,WAAW,KAAK;CACvC,MAAM,iBACJ,IAAI,oBAAoB;EACtB;EACA,iBAAiB,2BAA2B,WAAW,IAAI;EAC3D,oBAAoB,YAClB,WAAW,oBAAoB,EAAE,GAAG,WAAW,kBAAkB,IAAI,MAAM,MAAM,qBAAqB,CAAC,CAAC,GAAG;EAC7G;CACF,CAAC;CACH,MAAM,WAAW,IAAI,YACnB,YACA,IAAI,gCAAgC,UAAU,IAAI,aAAa,OAAO,QAAQ,GAAG,UAAU,GAC3F,OACF;CAEA,MAAM,eAAe;EACnB,iBAAiB,WAAW;EAC5B,mBAAmB,WAAW;EAC9B,QAAQ,iBAAiB,WAAW,IAAI;EACxC,mBAAmB,WAAW,YAAY,UAAU,KAAK,MAAO,OAAO,MAAM,WAAW,IAAI,QAAQ,cAAc,EAAE,SAAS,CAAE;EAC/H,eAAe,WAAW,YAAY,MAAM,KAAK,MAAM,OAAO,CAAC,CAAC;EAChE,iBAAiB,WAAW,YAAY,QAAQ,KAAK,MAAM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