Skip to content

AppDeployer

Handles deployment and update lifecycle of Algorand smart contract applications.

const deployer = algorand.appDeployer;

Deploys a new application or updates an existing one using an idempotent deploy pattern.

ParameterTypeDescription
params.appSpecAppSpecApplication specification
params.senderTransactionSignerAccountDeployer account
params.createParamsobjectCreate transaction parameters
params.updateParamsobjectUpdate transaction parameters
params.deleteParamsobjectDelete transaction parameters
params.onSchemaBreak'replace' | 'fail' | 'append'Schema break behavior
params.onUpdate'update' | 'replace' | 'fail' | 'append'Update behavior
const result = await algorand.appDeployer.deploy({
appSpec: myAppSpec,
sender: deployer,
createParams: { sender: deployer },
onUpdate: 'update',
onSchemaBreak: 'replace',
});

Returns: DeployResult with fields:

  • appId - The application ID
  • appAddress - The application account address
  • operationPerformed - 'create', 'update', 'replace', or 'nothing'