Skip to main content

Writing Smart Contracts on the Algorand Blockchain

Speaker: Muhammad Ishaq. Ishaq is a PhD student at Purdue University, being advised by Vassilis Zikas.

Title: Writing Smart Contracts on the Algorand Blockchain

Abstract: This is a beginner-friendly two-part session to introduce smart contract programming on the Algorand blockchain. We use the PyTEAL language for programming while also covering reading/debugging the lower-level TEAL language. In the first part, we interactively build a "Hello World" smart contract, the "counter contract". It keeps track of a global counter on the blockchain and allows its value to be incremented/decremented through function calls (via Application Call transactions). The goal is to familiarize the audience with the Algorand sandbox and, the fundamentals of PyTEAL and TEAL languages. In the second part, we build "rock-paper-scissors contract". This contract is slightly more sophisticated than counter and enables two users (a challenger and an opponent) to play a game of rock-paper-scissors together. Multiple concurrent games are allowed provided each user is only involved in one game at a time. The goal is to introduce the concepts of local state, common safety checks, atomic transaction groups, and transaction fees (including fee pooling).


Location: LWSN 1106 and Zoom (https://purdue-edu.zoom.us/j/91817312903?pwd=NFNKeHoyZlV2aVp3ZUdwRzRHR3Fhdz09)