Alpha preview. Not for production use.
Working anonymously. to save your work permanently.
Guide

Quick Start

Get your first Algorand smart contract compiled in under 5 minutes. No installation required.

What you'll learn

  • Create a new project in AVM Studio
  • Write a simple smart contract
  • Compile your contract to TEAL
  • View the generated artifacts

Step 1: Open the Editor

Navigate to the Editor page. If you don't have a project yet, you'll be prompted to create one.

  1. Click New Project or go to Projects
  2. Select Algorand TypeScript as your language
  3. Name your project (e.g., "my-first-contract")
  4. Click Create
Tip
You can also start with a template by selecting one from the template dropdown when creating a project.

Step 2: Write Your Contract

In the editor, you'll see a starter file. Replace its contents with this simple counter contract:

counter.algo.ts TypeScript
1import { Contract, GlobalState, assert, uint64 } from '@algorandfoundation/algorand-typescript'
2
3class Counter extends Contract {
4  count = GlobalState<uint64>({ initialValue: 0 })
5
6  increment(): void {
7    this.count.value = this.count.value + 1
8  }
9
10  decrement(): void {
11    assert(this.count.value > 0, 'Count cannot be negative')
12    this.count.value = this.count.value - 1
13  }
14
15  getCount(): uint64 {
16    return this.count.value
17  }
18}

This contract:

  • Stores a counter value in global state
  • Has methods to increment and decrement the counter
  • Includes a safety check to prevent negative values

Step 3: Build Your Contract

Click the Build button in the top toolbar (or press Cmd/Ctrl + B).

The build panel will show:

  • Build status - Success or failure with any error messages
  • Compilation logs - Details about the build process
  • Build time - How long the compilation took
Note
The first build may take a few seconds as the compiler initializes. Subsequent builds are faster.

Step 4: View Artifacts

After a successful build, you can view the generated artifacts (named after your contract):

  • {Contract}.approval.teal - The approval program (main contract logic)
  • {Contract}.clear.teal - The clear state program
  • {Contract}.arc56.json - ARC-56 application specification (ABI)
  • {Contract}Client.ts - Generated TypeScript client
  • {Contract}.docs.md - Human-readable documentation

Click on the Preview tab to see the generated TEAL code, or Artifacts to download them.

Step 5: (Optional) Deploy

Ready to deploy to a network?

  1. Go to the Deploy tab
  2. Select a network (start with Testnet for testing)
  3. Configure your signing account (or connect a wallet)
  4. Click Deploy
Testnet First
Always deploy to Testnet first to verify your contract works correctly. Never deploy untested contracts to Mainnet.

Congratulations!

You've just created and compiled your first Algorand smart contract! Here's what you can do next: