Skip to content

Conversation

@mkysel
Copy link
Collaborator

@mkysel mkysel commented Oct 1, 2025

Infer parameter types in xmtpd-cli params commands to default to typed getters/setters and make the --raw flag optional

This change modifies CLI admin setup helpers to return both parameter and chain admins, adds parameter type inference utilities, and updates params commands to read and write typed values by default with an optional --raw mode for 0x-prefixed 32-byte hex. Key updates are distributed across admin setup, params handlers, and shared parsing utilities.

  • Add dual-return admins in commands.setupAppChainAdmin and commands.setupSettlementChainAdmin with explicit error handling in admin_setup.go
  • Update params handlers to use inferred types for get/set operations with a --raw fallback in params_settlement.go and params_appchain.go
  • Introduce parsing and type utilities (ParamType, paramType, key map, address/uint parsers) in utils.go
  • Adjust appchain and settlement command handlers to consume the new admin setup signatures in appchain.go and settlement.go
  • Align bridge params handler with the new settlement admin setup and raw parameter access in params_bridge.go

📍Where to Start

Start with the admin setup changes in commands.setupSettlementChainAdmin and commands.setupAppChainAdmin in admin_setup.go, then review typed get/set flows in params_settlement.go and params_appchain.go.


Macroscope summarized 6b6eaf0.

@mkysel mkysel requested a review from a team as a code owner October 1, 2025 14:44
@graphite-app
Copy link

graphite-app bot commented Oct 1, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • Queue - adds this PR to the back of the merge queue
  • Hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

@mkysel mkysel merged commit fa82896 into main Oct 2, 2025
11 checks passed
@mkysel mkysel deleted the mkysel/cli-types branch October 2, 2025 15:36
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.

3 participants