-
Notifications
You must be signed in to change notification settings - Fork 92
Description
Problem
👾 Description of the Issue
The central TransactionRecord class, located in src/hiero_sdk_python/transaction/transaction_record.py, is missing essential documentation on its aggregated fields and key helper methods. Given the complexity of the data handled by this class (including contract results, NFT transfers, and airdrops), clear documentation is vital for maintainability and contributor readability.
The following methods/components require comprehensive Google-style documentation:
- Dataclass Parameters (
__init__): The implicitly generated constructor needs documentation for all fields (e.g.,transaction_hash,token_transfers,prng_bytes). __repr__method: Lacks a docstring explaining that it returns a human-readable string representation of the record._from_protomethod: Needs expansion to clearly detail the complex data aggregation and mapping logic it performs (token transfers, NFT transfers, airdrop records).
💡 Solution
Implement comprehensive, Google-style docstrings throughout the specified file.
Proposed Solution
💡 Proposed Solution
The solution requires implementing or expanding documentation for the TransactionRecord class and its methods in src/hiero_sdk_python/transaction/transaction_record.py.
Step-by-Step Implementation:
- Document Dataclass Fields: Add descriptive documentation for all fields defined in the
TransactionRecordclass. - Document
__repr__Method: Add a Google-style docstring explaining that it generates a human-readable string representation of the transaction data. - Expand
_from_proto: Expand the existing docstring to full Google-style, detailing all inputs, the return value, and clarifying the method's role in aggregating all nested transfer data from the raw Protobuf. - Reference for Style: Follow the style conventions used in other SDK files.
📋 Requirements to Pass
- The
__init__parameters (dataclass fields),__repr__, and_from_protomethods must receive descriptive, Google-style docstrings. - Update the
CHANGELOG.mdunder## [Unreleased] -> ### Added. - All commits must be signed (
-Sand-s).
Implementation
Implementation
The contributor must perform the following technical steps in the file src/hiero_sdk_python/transaction/transaction_record.py:
- Document Dataclass Fields: Add descriptive documentation for all fields defined in the
TransactionRecordclass (e.g.,transaction_hash,token_transfers,prng_number). - Document
__repr__: Implement a docstring for the__repr__method, explaining that it generates a comprehensive, human-readable string representation of the record. - Expand
_from_proto: Expand the existing docstring to full Google-style, detailing that the method aggregates complex data (token transfers, NFT transfers, airdrop records) from the raw Protobuf message. - Compliance: Ensure the final commit is DCO (
-s) and GPG (-S) signed. - Changelog: Update the
CHANGELOG.mdunder## [Unreleased] -> ### Added.