Skip to content

Conversation

@calvin-do
Copy link

@calvin-do calvin-do commented Mar 13, 2024

Bootstrapped algokit, removed commented line, and updated generate client command

Algorand Coding Challenge Submission

What was the bug?

The bug was that algokit was not yet bootstrapped.

How did you fix the bug?

Tried to run npm run test
and encountered missing tealscript dependency, this indicates that I likely need to install all the necessary dependencies.
1
The hint suggestion pointed to using algokit bootstrap all, algokit bootstrap env, algokit bootstrap poetry, and algokit bootstrap npm. Out of these commands I thought that it would be fine to just use algokit bootstrap npm:
2
I then tried to run npm run test but encountered a client generation failure:
3
This led me to trying to fix the previous package issues that were mentioned by using npm audit fix
4
I then tried to run npm run test but encountered a client generation failure:
5
I decided to revisit the idea that maybe I should run all of the algokit commands instead so I ran algokit bootstrap all:
6
Still the same error:
7
Here I tried to run algokit doctor because I thought there was a missing dependency that was causing the client generation failure. I noticed that poetry was not installed even though algokit bootstrap all was run earlier (which claims to run algokit bootstrap poetry).
8
I decide to run algokit bootstrap poetry as a remediation attempt
9
Poetry is now installed:
10
Still the same error:
11
I saw this PR: #30 and noticed that they had changed algokit generate to algokitgen generate so I tried that out but got the following error:
12
Took inspiration from above PR and modified the command to use -a with the artifact json:
13

Console Screenshot:
Completed tests:
14

Additional Comments

  • I'm not sure if the creation of new artifacts is intentionally stored in github / other repo. My natural instinct is that it might be something that should be in a gitignore. Please do educate me on best practices / why we should store these artifacts in a repo.

  • algokit bootstrap all didnt actually seem to run algokit bootstrap poetry or algokit bootstrap env

@iskysun96 iskysun96 added the Approved ✅ Successfully completed the challenge! label Mar 14, 2024
@iskysun96
Copy link
Contributor

Thanks for sharing how you debugged. The algokitgen issue should have been solved with this PR algorandfoundation/algokit-cli#454

Regarding exposing artifacts, its really up to the project owner but by exposing the artifacts if someone wants to interact with a deployed contract, they can just take the arc32.json file and instantiate an appClient without having to compile and generate the artifacts.

🎉 Congrats on solving the 2nd Algorand Coding Challenge!

I have labeled your PR approved so you can now claim your certificate.

You can claim your certificate of completion NFT here:
https://goplausible.xyz/claim/f5ctf17aqhhzxxhrjgzye58g5fa07tr9x7q1j595041m2t7drgkx4z87neww65f81ehyvkxd7qp0f21pzg7vpdne0vqrncc7m1bv02g

@iskysun96 iskysun96 added the LEGENDARY Recognizing the REAL ones 👑 label Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Approved ✅ Successfully completed the challenge! LEGENDARY Recognizing the REAL ones 👑

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants