Code Monkey home page Code Monkey logo

algorand-coding-challenges-1's Introduction

๐ŸŽฎ Algorand Coding Challenge: Fix The Bug ๐Ÿž!

๐Ÿšฉ Challenge 1: I Can't Send My Transaction! ๐Ÿ˜ญ

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!

Checkpoint 1: ๐Ÿงฐ Prerequisites

  1. Install AlgoKit.
  2. Install Docker. It is used to run a local Algorand network for development.
  3. Install Node.JS / npm

Make sure to install these 3 prerequisites before continuing!

Checkpoint 2: ๐Ÿ’ป Set up your development environment

  1. Fork this repository.
  2. Clone the repository
cd [DIRECTORY_OF_YOUR_CHOICE]
git clone [FORKED_REPO_URL]
  1. Open the cloned repository with the code editor of your choosing.
  2. 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!

Checkpoint 3: ๐Ÿž Fix the bug ๐Ÿง

  1. Open Docker Desktop and launch Algorand localnet by running algokit localnet start in your terminal For more info click me!.
  2. Make sure you are inside the challenge directory and run npm run start in your terminal to run the index.ts file and see the error message.
  3. Go to index.ts file and fix the code to make it work.
  4. Run npm run start inside of challenge directory again to run the index.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/

Checkpoint 4: ๐Ÿ’ฏ Submit your answer

  1. After fixing the bug, push your code to your forked Github repo and make a PR to the original repo.
  2. Inside the PR include:
    1. What was the problem?
    2. How did you solve the problem?
    3. Screenshot of your terminal showing the logged sentence. Payment of 1000000 microAlgos was sent to [receiver's address]

Checkpoint 5: ๐Ÿ† Claim your certificate of completion NFT! ๐ŸŽ“

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 ๐Ÿ’ช

algorand-coding-challenges-1's People

Contributors

iskysun96 avatar hongthaipham avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.