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

fix: pydantic v2 API; incorrect encoding #175

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

fubuloubu
Copy link
Member

What I did

fixes: #

How I did it

How to verify it

Checklist

  • Passes all linting checks (pre-commit and CI jobs)
  • New test cases have been added and are passing
  • Documentation has been updated
  • PR title follows Conventional Commit standard (will be automatically included in the changelog)

@fubuloubu
Copy link
Member Author

@antazoey, do you know why ReceiptAPI.transaction_hash is now a bytesarray-like list of uint8 integers? (see 2740493)

@antazoey
Copy link
Member

antazoey commented Nov 24, 2024

@antazoey, do you know why ReceiptAPI.transaction_hash is now a bytesarray-like list of uint8 integers?

I don't think Receipt has a field named transaction_hash:

In [3]: tx.transaction_hash
ERROR:    (ApeAttributeError) 'Receipt' object has no attribute 'transaction_hash'. Also checked extra(s) 'transaction'.

There is a field called txn_hash though; it's always been called that.

In [7]: tx.txn_hash
Out[7]: '0xb96c723ea53398faa98ad3b746cf9f94b76f09241f0a7e48fb3c00b232c23e03'

For 0.9, I would good with renaming the field to transaction_hash though.

@fubuloubu
Copy link
Member Author

@antazoey, do you know why ReceiptAPI.transaction_hash is now a bytesarray-like list of uint8 integers?

I don't think Receipt has a field named transaction_hash:

In [3]: tx.transaction_hash
ERROR:    (ApeAttributeError) 'Receipt' object has no attribute 'transaction_hash'. Also checked extra(s) 'transaction'.

There is a field called txn_hash though; it's always been called that.

Okay I have to trace down how that gets in there...

In [7]: tx.txn_hash
Out[7]: '0xb96c723ea53398faa98ad3b746cf9f94b76f09241f0a7e48fb3c00b232c23e03'

For 0.9, I would good with renaming the field to transaction_hash though.

We shouldn't have to do that, no

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.

2 participants