Skip to content

algorand-devrel/learn-algokit-ts-client

Repository files navigation

Learn Autogenerated AlgoKit TS Client with Calculator App

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.

Contents

📂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

Setup

  1. Ensure you have AlgoKit installed and run algokit bootstrap all in this directory
  2. Go into the smart_contract folder by running cd smart_contract
  3. Generate ts client with algokit generate client artifacts/ --output artifacts/client.ts. Learn more about algokit generate here
  4. Ensure you have Docker running and launch Localnet with algokit localnet start
  5. copy everything inside of .env.localnet.template file into .env file.
  6. Run the deploy.ts file by running npm run deploy in the smart_contract folder

Tools

The following tools are used in this project:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •