feat: Add UpdateToken #2474
Conversation
Signed-off-by: aceppaluni <aceppaluni@gmail.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
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>
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