Skip to content

Conversation

ravicharanj22
Copy link

Algorand Coding Challenge Submission

What was the bug?
-> Given code after debugging give an error at

*** ptxn.receiver == Global.current application_id ***
and
***Txn.sender, Global.current application address ***
because, above both are comparing the Address type and Application type
=>In (1) expression, ptxn.receiver returns the Address type but Global.current application id returns the application type comparing both gives an error.
=> In (2) expression, op.app_opted_ in method is comparing the T×n.sender(returns Application type) and Global.current_application_address ( returns Address type) here, we are comparing different types of data so we get an error.
How did you fix the bug?
=> To solve (1) we need to use the current_ application_address (returns address type) method in Global class
Global.current application_address }
=> To solve (2) we need to use the current_application id method(returns Application type) in Global class {
Global.current_application_id }

Console Screenshot:
Screenshot 2024-05-06 at 10 00 11 AM

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

🎉 Congrats on solving the 1st Algorand Python 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/5rc2q57822ka1h0pf4eqv6yx1nxwwvvf5m72vte7gdf6sr0wxd4ccdsp3qzmtas72jxdnrjv9ewf6rwee0aerm1whzt509dv2rh5w18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved ✅ Successfully completed the challenge!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants