Skip to content

Algorand Note

Algorand sandbox#

Initialization#
  • @2021-12-15
  • Examples
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Available accounts
./sandbox goal account list
## Example command to send between two accounts:
./sandbox goal clerk send -a 123456789 \
  -f 5FCT5DRXI0777MGBPGZUC7YWSQVIQQCWPQGOYZKYETPXA0K3PV3ZPOK5IM \
  -t GUJLQG20ALKCGD3DFLC3A5BCOYEK6HAI3UJBSJ6TRJ3YEGY4FQLBUBOZGY
# -a amount, -f from, -t to
## Soon after sending the transaction it will appear in indexer:
# check
curl "localhost:8980/v2/transactions?pretty"
  • Setup system env var
    • export SANDBOX_DIR="PATH/TO/algorand/sandbox" #to the sandbox dir
    • Or put project directory next to sandbox(share same parent dir)
    • Important for VSCode: python interpreter should set to the python executable file of the venv.
What is sandbox#
  • @2021-12-24
  • (wrong:) I thought sandbox is a virtual chain, and we could create account, run transaction and smart contract inside the sandbox. But it's actually not.
  • (summary:) Algorand is a chain, on this chain we have several "client" to run different "smart contract". Sandbox is a quick way to setup a "client" so that we can deploy our smart contract on algorand (testnet).
  • From the repo, it's said "a fast way to create and configure an Algorand development environment with Algod and Indexer."
  • Algod is an Algorand's official implementation in Go. To me It's an client, who controls, maintains and executes the smart contract(s). I think the name stands for algo-docker, containing all features of algorand PoS chain. (update 220324: algo-daemon)
  • Indexer. To my understanding it's a server of the algod client, who keeps track of all the transactions and smart contracts executed by its algod client.
  • All py-algorand-sdk functions will run on testnet.
Interact with sandbox#
  • @2021-12-24
  • Create an account in sandbox: the sandbox is like a local smart contract client, you can't create account in sandbox.
Pending for sandbox#
  • [ ] what does those accounts on 8980 port do?
  • [ ] Are the on testnet / main net?

Better sandbox#

  • @2021-12-25
  • Instead of sandbox, we should usehttps://developer.purestake.io/
  • Reason: sandbox has some problem. The sample code is not working with error ``

ASA#

What is ASA: Algorand Standard Assets#

Our ASA: ARTcoin on Algorand Chain#

PyTeal tools#

Frontend#

Interact with smart contracts Algorand Blockchain Development using Reach - Part 7: React.js Front End and AlgoSigner Integration