Git Product home page Git Product logo

beaker-starter-kit's Introduction

Beaker Starter Kit

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

How to Learn

This is a recommendation only.

  1. Clone and set up your development environment (instruction below) to code what you learn by yourself.
  2. Have Beaker Github repo and Beaker documentation opened while learning.
  3. 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
  4. 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 ๐Ÿ˜

Contents

๐Ÿ“ฆ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

Development Environment

Install Sandbox

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

Clone repository

Next, clone this repository and cd to the root directory.

Setup Virtual Environment

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.