Create Publication

We are looking for publications that demonstrate building dApps or smart contracts!
See the full list of Gitcoin bounties that are eligible for rewards.

Article Thumbnail

Algo Builder v0.5 Released

Highlights

This was a long awaited release. We spent last few months creating a JavaScript based Algorand Runtime, which allows developers to execute Algorand transaction directly within algob as well as creating unit tests and integration tests.

Name change

We had to change the name. We can’t use Algorand Builder name. The new project name is Algo Builder. Please update your package.json dependencies:

  • @algorand-builder/algob@algo-builder/algob
  • @algorand-builder/runtime@algo-builder/runtime
  • @algorand-builder/types-algosdk@algo-builder/types-algosdk

JS Runtime

The JS Runtime (@algo-builder/runtime) is a combination of a TEAL parser, interpreter, account storage, smart contract storage, and transaction execution environment.

We have 100% TEAL #pragma version 2 support with a robust internal test suite.

Algob Test Framework

We integrated the JS Runtime into algob and created a test framework. Testing your Algo Builder based project will consist of three phases:

  1. Setup
    • Initializing a Runtime and Storage
    • Creating accounts and saving them in a storage
    • Preparing the variables or smart contracts
  2. Test flow
    • Writing a test scenario: creating transactions, updating smart contract
    • Using chai.js to write assertions to verify the updated storage.
  3. Tear down (optional): closing resources

With Algo Builder v0.5 you can tests all your smart contracts and ASA! Check the Crowdfunding App Example to see tests in action.

JS Algorand SDK

We continue adding definite typings into for the js-algorand-sdk. We released a new version with improved TypeScript type definitions → @algo-builder/types-algosdk.

Sandbox

In the past versions we improved our private net setup (scripts in /infrastructure). It required the algorand node (algod) and goal to be locally installed. In the meantime the Algorand Team improved the Sandbox Docker image (the v2 release).
In this release we integrated Sandbox v2 - you can setup a Sandbox private network with one command:

  • go to /infrastructure (a directory in our repository)
  • run make sandbox-up sandbox-setup-master-account

To stop the sandbox you can run: make sandbox-down.

Another new infrastructure command worth noting is: make recreate-private-net which will remove and recreate a current private net (not Sandobx based).

Inspect the infrastructure/Makefile for more useful commands.

Important

Infrastructure Breaking Change

We changed the default port and node token to match the one from Sandbox:

  • host: localhost:4001
  • token: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

Other Changes

  • Added new optin functions: deployer.optInAcountToASA and deployer.optInLsigToASA (breaking - we removed deployer.optInToASA).
  • Added support for bigint for all numeric values in runtime and algob.
  • Added TypeScript example project - htlc-pyteal-ts

Quick Start

Check our README file for a quick setup instructions.

Write to us in the Algorand Discord Server -> #algo-builder channel.