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

Arc4 types examples #6

Merged
merged 23 commits into from
Dec 10, 2024
Merged

Arc4 types examples #6

merged 23 commits into from
Dec 10, 2024

Conversation

iskysun96
Copy link
Collaborator

adding arc4 types code examples

# example: ARC4_ADDRESS
@abimethod()
def arc4_address_properties(self, address: arc4.Address) -> UInt64:
underlying_bytes = ( # noqa: F841
Copy link
Collaborator

@gabrielkuettel gabrielkuettel Dec 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# noqa: F841 is to ignore unused variables? Maybe log or return underlying_bytes and others so you can remove these comments and keep the examples clean

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah. If I want to do that, I would have to construct a tuple and return various types. I thought that would complicate the example more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could just log it, no? e.g., log(underlying_bytes)

Copy link
Collaborator

@gabrielkuettel gabrielkuettel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks great! I just added a few nitpicks to the comments for additional clarity.

@iskysun96 iskysun96 merged commit 34254e1 into main Dec 10, 2024
1 check passed
@iskysun96 iskysun96 deleted the arc4-types-examples branch December 10, 2024 14:14
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.

3 participants