In this assignment, you will be tasked to complete the PyTeal stateless program in artifacts/pyteal_program.py that checks the transactions performed in scripts/main.js.
The transaction performed is a simple Algo transfer from master account to accounts acc1 and acc2.
A password would be supplied as a argument to the stateless program during transaction execution. The program should contain the following logic,
- Transaction should not have a rekey to address or close remainder to address.
- If the transaction receiver is
acc1address, the password should bercv1password. The transacted amount should not be above 5 Algos. - If the transaction receiver is
acc2address, the password should bercv2password. The transacted amount should not be above 10 Algos.
To test your PyTeal program, change the transaction amount, receiver account addresses or password and see if your program rejects the transaction.
yarn install
- Copy
.env.exampleto.env. - Update Algorand Sandbox credentials in
.envfile. You will need 3 accounts for this assignment.
- Update the account credentials. You will need 3 accounts,
master,acc1andacc2.
source .env
yarn run algob deploy scripts/main.js
yarn run algob clean