Skip to content

Conversation

kkeerthana18
Copy link

Algorand Coding Challenge Submission

What was the bug?

-> Given code after debugging give an error at

''''ptn.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 Txn.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 (reuturns address type) method in Global class {
Global.current_application_address }
=> To solve (2) we need to use the current application id method(reuturns Application type) in Global class f
Global.current _application _id }

Console Screenshot:

Screenshot_1

@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.

2 participants