This project is meant to be cloned and used to follow along the AlgoKit App Client Explained video. With this project, you will learn how to set up your development environment with algokit bootstrap all
, how to generate a typescript client for contract interaction with algokit generate
and use the generated client to interact with a calculator smart contract.
📂smart_contract - Directory containing files related to the calculator smart contract
┃ 📂artifacts - Directory containing autogenerated artifacts
┃ 📜build.py - Python script that generates artifacts from the PyTeal/Beaker smart contract
┃ 📜calculator.py - Calculator smart contract in PyTeal/Beaker
┃ 📜deploy.ts - Deploy/interact script with the contract using the generated ts client
┃ 📜**.env** - Contains localnet env variables
- Ensure you have AlgoKit installed and run
algokit bootstrap all
in this directory - Go into the
smart_contract
folder by runningcd smart_contract
- Generate ts client with
algokit generate client artifacts/ --output artifacts/client.ts
. Learn more aboutalgokit generate
here - Ensure you have Docker running and launch Localnet with
algokit localnet start
- copy everything inside of
.env.localnet.template
file into.env
file. - Run the
deploy.ts
file by runningnpm run deploy
in the smart_contract folder
The following tools are used in this project:
- Algorand - Layer 1 Blockchain; Developer portal, Why Algorand?
- AlgoKit - One-stop shop tool for developers building on the Algorand network; docs, intro tutorial
- Beaker - Smart contract development framework for PyTeal; docs, examples
- PyTEAL - Python language binding for Algorand smart contracts; docs
- AlgoKit Utils - A set of core Algorand utilities that make it easier to build solutions on Algorand.
- Poetry: Python packaging and dependency management.