- Download and setup
docker
. - Download and setup
docker-compose
.
- Copy backend/sample.env to backend/.env
cp backend/sample.env backend/.env
. - Put correct data into backend/.env if you need.
- Copy frontend/sample.env to frontend/.env
cp frontend/sample.env frontend/.env
. - Put correct data into frontend/.env if you need.
- Run
docker-compose build
. - Run
docker-compose run backend python manage.py migrate
. - Run
docker-compose run backend python manage.py collectstatic
. - Run
docker-compose up -V
.
- Make sure you have done everything from instructions above.
- Run
docker-compose stop
(we have to stop node to run catchup). - Run
docker-compose run algorand bash
. - Run in Algorand bash
./goal node start -d data
. - Run in Algorand bash
./update.sh -d data
. - Obtain catchup point from https://developer.algorand.org/docs/run-a-node/setup/install/#sync-node-network-using-fast-catchup. For TestNet: https://algorand-catchpoints.s3.us-east-2.amazonaws.com/channel/testnet/latest.catchpoint.
- Run in Algorand bash
./goal node catchup <paste catchup point here!> -d data
. - Run in Algorand bash
./goal node status -d data -w 1000
and wait till you see textSync Time: 0.0s
. - Run in Algorand bash
cp data/config.json.example data/config.json
. - Edit
"EnableDeveloperAPI": false,
to"EnableDeveloperAPI": true,
in data/config.json. - Add to backend/.env token from data/algod.token like
ALGO_API_TOKEN=<token>
. - Run in Algorand bash
exit
.
- Create superuser
docker-compose run backend python manage.py createsuperuser
. - Run
docker-compose run backend python manage.py generateaddress
- You will see address and private key in output, please save it.
- Go to https://dispenser.testnet.aws.algodev.network/ and paste your address there and click "Dispense".
- Run in seprate terminal
docker-compose up algorand
. - Run
docker-compose run backend python manage.py usdcoptin <ADDRESS> <PRIVATE_KEY>
. - Go again to https://dispenser.testnet.aws.algodev.network/ and check "100 USDC" and paste your address there and click "Dispense".
- Go to django admin panel and add new Accounts/Account. Paste address, private key, set type on "Main account" and set user as superuser.
- Copy backend/accounts/fixtures/example.main_account.json backend/accounts/fixtures/main_account.json .
- Paste your address and private key from previous section into main_account.json.
- You can track your tests here
https://testnet.algoexplorer.io/address/<YOUR ADDRESS>