This page covers the costs and constraints specific to smart contract development on Algorand. For a complete list of all protocol parameters including transaction fees, minimum balances, and other network-wide settings, see the main protocol parameters page.
Protocol ParametersComplete list of all Algorand protocol parameters including transaction fees, minimum balances, and network-wide constants
Maximum 16 arguments can be passed to an application call. This limit is defined by the consensus parameter MaxAppArgs
Combined Size of Arguments
The maximum combined size of arguments is 2048 bytes. This limit is defined by the consensus parameter MaxAppTotalArgLen
Max Size of Compiled TEAL Code
The maximum size of compiled TEAL code combined with arguments is 1000 bytes. This limit is defined by the consensus parameter LogicSigMaxSize
Max Cost of TEAL Code
The maximum cost of TEAL code is 20000 for logic signatures and 700 for smart contracts. These limits are defined by the consensus parameters LogicSigMaxCost and MaxAppProgramCost respectively
Argument Types
The arguments to pass to the ABI call can be one of the following types: boolean, number, bigint, string, Uint8Array, an array of one of the above types, algosdk.TransactionWithSigner, TransactionToSign, algosdk.Transaction, Promise<SendTransactionResult>. These types are used when specifying the ABIAppCallArgs for an application call
In Algorand, the opcode budget measures the computational cost of executing a smart contract or logic signature. Each opcode (operation code) in the Algorand Virtual Machine (AVM) has an associated cost deducted from the opcode budget during execution.
Parameter
Constraint
Cost of Opcodes
Most opcodes have a computational cost of 1. Some operations (e.g., SHA256, keccak256, sha512_256, ed25519verify) have larger costs.
Budget Constraints
Max opcode budget: Smart signatures: 20,000 units Smart contracts invoked by a single application transaction: 700 units. If invoked via a group: 700 * number of application transactions.
Clear State Programs
Initial pooled budget must be >= 700 units or higher. Execution limit: 700 units.
Note: Algorand Python provides a helper method for increasing the available opcode budget, see algopy.ensure_budget.
In Algorand, the access and usage of resources such as account balance/state, application state, etc., by applications are subject to certain constraints and costs: