-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
a0df1d5
to
2671ac6
Compare
projects/python-contract-examples/smart_contracts/arc4_types/contract.py
Show resolved
Hide resolved
projects/python-contract-examples/smart_contracts/arc4_types/contract.py
Outdated
Show resolved
Hide resolved
# example: ARC4_ADDRESS | ||
@abimethod() | ||
def arc4_address_properties(self, address: arc4.Address) -> UInt64: | ||
underlying_bytes = ( # noqa: F841 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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)
projects/python-contract-examples/smart_contracts/arc4_types/contract.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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.
…ontract.py Co-authored-by: Gabriel Kuettel <[email protected]>
…ontract.py Co-authored-by: Gabriel Kuettel <[email protected]>
…ontract.py Co-authored-by: Gabriel Kuettel <[email protected]>
adding arc4 types code examples