NOTE: This code is not audited and should not be used in production environment.
NOTE: This tutorial is not for beginners and assumes the reader is familiar with setting up a private algorand node and setting up testnet accounts.
Link to Tutorial Read about algorand sandbox
This tutorial also touches on using algorand sandbox and setting account
- To teach about transacion fee pooling on algorand.
- Inner Transactions.
- Handling Errors when interacting with smart contract via a python script.
Docker Compose MUST be installed. Instructions.
On a Windows machine, Docker Desktop comes with the necessary tools. Please see the Windows section in getting started for more details.
Warning: Algorand Sandbox is not meant for production environments and should not be used to store secure Algorand keys. Updates may reset all the data and keys that are stored.
Use the sandbox command to interact with the Algorand Sandbox.
sandbox commands:
up [config] -> start the sandbox environment.
down -> tear down the sandbox environment.
Sandbox creates the following API endpoints:
algod
:- address:
http://localhost:4001
- token:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- address:
kmd
:- address:
http://localhost:4002
- token:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- address:
indexer
:- address:
http://localhost:8980
- address:
Make sure the docker daemon is running and docker-compose is installed.
Open a terminal and run:
git clone https://github.com/algorand/sandbox.git
In whatever local directory the sandbox should reside. Then:
cd sandbox
./sandbox up
It should run the released version of sandbox
This will run the sandbox
shell script with the default configuration. See the Basic Configuration for other options.
Install all project dependencies
Open a terminal and run:
python3 pip -r requirements.txt
create a .env
file in the root of the project and paste your environment variables as described in the .env.example
file.
import 3 testnet accounts to the goal app by running this command:
./sandbox goal account import
./sandbox goal clerk send -a {amount} -f {provided accounts in goal} -t {imported accounts}
For more information on how to use alglorand sandbox visit:
Open a terminal in project directory and run
cd src
python3 deploy.py