ihsraham / algokit-hello-world

0 stars 0 forks source link

algokit-hello-world

Welcome to my AlgoKit project!

I've developed an Algorand smart contract using AlgoKit and AlgoPy that stores and retrieves greetings in blockchain storage boxes. The contract includes methods for initializing, setting, and reading greetings. Alongside this, a deployment script was created to interact with the contract, handling deployment, method calls, and information retrieval.

Key nuances:

  1. BoxMap was used for persistent on-chain storage, adapting to Algorand's box storage mechanism.
  2. Error handling and logging were implemented to manage potential issues in contract interactions.
  3. To optimize for Algorand's fast finality, arbitrary delays were replaced with transaction confirmation checks.
  4. Repetitive operations were consolidated into reusable functions for cleaner code.
  5. Proper formatting of box keys and handling of potential box existence issues were ensured.

This approach resulted in a robust, efficient smart contract deployment and interaction process, tailored to Algorand's specific features and best practices.

Smart Contract Deployment

We've successfully deployed our "HelloWorld" smart contract to the Algorand TestNet. You can view the application on the Lora explorer:

View Application on Lora Explorer

image image

Deployment Process

Here's a screenshot of the terminal showing the logs during the deployment process:

image

Feedback on the AlgoKit Guide

After following the AlgoKit Getting Started Guide, we have some observations and suggestions for improvement:

  1. Prerequisite Clarity: The guide assumes readers are seasoned Python developers with pipx and Python venv already set up. It would be helpful to explicitly state these prerequisites or provide setup instructions.

  2. Explore Command Discrepancy: The guide states that algokit explore opens Dappflow in the browser, but it actually opens LORA (lora.algokit.io). LORA does have an App Studio option in the left sidebar that links to Dappflow.

  3. Outdated Dappflow References: The guide's instructions for Dappflow seem to be based on an older version. For example:

    • There's no "sandbox" option in the top left corner
    • The process for creating test accounts differs from the guide's description
    • Screenshots in the guide are outdated
  4. Browser Compatibility Notes: The guide should expand its browser compatibility notes:

    • The existing note about Safari not working with LocalNet is helpful
    • It should also mention that Brave browser users need to disable Brave Shields for LORA and Dappflow to function properly

    Here are examples of what users might see with Brave Shields enabled:

    Dappflow (blank page):

    Dappflow with Brave Shields

    LORA (error message):

    LORA with Brave Shields

These improvements would greatly enhance the user experience for developers new to AlgoKit and the Algorand ecosystem.


Powered by AlgoKit.