Applications | Algorand Developer Portal

Applications

Algorand Smart Contracts, also known as Applications, are the logic component of our blockchain systems. A client can invoke these pieces of structured code to execute a specific method or logic inside the application.

Smart contracts live on the blockchain. Once they are deployed, the on-chain instance of the contract is referred to as an application and assigned an Application ID, which can be used by any client to lookup the application or to execute its methods.

Storage

Applications can store values on the Algorand blockchain using one of the following storage types:

The Storage Overview section provides a detailed section on on-chain storage.

Components

In either program, if a global, box, or local state variable is modified and the program fails, the state changes will not be applied. Having two programs allows an account to clear the contract from its state, whether the logic passes or not. When the clear call is made to the contract, whether the logic passes or fails, the contract will be removed from the account’s balance record.

Interaction and Lifecycle

For interacting in a standard way with Applications, the Application Binary Interface (ABI) should be used. This specification defines the encoding/decoding of data types and is a standard for exposing and invoking methods in a smart contract.

For calling an Application, the clients must execute ApplicationCall transactions. Depending on the type, the application could show a different behavior and result:

The ClearStateProgram handles the ClearState transaction and the ApprovalProgram handles all other ApplicationCall transactions. These transaction types can be created with either goal or the SDKs. In the following sections, details on the individual capabilities of a smart contract will be explained.

Inner Transactions

Inner transactions are operations that an Application performs from within its execution context. When an application executes, it has its own associated account that can create and submit transactions, similar to how a regular account would.

Through inner transactions, Applications can:

Inner Transactions Learn more about how smart contracts can create and submit transactions from within their execution context