Skip to content

feat(tck): implement dissociateToken JSON-RPC method#2450

Merged
MonaaEid merged 1 commit into
hiero-ledger:mainfrom
iron-prog:feat/tck-dissociate-token
Jul 18, 2026
Merged

feat(tck): implement dissociateToken JSON-RPC method#2450
MonaaEid merged 1 commit into
hiero-ledger:mainfrom
iron-prog:feat/tck-dissociate-token

Conversation

@iron-prog

Copy link
Copy Markdown
Contributor

Description

Add support for the dissociateToken TCK JSON-RPC method by mirroring the
existing associateToken implementation.

  • Add DissociateTokenParams
  • Add DissociateTokenResponse
  • Add the dissociateToken JSON-RPC handler using TokenDissociateTransaction

Related issue(s)

Fixes #2418

Notes for reviewer

  • Implementation mirrors the existing associateToken handler.
  • Reuses the existing commonTransactionParams flow.
  • Returns a status-only response, consistent with the TCK specification.

Checklist

  • Documented
  • Tested

Add DissociateTokenParams, DissociateTokenResponse, and the
dissociateToken RPC method handler, mirroring the existing
associateToken pattern.

Fixes hiero-ledger#2418

Signed-off-by: iron-prog <dt915725@gmail.com>
@iron-prog
iron-prog requested a review from a team as a code owner July 18, 2026 07:16
@iron-prog
iron-prog requested a review from MonaaEid July 18, 2026 07:16
@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 967d04f7-1ecf-4f99-9a02-05179ec4efab

📥 Commits

Reviewing files that changed from the base of the PR and between e8513a2 and 2302bf2.

📒 Files selected for processing (3)
  • tck/handlers/token.py
  • tck/param/token.py
  • tck/response/token.py

Walkthrough

The TCK server adds the dissociateToken JSON-RPC method, including parameter validation, TokenDissociateTransaction construction, optional common transaction parameters, receipt status validation, and a status-only response.

Changes

Dissociate token RPC

Layer / File(s) Summary
Dissociation request and response contracts
tck/param/token.py, tck/response/token.py
Adds DissociateTokenParams with accountId, tokenIds, sessionId, and common transaction parameters, plus DissociateTokenResponse extending StatusOnlyResponse.
Transaction construction and RPC execution
tck/handlers/token.py
Registers dissociateToken, builds and executes TokenDissociateTransaction, and returns the validated receipt status.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Client
  participant dissociate_token
  participant TokenDissociateTransaction
  participant HederaNetwork
  Client->>dissociate_token: dissociateToken(params)
  dissociate_token->>TokenDissociateTransaction: build with accountId and tokenIds
  dissociate_token->>TokenDissociateTransaction: apply commonTransactionParams
  TokenDissociateTransaction->>HederaNetwork: execute without waiting for receipt
  HederaNetwork-->>dissociate_token: transaction receipt status
  dissociate_token-->>Client: DissociateTokenResponse(status)
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding the dissociateToken JSON-RPC method.
Description check ✅ Passed The description clearly matches the implemented dissociateToken support and related files.
Linked Issues check ✅ Passed The changes satisfy #2418 by adding the handler, params, and status-only response for dissociateToken.
Out of Scope Changes check ✅ Passed No unrelated or out-of-scope changes are evident beyond the requested dissociateToken implementation.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
📋 Issue Planner

Built with CodeRabbit's Coding Plans for faster development and fewer bugs.

View plan used: #2418

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@github-actions github-actions Bot added open to community review PR is open for community review and feedback queue:junior-committer PR awaiting initial quality review labels Jul 18, 2026
@github-actions github-actions Bot added approved Issue has been approved by team member skill: beginner Achievable by a fairly new comer that has already completed a couple of good first issues queue:committers PR awaiting committer technical review and removed queue:junior-committer PR awaiting initial quality review labels Jul 18, 2026
@MonaaEid MonaaEid added this to the v0.2.9 milestone Jul 18, 2026
@github-actions github-actions Bot added status: ready-to-merge PR has 1+ maintainer and 2+ total approvals, ready to merge and removed queue:committers PR awaiting committer technical review labels Jul 18, 2026
@MonaaEid
MonaaEid merged commit 8b49e3f into hiero-ledger:main Jul 18, 2026
14 checks passed
@github-actions

Copy link
Copy Markdown

👋 Hi @iron-prog! Great work completing a Beginner issue! 🎉

Thanks for your contribution! 🚀

Here are some issues you might want to explore next:

🌟 Stay connected:

Happy coding! 🚀
— Hiero Python SDK Team

@iron-prog
iron-prog deleted the feat/tck-dissociate-token branch July 18, 2026 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Issue has been approved by team member open to community review PR is open for community review and feedback skill: beginner Achievable by a fairly new comer that has already completed a couple of good first issues status: ready-to-merge PR has 1+ maintainer and 2+ total approvals, ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(tck): implement dissociateToken JSON-RPC method

3 participants