Coder Social home page Coder Social logo

emg110 / appasa Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 2.0 28.04 MB

This repository contains educational code & content prepared for the Algorand developers portal.

License: MIT License

Shell 100.00%
algorand asa asset blockchain smart-contract atomic-transfers transaction-group application-call stateful-smart-contract stateless-smart-contract

appasa's Introduction

AppASA

AppASA repository contains code solution plus tutorial content, prepared for Algorand's Developers Portal. DO NOT USE DIRECTLY IN PRODUCTION or MAINNET unless you know what you're doing!

Author

@emg110

Hi! MG here!

Many many thanks goes to Jason, Ryan, Russ, Fabrice and all Algorand & Algorand Foundation team for being insightful, willing, welcoming, accepting and guiding.

Technical notes

This repository uses Algorand Sandbox and assumes it exists already.

Please install this repo next to the sandbox folder in your workspace.

Run chmod +x appasa.sh in appasa folder to let the scripts run.

Make sure you have a wallet and an active account under it, on sandbox, check sandbox docs for more information.

It's very important that the wallet you use for test and development does not have a password on it , otherwise the process will be intrupted and hangs.

What does this demo do

This is a very simple demo tool built using bash script, Algorand's beautiful goal command line and TEAL 4 (No SDK used) in hope to be extendible and re-usable in future by Algorand dev community.

What was exciting about this AppASA solution!

  • Full featured command line to experience the power of Algorand in a classic way.

  • TEAL is parametrized in CLI for this solution (on Application ID).

  • Many featured demos out of the box & by a single command: Creating stateful smart contract, creating stateless smart contract

  • It's sandboxed baby! This entire demo works on amazing Algorand Sandbox.

How to use AppASA

Easily! You can get AppASA solution demo up & running in no time because it uses Algorand Sandbox to provide demo enviromnet in no time!

  • Clone this repository from GitHub to your workspace using:

    git clone https://github.com/emg110/appasa

  • Run the bash script file inside using :

./appasa.sh <Command> <Arg>

That's it! Have fun Algoranding using AppASA!

Screen capture demos of main features

Creating stateful smart contract application

Funding stateless escrow contract account

Linking stateful and stateless smart contracts (the app and the escrow)

Create Algorand Standard Asset with name AppASA-x (x being counter)

Transfering one unit of the created asset (or other created assets from escrow account assets) to main account on system

List of commands (and their arguments if any)

Sandbox utilities

  • For help, Run with help flag:

./appasa.sh help

  • To start sandbox:

./appasa.sh start

  • To stop sandbox:

./appasa.sh stop

  • To reset sandbox :

./appasa.sh reset

Node utilities

  • For node status :

./appasa.sh status

  • For list of transactions on node from indexer:

./appasa.sh trxlist

  • To check info on main account:

./appasa.sh main

  • To check info on escrow account:

./appasa.sh escrow

  • To check balance on main account:

./appasa.sh mainbal

  • To check info on escrow account:

./appasa.sh escrowbal

AppASA Solution Demo Process

order of running is important to be as numbered!

  • 1- Create algorand smart contratcs (statefull app and stateless excrow) :

./appasa.sh asc

  • 2- Fund escrow account in MicroAlgos (stateless smart contract) :

./appasa.sh fund AMOUNT e.g. ./appasa.sh fund 250000000

  • 3- Link stateful smart contract and stateless smart contarcts (app & escrow) :

./appasa.sh link

  • 4- Create the standard asset named AppASA-x (x being counter) :

./appasa.sh asa COUNTERe.g. ./appasa.sh asa 0

  • 5- Transfer one unit of created AppASA-x to main account on system :

./appasa.sh axfer ASSET_INDEXe.g. ./appasa.sh axfer 13

appasa's People

Contributors

emg110 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

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.