Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solution for Challenge 3 #85

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

algotables
Copy link

@algotables algotables commented May 11, 2024

Fix the Bug Submission Pull Request

What was the bug?

The initial implementation of the HelloWorldClient in our Algorand-based application contained several bugs related to improper client instantiation and method calls. Specifically:

  • The client was not correctly instantiated with necessary parameters, missing proper client-object configurations.

How did you fix the bug?

  1. Client Initialization:

    • Updated the HelloWorldClient instantiation to correctly include the algod client as part of its parameters. This ensures that the client is properly set up to interact with the Algorand network.
    • Modified the creatorAddress parameter to use deployer.addr, providing the correct address format required by the client.
  2. Method Call Adjustment:

    • Updated the helloWorld method call to use hardcoded "Jeff" as a name parameter, replacing the 'YOUR_NAME' placeholder. This was done to facilitate immediate testing and validation.
  3. Code Testing:

    • Conducted a test to ensure that the application deploys correctly and the helloWorld method interacts as expected without errors.

Console Screenshot:

algorand-volume-1-challenge-3-AppClient -5-11-24

This commit fixes issues in the HelloWorldClient setup and its interaction with the Algorand blockchain:
- Modified the HelloWorldClient constructor to correctly include algod client and adjust the creatorAddress to use deployer.addr, aligning with AlgoKit's requirements for typed clients.
- Corrected the createApplication method call to remove an erroneous additional 'create.' prefix and ensured proper parameters in the helloWorld method.
- Replaced placeholder 'YOUR_NAME' with 'Jeff' in the helloWorld method call for practical testing.

These changes ensure that the client is initialized correctly and interacts with the Algorand blockchain as intended.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant