Skip to content

Conversation

@Adityarya11
Copy link
Contributor

Description:
This PR adds a new training document: docs/sdk_developers/training/coding_token_transactions.md.
This guide provides a high-level architectural overview of how to create a new token transaction class in the Python SDK, covering:

  • Inheritance: How to properly subclass Transaction.
  • Initialization: Using the __init__ pattern with default None values.
  • Builder Pattern: Implementing fluent setters (e.g., set_account_id).
  • Protobuf Integration: Implementing build_transaction_body and _build_proto_body.
  • Scheduling: Implementing build_scheduled_body.
  • Routing: Defining _get_method for gRPC calls.

Related issue(s):
Fixes #863


Checklist

  • Documented (New markdown file added)
  • Tested (Verified markdown rendering locally)

Copilot AI review requested due to automatic review settings December 22, 2025 10:35
@codecov
Copy link

codecov bot commented Dec 22, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1190   +/-   ##
=======================================
  Coverage   91.26%   91.26%           
=======================================
  Files         139      139           
  Lines        8447     8447           
=======================================
  Hits         7709     7709           
  Misses        738      738           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds comprehensive training documentation for SDK developers on creating token transactions in the Hiero Python SDK. The guide provides a structured, step-by-step architectural overview covering the essential patterns and requirements for implementing new transaction types.

Key Changes:

  • Added docs/sdk_developers/training/coding_token_transactions.md with detailed guidance on transaction implementation
  • Updated CHANGELOG.md to document the new training resource

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
docs/sdk_developers/training/coding_token_transactions.md New training document covering inheritance structure, initialization patterns, builder pattern implementation, protobuf conversion, scheduling support, and network routing for token transactions
CHANGELOG.md Added entry documenting the new training documentation under the "Added" section

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@coderabbitai
Copy link

coderabbitai bot commented Dec 22, 2025

📝 Walkthrough

Walkthrough

Added a new training document explaining how to construct token transaction types in the Hiero Python SDK and updated the changelog to list this new documentation entry.

Changes

Cohort / File(s) Change Summary
Documentation additions
CHANGELOG.md, docs/sdk_developers/training/coding_token_transactions.md
Added docs/sdk_developers/training/coding_token_transactions.md, a high-level guide covering token transaction class inheritance from Transaction, default initialization patterns, setter methods, protobuf conversion points (_build_proto_body, build_transaction_body, build_scheduled_body), and gRPC routing via _get_method. Updated CHANGELOG.md to reference the new doc.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • Check markdown formatting and consistency with existing docs
  • Verify the changelog entry text and file path references

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: adding documentation on how to create token transactions in the SDK.
Description check ✅ Passed The description is well-related to the changeset, detailing the new documentation file and its coverage of token transaction architecture.
Linked Issues check ✅ Passed The new documentation file comprehensively addresses all coding-related requirements from issue #863: inheritance, initialization patterns, setters, Protobuf conversion, scheduling support, routing via _get_method, and a checklist for new transaction types.
Out of Scope Changes check ✅ Passed All changes are in scope: one new documentation file and one changelog entry, both directly addressing the objective to create training documentation on token transaction construction.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ea81b8a and e53718b.

📒 Files selected for processing (1)
  • CHANGELOG.md
🧰 Additional context used
🪛 LanguageTool
CHANGELOG.md

[uncategorized] ~59-~59: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...ed coding_token_transactions.md for a high level overview training on how token transact...

(EN_COMPOUND_ADJECTIVE_INTERNAL)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: build-and-test (3.13)
  • GitHub Check: run-examples
  • GitHub Check: build-and-test (3.12)
  • GitHub Check: build-and-test (3.10)
  • GitHub Check: build-and-test (3.11)
  • GitHub Check: StepSecurity Harden-Runner

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b97935d and ea81b8a.

📒 Files selected for processing (2)
  • CHANGELOG.md
  • docs/sdk_developers/training/coding_token_transactions.md
🧰 Additional context used
🪛 LanguageTool
CHANGELOG.md

[uncategorized] ~59-~59: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...ed coding_token_transactions.md for a high level overview training on how token transact...

(EN_COMPOUND_ADJECTIVE_INTERNAL)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: Agent
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: build-and-test (3.11)
  • GitHub Check: build-and-test (3.10)
  • GitHub Check: build-and-test (3.12)
  • GitHub Check: build-and-test (3.13)
  • GitHub Check: run-examples
  • GitHub Check: StepSecurity Harden-Runner
🔇 Additional comments (2)
docs/sdk_developers/training/coding_token_transactions.md (2)

1-149: Comprehensive training document covering all PR objectives.

The documentation is well-structured, clearly written, and successfully addresses all requirements from issue #863. It effectively explains the architectural patterns for creating token transactions, from inheritance through Protobuf conversion to gRPC routing.


68-133: All documented methods and Protobuf patterns are accurate and match the codebase.

The referenced base class methods build_base_transaction_body() and build_base_scheduled_body() exist as documented, the _build_proto_body() helper pattern is correctly implemented, and the transaction_body.tokenAssociate.CopyFrom() usage pattern matches actual implementations in token transactions like TokenAssociateTransaction. The three-step process for Protobuf conversion is accurate to how the code works.

exploreriii
exploreriii previously approved these changes Dec 22, 2025
Copy link
Contributor

@exploreriii exploreriii left a comment

Choose a reason for hiding this comment

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

Hi @Adityarya11 this is approved! Really excellent work! I like how you kept it short yet very accurate

One minor suggestion is provided - could you help to create a good first issue to solve that?
Ideally we demonstrate the benefit of method chaining, with reference to an existing example, copying some content from examples/tokens

@exploreriii
Copy link
Contributor

Also please rebase :D

@Adityarya11
Copy link
Contributor Author

Hi @Adityarya11 this is approved! Really excellent work! I like how you kept it short yet very accurate

One minor suggestion is provided - could you help to create a good first issue to solve that? Ideally we demonstrate the benefit of method chaining, with reference to an existing example, copying some content from examples/tokens

Sorry but what exactly to create the issue
Will they need to change this part setter and method chaining like you did here? Right? In the docs?

@exploreriii
Copy link
Contributor

yes

@exploreriii exploreriii merged commit 838a112 into hiero-ledger:main Dec 22, 2025
18 checks passed
@Adityarya11
Copy link
Contributor Author

yes

Will create one soon.
Thanks

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.

Create docs/sdk_developers/training/coding_token_transactions.md

2 participants