Building smart contracts with TEAL, an assembly language, and PyTeal could be challenging and unfamiliar to beginner Algorand smart contract developers. Beaker aims to address the problem by making smart contract development both simpler and familiar to web2 developers.
This is a Beaker starter kit that covers all of the components of Beaker and a complete RSVP Application example that utilizes Beaker.
Beaker repo: https://github.com/algorand-devrel/beaker Beaker Documentation: https://algorand-devrel.github.io/beaker/html/index.html
This is a recommendation only.
- Clone and set up your development environment (instruction below) to code what you learn by yourself.
- Have Beaker Github repo and Beaker documentation opened while learning.
- Try filling in blanks in files under
starter-kit
folder and make the file run. If you are stuck, refer code examples provided in the Beaker github repo or search in the Beaker doc for guidance. Recommended learning route is:- contract_basic/application.py
- contract_basic/state.py
- contract_basic/decorator.py
- interact_basic/use_sandbox.py
- interact_basic/use_app_client.py
- After completing all of the files above, Try building your own RSVP Application with what you learned. Try to fail as much as possible as you will learn from making mistakes, debugging, and diving into the Beaker source code to find answers.
After completing these steps, you will be a Beaker master! ๐๐
Now go innovate and build your own application with Beaker ๐
๐ฆcomplete_code - Directory containing complete code for demonstration
โฃ ๐contract_basic - Directory containing Beaker contract components code examples
โ โฃ ๐application.py - Code example showcasing application class
โ โฃ ๐decorator.py - Code example showcasing Beaker decorators
โ โ ๐state.py - Code example showcasing Beaker States
โฃ ๐interact_basic - Directory containing Beaker deploy/call, testing components code examples
โ โฃ ๐use_app_client.py - Code example showcasing Beaker application client
โ โ ๐use_sandbox.py - Code example showcasing Beaker sandbox module
โ ๐rsvp - Directory containing full RSVP App code examples
โ โฃ ๐approval.teal - autogenerated RSVP TEAL approval program
โ โฃ ๐clear.teal - autogenerated RSVP TEAL clear program
โ โฃ ๐contract.json - A JSON file describing the interface of the contract to be read by SDK clients
โ โฃ ๐interact_rsvp.py - Code example showcasing how to deploy / call RSVP app using Beaker sandbox module and Application client
โ โ ๐rsvp.py - RSVP application built with Beaker
๐ฆstarter_kit - Directory containing all of the files above but with "fill in the blank" type of files for you to learn by coding by yourself
Install the sandbox to start a local private node and start it with the dev
configuration.
If you're in the sandbox directory run:
./sandbox up dev
Next, clone this repository and cd to the root directory.
Create a virtual environment inside the project directory.
python3 -m venv venv
Activate virtual environment.
source ./venv/bin/activate
requirements.txt file contains all of the required dependencies and packages. Install them in your virtual environment by running:
pip install -r requirements.txt
Check all dependencies and packages install in your virtual environment by running:
pip list