You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
β Researched across multiple files and modules
β Owned implementation decisions
β Written thorough, meaningful tests
β Delivered a clean, review-ready pull request
π Problem Description
Transaction.from_bytes() returns a correctly-typed but empty instance for the transaction types below: they never override _from_protobuf, so every type-specific field is left at its default with no error or warning (common fields, signatures and the original body bytes are restored by the base class, so execution still works β inspection does not). Part of #2179; the dispatch-map fixes and the round-trip test harness land in #2614 first.
Implement _from_protobuf for each affected class as the exact field-for-field inverse of its build_transaction_body(), then remove the xfail markers for these types in the round-trip harness from #2614.
This is inverse-serialization contract work β please research the pattern before coding; do not code from this issue title alone, and do not ship the first AI-generated attempt that runs. Reviewers check inverse fidelity per field.
The reference implementations: FileCreateTransaction._from_protobuf (src/hiero_sdk_python/file/file_create_transaction.py) and TransferTransaction._from_protobuf (src/hiero_sdk_python/transaction/transfer_transaction.py). Your implementation must follow their structure exactly: call super()._from_protobuf(...), then restore type-specific fields from the body.
Each affected class's build_transaction_body() β your _from_protobuf is its exact inverse. Reuse the SDK's existing _from_proto converters (AccountId, TokenId, keys, β¦); never hand-parse a submessage that already has one.
The generated proto message for each body (src/hiero_sdk_python/hapi/services/) β learn which fields are optional (guard with HasField so unset stays None) versus plain scalars/repeated.
TokenAirdropTransaction reuses the TokenTransfer structures β research how TransferTransaction._from_protobuf (src/hiero_sdk_python/transaction/transfer_transaction.py) restores transfer lists and follow it. Cancel/claim restore repeated PendingAirdropId messages; reject distinguishes fungible token references from NFT references.
Constraints / acceptance criteria:
For each class: build with all fields set β freeze β to_bytes() β from_bytes() β every type-specific field equals the original
Unset optional fields come back as None/empty, not proto defaults
restored.to_bytes() stays byte-identical to the original (no re-serialization of the body)
Intermediate issues are high-risk. We expect more than just a 'working solution' and will recommend beginner issues if the PR does not meet these standards.
π Concrete Prerequisites
Advanced Programming Language: Higher level intermediate or advanced programming language.
Expertise: Strong understanding of files related to this issue (research before claiming!).
Proven History: Successfully completed β₯ 5 beginner issues in this repo.
If this feels like too big a step, that is completely fine β try a Beginner Issue first or a different Intermediate Issue. You can always come back when you are ready.
β οΈ AI Usage Policy
Using AI to generate code for Intermediate issues is strictly discouraged
Using AI as the main source of research is strictly discouraged, refer to language and library documentation, protobuf definitions and other SDKs.
β±οΈ Timeline & Workflow
Typical time: ~2 weeks / ~25 hours.
π΄ Completing an intermediate issue in 1β3 days is a red flag.
Tip
Suggested: share your proposed implementation approach as a comment before writing code to get early feedback and avoid wasted effort.
π§ͺ Testing Requirements
Important
At the intermediate level, testing is a major component.
Each _from_protobuf you implement must be verified field-by-field. Tests should cover happy paths, unset-optional edge cases, and error handling.
Check consistency with similar classes already in the SDK β use the same patterns
Integration tests will run automatically when you push
π‘οΈ Quality & Review Standards
Intermediate PRs must be "working, maintainable, and aligned with SDK architecture."
Working: The implementation must solve the problem and meet the acceptance criteria.
Maintainable: Code should be clear and concise enough for others to understand and debug without your assistance.
SDK Alignment: The solution should fit well with existing SDK patterns and abstractions.
Backward Compatibility: Public API signatures must be preserved.
Comprehensive Testing: Must include unit and integration tests covering all new logic paths, edge cases, and failure modes. AI generated tests based on AI generated code is grounds for immediate rejection.
β οΈ Breaking changes
Before changing any function signature, return type, or public API β stop and check
If a breaking change is unavoidable: get explicit maintainer approval before implementing
All existing tests should pass as-is.
β PR Quality Checklist
Before opening your PR, confirm:
I have spent the majority of my time researching the problem and solution space extensively, including reviewing relevant code, documentation, and external resources.
My implementation works but is also of high quality - including maintainability, readability, and architectural fit.
I have checked for breaking changes - no public APIs regress.
The system design fits with current Hiero SDK architectural approaches.
Every line of code is personally understood and explainable.
Before requesting a review, confirm:
I have reviewed the diff line by line.
My implementation fully addresses the problem described above.
I did not modify files unrelated to this issue
Clean git history β no rebase artifacts, merge commits, or unrelated files
My commits are signed: git commit -S -s -m "chore: description" β Signing guide
I have verified naming, types, and field ordering against pinned Protobufs.
I have applied appropriate linting, code quality, and formatting tools used in this repo.
I have included appropriate tests and all CI checks pass.
Double and triple check β intermediate PRs are time-consuming to review
π Workflow quick reference
You know the workflow β here are the links if you need them:
π§βπ» Intermediate Issue
Welcome! This is an Intermediate Issue touching core SDK architecture.
π When this issue is complete, you will have:
β Researched across multiple files and modules
β Owned implementation decisions
β Written thorough, meaningful tests
β Delivered a clean, review-ready pull request
π Problem Description
Transaction.from_bytes()returns a correctly-typed but empty instance for the transaction types below: they never override_from_protobuf, so every type-specific field is left at its default with no error or warning (common fields, signatures and the original body bytes are restored by the base class, so execution still works β inspection does not). Part of #2179; the dispatch-map fixes and the round-trip test harness land in #2614 first.Affected classes:
TokenAssociateTransaction(src/hiero_sdk_python/tokens/token_associate_transaction.py)TokenDissociateTransaction(src/hiero_sdk_python/tokens/token_dissociate_transaction.py)TokenRejectTransaction(src/hiero_sdk_python/tokens/token_reject_transaction.py)TokenAirdropTransaction(src/hiero_sdk_python/tokens/token_airdrop_transaction.py)TokenCancelAirdropTransaction(src/hiero_sdk_python/tokens/token_cancel_airdrop_transaction.py)TokenClaimAirdropTransaction(src/hiero_sdk_python/tokens/token_airdrop_claim.py)π‘ Expected Solution
Implement
_from_protobuffor each affected class as the exact field-for-field inverse of itsbuild_transaction_body(), then remove thexfailmarkers for these types in the round-trip harness from #2614.TokenAssociateTransaction._from_protobufTokenDissociateTransaction._from_protobufTokenRejectTransaction._from_protobufTokenAirdropTransaction._from_protobufTokenCancelAirdropTransaction._from_protobufTokenClaimAirdropTransaction._from_protobufπ Background Research
This is inverse-serialization contract work β please research the pattern before coding; do not code from this issue title alone, and do not ship the first AI-generated attempt that runs. Reviewers check inverse fidelity per field.
FileCreateTransaction._from_protobuf(src/hiero_sdk_python/file/file_create_transaction.py) andTransferTransaction._from_protobuf(src/hiero_sdk_python/transaction/transfer_transaction.py). Your implementation must follow their structure exactly: callsuper()._from_protobuf(...), then restore type-specific fields from the body.build_transaction_body()β your_from_protobufis its exact inverse. Reuse the SDK's existing_from_protoconverters (AccountId,TokenId, keys, β¦); never hand-parse a submessage that already has one.src/hiero_sdk_python/hapi/services/) β learn which fields areoptional(guard withHasFieldso unset staysNone) versus plain scalars/repeated.π οΈ Implementation Notes
TokenAirdropTransactionreuses theTokenTransferstructures β research howTransferTransaction._from_protobuf(src/hiero_sdk_python/transaction/transfer_transaction.py) restores transfer lists and follow it. Cancel/claim restore repeatedPendingAirdropIdmessages; reject distinguishes fungible token references from NFT references.Constraints / acceptance criteria:
to_bytes()βfrom_bytes()β every type-specific field equals the originalNone/empty, not proto defaultsrestored.to_bytes()stays byte-identical to the original (no re-serialization of the body)Part of #2179. Blocked by #2614.
π¬ Technical Domains
.protofiles,_to_proto()/_from_proto()correctness)π§ Intermediate Contributors β Prerequisites & Expectations
Caution
Intermediate issues are high-risk. We expect more than just a 'working solution' and will recommend beginner issues if the PR does not meet these standards.
π Concrete Prerequisites
If this feels like too big a step, that is completely fine β try a Beginner Issue first or a different Intermediate Issue. You can always come back when you are ready.
β±οΈ Timeline & Workflow
Tip
Suggested: share your proposed implementation approach as a comment before writing code to get early feedback and avoid wasted effort.
π§ͺ Testing Requirements
Important
At the intermediate level, testing is a major component.
Each
_from_protobufyou implement must be verified field-by-field. Tests should cover happy paths, unset-optional edge cases, and error handling.Source code changes (in
src/):to_bytes()βfrom_bytes()β assert every type-specific field equals the original)None/empty, not proto defaultsuv run pytest tests/unit/<specific_file>_test.py -vπ‘οΈ Quality & Review Standards
Intermediate PRs must be "working, maintainable, and aligned with SDK architecture."
β PR Quality Checklist
Before opening your PR, confirm:
Before requesting a review, confirm:
git commit -S -s -m "chore: description"β Signing guideπ Workflow quick reference
You know the workflow β here are the links if you need them:
/assignbelowπ Resources & Support
π Stuck?
Tip
Comment on this issue: and describe what you have tried. A maintainer will respond.
Project references:
Protobuf references:
Community: