feat: Add UpdateToken #2474
Conversation
Signed-off-by: aceppaluni <aceppaluni@gmail.com>
WalkthroughAdds the ChangesToken Update RPC
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Client
participant update_token
participant TokenUpdateTransaction
participant HederaNetwork
Client->>update_token: UpdateTokenParams
update_token->>TokenUpdateTransaction: Build update fields
update_token->>TokenUpdateTransaction: Execute transaction
TokenUpdateTransaction->>HederaNetwork: Submit token update
HederaNetwork-->>update_token: Receipt status
update_token-->>Client: UpdateTokenResponse
🚥 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: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 71fedbdb-d60d-489d-b015-8e667cf0ac3e
📒 Files selected for processing (3)
tck/handlers/token.pytck/param/token.pytck/response/token.py
Signed-off-by: aceppaluni <aceppaluni@gmail.com>
manishdait
left a comment
There was a problem hiding this comment.
@aceppaluni, small change request, rest looks good
Signed-off-by: aceppaluni <aceppaluni@gmail.com>
|
Hi, this is WorkflowBot.
|
Signed-off-by: aceppaluni <aceppaluni@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #2474 +/- ##
==========================================
- Coverage 95.27% 95.27% -0.01%
==========================================
Files 164 164
Lines 10485 10483 -2
==========================================
- Hits 9990 9988 -2
Misses 495 495 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 783b78c3-a3b8-4917-8b0e-df896113678f
📒 Files selected for processing (3)
src/hiero_sdk_python/tokens/token_update_transaction.pytck/handlers/key.pytests/unit/token_update_transaction_test.py
|
update plz @aceppaluni |
|
👋 Hi @aceppaluni! 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:
Implements the
updateTokenJSON-RPC endpoint in the TCK module by adding the required parameter, response, and handler layers following the existing token transaction conventions.The new endpoint integrates through the existing
@rpc_methodregistration flow and does not require any server, protocol, or handler registration changes.Changes
Parameter layer
Added
UpdateTokenParamsintck/param/token.py.Added support for all
TokenUpdateTransactionfields exposed by the TCK surface:tokenIdname,symbol,memo,metadata)treasuryAccountId,autoRenewAccountId)adminKey,kycKey,freezeKey,wipeKey,supplyKey,feeScheduleKey,pauseKey,metadataKey)expirationTime,autoRenewPeriod)Kept key, expiration, and auto-renew values as raw strings in params, matching existing
createTokenconventions and deferring conversion to the handler layer.Intentionally omitted
keyVerificationModeto align with the resolved TCK parameter surface.Response layer
UpdateTokenResponseas aStatusOnlyResponse.DeleteTokenResponse,FreezeTokenResponse, andPauseTokenResponse.Handler layer
Added
TokenUpdateTransactionsupport.Added
_build_update_token_transaction()to construct update transactions with:Added the
updateTokenRPC handler:ResponseCodeRelated issue(s):
Fixes #2397
Notes for reviewer:
Checklist