feat: implemented wipeToken TCK endpt.#2414
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds TCK support for the wipeToken JSON-RPC endpoint, aligning the Python SDK’s TCK module with the TokenWipeTransaction specification.
Changes:
- Added
WipeTokenParamsrequest model and JSON param parsing for the new endpoint. - Added
WipeTokenResponseresponse model. - Implemented the
wipeTokenRPC handler and transaction builder usingTokenWipeTransaction.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| tck/response/token.py | Adds a status-only response dataclass for wipeToken. |
| tck/param/token.py | Adds request params dataclass + JSON parsing for wipeToken. |
| tck/handlers/token.py | Adds wipeToken RPC method and constructs/executes TokenWipeTransaction. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Warning Review limit reached
Next review available in: 36 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
WalkthroughAdds the ChangeswipeToken endpoint
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant JSONRPCClient
participant wipe_token
participant TokenWipeTransaction
participant TransactionReceipt
JSONRPCClient->>wipe_token: WipeTokenParams
wipe_token->>TokenWipeTransaction: build transaction
wipe_token->>TokenWipeTransaction: execute
wipe_token->>TransactionReceipt: get_receipt(validate_status=True)
TransactionReceipt-->>wipe_token: receipt.status
wipe_token-->>JSONRPCClient: WipeTokenResponse
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
📋 Issue PlannerBuilt with CodeRabbit's Coding Plans for faster development and fewer bugs. View plan used: ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 3201578c-9494-407f-b06a-7558c2cbc0b2
📒 Files selected for processing (3)
tck/handlers/token.pytck/param/token.pytck/response/token.py
|
Hi @Adityarya11, Please update the branch and resolve the conflicts |
|
Hi, this is WorkflowBot.
|
48c58d9 to
ca54f12
Compare
562ff11 to
93edf95
Compare
Codecov Report❌ Patch coverage is ❌ Your patch check has failed because the patch coverage (75.00%) is below the target coverage (92.00%). You can increase the patch coverage or adjust the target coverage. @@ Coverage Diff @@
## main #2414 +/- ##
==========================================
- Coverage 94.99% 94.98% -0.01%
==========================================
Files 164 164
Lines 10449 10452 +3
==========================================
+ Hits 9926 9928 +2
- Misses 523 524 +1 🚀 New features to boost your workflow:
|
|
Hello, this is the OfficeHourBot. This is a reminder that the Hiero Python SDK Office Hours will begin in approximately 3 hours and 28 minutes (14:00 UTC). This session provides an opportunity to ask questions regarding this Pull Request. Details:
Disclaimer: This is an automated reminder. Please verify the schedule here for any changes. From, |
28bbd62 to
4b31404
Compare
ac27520 to
9df96d2
Compare
|
is this ready to review again |
Yeah sure |
manishdait
left a comment
There was a problem hiding this comment.
just small change rest looks good to me.
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
tck/handlers/token.py (1)
795-796: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winUse
int()instead ofto_int()to properly surface validation errors.The
to_inthelper suppressesValueErrorand returnsNonefor invalid numeric strings. If a user provides an invalidamountstring,to_intsilently returnsNone, resulting inset_amount(None)being called instead of failing the request with a clear validation error. This also violates theset_amountmethod signature, which expects anint.Use
int()directly so that invalid strings properly raise an exception.🐛 Proposed fix
if params.amount is not None: - transaction.set_amount(to_int(params.amount)) + transaction.set_amount(int(params.amount))
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 1371e1d4-2604-4704-83b0-021c231a171a
📒 Files selected for processing (3)
tck/handlers/token.pytck/param/token.pytck/response/token.py
Signed-off-by: Adityarya11 <arya050411@gmail.com>
Signed-off-by: Adityarya11 <arya050411@gmail.com>
Signed-off-by: Adityarya11 <arya050411@gmail.com>
Signed-off-by: Adityarya11 <arya050411@gmail.com>
Signed-off-by: Adityarya11 <arya050411@gmail.com>
Signed-off-by: Adityarya11 <arya050411@gmail.com>
Signed-off-by: Aditya Arya <arya050411@gmail.com>
Signed-off-by: Aditya Arya <arya050411@gmail.com>
Signed-off-by: Aditya Arya <arya050411@gmail.com>
96165da to
edd4b5c
Compare
|
👋 Hi @Adityarya11! Great work completing a Advanced issue! 🎉 Thanks for your contribution! 🚀 Here are some issues you might want to explore next:
🌟 Stay connected: Happy coding! 🚀 |
Description:
This PR introduce the
wipeTokenmethod to tck module.Changes Made:
Related issue(s):
Fixes #2398
Notes for reviewer:
Checklist