I want to send 1 ALGO to my friend to show how amazing Algorand is but I can't send my transaction! what's wrong???
Inside of index.ts
file, there is a script that sends a payment transaction that sends 1,000,000 microAlgos (1 ALGO) to the receiver's wallet. However if you try running the index.ts
file after opening Docker Desktop and then running:
algokit bootstrap all
algokit localnet start
npm run start
it will fail and show this error: TypeError: Argument must be byte array
This repository has the challenge
folder on the root level, which contains the fix the bug challenge codebase.
Find the index.ts
file inside of the challenge
folder and fix the bug! 🐞
💬 Meet other hackers working on this challenge and get help in the JavaScript SDK Discord Channel!
- Install AlgoKit.
- Install Docker. It is used to run a local Algorand network for development.
- Install Node.JS / npm
Make sure to install these 3 prerequisites before continuing!
- Fork this repository.
- Clone the repository
cd [DIRECTORY_OF_YOUR_CHOICE]
git clone [FORKED_REPO_URL]
- Open the cloned repository with the code editor of your choosing.
- Go into the
challenge
directory and run the following in your terminal:
algokit bootstrap all
Video walkthrough of forking and cloning this repository:
fork-clone-tutorial.mp4
Now you are ready to fix the bug!
- Open Docker Desktop and launch Algorand localnet by running
algokit localnet start
in your terminal For more info click me!. - Make sure you are inside the
challenge
directory and runnpm run start
in your terminal to run theindex.ts
file and see the error message. - Go to
index.ts
file and fix the code to make it work. - Run
npm run start
inside ofchallenge
directory again to run theindex.ts
file. If you see:Payment of 1000000 microAlgos was sent to [receiver's address]
in the console, you successfully fixed the bug! 👏
😰 Are you struggling? Here is a hint for you: https://developer.algorand.org/docs/sdks/javascript/
- After fixing the bug, push your code to your forked Github repo and make a PR to the original repo.
- Inside the PR include:
- What was the problem?
- How did you solve the problem?
- Screenshot of your terminal showing the logged sentence.
Payment of 1000000 microAlgos was sent to [receiver's address]
The Algorand Developer Relations team will review the submission and "approve" the PR by labeling it Approved
. Once it's approved, we will share the magic link to claim your certificate of completion NFT in the comment of the PR!
🎉 Congratulations on completing the challenge Algodev! Now on to the next one 💪