I want to instantiate an app client to deploy and interact with my smart contract but it's not working!!
This project includes a simple helloWorld
smart contract written with TEALScript inside of ./contract/helloWorld.algo.ts
file. The smart contract is already compiled with artifacts generated inside of the ./contracts/artifacts
folder and the application typed client inside of ./contracts/clients/helloWorldClient.ts
file.
Artifacts: autogenerated assets (TEAL contract code, ABI spec, source mapping) for your smart contract. Application Typed Client: autogenerated client used to easily deploy / interact with Algorand smart contract.
The index.ts
file in the root level is a script that deploys the helloWorld
smart contract and calls the helloWorld
method.
However, if you try to run the index.ts
file after going into the challenge
directory, opening Docker Desktop, and then running:
algokit bootstrap all
algokit localnet start
npm run start
it will fail.
Find out what is wrong and fix the bug.
๐ฌ Meet other hackers working on this challenge and get help in the AlgoKit 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.
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!. - Go to
./contracts/helloWorld.algo.ts
to read thehelloWorld
TEALScript smart contract and understand what it does. - Go to
./index.ts
and read the comments on the file and fix the bug! - After fixing the bug run the below command inside the
challenge
directory:
npm run start
If you see something like the image below, you have successfully fixed the bug! Congratulations ๐
๐ฐ Are you struggling? Here is a hint for you: https://developer.algorand.org/docs/get-details/algokit/features/generate/?from_query=algokit%20utils#1-typed-clients
- After fixing the bug, push your code to your forked Github repo and make a PR to the original repo.
- Inside the PR include:
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!
The certificate of completion NFT is a verifiable credential minted on the GoPlausible platform that follows the W3C standard for certificates and OpenBadges standard for badges.
๐ Congratulations on completing the challenge Algodev! Now on to the next one ๐ช